diff --git a/versions/v5.0.1/_base_controller_interface_8cpp_source.html b/versions/v5.0.1/_base_controller_interface_8cpp_source.html new file mode 100644 index 00000000..e72ae7b1 --- /dev/null +++ b/versions/v5.0.1/_base_controller_interface_8cpp_source.html @@ -0,0 +1,714 @@ + + + + + + + +Modulo: /github/workspace/source/modulo_controllers/src/BaseControllerInterface.cpp Source File + + + + + + + + + +
+
+ + + + + + +
+
Modulo 5.0.0 +
+
+
+ + + + + + + + + +
+
+ + +
+
+
+
+
+
Loading...
+
Searching...
+
No Matches
+
+
+
+
+ + +
+
+
BaseControllerInterface.cpp
+
+
+
1#include "modulo_controllers/BaseControllerInterface.hpp"
+
2
+
3#include <chrono>
+
4
+
5#include <lifecycle_msgs/msg/state.hpp>
+
6
+
7#include <modulo_core/translators/message_readers.hpp>
+
8
+
9template<class... Ts>
+
10struct overloaded : Ts... {
+
11 using Ts::operator()...;
+
12};
+
13template<class... Ts>
+
14overloaded(Ts...) -> overloaded<Ts...>;
+
15
+
16using namespace modulo_core;
+
17using namespace state_representation;
+
18using namespace std::chrono_literals;
+
19
+
20namespace modulo_controllers {
+
21
+
+ +
23 : controller_interface::ControllerInterface(), input_validity_period_(std::numeric_limits<double>::quiet_NaN()) {}
+
+
24
+
+
25rclcpp_lifecycle::node_interfaces::LifecycleNodeInterface::CallbackReturn BaseControllerInterface::on_init() {
+
26 // registering set_parameter callbacks is only possible on_init since the lifecycle node is not yet initialized
+
27 // on construction. This means we might not be able to validate parameter overrides - if they are provided.
+
28 pre_set_parameter_cb_handle_ = get_node()->add_pre_set_parameters_callback(
+
29 [this](std::vector<rclcpp::Parameter>& parameters) { return this->pre_set_parameters_callback(parameters); });
+
30 on_set_parameter_cb_handle_ = get_node()->add_on_set_parameters_callback(
+
31 [this](const std::vector<rclcpp::Parameter>& parameters) -> rcl_interfaces::msg::SetParametersResult {
+
32 return this->on_set_parameters_callback(parameters);
+
33 });
+
34
+
35 return CallbackReturn::SUCCESS;
+
36}
+
+
37
+
38rclcpp_lifecycle::node_interfaces::LifecycleNodeInterface::CallbackReturn
+
+
39BaseControllerInterface::on_configure(const rclcpp_lifecycle::State&) {
+
40 add_inputs();
+
41 add_outputs();
+
42
+
43 if (predicates_.size()) {
+
44 predicate_publisher_ =
+
45 get_node()->create_publisher<modulo_interfaces::msg::PredicateCollection>("/predicates", qos_);
+
46 predicate_message_.node = get_node()->get_fully_qualified_name();
+
47 predicate_message_.type = modulo_interfaces::msg::PredicateCollection::CONTROLLER;
+
48
+
49 predicate_timer_ = get_node()->create_wall_timer(
+
50 std::chrono::nanoseconds(static_cast<int64_t>(1e9 / get_parameter_value<int>("predicate_publishing_rate"))),
+
51 [this]() { this->publish_predicates(); });
+
52 }
+
53
+
54 RCLCPP_DEBUG(get_node()->get_logger(), "Configuration of BaseControllerInterface successful");
+
55 return CallbackReturn::SUCCESS;
+
56}
+
+
57
+ +
59 const std::shared_ptr<ParameterInterface>& parameter, const std::string& description, bool read_only) {
+
60 rclcpp::Parameter ros_param;
+
61 try {
+ + +
64 throw modulo_core::exceptions::ParameterException("Failed to add parameter: " + std::string(ex.what()));
+
65 }
+
66 if (!get_node()->has_parameter(parameter->get_name())) {
+
67 RCLCPP_DEBUG(get_node()->get_logger(), "Adding parameter '%s'.", parameter->get_name().c_str());
+
68 parameter_map_.set_parameter(parameter);
+
69 read_only_parameters_.insert_or_assign(parameter->get_name(), false);
+
70 try {
+
71 rcl_interfaces::msg::ParameterDescriptor descriptor;
+
72 descriptor.description = description;
+
73 descriptor.read_only = read_only;
+
74 // since the pre_set_parameters_callback is not called on parameter declaration, this has to be true
+
75 set_parameters_result_.successful = true;
+
76 set_parameters_result_.reason = "";
+
77 if (parameter->is_empty()) {
+
78 descriptor.dynamic_typing = true;
+
79 descriptor.type = translators::get_ros_parameter_type(parameter->get_parameter_type());
+
80 get_node()->declare_parameter(parameter->get_name(), rclcpp::ParameterValue{}, descriptor);
+
81 } else {
+
82 get_node()->declare_parameter(parameter->get_name(), ros_param.get_parameter_value(), descriptor);
+
83 }
+
84 std::vector<rclcpp::Parameter> ros_parameters{get_node()->get_parameters({parameter->get_name()})};
+
85 pre_set_parameters_callback(ros_parameters);
+
86 auto result = on_set_parameters_callback(ros_parameters);
+
87 if (!result.successful) {
+
88 get_node()->undeclare_parameter(parameter->get_name());
+ +
90 }
+
91 read_only_parameters_.at(parameter->get_name()) = read_only;
+
92 } catch (const std::exception& ex) {
+
93 parameter_map_.remove_parameter(parameter->get_name());
+
94 read_only_parameters_.erase(parameter->get_name());
+
95 throw modulo_core::exceptions::ParameterException("Failed to add parameter: " + std::string(ex.what()));
+
96 }
+
97 } else {
+
98 RCLCPP_DEBUG(get_node()->get_logger(), "Parameter '%s' already exists.", parameter->get_name().c_str());
+
99 }
+
100}
+
101
+
+
102std::shared_ptr<ParameterInterface> BaseControllerInterface::get_parameter(const std::string& name) const {
+
103 try {
+
104 return parameter_map_.get_parameter(name);
+
105 } catch (const state_representation::exceptions::InvalidParameterException& ex) {
+
106 throw modulo_core::exceptions::ParameterException("Failed to get parameter '" + name + "': " + ex.what());
+
107 }
+
108}
+
+
109
+
110void BaseControllerInterface::pre_set_parameters_callback(std::vector<rclcpp::Parameter>& parameters) {
+
111 if (pre_set_parameter_callback_called_) {
+
112 pre_set_parameter_callback_called_ = false;
+
113 return;
+
114 }
+
115 rcl_interfaces::msg::SetParametersResult result;
+
116 result.successful = true;
+
117 for (auto& ros_parameter : parameters) {
+
118 try {
+
119 auto parameter = parameter_map_.get_parameter(ros_parameter.get_name());
+
120 if (read_only_parameters_.at(ros_parameter.get_name())) {
+
121 RCLCPP_DEBUG(get_node()->get_logger(), "Parameter '%s' is read only.", ros_parameter.get_name().c_str());
+
122 continue;
+
123 }
+
124
+
125 // convert the ROS parameter into a ParameterInterface without modifying the original
+ +
127 if (!this->validate_parameter(new_parameter)) {
+
128 result.successful = false;
+
129 result.reason += "Validation of parameter '" + ros_parameter.get_name() + "' returned false!";
+
130 } else if (!new_parameter->is_empty()) {
+
131 // update the value of the parameter in the map
+ + +
134 }
+
135 } catch (const std::exception& ex) {
+
136 result.successful = false;
+
137 result.reason += ex.what();
+
138 }
+
139 }
+
140 set_parameters_result_ = result;
+
141}
+
142
+
143rcl_interfaces::msg::SetParametersResult
+
144BaseControllerInterface::on_set_parameters_callback(const std::vector<rclcpp::Parameter>&) {
+
145 auto result = set_parameters_result_;
+
146 set_parameters_result_.successful = true;
+
147 set_parameters_result_.reason = "";
+
148 return result;
+
149}
+
150
+
151bool BaseControllerInterface::validate_parameter(const std::shared_ptr<ParameterInterface>& parameter) {
+
152 if (parameter->get_name() == "activation_timeout" || parameter->get_name() == "input_validity_period") {
+
153 auto value = parameter->get_parameter_value<double>();
+
154 if (value < 0.0 || value > std::numeric_limits<double>::max()) {
+ +
156 get_node()->get_logger(), "Parameter value of parameter '%s' should be a positive finite number",
+
157 parameter->get_name().c_str());
+
158 return false;
+
159 }
+
160 }
+ +
162}
+
163
+
+
164bool BaseControllerInterface::on_validate_parameter_callback(const std::shared_ptr<ParameterInterface>&) {
+
165 return true;
+
166}
+
+
167
+
+
168void BaseControllerInterface::add_predicate(const std::string& predicate_name, bool predicate_value) {
+ +
170}
+
+
171
+
+ +
173 const std::string& predicate_name, const std::function<bool(void)>& predicate_function) {
+
174 if (predicate_name.empty()) {
+
175 RCLCPP_ERROR(get_node()->get_logger(), "Failed to add predicate: Provide a non empty string as a name.");
+
176 return;
+
177 }
+
178 if (predicates_.find(predicate_name) != predicates_.end()) {
+ +
180 get_node()->get_logger(), "Predicate with name '%s' already exists, overwriting.", predicate_name.c_str());
+
181 } else {
+
182 RCLCPP_DEBUG(get_node()->get_logger(), "Adding predicate '%s'.", predicate_name.c_str());
+
183 }
+
184 try {
+
185 this->predicates_.insert_or_assign(predicate_name, Predicate(predicate_function));
+
186 } catch (const std::exception& ex) {
+ +
188 get_node()->get_logger(), "Failed to evaluate callback of predicate '%s', returning false: %s",
+
189 predicate_name.c_str(), ex.what());
+
190 }
+
191}
+
+
192
+
+
193bool BaseControllerInterface::get_predicate(const std::string& predicate_name) const {
+
194 auto predicate_it = predicates_.find(predicate_name);
+
195 if (predicate_it == predicates_.end()) {
+ +
197 get_node()->get_logger(), *get_node()->get_clock(), 1000,
+
198 "Failed to get predicate '%s': Predicate does not exists, returning false.", predicate_name.c_str());
+
199 return false;
+
200 }
+
201 try {
+
202 return predicate_it->second.get_value();
+
203 } catch (const std::exception& ex) {
+ +
205 get_node()->get_logger(), *get_node()->get_clock(), 1000,
+
206 "Failed to evaluate callback of predicate '%s', returning false: %s", predicate_name.c_str(), ex.what());
+
207 }
+
208 return false;
+
209}
+
+
210
+
+
211void BaseControllerInterface::set_predicate(const std::string& predicate_name, bool predicate_value) {
+ +
213}
+
+
214
+
+ +
216 const std::string& predicate_name, const std::function<bool(void)>& predicate_function) {
+
217 auto predicate_it = predicates_.find(predicate_name);
+
218 if (predicate_it == predicates_.end()) {
+ +
220 get_node()->get_logger(), *get_node()->get_clock(), 1000,
+
221 "Failed to set predicate '%s': Predicate does not exist.", predicate_name.c_str());
+
222 return;
+
223 }
+
224 predicate_it->second.set_predicate(predicate_function);
+
225 if (auto new_predicate = predicate_it->second.query(); new_predicate) {
+
226 publish_predicate(predicate_name, *new_predicate);
+
227 }
+
228}
+
+
229
+
+
230void BaseControllerInterface::add_trigger(const std::string& trigger_name) {
+
231 if (trigger_name.empty()) {
+
232 RCLCPP_ERROR(get_node()->get_logger(), "Failed to add trigger: Provide a non empty string as a name.");
+
233 return;
+
234 }
+
235 if (std::find(triggers_.cbegin(), triggers_.cend(), trigger_name) != triggers_.cend()) {
+ +
237 get_node()->get_logger(), "Failed to add trigger: there is already a trigger with name '%s'.",
+
238 trigger_name.c_str());
+
239 return;
+
240 }
+
241 if (predicates_.find(trigger_name) != predicates_.end()) {
+ +
243 get_node()->get_logger(), "Failed to add trigger: there is already a predicate with name '%s'.",
+
244 trigger_name.c_str());
+
245 return;
+
246 }
+
247 triggers_.push_back(trigger_name);
+ +
249}
+
+
250
+
+
251void BaseControllerInterface::trigger(const std::string& trigger_name) {
+
252 if (std::find(triggers_.cbegin(), triggers_.cend(), trigger_name) != triggers_.cend()) {
+ +
254 get_node()->get_logger(), "Failed to trigger: could not find trigger with name '%s'.", trigger_name.c_str());
+
255 return;
+
256 }
+ +
258 // reset the trigger to be published on the next step
+
259 predicates_.at(trigger_name).set_predicate([]() { return false; });
+
260}
+
+
261
+
262modulo_interfaces::msg::Predicate
+
263BaseControllerInterface::get_predicate_message(const std::string& name, bool value) const {
+
264 modulo_interfaces::msg::Predicate message;
+
265 message.predicate = name;
+
266 message.value = value;
+
267 return message;
+
268}
+
269
+
270void BaseControllerInterface::publish_predicate(const std::string& predicate_name, bool value) const {
+
271 auto message(predicate_message_);
+
272 message.predicates.push_back(get_predicate_message(predicate_name, value));
+
273 predicate_publisher_->publish(message);
+
274}
+
275
+
276void BaseControllerInterface::publish_predicates() {
+
277 auto message(predicate_message_);
+
278 for (auto predicate_it = predicates_.begin(); predicate_it != predicates_.end(); ++predicate_it) {
+
279 if (auto new_predicate = predicate_it->second.query(); new_predicate) {
+
280 message.predicates.push_back(get_predicate_message(predicate_it->first, *new_predicate));
+
281 }
+
282 }
+
283 if (message.predicates.size()) {
+
284 predicate_publisher_->publish(message);
+
285 }
+
286}
+
287
+
288std::string BaseControllerInterface::validate_and_declare_signal(
+
289 const std::string& signal_name, const std::string& type, const std::string& default_topic, bool fixed_topic) {
+
290 auto parsed_signal_name = modulo_utils::parsing::parse_topic_name(signal_name);
+
291 if (parsed_signal_name.empty()) {
+ +
293 get_node()->get_logger(),
+
294 "The parsed signal name for %s '%s' is empty. Provide a string with valid characters for the signal name "
+
295 "([a-zA-Z0-9_]).",
+
296 type.c_str(), signal_name.c_str());
+
297 return "";
+
298 }
+ + +
301 get_node()->get_logger(),
+
302 "The parsed signal name for %s '%s' is '%s'. Use the parsed signal name to refer to this %s and its topic "
+
303 "parameter.",
+
304 type.c_str(), signal_name.c_str(), parsed_signal_name.c_str(), type.c_str());
+
305 }
+
306 if (inputs_.find(parsed_signal_name) != inputs_.end()) {
+
307 RCLCPP_WARN(get_node()->get_logger(), "Signal '%s' already exists as input.", parsed_signal_name.c_str());
+
308 return "";
+
309 }
+
310 if (outputs_.find(parsed_signal_name) != outputs_.end()) {
+
311 RCLCPP_WARN(get_node()->get_logger(), "Signal '%s' already exists as output", parsed_signal_name.c_str());
+
312 return "";
+
313 }
+
314 auto topic = default_topic.empty() ? "~/" + parsed_signal_name : default_topic;
+
315 auto parameter_name = parsed_signal_name + "_topic";
+ + +
318 } else {
+ +
320 parameter_name, topic, "Signal topic name of " + type + " '" + parsed_signal_name + "'", fixed_topic);
+
321 }
+ +
323 get_node()->get_logger(), "Declared %s '%s' and parameter '%s' with value '%s'.", type.c_str(),
+
324 parsed_signal_name.c_str(), parameter_name.c_str(), topic.c_str());
+
325 return parsed_signal_name;
+
326}
+
327
+
328void BaseControllerInterface::create_input(
+
329 const ControllerInput& input, const std::string& name, const std::string& topic_name) {
+
330 auto parsed_name = validate_and_declare_signal(name, "input", topic_name);
+
331 if (!parsed_name.empty()) {
+
332 inputs_.insert_or_assign(parsed_name, input);
+
333 }
+
334}
+
335
+
336void BaseControllerInterface::add_inputs() {
+
337 for (auto& [name, input] : inputs_) {
+
338 try {
+ +
340 std::visit(
+
341 overloaded{
+
342 [&](const realtime_tools::RealtimeBuffer<std::shared_ptr<EncodedState>>&) {
+
343 subscriptions_.push_back(create_subscription<EncodedState>(name, topic));
+
344 },
+
345 [&](const realtime_tools::RealtimeBuffer<std::shared_ptr<std_msgs::msg::Bool>>&) {
+
346 subscriptions_.push_back(create_subscription<std_msgs::msg::Bool>(name, topic));
+
347 },
+
348 [&](const realtime_tools::RealtimeBuffer<std::shared_ptr<std_msgs::msg::Float64>>&) {
+
349 subscriptions_.push_back(create_subscription<std_msgs::msg::Float64>(name, topic));
+
350 },
+
351 [&](const realtime_tools::RealtimeBuffer<std::shared_ptr<std_msgs::msg::Float64MultiArray>>&) {
+ +
353 },
+
354 [&](const realtime_tools::RealtimeBuffer<std::shared_ptr<std_msgs::msg::Int32>>&) {
+
355 subscriptions_.push_back(create_subscription<std_msgs::msg::Int32>(name, topic));
+
356 },
+
357 [&](const realtime_tools::RealtimeBuffer<std::shared_ptr<std_msgs::msg::String>>&) {
+
358 subscriptions_.push_back(create_subscription<std_msgs::msg::String>(name, topic));
+
359 },
+
360 [&](const std::any&) {
+
361 custom_input_configuration_callables_.at(name)(name, topic);
+
362 }},
+
363 input.buffer);
+
364 } catch (const std::exception& ex) {
+
365 RCLCPP_ERROR(get_node()->get_logger(), "Failed to add input '%s': %s", name.c_str(), ex.what());
+
366 }
+
367 }
+
368}
+
369
+
370void BaseControllerInterface::create_output(
+
371 const PublisherVariant& publishers, const std::string& name, const std::string& topic_name) {
+
372 auto parsed_name = validate_and_declare_signal(name, "output", topic_name);
+
373 if (!parsed_name.empty()) {
+
374 outputs_.insert_or_assign(parsed_name, publishers);
+
375 }
+
376}
+
377
+
378void BaseControllerInterface::add_outputs() {
+
379 for (auto& [name, publishers] : outputs_) {
+
380 try {
+ +
382 std::visit(
+
383 overloaded{
+
384 [&](EncodedStatePublishers& pub) {
+
385 std::get<1>(pub) = get_node()->create_publisher<EncodedState>(topic, qos_);
+
386 std::get<2>(pub) = std::make_shared<realtime_tools::RealtimePublisher<EncodedState>>(std::get<1>(pub));
+
387 },
+
388 [&](BoolPublishers& pub) {
+
389 pub.first = get_node()->create_publisher<std_msgs::msg::Bool>(topic, qos_);
+
390 pub.second = std::make_shared<realtime_tools::RealtimePublisher<std_msgs::msg::Bool>>(pub.first);
+
391 },
+
392 [&](DoublePublishers& pub) {
+
393 pub.first = get_node()->create_publisher<std_msgs::msg::Float64>(topic, qos_);
+
394 pub.second = std::make_shared<realtime_tools::RealtimePublisher<std_msgs::msg::Float64>>(pub.first);
+
395 },
+
396 [&](DoubleVecPublishers& pub) {
+
397 pub.first = get_node()->create_publisher<std_msgs::msg::Float64MultiArray>(topic, qos_);
+
398 pub.second =
+
399 std::make_shared<realtime_tools::RealtimePublisher<std_msgs::msg::Float64MultiArray>>(pub.first);
+
400 },
+
401 [&](IntPublishers& pub) {
+
402 pub.first = get_node()->create_publisher<std_msgs::msg::Int32>(topic, qos_);
+
403 pub.second = std::make_shared<realtime_tools::RealtimePublisher<std_msgs::msg::Int32>>(pub.first);
+
404 },
+
405 [&](StringPublishers& pub) {
+
406 pub.first = get_node()->create_publisher<std_msgs::msg::String>(topic, qos_);
+
407 pub.second = std::make_shared<realtime_tools::RealtimePublisher<std_msgs::msg::String>>(pub.first);
+
408 },
+
409 [&](CustomPublishers& pub) {
+
410 custom_output_configuration_callables_.at(name)(pub, name);
+
411 }},
+
412 publishers);
+
413 } catch (const std::bad_any_cast& ex) {
+
414 RCLCPP_ERROR(get_node()->get_logger(), "Failed to add custom output '%s': %s", name.c_str(), ex.what());
+
415 } catch (const std::exception& ex) {
+
416 RCLCPP_ERROR(get_node()->get_logger(), "Failed to add output '%s': %s", name.c_str(), ex.what());
+
417 }
+
418 }
+
419}
+
420
+
+
421void BaseControllerInterface::set_input_validity_period(double input_validity_period) {
+
422 input_validity_period_ = input_validity_period;
+
423}
+
+
424
+
425bool BaseControllerInterface::check_input_valid(const std::string& name) const {
+
426 if (inputs_.find(name) == inputs_.end()) {
+ +
428 get_node()->get_logger(), *get_node()->get_clock(), 1000, "Could not find input '%s'", name.c_str());
+
429 return false;
+
430 }
+
431 if (static_cast<double>(std::chrono::duration_cast<std::chrono::nanoseconds>(
+
432 std::chrono::steady_clock::now() - inputs_.at(name).timestamp)
+
433 .count())
+
434 / 1e9
+
435 >= input_validity_period_) {
+
436 return false;
+
437 }
+
438 return true;
+
439}
+
440
+
441std::string
+
442BaseControllerInterface::validate_service_name(const std::string& service_name, const std::string& type) const {
+
443 std::string parsed_service_name = modulo_utils::parsing::parse_topic_name(service_name);
+
444 if (parsed_service_name.empty()) {
+ +
446 get_node()->get_logger(),
+
447 "The parsed service name for %s service '%s' is empty. Provide a string with valid characters for the service "
+
448 "name "
+
449 "([a-zA-Z0-9_]).",
+
450 type.c_str(), service_name.c_str());
+
451 return "";
+
452 }
+ + +
455 get_node()->get_logger(),
+
456 "The parsed name for '%s' service '%s' is '%s'. Use the parsed name to refer to this service.", type.c_str(),
+
457 service_name.c_str(), parsed_service_name.c_str());
+
458 }
+
459 if (empty_services_.find(parsed_service_name) != empty_services_.cend()) {
+ +
461 get_node()->get_logger(), "Service with name '%s' already exists as empty service.",
+
462 parsed_service_name.c_str());
+
463 return "";
+
464 }
+
465 if (string_services_.find(parsed_service_name) != string_services_.cend()) {
+ +
467 get_node()->get_logger(), "Service with name '%s' already exists as string service.",
+
468 parsed_service_name.c_str());
+
469 return "";
+
470 }
+
471 RCLCPP_DEBUG(get_node()->get_logger(), "Adding %s service '%s'.", type.c_str(), parsed_service_name.c_str());
+
472 return parsed_service_name;
+
473}
+
474
+
+ +
476 const std::string& service_name, const std::function<ControllerServiceResponse(void)>& callback) {
+
477 auto parsed_service_name = validate_service_name(service_name, "empty");
+
478 if (!parsed_service_name.empty()) {
+
479 try {
+
480 auto service = get_node()->create_service<modulo_interfaces::srv::EmptyTrigger>(
+
481 "~/" + parsed_service_name,
+
482 [this, callback](
+
483 const std::shared_ptr<modulo_interfaces::srv::EmptyTrigger::Request>,
+
484 std::shared_ptr<modulo_interfaces::srv::EmptyTrigger::Response> response) {
+
485 try {
+
486 if (this->command_mutex_.try_lock_for(100ms)) {
+ +
488 this->command_mutex_.unlock();
+
489 response->success = callback_response.success;
+
490 response->message = callback_response.message;
+
491 } else {
+
492 response->success = false;
+
493 response->message = "Unable to acquire lock for command interface within 100ms";
+
494 }
+
495 } catch (const std::exception& ex) {
+
496 response->success = false;
+
497 response->message = ex.what();
+
498 }
+
499 },
+
500 qos_);
+
501 empty_services_.insert_or_assign(parsed_service_name, service);
+
502 } catch (const std::exception& ex) {
+
503 RCLCPP_ERROR(get_node()->get_logger(), "Failed to add service '%s': %s", parsed_service_name.c_str(), ex.what());
+
504 }
+
505 }
+
506}
+
+
507
+
+ +
509 const std::string& service_name,
+
510 const std::function<ControllerServiceResponse(const std::string& string)>& callback) {
+
511 auto parsed_service_name = validate_service_name(service_name, "string");
+
512 if (!parsed_service_name.empty()) {
+
513 try {
+
514 auto service = get_node()->create_service<modulo_interfaces::srv::StringTrigger>(
+
515 "~/" + parsed_service_name,
+
516 [this, callback](
+
517 const std::shared_ptr<modulo_interfaces::srv::StringTrigger::Request> request,
+
518 std::shared_ptr<modulo_interfaces::srv::StringTrigger::Response> response) {
+
519 try {
+
520 if (this->command_mutex_.try_lock_for(100ms)) {
+
521 auto callback_response = callback(request->payload);
+
522 this->command_mutex_.unlock();
+
523 response->success = callback_response.success;
+
524 response->message = callback_response.message;
+
525 } else {
+
526 response->success = false;
+
527 response->message = "Unable to acquire lock for command interface within 100ms";
+
528 }
+
529 } catch (const std::exception& ex) {
+
530 response->success = false;
+
531 response->message = ex.what();
+
532 }
+
533 },
+
534 qos_);
+
535 string_services_.insert_or_assign(parsed_service_name, service);
+
536 } catch (const std::exception& ex) {
+
537 RCLCPP_ERROR(get_node()->get_logger(), "Failed to add service '%s': %s", parsed_service_name.c_str(), ex.what());
+
538 }
+
539 }
+
540}
+
+
541
+
+ +
543 return qos_;
+
544}
+
+
545
+
+
546void BaseControllerInterface::set_qos(const rclcpp::QoS& qos) {
+
547 qos_ = qos;
+
548}
+
+
549
+
+ +
551 return get_lifecycle_state().id() == lifecycle_msgs::msg::State::PRIMARY_STATE_ACTIVE;
+
552}
+
+
553
+
+ +
555 return command_mutex_;
+
556}
+
+
557
+
558}// namespace modulo_controllers
+
std::shared_ptr< state_representation::ParameterInterface > get_parameter(const std::string &name) const
Get a parameter by name.
+
CallbackReturn on_configure(const rclcpp_lifecycle::State &previous_state) override
Add signals.
+
rclcpp::QoS get_qos() const
Getter of the Quality of Service attribute.
+
bool is_active() const
Check if the controller is currently in state active or not.
+
T get_parameter_value(const std::string &name) const
Get a parameter value by name.
+
void set_input_validity_period(double input_validity_period)
Set the input validity period of input signals.
+
CallbackReturn on_init() override
Declare parameters and register the on_set_parameters callback.
+
void add_parameter(const std::shared_ptr< state_representation::ParameterInterface > &parameter, const std::string &description, bool read_only=false)
Add a parameter.
+
void trigger(const std::string &trigger_name)
Latch the trigger with the provided name.
+
void set_qos(const rclcpp::QoS &qos)
Set the Quality of Service for ROS publishers and subscribers.
+
void set_predicate(const std::string &predicate_name, bool predicate_value)
Set the value of the predicate given as parameter, if the predicate is not found does not do anything...
+
void add_predicate(const std::string &predicate_name, bool predicate_value)
Add a predicate to the map of predicates.
+
bool get_predicate(const std::string &predicate_name) const
Get the logical value of a predicate.
+
virtual bool on_validate_parameter_callback(const std::shared_ptr< state_representation::ParameterInterface > &parameter)
Parameter validation function to be redefined by derived controller classes.
+ +
void add_service(const std::string &service_name, const std::function< ControllerServiceResponse(void)> &callback)
Add a service to trigger a callback function with no input arguments.
+
std::timed_mutex & get_command_mutex()
Get the reference to the command mutex.
+
void add_trigger(const std::string &trigger_name)
Add a trigger to the controller.
+ + +
An exception class to notify errors with parameters in modulo classes.
+
An exception class to notify incompatibility when translating parameters from different sources.
+
rclcpp::Parameter write_parameter(const std::shared_ptr< state_representation::ParameterInterface > &parameter)
Write a ROS Parameter from a ParameterInterface pointer.
+
rclcpp::ParameterType get_ros_parameter_type(const state_representation::ParameterType &parameter_type)
Given a state representation parameter type, get the corresponding ROS parameter type.
+
void copy_parameter_value(const std::shared_ptr< const state_representation::ParameterInterface > &source_parameter, const std::shared_ptr< state_representation::ParameterInterface > &parameter)
Copy the value of one parameter interface into another.
+
std::shared_ptr< state_representation::ParameterInterface > read_parameter_const(const rclcpp::Parameter &ros_parameter, const std::shared_ptr< const state_representation::ParameterInterface > &parameter)
Update the parameter value of a ParameterInterface from a ROS Parameter object only if the two parame...
+
Modulo Core.
+
Response structure to be returned by controller services.
+
+ + + + diff --git a/versions/v5.0.1/_base_controller_interface_8hpp_source.html b/versions/v5.0.1/_base_controller_interface_8hpp_source.html new file mode 100644 index 00000000..3bbfd53a --- /dev/null +++ b/versions/v5.0.1/_base_controller_interface_8hpp_source.html @@ -0,0 +1,755 @@ + + + + + + + +Modulo: /github/workspace/source/modulo_controllers/include/modulo_controllers/BaseControllerInterface.hpp Source File + + + + + + + + + +
+
+ + + + + + +
+
Modulo 5.0.0 +
+
+
+ + + + + + + + + +
+
+ + +
+
+
+
+
+
Loading...
+
Searching...
+
No Matches
+
+
+
+
+ + +
+
+
BaseControllerInterface.hpp
+
+
+
1#pragma once
+
2
+
3#include <any>
+
4#include <mutex>
+
5
+
6#include <controller_interface/controller_interface.hpp>
+
7#include <controller_interface/helpers.hpp>
+
8#include <realtime_tools/realtime_buffer.h>
+
9#include <realtime_tools/realtime_publisher.h>
+
10
+
11#include <state_representation/parameters/ParameterMap.hpp>
+
12
+
13#include <modulo_core/EncodedState.hpp>
+
14#include <modulo_core/Predicate.hpp>
+
15#include <modulo_core/communication/MessagePair.hpp>
+
16#include <modulo_core/exceptions.hpp>
+
17#include <modulo_core/translators/message_writers.hpp>
+
18#include <modulo_core/translators/parameter_translators.hpp>
+
19
+
20#include <modulo_interfaces/msg/predicate_collection.hpp>
+
21#include <modulo_interfaces/srv/empty_trigger.hpp>
+
22#include <modulo_interfaces/srv/string_trigger.hpp>
+
23
+
24#include <modulo_utils/parsing.hpp>
+
25
+
26#include <modulo_core/concepts.hpp>
+
27
+
28namespace modulo_controllers {
+
29
+
30typedef std::variant<
+
31 std::shared_ptr<rclcpp::Subscription<modulo_core::EncodedState>>,
+
32 std::shared_ptr<rclcpp::Subscription<std_msgs::msg::Bool>>,
+
33 std::shared_ptr<rclcpp::Subscription<std_msgs::msg::Float64>>,
+
34 std::shared_ptr<rclcpp::Subscription<std_msgs::msg::Float64MultiArray>>,
+
35 std::shared_ptr<rclcpp::Subscription<std_msgs::msg::Int32>>,
+
36 std::shared_ptr<rclcpp::Subscription<std_msgs::msg::String>>, std::any>
+
37 SubscriptionVariant;
+
38
+
39typedef std::variant<
+
40 realtime_tools::RealtimeBuffer<std::shared_ptr<modulo_core::EncodedState>>,
+
41 realtime_tools::RealtimeBuffer<std::shared_ptr<std_msgs::msg::Bool>>,
+
42 realtime_tools::RealtimeBuffer<std::shared_ptr<std_msgs::msg::Float64>>,
+
43 realtime_tools::RealtimeBuffer<std::shared_ptr<std_msgs::msg::Float64MultiArray>>,
+
44 realtime_tools::RealtimeBuffer<std::shared_ptr<std_msgs::msg::Int32>>,
+
45 realtime_tools::RealtimeBuffer<std::shared_ptr<std_msgs::msg::String>>, std::any>
+
46 BufferVariant;
+
47
+
48typedef std::tuple<
+
49 std::shared_ptr<state_representation::State>, std::shared_ptr<rclcpp::Publisher<modulo_core::EncodedState>>,
+
50 realtime_tools::RealtimePublisherSharedPtr<modulo_core::EncodedState>>
+
51 EncodedStatePublishers;
+
52typedef std::pair<
+
53 std::shared_ptr<rclcpp::Publisher<std_msgs::msg::Bool>>,
+
54 realtime_tools::RealtimePublisherSharedPtr<std_msgs::msg::Bool>>
+
55 BoolPublishers;
+
56typedef std::pair<
+
57 std::shared_ptr<rclcpp::Publisher<std_msgs::msg::Float64>>,
+
58 realtime_tools::RealtimePublisherSharedPtr<std_msgs::msg::Float64>>
+
59 DoublePublishers;
+
60typedef std::pair<
+
61 std::shared_ptr<rclcpp::Publisher<std_msgs::msg::Float64MultiArray>>,
+
62 realtime_tools::RealtimePublisherSharedPtr<std_msgs::msg::Float64MultiArray>>
+
63 DoubleVecPublishers;
+
64typedef std::pair<
+
65 std::shared_ptr<rclcpp::Publisher<std_msgs::msg::Int32>>,
+
66 realtime_tools::RealtimePublisherSharedPtr<std_msgs::msg::Int32>>
+
67 IntPublishers;
+
68typedef std::pair<
+
69 std::shared_ptr<rclcpp::Publisher<std_msgs::msg::String>>,
+
70 realtime_tools::RealtimePublisherSharedPtr<std_msgs::msg::String>>
+
71 StringPublishers;
+
72typedef std::pair<std::any, std::any> CustomPublishers;
+
73
+
74typedef std::variant<
+
75 EncodedStatePublishers, BoolPublishers, DoublePublishers, DoubleVecPublishers, IntPublishers, StringPublishers,
+
76 CustomPublishers>
+
77 PublisherVariant;
+
78
+
+ +
84 ControllerInput() = default;
+
85 ControllerInput(BufferVariant buffer_variant) : buffer(std::move(buffer_variant)) {}
+
86 BufferVariant buffer;
+
87 std::chrono::time_point<std::chrono::steady_clock> timestamp;
+
88};
+
+
89
+
+ +
97 bool success;
+
98 std::string message;
+
99};
+
+
100
+
+
105class BaseControllerInterface : public controller_interface::ControllerInterface {
+
106public:
+ +
111
+
116 CallbackReturn on_init() override;
+
117
+
123 CallbackReturn on_configure(const rclcpp_lifecycle::State& previous_state) override;
+
124
+
125protected:
+ +
135 const std::shared_ptr<state_representation::ParameterInterface>& parameter, const std::string& description,
+
136 bool read_only = false);
+
137
+
148 template<typename T>
+
149 void add_parameter(const std::string& name, const T& value, const std::string& description, bool read_only = false);
+
150
+
161 virtual bool
+
162 on_validate_parameter_callback(const std::shared_ptr<state_representation::ParameterInterface>& parameter);
+
163
+
169 [[nodiscard]] std::shared_ptr<state_representation::ParameterInterface> get_parameter(const std::string& name) const;
+
170
+
177 template<typename T>
+
178 T get_parameter_value(const std::string& name) const;
+
179
+
188 template<typename T>
+
189 void set_parameter_value(const std::string& name, const T& value);
+
190
+
196 void add_predicate(const std::string& predicate_name, bool predicate_value);
+
197
+
203 void add_predicate(const std::string& predicate_name, const std::function<bool(void)>& predicate_function);
+
204
+
211 [[nodiscard]] bool get_predicate(const std::string& predicate_name) const;
+
212
+
220 void set_predicate(const std::string& predicate_name, bool predicate_value);
+
221
+
229 void set_predicate(const std::string& predicate_name, const std::function<bool(void)>& predicate_function);
+
230
+
237 void add_trigger(const std::string& trigger_name);
+
238
+
243 void trigger(const std::string& trigger_name);
+
244
+
253 template<typename T>
+
254 void add_input(const std::string& name, const std::string& topic_name = "");
+
255
+
264 template<typename T>
+
265 void add_output(const std::string& name, const std::string& topic_name = "");
+
266
+ +
272
+
280 template<typename T>
+
281 std::optional<T> read_input(const std::string& name);
+
282
+
291 template<typename T>
+
292 void write_output(const std::string& name, const T& data);
+
293
+
299 void add_service(const std::string& service_name, const std::function<ControllerServiceResponse(void)>& callback);
+
300
+
309 void add_service(
+
310 const std::string& service_name,
+
311 const std::function<ControllerServiceResponse(const std::string& string)>& callback);
+
312
+
317 [[nodiscard]] rclcpp::QoS get_qos() const;
+
318
+
323 void set_qos(const rclcpp::QoS& qos);
+
324
+
329 bool is_active() const;
+
330
+
335 std::timed_mutex& get_command_mutex();
+
336
+
337private:
+
345 bool validate_parameter(const std::shared_ptr<state_representation::ParameterInterface>& parameter);
+
346
+
351 void pre_set_parameters_callback(std::vector<rclcpp::Parameter>& parameters);
+
352
+
359 rcl_interfaces::msg::SetParametersResult on_set_parameters_callback(const std::vector<rclcpp::Parameter>& parameters);
+
360
+
366 modulo_interfaces::msg::Predicate get_predicate_message(const std::string& name, bool value) const;
+
367
+
373 void publish_predicate(const std::string& predicate_name, bool value) const;
+
374
+
378 void publish_predicates();
+
379
+
387 std::string validate_and_declare_signal(
+
388 const std::string& signal_name, const std::string& type, const std::string& default_topic,
+
389 bool fixed_topic = false);
+
390
+
399 void create_input(const ControllerInput& input, const std::string& name, const std::string& topic_name);
+
400
+
409 void create_output(const PublisherVariant& publishers, const std::string& name, const std::string& topic_name);
+
410
+
417 template<typename T>
+
418 std::shared_ptr<rclcpp::Subscription<T>> create_subscription(const std::string& name, const std::string& topic_name);
+
419
+
424 bool check_input_valid(const std::string& name) const;
+
425
+
429 template<typename PublisherT, typename MsgT, typename T>
+
430 void write_std_output(const std::string& name, const T& data);
+
431
+
435 void add_inputs();
+
436
+
440 void add_outputs();
+
441
+
448 std::string validate_service_name(const std::string& service_name, const std::string& type) const;
+
449
+
450 state_representation::ParameterMap parameter_map_;
+
451 std::unordered_map<std::string, bool> read_only_parameters_;
+
452 std::shared_ptr<rclcpp::node_interfaces::PreSetParametersCallbackHandle>
+
453 pre_set_parameter_cb_handle_;
+
454 std::shared_ptr<rclcpp::node_interfaces::OnSetParametersCallbackHandle>
+
455 on_set_parameter_cb_handle_;
+
456 rcl_interfaces::msg::SetParametersResult set_parameters_result_;
+
457 bool pre_set_parameter_callback_called_ = false;
+
458
+
459 std::vector<SubscriptionVariant> subscriptions_;
+
460 std::map<std::string, ControllerInput> inputs_;
+
461 std::map<std::string, std::shared_ptr<modulo_core::communication::MessagePairInterface>>
+
462 input_message_pairs_;
+
463 std::map<std::string, PublisherVariant> outputs_;
+
464 double input_validity_period_;
+
465 rclcpp::QoS qos_ = rclcpp::QoS(10);
+
466
+
467 std::map<std::string, std::shared_ptr<rclcpp::Service<modulo_interfaces::srv::EmptyTrigger>>>
+
468 empty_services_;
+
469 std::map<std::string, std::shared_ptr<rclcpp::Service<modulo_interfaces::srv::StringTrigger>>>
+
470 string_services_;
+
471
+
472 std::map<std::string, modulo_core::Predicate> predicates_;
+
473 std::shared_ptr<rclcpp::Publisher<modulo_interfaces::msg::PredicateCollection>>
+
474 predicate_publisher_;
+
475 std::vector<std::string> triggers_;
+
476 modulo_interfaces::msg::PredicateCollection predicate_message_;
+
477 std::shared_ptr<rclcpp::TimerBase> predicate_timer_;
+
478
+
479 std::timed_mutex command_mutex_;
+
480
+
481 std::map<std::string, std::function<void(CustomPublishers&, const std::string&)>>
+
482 custom_output_configuration_callables_;
+
483 std::map<std::string, std::function<void(const std::string&, const std::string&)>>
+
484 custom_input_configuration_callables_;
+
485};
+
+
486
+
487template<typename T>
+
+ +
489 const std::string& name, const T& value, const std::string& description, bool read_only) {
+
490 if (name.empty()) {
+
491 RCLCPP_ERROR(get_node()->get_logger(), "Failed to add parameter: Provide a non empty string as a name.");
+
492 return;
+
493 }
+
494 add_parameter(state_representation::make_shared_parameter(name, value), description, read_only);
+
495}
+
+
496
+
497template<typename T>
+
+
498inline T BaseControllerInterface::get_parameter_value(const std::string& name) const {
+
499 try {
+
500 return this->parameter_map_.template get_parameter_value<T>(name);
+
501 } catch (const state_representation::exceptions::InvalidParameterException& ex) {
+ +
503 "Failed to get parameter value of parameter '" + name + "': " + ex.what());
+
504 }
+
505}
+
+
506
+
507template<typename T>
+
+
508inline void BaseControllerInterface::set_parameter_value(const std::string& name, const T& value) {
+
509 try {
+
510 std::vector<rclcpp::Parameter> parameters{
+
511 modulo_core::translators::write_parameter(state_representation::make_shared_parameter(name, value))};
+
512 pre_set_parameters_callback(parameters);
+
513 pre_set_parameter_callback_called_ = true;
+
514 auto result = get_node()->set_parameters(parameters).at(0);
+
515 if (!result.successful) {
+ +
517 get_node()->get_logger(), *get_node()->get_clock(), 1000,
+
518 "Failed to set parameter value of parameter '%s': %s", name.c_str(), result.reason.c_str());
+
519 }
+
520 } catch (const std::exception& ex) {
+ +
522 get_node()->get_logger(), *get_node()->get_clock(), 1000, "Failed to set parameter value of parameter '%s': %s",
+
523 name.c_str(), ex.what());
+
524 }
+
525}
+
+
526
+
527template<typename T>
+
+
528inline void BaseControllerInterface::add_input(const std::string& name, const std::string& topic_name) {
+
529 if constexpr (modulo_core::concepts::CustomT<T>) {
+
530 auto buffer = std::make_shared<realtime_tools::RealtimeBuffer<std::shared_ptr<T>>>();
+
531 auto input = ControllerInput(buffer);
+
532 auto parsed_name = validate_and_declare_signal(name, "input", topic_name);
+
533 if (!parsed_name.empty()) {
+
534 inputs_.insert_or_assign(parsed_name, input);
+
535 custom_input_configuration_callables_.insert_or_assign(
+
536 name, [this](const std::string& name, const std::string& topic) {
+
537 auto subscription =
+
538 get_node()->create_subscription<T>(topic, qos_, [this, name](const std::shared_ptr<T> message) {
+
539 auto buffer_variant = std::get<std::any>(inputs_.at(name).buffer);
+
540 auto buffer = std::any_cast<std::shared_ptr<realtime_tools::RealtimeBuffer<std::shared_ptr<T>>>>(
+ +
542 buffer->writeFromNonRT(message);
+
543 inputs_.at(name).timestamp = std::chrono::steady_clock::now();
+
544 });
+
545 subscriptions_.push_back(subscription);
+
546 });
+
547 }
+
548 } else {
+
549 auto buffer = realtime_tools::RealtimeBuffer<std::shared_ptr<modulo_core::EncodedState>>();
+
550 auto input = ControllerInput(buffer);
+
551 auto parsed_name = validate_and_declare_signal(name, "input", topic_name);
+
552 if (!parsed_name.empty()) {
+
553 inputs_.insert_or_assign(parsed_name, input);
+
554 input_message_pairs_.insert_or_assign(
+ +
556 modulo_core::communication::make_shared_message_pair(std::make_shared<T>(), get_node()->get_clock()));
+
557 }
+
558 }
+
559}
+
+
560
+
561template<>
+
562inline void BaseControllerInterface::add_input<bool>(const std::string& name, const std::string& topic_name) {
+
563 auto buffer = realtime_tools::RealtimeBuffer<std::shared_ptr<std_msgs::msg::Bool>>();
+
564 auto input = ControllerInput(buffer);
+
565 create_input(input, name, topic_name);
+
566}
+
567
+
568template<>
+
569inline void BaseControllerInterface::add_input<double>(const std::string& name, const std::string& topic_name) {
+
570 auto buffer = realtime_tools::RealtimeBuffer<std::shared_ptr<std_msgs::msg::Float64>>();
+
571 auto input = ControllerInput(buffer);
+
572 create_input(input, name, topic_name);
+
573}
+
574
+
575template<>
+
576inline void
+
577BaseControllerInterface::add_input<std::vector<double>>(const std::string& name, const std::string& topic_name) {
+
578 auto buffer = realtime_tools::RealtimeBuffer<std::shared_ptr<std_msgs::msg::Float64MultiArray>>();
+
579 auto input = ControllerInput(buffer);
+
580 create_input(input, name, topic_name);
+
581}
+
582
+
583template<>
+
584inline void BaseControllerInterface::add_input<int>(const std::string& name, const std::string& topic_name) {
+
585 auto buffer = realtime_tools::RealtimeBuffer<std::shared_ptr<std_msgs::msg::Int32>>();
+
586 auto input = ControllerInput(buffer);
+
587 create_input(input, name, topic_name);
+
588}
+
589
+
590template<>
+
591inline void BaseControllerInterface::add_input<std::string>(const std::string& name, const std::string& topic_name) {
+
592 auto buffer = realtime_tools::RealtimeBuffer<std::shared_ptr<std_msgs::msg::String>>();
+
593 auto input = ControllerInput(buffer);
+
594 create_input(input, name, topic_name);
+
595}
+
596
+
597template<typename T>
+
598inline std::shared_ptr<rclcpp::Subscription<T>>
+
599BaseControllerInterface::create_subscription(const std::string& name, const std::string& topic_name) {
+
600 return get_node()->create_subscription<T>(topic_name, qos_, [this, name](const std::shared_ptr<T> message) {
+
601 std::get<realtime_tools::RealtimeBuffer<std::shared_ptr<T>>>(inputs_.at(name).buffer).writeFromNonRT(message);
+
602 inputs_.at(name).timestamp = std::chrono::steady_clock::now();
+
603 });
+
604}
+
605
+
606template<typename T>
+
+
607inline void BaseControllerInterface::add_output(const std::string& name, const std::string& topic_name) {
+
608 if constexpr (modulo_core::concepts::CustomT<T>) {
+
609 typedef std::pair<std::shared_ptr<rclcpp::Publisher<T>>, realtime_tools::RealtimePublisherSharedPtr<T>> PublisherT;
+
610 auto parsed_name = validate_and_declare_signal(name, "output", topic_name);
+
611 if (!parsed_name.empty()) {
+
612 outputs_.insert_or_assign(parsed_name, PublisherT());
+
613 custom_output_configuration_callables_.insert_or_assign(
+
614 name, [this](CustomPublishers& pub, const std::string& topic) {
+
615 auto publisher = get_node()->create_publisher<T>(topic, qos_);
+
616 pub.first = publisher;
+
617 pub.second = std::make_shared<realtime_tools::RealtimePublisher<T>>(publisher);
+
618 });
+
619 }
+
620 } else {
+
621 std::shared_ptr<state_representation::State> state_ptr = std::make_shared<T>();
+
622 create_output(EncodedStatePublishers(state_ptr, {}, {}), name, topic_name);
+
623 }
+
624}
+
+
625
+
626template<>
+
627inline void BaseControllerInterface::add_output<bool>(const std::string& name, const std::string& topic_name) {
+
628 create_output(BoolPublishers(), name, topic_name);
+
629}
+
630
+
631template<>
+
632inline void BaseControllerInterface::add_output<double>(const std::string& name, const std::string& topic_name) {
+
633 create_output(DoublePublishers(), name, topic_name);
+
634}
+
635
+
636template<>
+
637inline void
+
638BaseControllerInterface::add_output<std::vector<double>>(const std::string& name, const std::string& topic_name) {
+
639 create_output(DoubleVecPublishers(), name, topic_name);
+
640}
+
641
+
642template<>
+
643inline void BaseControllerInterface::add_output<int>(const std::string& name, const std::string& topic_name) {
+
644 create_output(IntPublishers(), name, topic_name);
+
645}
+
646
+
647template<>
+
648inline void BaseControllerInterface::add_output<std::string>(const std::string& name, const std::string& topic_name) {
+
649 create_output(StringPublishers(), name, topic_name);
+
650}
+
651
+
652template<typename T>
+
+
653inline std::optional<T> BaseControllerInterface::read_input(const std::string& name) {
+
654 if (!check_input_valid(name)) {
+
655 return {};
+
656 }
+
657
+
658 if constexpr (modulo_core::concepts::CustomT<T>) {
+
659 try {
+
660 auto buffer_variant = std::get<std::any>(inputs_.at(name).buffer);
+
661 auto buffer = std::any_cast<std::shared_ptr<realtime_tools::RealtimeBuffer<std::shared_ptr<T>>>>(buffer_variant);
+
662 return **(buffer->readFromNonRT());
+
663 } catch (const std::bad_any_cast& ex) {
+
664 RCLCPP_ERROR(get_node()->get_logger(), "Failed to read custom input: %s", ex.what());
+
665 }
+
666 return {};
+
667 } else {
+
668 auto message =
+
669 **std::get<realtime_tools::RealtimeBuffer<std::shared_ptr<modulo_core::EncodedState>>>(inputs_.at(name).buffer)
+
670 .readFromNonRT();
+
671 std::shared_ptr<state_representation::State> state;
+
672 try {
+
673 auto message_pair = input_message_pairs_.at(name);
+
674 message_pair->read<modulo_core::EncodedState, state_representation::State>(message);
+
675 state = message_pair->get_message_pair<modulo_core::EncodedState, state_representation::State>()->get_data();
+
676 } catch (const std::exception& ex) {
+ +
678 get_node()->get_logger(), *get_node()->get_clock(), 1000,
+
679 "Could not read EncodedState message on input '%s': %s", name.c_str(), ex.what());
+
680 return {};
+
681 }
+
682 if (state->is_empty()) {
+
683 return {};
+
684 }
+
685 auto cast_ptr = std::dynamic_pointer_cast<T>(state);
+
686 if (cast_ptr != nullptr) {
+
687 return *cast_ptr;
+
688 } else {
+ +
690 get_node()->get_logger(), *get_node()->get_clock(), 1000,
+
691 "Dynamic cast of message on input '%s' from type '%s' to type '%s' failed.", name.c_str(),
+
692 get_state_type_name(state->get_type()).c_str(), get_state_type_name(T().get_type()).c_str());
+
693 }
+
694 return {};
+
695 }
+
696}
+
+
697
+
698template<>
+
699inline std::optional<bool> BaseControllerInterface::read_input<bool>(const std::string& name) {
+
700 if (!check_input_valid(name)) {
+
701 return {};
+
702 }
+
703 // no need to check for emptiness of the pointer: timestamps are default constructed to 0, so an input being valid
+
704 // means that a message was received
+
705 return (*std::get<realtime_tools::RealtimeBuffer<std::shared_ptr<std_msgs::msg::Bool>>>(inputs_.at(name).buffer)
+
706 .readFromNonRT())
+
707 ->data;
+
708}
+
709
+
710template<>
+
711inline std::optional<double> BaseControllerInterface::read_input<double>(const std::string& name) {
+
712 if (!check_input_valid(name)) {
+
713 return {};
+
714 }
+
715 return (*std::get<realtime_tools::RealtimeBuffer<std::shared_ptr<std_msgs::msg::Float64>>>(inputs_.at(name).buffer)
+
716 .readFromNonRT())
+
717 ->data;
+
718}
+
719
+
720template<>
+
721inline std::optional<std::vector<double>>
+ +
723 if (!check_input_valid(name)) {
+
724 return {};
+
725 }
+
726 return (*std::get<realtime_tools::RealtimeBuffer<std::shared_ptr<std_msgs::msg::Float64MultiArray>>>(
+
727 inputs_.at(name).buffer)
+
728 .readFromNonRT())
+
729 ->data;
+
730}
+
731
+
732template<>
+
733inline std::optional<int> BaseControllerInterface::read_input<int>(const std::string& name) {
+
734 if (!check_input_valid(name)) {
+
735 return {};
+
736 }
+
737 return (*std::get<realtime_tools::RealtimeBuffer<std::shared_ptr<std_msgs::msg::Int32>>>(inputs_.at(name).buffer)
+
738 .readFromNonRT())
+
739 ->data;
+
740}
+
741
+
742template<>
+
743inline std::optional<std::string> BaseControllerInterface::read_input<std::string>(const std::string& name) {
+
744 if (!check_input_valid(name)) {
+
745 return {};
+
746 }
+
747 return (*std::get<realtime_tools::RealtimeBuffer<std::shared_ptr<std_msgs::msg::String>>>(inputs_.at(name).buffer)
+
748 .readFromNonRT())
+
749 ->data;
+
750}
+
751
+
752template<typename T>
+
+
753inline void BaseControllerInterface::write_output(const std::string& name, const T& data) {
+
754 if (outputs_.find(name) == outputs_.end()) {
+ +
756 get_node()->get_logger(), *get_node()->get_clock(), 1000, "Could not find output '%s'", name.c_str());
+
757 return;
+
758 }
+
759
+
760 if constexpr (modulo_core::concepts::CustomT<T>) {
+
761 CustomPublishers publishers;
+
762 try {
+
763 publishers = std::get<CustomPublishers>(outputs_.at(name));
+
764 } catch (const std::bad_variant_access&) {
+ +
766 get_node()->get_logger(), *get_node()->get_clock(), 1000,
+
767 "Could not retrieve publisher for output '%s': Invalid output type", name.c_str());
+
768 return;
+
769 }
+
770
+
771 std::shared_ptr<realtime_tools::RealtimePublisher<T>> rt_pub;
+
772 try {
+
773 rt_pub = std::any_cast<std::shared_ptr<realtime_tools::RealtimePublisher<T>>>(publishers.second);
+
774 } catch (const std::bad_any_cast& ex) {
+ +
776 get_node()->get_logger(), *get_node()->get_clock(), 1000,
+
777 "Skipping publication of output '%s' due to wrong data type: %s", name.c_str(), ex.what());
+
778 return;
+
779 }
+
780 if (rt_pub && rt_pub->trylock()) {
+
781 rt_pub->msg_ = data;
+
782 rt_pub->unlockAndPublish();
+
783 }
+
784 } else {
+
785 if (data.is_empty()) {
+ +
787 get_node()->get_logger(), *get_node()->get_clock(), 1000,
+
788 "Skipping publication of output '%s' due to emptiness of state", name.c_str());
+
789 return;
+
790 }
+
791 EncodedStatePublishers publishers;
+
792 try {
+
793 publishers = std::get<EncodedStatePublishers>(outputs_.at(name));
+
794 } catch (const std::bad_variant_access&) {
+ +
796 get_node()->get_logger(), *get_node()->get_clock(), 1000,
+
797 "Could not retrieve publisher for output '%s': Invalid output type", name.c_str());
+
798 return;
+
799 }
+
800 if (const auto output_type = std::get<0>(publishers)->get_type(); output_type != data.get_type()) {
+ +
802 get_node()->get_logger(), *get_node()->get_clock(), 1000,
+
803 "Skipping publication of output '%s' due to wrong data type (expected '%s', got '%s')",
+
804 state_representation::get_state_type_name(output_type).c_str(),
+
805 state_representation::get_state_type_name(data.get_type()).c_str(), name.c_str());
+
806 return;
+
807 }
+
808 auto rt_pub = std::get<2>(publishers);
+
809 if (rt_pub && rt_pub->trylock()) {
+
810 try {
+
811 modulo_core::translators::write_message<T>(rt_pub->msg_, data, get_node()->get_clock()->now());
+ + +
814 get_node()->get_logger(), *get_node()->get_clock(), 1000, "Failed to publish output '%s': %s", name.c_str(),
+
815 ex.what());
+
816 }
+
817 rt_pub->unlockAndPublish();
+
818 }
+
819 }
+
820}
+
+
821
+
822template<typename PublisherT, typename MsgT, typename T>
+
823void BaseControllerInterface::write_std_output(const std::string& name, const T& data) {
+
824 if (outputs_.find(name) == outputs_.end()) {
+ +
826 get_node()->get_logger(), *get_node()->get_clock(), 1000, "Could not find output '%s'", name.c_str());
+
827 return;
+
828 }
+ +
830 try {
+
831 publishers = std::get<PublisherT>(outputs_.at(name));
+
832 } catch (const std::bad_variant_access&) {
+ +
834 get_node()->get_logger(), *get_node()->get_clock(), 1000,
+
835 "Could not retrieve publisher for output '%s': Invalid output type", name.c_str());
+
836 return;
+
837 }
+
838 auto rt_pub = publishers.second;
+
839 if (rt_pub && rt_pub->trylock()) {
+
840 rt_pub->msg_.data = data;
+
841 rt_pub->unlockAndPublish();
+
842 }
+
843}
+
844
+
845template<>
+
846inline void BaseControllerInterface::write_output(const std::string& name, const bool& data) {
+ +
848}
+
849
+
850template<>
+
851inline void BaseControllerInterface::write_output(const std::string& name, const double& data) {
+ +
853}
+
854
+
855template<>
+
856inline void BaseControllerInterface::write_output(const std::string& name, const std::vector<double>& data) {
+ +
858}
+
859
+
860template<>
+
861inline void BaseControllerInterface::write_output(const std::string& name, const int& data) {
+ +
863}
+
864
+
865template<>
+
866inline void BaseControllerInterface::write_output(const std::string& name, const std::string& data) {
+ +
868}
+
869
+
870}// namespace modulo_controllers
+
Base controller class to combine ros2_control, control libraries and modulo.
+
std::shared_ptr< state_representation::ParameterInterface > get_parameter(const std::string &name) const
Get a parameter by name.
+
CallbackReturn on_configure(const rclcpp_lifecycle::State &previous_state) override
Add signals.
+
rclcpp::QoS get_qos() const
Getter of the Quality of Service attribute.
+
bool is_active() const
Check if the controller is currently in state active or not.
+
void set_parameter_value(const std::string &name, const T &value)
Set the value of a parameter.
+
T get_parameter_value(const std::string &name) const
Get a parameter value by name.
+
void add_output(const std::string &name, const std::string &topic_name="")
Add an output to the controller.
+
void set_input_validity_period(double input_validity_period)
Set the input validity period of input signals.
+
CallbackReturn on_init() override
Declare parameters and register the on_set_parameters callback.
+
std::optional< T > read_input(const std::string &name)
Read the most recent message of an input.
+
void add_parameter(const std::shared_ptr< state_representation::ParameterInterface > &parameter, const std::string &description, bool read_only=false)
Add a parameter.
+
void write_output(const std::string &name, const T &data)
Write an object to an output.
+
void trigger(const std::string &trigger_name)
Latch the trigger with the provided name.
+
void set_qos(const rclcpp::QoS &qos)
Set the Quality of Service for ROS publishers and subscribers.
+
void add_input(const std::string &name, const std::string &topic_name="")
Add an input to the controller.
+
void set_predicate(const std::string &predicate_name, bool predicate_value)
Set the value of the predicate given as parameter, if the predicate is not found does not do anything...
+
void add_predicate(const std::string &predicate_name, bool predicate_value)
Add a predicate to the map of predicates.
+
bool get_predicate(const std::string &predicate_name) const
Get the logical value of a predicate.
+
virtual bool on_validate_parameter_callback(const std::shared_ptr< state_representation::ParameterInterface > &parameter)
Parameter validation function to be redefined by derived controller classes.
+ +
void add_service(const std::string &service_name, const std::function< ControllerServiceResponse(void)> &callback)
Add a service to trigger a callback function with no input arguments.
+
std::timed_mutex & get_command_mutex()
Get the reference to the command mutex.
+
void add_trigger(const std::string &trigger_name)
Add a trigger to the controller.
+
An exception class to notify that the translation of a ROS message failed.
+
An exception class to notify errors with parameters in modulo classes.
+ +
rclcpp::Parameter write_parameter(const std::shared_ptr< state_representation::ParameterInterface > &parameter)
Write a ROS Parameter from a ParameterInterface pointer.
+
Input structure to save topic data in a realtime buffer and timestamps in one object.
+
Response structure to be returned by controller services.
+
+ + + + diff --git a/versions/v5.0.1/_component_8cpp_source.html b/versions/v5.0.1/_component_8cpp_source.html new file mode 100644 index 00000000..615e3ae9 --- /dev/null +++ b/versions/v5.0.1/_component_8cpp_source.html @@ -0,0 +1,193 @@ + + + + + + + +Modulo: /github/workspace/source/modulo_components/src/Component.cpp Source File + + + + + + + + + +
+
+ + + + + + +
+
Modulo 5.0.0 +
+
+
+ + + + + + + + + +
+
+ + +
+
+
+
+
+
Loading...
+
Searching...
+
No Matches
+
+
+
+
+ + +
+
+
Component.cpp
+
+
+
1#include "modulo_components/Component.hpp"
+
2
+
3using namespace modulo_core::communication;
+
4using namespace rclcpp;
+
5
+
6namespace modulo_components {
+
7
+
+
8Component::Component(const NodeOptions& node_options, const std::string& fallback_name)
+
9 : Node(modulo_utils::parsing::parse_node_name(node_options, fallback_name), node_options),
+
10 ComponentInterface(std::make_shared<node_interfaces::NodeInterfaces<ALL_RCLCPP_NODE_INTERFACES>>(
+
11 Node::get_node_base_interface(), Node::get_node_clock_interface(), Node::get_node_graph_interface(),
+
12 Node::get_node_logging_interface(), Node::get_node_parameters_interface(),
+
13 Node::get_node_services_interface(), Node::get_node_time_source_interface(),
+
14 Node::get_node_timers_interface(), Node::get_node_topics_interface(),
+
15 Node::get_node_type_descriptions_interface(), Node::get_node_waitables_interface())),
+
16 started_(false) {
+
17 this->add_predicate("is_finished", false);
+
18 this->add_predicate("in_error_state", false);
+
19}
+
+
20
+
+ +
22 if (this->execute_thread_.joinable()) {
+
23 this->execute_thread_.join();
+
24 }
+
25}
+
+
26
+
27void Component::step() {
+
28 try {
+
29 this->evaluate_periodic_callbacks();
+
30 this->on_step_callback();
+
31 this->publish_outputs();
+
32 this->publish_predicates();
+
33 } catch (const std::exception& ex) {
+
34 RCLCPP_ERROR_STREAM(this->get_logger(), "Failed to execute step function: " << ex.what());
+
35 this->raise_error();
+
36 }
+
37}
+
38
+
+ +
40 if (this->started_) {
+
41 RCLCPP_ERROR(this->get_logger(), "Failed to start execution thread: Thread has already been started.");
+
42 return;
+
43 }
+
44 this->started_ = true;
+
45 this->execute_thread_ = std::thread([this]() { this->on_execute(); });
+
46}
+
+
47
+
48void Component::on_execute() {
+
49 try {
+
50 if (!this->on_execute_callback()) {
+
51 this->raise_error();
+
52 return;
+
53 }
+
54 } catch (const std::exception& ex) {
+
55 RCLCPP_ERROR_STREAM(this->get_logger(), "Failed to run the execute function: " << ex.what());
+
56 this->raise_error();
+
57 return;
+
58 }
+
59 RCLCPP_DEBUG(this->get_logger(), "Execution finished, setting 'is_finished' predicate to true.");
+
60 this->set_predicate("is_finished", true);
+
61}
+
62
+
+ +
64 return true;
+
65}
+
+
66
+
+
67std::shared_ptr<state_representation::ParameterInterface> Component::get_parameter(const std::string& name) const {
+ +
69}
+
+
70
+
+ + +
73 this->set_predicate("in_error_state", true);
+
74 this->finalize_interfaces();
+
75}
+
+
76}// namespace modulo_components
+
std::shared_ptr< state_representation::ParameterInterface > get_parameter(const std::string &name) const
Get a parameter by name.
Definition Component.cpp:67
+
virtual ~Component()
Destructor that joins the thread if necessary.
Definition Component.cpp:21
+
virtual bool on_execute_callback()
Execute the component logic. To be redefined in derived classes.
Definition Component.cpp:63
+
void raise_error() override
Definition Component.cpp:71
+
Component(const rclcpp::NodeOptions &node_options, const std::string &fallback_name="Component")
Constructor from node options.
Definition Component.cpp:8
+
void execute()
Start the execution thread.
Definition Component.cpp:39
+
Base interface class for modulo components to wrap a ROS Node with custom behaviour.
+
std::shared_ptr< state_representation::ParameterInterface > get_parameter(const std::string &name) const
Get a parameter by name.
+
T get_parameter_value(const std::string &name) const
Get a parameter value by name.
+
virtual void on_step_callback()
Steps to execute periodically. To be redefined by derived Component classes.
+
void set_predicate(const std::string &predicate_name, bool predicate_value)
Set the value of the predicate given as parameter, if the predicate is not found does not do anything...
+
virtual void raise_error()
Notify an error in the component.
+
void add_predicate(const std::string &predicate_name, bool predicate_value)
Add a predicate to the map of predicates.
+
Modulo components.
Definition Component.hpp:9
+
Modulo Core communication module for handling messages on publication and subscription interfaces.
+
+ + + + diff --git a/versions/v5.0.1/_component_8hpp_source.html b/versions/v5.0.1/_component_8hpp_source.html new file mode 100644 index 00000000..9addefc1 --- /dev/null +++ b/versions/v5.0.1/_component_8hpp_source.html @@ -0,0 +1,248 @@ + + + + + + + +Modulo: /github/workspace/source/modulo_components/include/modulo_components/Component.hpp Source File + + + + + + + + + +
+
+ + + + + + +
+
Modulo 5.0.0 +
+
+
+ + + + + + + + + +
+
+ + +
+
+
+
+
+
Loading...
+
Searching...
+
No Matches
+
+
+
+
+ + +
+
+
Component.hpp
+
+
+
1#pragma once
+
2
+
3#include <thread>
+
4
+
5#include <rclcpp/node.hpp>
+
6
+
7#include "modulo_components/ComponentInterface.hpp"
+
8
+
+ +
10
+
+
23class Component : public rclcpp::Node, public ComponentInterface {
+
24public:
+
25 friend class ComponentPublicInterface;
+
26
+
32 explicit Component(const rclcpp::NodeOptions& node_options, const std::string& fallback_name = "Component");
+
33
+
37 virtual ~Component();
+
38
+
39protected:
+
43 [[nodiscard]] std::shared_ptr<state_representation::ParameterInterface> get_parameter(const std::string& name) const;
+
44
+
48 void execute();
+
49
+
54 virtual bool on_execute_callback();
+
55
+
65 template<typename DataT>
+
66 void add_output(
+
67 const std::string& signal_name, const std::shared_ptr<DataT>& data, const std::string& default_topic = "",
+
68 bool fixed_topic = false, bool publish_on_step = true);
+
69
+
73 void raise_error() override;
+
74
+
75private:
+
79 void step() override;
+
80
+
85 void on_execute();
+
86
+
87 // TODO hide ROS methods
+ + + + + + + + + +
97 using rclcpp::Node::get_parameter;
+
98
+
99 std::thread execute_thread_;
+
100 bool started_;
+
101};
+
+
102
+
103template<typename DataT>
+
+ +
105 const std::string& signal_name, const std::shared_ptr<DataT>& data, const std::string& default_topic,
+
106 bool fixed_topic, bool publish_on_step) {
+
107 using namespace modulo_core::communication;
+
108 try {
+
109 auto parsed_signal_name =
+
110 this->create_output(PublisherType::PUBLISHER, signal_name, data, default_topic, fixed_topic, publish_on_step);
+
111 auto topic_name = this->get_parameter_value<std::string>(parsed_signal_name + "_topic");
+ +
113 this->get_logger(), "Adding output '" << parsed_signal_name << "' with topic name '" << topic_name << "'.");
+
114 auto message_pair = this->outputs_.at(parsed_signal_name)->get_message_pair();
+
115 switch (message_pair->get_type()) {
+
116 case MessageType::BOOL: {
+ +
118 this->outputs_.at(parsed_signal_name) =
+
119 std::make_shared<PublisherHandler<rclcpp::Publisher<std_msgs::msg::Bool>, std_msgs::msg::Bool>>(
+
120 PublisherType::PUBLISHER, publisher)
+
121 ->create_publisher_interface(message_pair);
+
122 break;
+
123 }
+
124 case MessageType::FLOAT64: {
+ +
126 this->outputs_.at(parsed_signal_name) =
+
127 std::make_shared<PublisherHandler<rclcpp::Publisher<std_msgs::msg::Float64>, std_msgs::msg::Float64>>(
+
128 PublisherType::PUBLISHER, publisher)
+
129 ->create_publisher_interface(message_pair);
+
130 break;
+
131 }
+
132 case MessageType::FLOAT64_MULTI_ARRAY: {
+ +
134 this->outputs_.at(parsed_signal_name) = std::make_shared<PublisherHandler<
+
135 rclcpp::Publisher<std_msgs::msg::Float64MultiArray>, std_msgs::msg::Float64MultiArray>>(
+
136 PublisherType::PUBLISHER, publisher)
+
137 ->create_publisher_interface(message_pair);
+
138 break;
+
139 }
+
140 case MessageType::INT32: {
+ +
142 this->outputs_.at(parsed_signal_name) =
+
143 std::make_shared<PublisherHandler<rclcpp::Publisher<std_msgs::msg::Int32>, std_msgs::msg::Int32>>(
+
144 PublisherType::PUBLISHER, publisher)
+
145 ->create_publisher_interface(message_pair);
+
146 break;
+
147 }
+
148 case MessageType::STRING: {
+ +
150 this->outputs_.at(parsed_signal_name) =
+
151 std::make_shared<PublisherHandler<rclcpp::Publisher<std_msgs::msg::String>, std_msgs::msg::String>>(
+
152 PublisherType::PUBLISHER, publisher)
+
153 ->create_publisher_interface(message_pair);
+
154 break;
+
155 }
+
156 case MessageType::ENCODED_STATE: {
+ +
158 this->outputs_.at(parsed_signal_name) =
+
159 std::make_shared<PublisherHandler<rclcpp::Publisher<modulo_core::EncodedState>, modulo_core::EncodedState>>(
+
160 PublisherType::PUBLISHER, publisher)
+
161 ->create_publisher_interface(message_pair);
+
162 break;
+
163 }
+
164 case MessageType::CUSTOM_MESSAGE: {
+ + +
167 this->outputs_.at(parsed_signal_name) =
+
168 std::make_shared<PublisherHandler<rclcpp::Publisher<DataT>, DataT>>(PublisherType::PUBLISHER, publisher)
+
169 ->create_publisher_interface(message_pair);
+
170 }
+
171 break;
+
172 }
+
173 }
+
174 } catch (const std::exception& ex) {
+
175 RCLCPP_ERROR_STREAM(this->get_logger(), "Failed to add output '" << signal_name << "': " << ex.what());
+
176 }
+
177}
+
+
178}// namespace modulo_components
+
+
A wrapper for rclcpp::Node to simplify application composition through unified component interfaces.
Definition Component.hpp:23
+
std::shared_ptr< state_representation::ParameterInterface > get_parameter(const std::string &name) const
Get a parameter by name.
Definition Component.cpp:67
+
virtual ~Component()
Destructor that joins the thread if necessary.
Definition Component.cpp:21
+
virtual bool on_execute_callback()
Execute the component logic. To be redefined in derived classes.
Definition Component.cpp:63
+
void add_output(const std::string &signal_name, const std::shared_ptr< DataT > &data, const std::string &default_topic="", bool fixed_topic=false, bool publish_on_step=true)
Add and configure an output signal of the component.
+
void raise_error() override
Definition Component.cpp:71
+
void execute()
Start the execution thread.
Definition Component.cpp:39
+
Base interface class for modulo components to wrap a ROS Node with custom behaviour.
+
void publish_outputs()
Helper function to publish all output signals.
+
std::map< std::string, std::shared_ptr< modulo_core::communication::PublisherInterface > > outputs_
Map of outputs.
+
std::shared_ptr< state_representation::ParameterInterface > get_parameter(const std::string &name) const
Get a parameter by name.
+
void finalize_interfaces()
Finalize all interfaces.
+
T get_parameter_value(const std::string &name) const
Get a parameter value by name.
+
void publish_predicates()
Helper function to publish all predicates.
+
std::string create_output(modulo_core::communication::PublisherType publisher_type, const std::string &signal_name, const std::shared_ptr< DataT > &data, const std::string &default_topic, bool fixed_topic, bool publish_on_step)
Helper function to parse the signal name and add an unconfigured PublisherInterface to the map of out...
+
rclcpp::QoS get_qos() const
Getter of the Quality of Service attribute.
+
std::map< std::string, std::shared_ptr< modulo_core::communication::SubscriptionInterface > > inputs_
Map of inputs.
+
void evaluate_periodic_callbacks()
Helper function to evaluate all periodic function callbacks.
+
std::map< std::string, bool > periodic_outputs_
Map of outputs with periodic publishing flag.
+
The PublisherHandler handles different types of ROS publishers to activate, deactivate and publish da...
+ +
Modulo components.
Definition Component.hpp:9
+
Modulo Core communication module for handling messages on publication and subscription interfaces.
+
+ + + + diff --git a/versions/v5.0.1/_component_interface_8cpp_source.html b/versions/v5.0.1/_component_interface_8cpp_source.html new file mode 100644 index 00000000..bba74c42 --- /dev/null +++ b/versions/v5.0.1/_component_interface_8cpp_source.html @@ -0,0 +1,847 @@ + + + + + + + +Modulo: /github/workspace/source/modulo_components/src/ComponentInterface.cpp Source File + + + + + + + + + +
+
+ + + + + + +
+
Modulo 5.0.0 +
+
+
+ + + + + + + + + +
+
+ + +
+
+
+
+
+
Loading...
+
Searching...
+
No Matches
+
+
+
+
+ + +
+
+
ComponentInterface.cpp
+
+
+
1#include "modulo_components/ComponentInterface.hpp"
+
2
+
3#include <console_bridge/console.h>
+
4#include <tf2_msgs/msg/tf_message.hpp>
+
5
+
6#include <modulo_core/translators/message_readers.hpp>
+
7#include <modulo_core/translators/message_writers.hpp>
+
8
+
9using namespace modulo_core;
+
10
+
11namespace modulo_components {
+
12
+
+ +
14 const std::shared_ptr<rclcpp::node_interfaces::NodeInterfaces<ALL_RCLCPP_NODE_INTERFACES>>& interfaces)
+
15 : node_base_(interfaces->get_node_base_interface()),
+
16 node_clock_(interfaces->get_node_clock_interface()),
+
17 node_logging_(interfaces->get_node_logging_interface()),
+
18 node_parameters_(interfaces->get_node_parameters_interface()),
+
19 node_services_(interfaces->get_node_services_interface()),
+
20 node_timers_(interfaces->get_node_timers_interface()),
+
21 node_topics_(interfaces->get_node_topics_interface()) {
+
22 // register the parameter change callback handlers
+
23 this->pre_set_parameter_cb_handle_ = this->node_parameters_->add_pre_set_parameters_callback(
+
24 [this](std::vector<rclcpp::Parameter>& parameters) { return this->pre_set_parameters_callback(parameters); });
+
25 this->on_set_parameter_cb_handle_ = this->node_parameters_->add_on_set_parameters_callback(
+
26 [this](const std::vector<rclcpp::Parameter>& parameters) -> rcl_interfaces::msg::SetParametersResult {
+
27 return this->on_set_parameters_callback(parameters);
+
28 });
+
29 this->add_parameter("rate", 10.0, "The rate in Hertz for all periodic callbacks", true);
+
30
+
31 this->predicate_publisher_ = rclcpp::create_publisher<modulo_interfaces::msg::PredicateCollection>(
+
32 this->node_parameters_, this->node_topics_, "/predicates", this->qos_);
+
33 this->predicate_message_.node = this->node_base_->get_fully_qualified_name();
+
34 this->predicate_message_.type = modulo_interfaces::msg::PredicateCollection::COMPONENT;
+
35
+
36 this->rate_ = this->get_parameter_value<double>("rate");
+
37 this->period_ = 1.0 / this->rate_;
+
38 this->step_timer_ = rclcpp::create_wall_timer(
+
39 std::chrono::nanoseconds(static_cast<int64_t>(1e9 * this->period_)),
+
40 [this] {
+
41 if (this->step_mutex_.try_lock()) {
+
42 this->step();
+
43 this->step_mutex_.unlock();
+
44 }
+
45 },
+
46 nullptr, this->node_base_.get(), this->node_timers_.get());
+
47}
+
+
48
+
+ +
50 this->step_mutex_.lock();
+
51}
+
+
52
+
+ +
54 return this->rate_;
+
55}
+
+
56
+
57template<>
+
58double ComponentInterface::get_period() const {
+
59 return this->period_;
+
60}
+
61
+
62template<>
+
63std::chrono::nanoseconds ComponentInterface::get_period() const {
+
64 return std::chrono::nanoseconds(static_cast<int64_t>(1e9 * this->period_));
+
65}
+
66
+
67template<>
+
68rclcpp::Duration ComponentInterface::get_period() const {
+
69 return rclcpp::Duration::from_seconds(this->period_);
+
70}
+
71
+ +
73
+ +
75
+
+ +
77 const std::shared_ptr<state_representation::ParameterInterface>& parameter, const std::string& description,
+
78 bool read_only) {
+
79 rclcpp::Parameter ros_param;
+
80 try {
+ + +
83 throw exceptions::ParameterException("Failed to add parameter: " + std::string(ex.what()));
+
84 }
+
85 if (!this->node_parameters_->has_parameter(parameter->get_name())) {
+
86 RCLCPP_DEBUG_STREAM(this->node_logging_->get_logger(), "Adding parameter '" << parameter->get_name() << "'.");
+
87 this->parameter_map_.set_parameter(parameter);
+
88 this->read_only_parameters_.insert_or_assign(parameter->get_name(), false);
+
89 try {
+
90 rcl_interfaces::msg::ParameterDescriptor descriptor;
+
91 descriptor.description = description;
+
92 descriptor.read_only = read_only;
+
93 // since the pre_set_parameters_callback is not called on parameter declaration, this has to be true
+
94 this->set_parameters_result_.successful = true;
+
95 this->set_parameters_result_.reason = "";
+
96 if (parameter->is_empty()) {
+
97 descriptor.dynamic_typing = true;
+
98 descriptor.type = translators::get_ros_parameter_type(parameter->get_parameter_type());
+
99 this->node_parameters_->declare_parameter(parameter->get_name(), rclcpp::ParameterValue{}, descriptor);
+
100 } else {
+
101 this->node_parameters_->declare_parameter(parameter->get_name(), ros_param.get_parameter_value(), descriptor);
+
102 }
+
103 std::vector<rclcpp::Parameter> ros_parameters{this->node_parameters_->get_parameters({parameter->get_name()})};
+
104 this->pre_set_parameters_callback(ros_parameters);
+
105 auto result = this->on_set_parameters_callback(ros_parameters);
+
106 if (!result.successful) {
+
107 this->node_parameters_->undeclare_parameter(parameter->get_name());
+ +
109 }
+
110 this->read_only_parameters_.at(parameter->get_name()) = read_only;
+
111 } catch (const std::exception& ex) {
+
112 this->parameter_map_.remove_parameter(parameter->get_name());
+
113 this->read_only_parameters_.erase(parameter->get_name());
+
114 throw exceptions::ParameterException("Failed to add parameter: " + std::string(ex.what()));
+
115 }
+
116 } else {
+ +
118 this->node_logging_->get_logger(), "Parameter '" << parameter->get_name() << "' already exists.");
+
119 }
+
120}
+
+
121
+
122std::shared_ptr<state_representation::ParameterInterface>
+
+
123ComponentInterface::get_parameter(const std::string& name) const {
+
124 try {
+
125 return this->parameter_map_.get_parameter(name);
+
126 } catch (const state_representation::exceptions::InvalidParameterException& ex) {
+
127 throw exceptions::ParameterException("Failed to get parameter '" + name + "': " + ex.what());
+
128 }
+
129}
+
+
130
+
131void ComponentInterface::pre_set_parameters_callback(std::vector<rclcpp::Parameter>& parameters) {
+
132 if (this->pre_set_parameter_callback_called_) {
+
133 this->pre_set_parameter_callback_called_ = false;
+
134 return;
+
135 }
+
136 rcl_interfaces::msg::SetParametersResult result;
+
137 result.successful = true;
+
138 for (auto& ros_parameter : parameters) {
+
139 try {
+
140 auto parameter = parameter_map_.get_parameter(ros_parameter.get_name());
+
141 if (this->read_only_parameters_.at(ros_parameter.get_name())) {
+ +
143 this->node_logging_->get_logger(), "Parameter '" << ros_parameter.get_name() << "' is read only.");
+
144 continue;
+
145 }
+
146
+
147 // convert the ROS parameter into a ParameterInterface without modifying the original
+ +
149 if (!this->validate_parameter(new_parameter)) {
+
150 result.successful = false;
+
151 result.reason += "Validation of parameter '" + ros_parameter.get_name() + "' returned false!";
+
152 } else if (!new_parameter->is_empty()) {
+
153 // update the value of the parameter in the map
+ + +
156 }
+
157 } catch (const std::exception& ex) {
+
158 result.successful = false;
+
159 result.reason += ex.what();
+
160 }
+
161 }
+
162 this->set_parameters_result_ = result;
+
163}
+
164
+
165rcl_interfaces::msg::SetParametersResult
+
166ComponentInterface::on_set_parameters_callback(const std::vector<rclcpp::Parameter>&) {
+
167 auto result = this->set_parameters_result_;
+
168 this->set_parameters_result_.successful = true;
+
169 this->set_parameters_result_.reason = "";
+
170 return result;
+
171}
+
172
+
173bool ComponentInterface::validate_parameter(
+
174 const std::shared_ptr<state_representation::ParameterInterface>& parameter) {
+
175 if (parameter->get_name() == "rate") {
+
176 auto value = parameter->get_parameter_value<double>();
+
177 if (value <= 0 || !std::isfinite(value)) {
+
178 RCLCPP_ERROR(this->node_logging_->get_logger(), "Value for parameter 'rate' has to be a positive finite number.");
+
179 return false;
+
180 }
+
181 }
+
182 return this->on_validate_parameter_callback(parameter);
+
183}
+
184
+
+ +
186 const std::shared_ptr<state_representation::ParameterInterface>&) {
+
187 return true;
+
188}
+
+
189
+
+
190void ComponentInterface::add_predicate(const std::string& predicate_name, bool predicate_value) {
+
191 this->add_predicate(predicate_name, [predicate_value]() { return predicate_value; });
+
192}
+
+
193
+
+ +
195 const std::string& predicate_name, const std::function<bool(void)>& predicate_function) {
+
196 if (predicate_name.empty()) {
+
197 RCLCPP_ERROR(this->node_logging_->get_logger(), "Failed to add predicate: Provide a non empty string as a name.");
+
198 return;
+
199 }
+
200 if (this->predicates_.find(predicate_name) != this->predicates_.end()) {
+ +
202 this->node_logging_->get_logger(),
+
203 "Predicate with name '" << predicate_name << "' already exists, overwriting.");
+
204 } else {
+
205 RCLCPP_DEBUG_STREAM(this->node_logging_->get_logger(), "Adding predicate '" << predicate_name << "'.");
+
206 }
+
207 try {
+
208 this->predicates_.insert_or_assign(predicate_name, Predicate(predicate_function));
+
209 } catch (const std::exception& ex) {
+ +
211 this->node_logging_->get_logger(), *this->node_clock_->get_clock(), 1000,
+
212 "Failed to add predicate '" << predicate_name << "': " << ex.what());
+
213 }
+
214}
+
+
215
+
+
216bool ComponentInterface::get_predicate(const std::string& predicate_name) const {
+
217 auto predicate_it = this->predicates_.find(predicate_name);
+
218 if (predicate_it == this->predicates_.end()) {
+ +
220 this->node_logging_->get_logger(), *this->node_clock_->get_clock(), 1000,
+
221 "Failed to get predicate '" << predicate_name << "': Predicate does not exist, returning false.");
+
222 return false;
+
223 }
+
224 try {
+
225 return predicate_it->second.get_value();
+
226 } catch (const std::exception& ex) {
+ +
228 this->node_logging_->get_logger(),
+
229 "Failed to evaluate callback of predicate '" << predicate_it->first << "', returning false: " << ex.what());
+
230 }
+
231 return false;
+
232}
+
+
233
+
+
234void ComponentInterface::set_predicate(const std::string& predicate_name, bool predicate_value) {
+
235 this->set_predicate(predicate_name, [predicate_value]() { return predicate_value; });
+
236}
+
+
237
+
+ +
239 const std::string& predicate_name, const std::function<bool(void)>& predicate_function) {
+
240 auto predicate_it = this->predicates_.find(predicate_name);
+
241 if (predicate_it == this->predicates_.end()) {
+ +
243 this->node_logging_->get_logger(), *this->node_clock_->get_clock(), 1000,
+
244 "Failed to set predicate '" << predicate_name << "': Predicate does not exist.");
+
245 return;
+
246 }
+
247 predicate_it->second.set_predicate(predicate_function);
+
248 if (auto new_predicate = predicate_it->second.query(); new_predicate) {
+
249 this->publish_predicate(predicate_name, *new_predicate);
+
250 }
+
251}
+
+
252
+
+
253void ComponentInterface::add_trigger(const std::string& trigger_name) {
+
254 if (trigger_name.empty()) {
+
255 RCLCPP_ERROR(this->node_logging_->get_logger(), "Failed to add trigger: Provide a non empty string as a name.");
+
256 return;
+
257 }
+
258 if (std::find(this->triggers_.cbegin(), this->triggers_.cend(), trigger_name) != this->triggers_.cend()) {
+ +
260 this->node_logging_->get_logger(),
+
261 "Failed to add trigger: there is already a trigger with name '" << trigger_name << "'.");
+
262 return;
+
263 }
+
264 if (this->predicates_.find(trigger_name) != this->predicates_.end()) {
+ +
266 this->node_logging_->get_logger(),
+
267 "Failed to add trigger: there is already a predicate with name '" << trigger_name << "'.");
+
268 return;
+
269 }
+
270 this->triggers_.push_back(trigger_name);
+
271 this->add_predicate(trigger_name, false);
+
272}
+
+
273
+
+
274void ComponentInterface::trigger(const std::string& trigger_name) {
+
275 if (std::find(this->triggers_.cbegin(), this->triggers_.cend(), trigger_name) == this->triggers_.cend()) {
+ +
277 this->node_logging_->get_logger(),
+
278 "Failed to trigger: could not find trigger with name '" << trigger_name << "'.");
+
279 return;
+
280 }
+
281 this->set_predicate(trigger_name, true);
+
282 // reset the trigger to be published on the next step
+
283 this->predicates_.at(trigger_name).set_predicate([]() { return false; });
+
284}
+
+
285
+
+ +
287 const std::string& signal_name, const std::string& default_topic, bool fixed_topic) {
+
288 this->declare_signal(signal_name, "input", default_topic, fixed_topic);
+
289}
+
+
290
+
+ +
292 const std::string& signal_name, const std::string& default_topic, bool fixed_topic) {
+
293 this->declare_signal(signal_name, "output", default_topic, fixed_topic);
+
294}
+
+
295
+
296void ComponentInterface::declare_signal(
+
297 const std::string& signal_name, const std::string& type, const std::string& default_topic, bool fixed_topic) {
+
298 std::string parsed_signal_name = modulo_utils::parsing::parse_topic_name(signal_name);
+
299 if (parsed_signal_name.empty()) {
+
300 throw exceptions::AddSignalException(modulo_utils::parsing::topic_validation_warning(signal_name, type));
+
301 }
+ + +
304 this->node_logging_->get_logger(),
+
305 "The parsed name for " + type + " '" + signal_name + "' is '" + parsed_signal_name
+
306 + "'. Use the parsed name to refer to this " + type);
+
307 }
+
308 if (this->inputs_.find(parsed_signal_name) != this->inputs_.cend()) {
+
309 throw exceptions::AddSignalException("Signal with name '" + parsed_signal_name + "' already exists as input.");
+
310 }
+
311 if (this->outputs_.find(parsed_signal_name) != this->outputs_.cend()) {
+
312 throw exceptions::AddSignalException("Signal with name '" + parsed_signal_name + "' already exists as output.");
+
313 }
+
314 std::string topic_name = default_topic.empty() ? "~/" + parsed_signal_name : default_topic;
+
315 auto parameter_name = parsed_signal_name + "_topic";
+
316 if (this->node_parameters_->has_parameter(parameter_name) && this->get_parameter(parameter_name)->is_empty()) {
+ +
318 } else {
+
319 this->add_parameter(
+
320 parameter_name, topic_name, "Signal topic name of " + type + " '" + parsed_signal_name + "'", fixed_topic);
+
321 }
+ +
323 this->node_logging_->get_logger(),
+
324 "Declared signal '" << parsed_signal_name << "' and parameter '" << parameter_name << "' with value '"
+
325 << topic_name << "'.");
+
326}
+
327
+
+
328void ComponentInterface::publish_output(const std::string& signal_name) {
+
329 auto parsed_signal_name = modulo_utils::parsing::parse_topic_name(signal_name);
+
330 if (this->outputs_.find(parsed_signal_name) == this->outputs_.cend()) {
+
331 throw exceptions::CoreException("Output with name '" + signal_name + "' doesn't exist.");
+
332 }
+
333 if (this->periodic_outputs_.at(parsed_signal_name)) {
+
334 throw exceptions::CoreException("An output that is published periodically cannot be triggered manually.");
+
335 }
+
336 try {
+
337 this->outputs_.at(parsed_signal_name)->publish();
+
338 } catch (const exceptions::CoreException& ex) {
+ +
340 this->node_logging_->get_logger(), *this->node_clock_->get_clock(), 1000,
+
341 "Failed to publish output '" << parsed_signal_name << "': " << ex.what());
+
342 }
+
343}
+
+
344
+
+
345void ComponentInterface::remove_input(const std::string& signal_name) {
+
346 if (!this->remove_signal(signal_name, this->inputs_)) {
+
347 auto parsed_signal_name = modulo_utils::parsing::parse_topic_name(signal_name);
+
348 if (!this->remove_signal(parsed_signal_name, this->inputs_)) {
+ +
350 this->node_logging_->get_logger(),
+
351 "Unknown input '" << signal_name << "' (parsed name was '" << parsed_signal_name << "').");
+
352 }
+
353 }
+
354}
+
+
355
+
+
356void ComponentInterface::remove_output(const std::string& signal_name) {
+
357 if (!this->remove_signal(signal_name, this->outputs_)) {
+
358 auto parsed_signal_name = modulo_utils::parsing::parse_topic_name(signal_name);
+
359 if (!this->remove_signal(parsed_signal_name, this->outputs_)) {
+ +
361 this->node_logging_->get_logger(),
+
362 "Unknown output '" << signal_name << "' (parsed name was '" << parsed_signal_name << "').");
+
363 }
+
364 }
+
365}
+
+
366
+
+ +
368 const std::string& service_name, const std::function<ComponentServiceResponse(void)>& callback) {
+
369 try {
+
370 std::string parsed_service_name = this->validate_service_name(service_name, "empty");
+
371 RCLCPP_DEBUG_STREAM(this->node_logging_->get_logger(), "Adding empty service '" << parsed_service_name << "'.");
+
372 auto service = rclcpp::create_service<modulo_interfaces::srv::EmptyTrigger>(
+
373 this->node_base_, this->node_services_, "~/" + parsed_service_name,
+
374 [callback](
+
375 const std::shared_ptr<modulo_interfaces::srv::EmptyTrigger::Request>,
+
376 std::shared_ptr<modulo_interfaces::srv::EmptyTrigger::Response> response) {
+
377 try {
+ +
379 response->success = callback_response.success;
+
380 response->message = callback_response.message;
+
381 } catch (const std::exception& ex) {
+
382 response->success = false;
+
383 response->message = ex.what();
+
384 }
+
385 },
+
386 this->qos_, nullptr);
+
387 this->empty_services_.insert_or_assign(parsed_service_name, service);
+
388 } catch (const std::exception& ex) {
+ +
390 this->node_logging_->get_logger(), "Failed to add service '" << service_name << "': " << ex.what());
+
391 }
+
392}
+
+
393
+
+ +
395 const std::string& service_name,
+
396 const std::function<ComponentServiceResponse(const std::string& string)>& callback) {
+
397 try {
+
398 std::string parsed_service_name = this->validate_service_name(service_name, "string");
+
399 RCLCPP_DEBUG_STREAM(this->node_logging_->get_logger(), "Adding string service '" << parsed_service_name << "'.");
+
400 auto service = rclcpp::create_service<modulo_interfaces::srv::StringTrigger>(
+
401 this->node_base_, this->node_services_, "~/" + parsed_service_name,
+
402 [callback](
+
403 const std::shared_ptr<modulo_interfaces::srv::StringTrigger::Request> request,
+
404 std::shared_ptr<modulo_interfaces::srv::StringTrigger::Response> response) {
+
405 try {
+
406 auto callback_response = callback(request->payload);
+
407 response->success = callback_response.success;
+
408 response->message = callback_response.message;
+
409 } catch (const std::exception& ex) {
+
410 response->success = false;
+
411 response->message = ex.what();
+
412 }
+
413 },
+
414 this->qos_, nullptr);
+
415 this->string_services_.insert_or_assign(parsed_service_name, service);
+
416 } catch (const std::exception& ex) {
+ +
418 this->node_logging_->get_logger(), "Failed to add service '" << service_name << "': " << ex.what());
+
419 }
+
420}
+
+
421
+
422// FIXME: use enum for service type
+
423std::string ComponentInterface::validate_service_name(const std::string& service_name, const std::string& type) const {
+
424 std::string parsed_service_name = modulo_utils::parsing::parse_topic_name(service_name);
+
425 if (parsed_service_name.empty()) {
+ +
427 modulo_utils::parsing::topic_validation_warning(service_name, type + " service"));
+
428 }
+ + +
431 this->node_logging_->get_logger(),
+
432 "The parsed name for service '" + service_name + "' is '" + parsed_service_name
+
433 + "'. Use the parsed name to refer to this service");
+
434 }
+
435 if (empty_services_.find(parsed_service_name) != empty_services_.cend()) {
+ +
437 "Service with name '" + parsed_service_name + "' already exists as an empty service.");
+
438 }
+
439 if (string_services_.find(parsed_service_name) != string_services_.cend()) {
+ +
441 "Service with name '" + parsed_service_name + "' already exists as a string service.");
+
442 }
+
443 RCLCPP_DEBUG(this->node_logging_->get_logger(), "Adding %s service '%s'.", type.c_str(), parsed_service_name.c_str());
+
444 return parsed_service_name;
+
445}
+
446
+
+
447void ComponentInterface::add_periodic_callback(const std::string& name, const std::function<void()>& callback) {
+
448 if (name.empty()) {
+ +
450 this->node_logging_->get_logger(), "Failed to add periodic function: Provide a non empty string as a name.");
+
451 return;
+
452 }
+
453 if (this->periodic_callbacks_.find(name) != this->periodic_callbacks_.end()) {
+ +
455 this->node_logging_->get_logger(), "Periodic function '" << name << "' already exists, overwriting.");
+
456 } else {
+
457 RCLCPP_DEBUG_STREAM(this->node_logging_->get_logger(), "Adding periodic function '" << name << "'.");
+
458 }
+
459 this->periodic_callbacks_.insert_or_assign(name, callback);
+
460}
+
+
461
+
+ +
463 if (this->tf_broadcaster_ == nullptr) {
+
464 RCLCPP_DEBUG(this->node_logging_->get_logger(), "Adding TF broadcaster.");
+
465 console_bridge::setLogLevel(console_bridge::CONSOLE_BRIDGE_LOG_NONE);
+
466 this->tf_broadcaster_ = std::make_shared<tf2_ros::TransformBroadcaster>(
+
467 this->node_parameters_, this->node_topics_, tf2_ros::DynamicBroadcasterQoS());
+
468 } else {
+
469 RCLCPP_DEBUG(this->node_logging_->get_logger(), "TF broadcaster already exists.");
+
470 }
+
471}
+
+
472
+
+ +
474 if (this->static_tf_broadcaster_ == nullptr) {
+
475 RCLCPP_DEBUG(this->node_logging_->get_logger(), "Adding static TF broadcaster.");
+
476 console_bridge::setLogLevel(console_bridge::CONSOLE_BRIDGE_LOG_NONE);
+
477 tf2_ros::StaticBroadcasterQoS qos;
+
478 rclcpp::PublisherOptionsWithAllocator<std::allocator<void>> options;
+
479 this->static_tf_broadcaster_ =
+
480 std::make_shared<tf2_ros::StaticTransformBroadcaster>(this->node_parameters_, this->node_topics_, qos, options);
+
481 } else {
+
482 RCLCPP_DEBUG(this->node_logging_->get_logger(), "Static TF broadcaster already exists.");
+
483 }
+
484}
+
+
485
+
+ +
487 if (this->tf_buffer_ == nullptr || this->tf_listener_ == nullptr) {
+
488 RCLCPP_DEBUG(this->node_logging_->get_logger(), "Adding TF buffer and listener.");
+
489 console_bridge::setLogLevel(console_bridge::CONSOLE_BRIDGE_LOG_NONE);
+
490 this->tf_buffer_ = std::make_shared<tf2_ros::Buffer>(this->node_clock_->get_clock());
+
491 this->tf_listener_ = std::make_shared<tf2_ros::TransformListener>(*this->tf_buffer_);
+
492 } else {
+
493 RCLCPP_DEBUG(this->node_logging_->get_logger(), "TF buffer and listener already exist.");
+
494 }
+
495}
+
+
496
+
+
497void ComponentInterface::send_transform(const state_representation::CartesianPose& transform) {
+
498 this->send_transforms(std::vector<state_representation::CartesianPose>{transform});
+
499}
+
+
500
+
+
501void ComponentInterface::send_transforms(const std::vector<state_representation::CartesianPose>& transforms) {
+
502 this->publish_transforms(transforms, this->tf_broadcaster_);
+
503}
+
+
504
+
+
505void ComponentInterface::send_static_transform(const state_representation::CartesianPose& transform) {
+
506 this->send_static_transforms(std::vector<state_representation::CartesianPose>{transform});
+
507}
+
+
508
+
+
509void ComponentInterface::send_static_transforms(const std::vector<state_representation::CartesianPose>& transforms) {
+
510 this->publish_transforms(transforms, this->static_tf_broadcaster_, true);
+
511}
+
+
512
+
+
513state_representation::CartesianPose ComponentInterface::lookup_transform(
+
514 const std::string& frame, const std::string& reference_frame, const tf2::TimePoint& time_point,
+
515 const tf2::Duration& duration) {
+
516 auto transform = this->lookup_ros_transform(frame, reference_frame, time_point, duration);
+
517 state_representation::CartesianPose result(frame, reference_frame);
+ +
519 return result;
+
520}
+
+
521
+
+
522state_representation::CartesianPose ComponentInterface::lookup_transform(
+
523 const std::string& frame, const std::string& reference_frame, double validity_period,
+
524 const tf2::Duration& duration) {
+
525 auto transform =
+
526 this->lookup_ros_transform(frame, reference_frame, tf2::TimePoint(std::chrono::microseconds(0)), duration);
+
527 if (validity_period > 0.0
+
528 && (this->node_clock_->get_clock()->now() - transform.header.stamp).seconds() > validity_period) {
+
529 throw exceptions::LookupTransformException("Failed to lookup transform: Latest transform is too old!");
+
530 }
+
531 state_representation::CartesianPose result(frame, reference_frame);
+ +
533 return result;
+
534}
+
+
535
+
536geometry_msgs::msg::TransformStamped ComponentInterface::lookup_ros_transform(
+
537 const std::string& frame, const std::string& reference_frame, const tf2::TimePoint& time_point,
+
538 const tf2::Duration& duration) {
+
539 if (this->tf_buffer_ == nullptr || this->tf_listener_ == nullptr) {
+
540 throw exceptions::LookupTransformException("Failed to lookup transform: To TF buffer / listener configured.");
+
541 }
+
542 try {
+
543 return this->tf_buffer_->lookupTransform(reference_frame, frame, time_point, duration);
+
544 } catch (const tf2::TransformException& ex) {
+
545 throw exceptions::LookupTransformException(std::string("Failed to lookup transform: ").append(ex.what()));
+
546 }
+
547}
+
548
+
+
549rclcpp::QoS ComponentInterface::get_qos() const {
+
550 return this->qos_;
+
551}
+
+
552
+
+
553void ComponentInterface::set_qos(const rclcpp::QoS& qos) {
+
554 this->qos_ = qos;
+
555}
+
+
556
+
+ +
558 RCLCPP_ERROR(this->node_logging_->get_logger(), "An error was raised in the component.");
+
559}
+
+
560
+
561modulo_interfaces::msg::Predicate ComponentInterface::get_predicate_message(const std::string& name, bool value) const {
+
562 modulo_interfaces::msg::Predicate message;
+
563 message.predicate = name;
+
564 message.value = value;
+
565 return message;
+
566}
+
567
+
568void ComponentInterface::publish_predicate(const std::string& name, bool value) const {
+
569 auto message(this->predicate_message_);
+
570 message.predicates.push_back(this->get_predicate_message(name, value));
+
571 this->predicate_publisher_->publish(message);
+
572}
+
573
+
+ +
575 auto message(this->predicate_message_);
+
576 for (auto predicate_it = this->predicates_.begin(); predicate_it != this->predicates_.end(); ++predicate_it) {
+
577 if (auto new_predicate = predicate_it->second.query(); new_predicate) {
+
578 message.predicates.push_back(this->get_predicate_message(predicate_it->first, *new_predicate));
+
579 }
+
580 }
+
581 if (message.predicates.size()) {
+
582 this->predicate_publisher_->publish(message);
+
583 }
+
584}
+
+
585
+
+ +
587 for (const auto& [signal, publisher] : this->outputs_) {
+
588 try {
+
589 if (this->periodic_outputs_.at(signal)) {
+
590 publisher->publish();
+
591 }
+
592 } catch (const exceptions::CoreException& ex) {
+ +
594 this->node_logging_->get_logger(), *this->node_clock_->get_clock(), 1000,
+
595 "Failed to publish output '" << signal << "': " << ex.what());
+
596 }
+
597 }
+
598}
+
+
599
+
+ +
601 for (const auto& [name, callback] : this->periodic_callbacks_) {
+
602 try {
+
603 callback();
+
604 } catch (const std::exception& ex) {
+ +
606 this->node_logging_->get_logger(), *this->node_clock_->get_clock(), 1000,
+
607 "Failed to evaluate periodic function callback '" << name << "': " << ex.what());
+
608 }
+
609 }
+
610}
+
+
611
+
+ +
613 RCLCPP_DEBUG(this->node_logging_->get_logger(), "Finalizing all interfaces.");
+
614 this->inputs_.clear();
+
615 this->outputs_.clear();
+
616 this->predicate_publisher_.reset();
+
617 this->empty_services_.clear();
+
618 this->string_services_.clear();
+
619 if (this->step_timer_ != nullptr) {
+
620 this->step_timer_->cancel();
+
621 }
+
622 this->step_timer_.reset();
+
623 this->tf_buffer_.reset();
+
624 this->tf_listener_.reset();
+
625 this->tf_broadcaster_.reset();
+
626 this->static_tf_broadcaster_.reset();
+
627}
+
+
628}// namespace modulo_components
+
double get_rate() const
Get the component rate in Hertz.
+
void send_transforms(const std::vector< state_representation::CartesianPose > &transforms)
Send a vector of transforms to TF.
+
virtual bool on_validate_parameter_callback(const std::shared_ptr< state_representation::ParameterInterface > &parameter)
Parameter validation function to be redefined by derived Component classes.
+
void publish_outputs()
Helper function to publish all output signals.
+
void remove_input(const std::string &signal_name)
Remove an input from the map of inputs.
+
void declare_input(const std::string &signal_name, const std::string &default_topic="", bool fixed_topic=false)
Declare an input to create the topic parameter without adding it to the map of inputs yet.
+
void declare_output(const std::string &signal_name, const std::string &default_topic="", bool fixed_topic=false)
Declare an output to create the topic parameter without adding it to the map of outputs yet.
+
T get_period() const
Get the component period.
+
void send_static_transforms(const std::vector< state_representation::CartesianPose > &transforms)
Send a vector of static transforms to TF.
+
std::map< std::string, std::shared_ptr< modulo_core::communication::PublisherInterface > > outputs_
Map of outputs.
+
std::shared_ptr< state_representation::ParameterInterface > get_parameter(const std::string &name) const
Get a parameter by name.
+
void finalize_interfaces()
Finalize all interfaces.
+
T get_parameter_value(const std::string &name) const
Get a parameter value by name.
+
virtual ~ComponentInterface()
Virtual destructor.
+
void add_static_tf_broadcaster()
Configure a static transform broadcaster.
+
void add_parameter(const std::shared_ptr< state_representation::ParameterInterface > &parameter, const std::string &description, bool read_only=false)
Add a parameter.
+
void trigger(const std::string &trigger_name)
Latch the trigger with the provided name.
+
state_representation::CartesianPose lookup_transform(const std::string &frame, const std::string &reference_frame, const tf2::TimePoint &time_point, const tf2::Duration &duration)
Look up a transform from TF.
+
virtual void on_step_callback()
Steps to execute periodically. To be redefined by derived Component classes.
+
void set_predicate(const std::string &predicate_name, bool predicate_value)
Set the value of the predicate given as parameter, if the predicate is not found does not do anything...
+
virtual void raise_error()
Notify an error in the component.
+
ComponentInterface(const std::shared_ptr< rclcpp::node_interfaces::NodeInterfaces< ALL_RCLCPP_NODE_INTERFACES > > &interfaces)
Constructor with all node interfaces.
+
void remove_output(const std::string &signal_name)
Remove an output from the map of outputs.
+
void publish_output(const std::string &signal_name)
Trigger the publishing of an output.
+
virtual void step()
Step function that is called periodically.
+
void publish_predicates()
Helper function to publish all predicates.
+
void set_qos(const rclcpp::QoS &qos)
Set the Quality of Service for ROS publishers and subscribers.
+
rclcpp::QoS get_qos() const
Getter of the Quality of Service attribute.
+
void add_predicate(const std::string &predicate_name, bool predicate_value)
Add a predicate to the map of predicates.
+
void send_transform(const state_representation::CartesianPose &transform)
Send a transform to TF.
+
void add_trigger(const std::string &trigger_name)
Add a trigger to the component. Triggers are predicates that are always false except when it's trigge...
+
void add_periodic_callback(const std::string &name, const std::function< void(void)> &callback)
Add a periodic callback function.
+
std::map< std::string, std::shared_ptr< modulo_core::communication::SubscriptionInterface > > inputs_
Map of inputs.
+
void add_tf_listener()
Configure a transform buffer and listener.
+
void evaluate_periodic_callbacks()
Helper function to evaluate all periodic function callbacks.
+
void add_tf_broadcaster()
Configure a transform broadcaster.
+
void send_static_transform(const state_representation::CartesianPose &transform)
Send a static transform to TF.
+
bool get_predicate(const std::string &predicate_name) const
Get the logical value of a predicate.
+
std::map< std::string, bool > periodic_outputs_
Map of outputs with periodic publishing flag.
+
void add_service(const std::string &service_name, const std::function< ComponentServiceResponse(void)> &callback)
Add a service to trigger a callback function with no input arguments.
+ +
An exception class to notify errors when adding a service.
+
An exception class to notify errors when adding a signal.
+
A base class for all core exceptions.
+
An exception class to notify an error while looking up TF transforms.
+
An exception class to notify errors with parameters in modulo classes.
+
An exception class to notify incompatibility when translating parameters from different sources.
+
Modulo components.
Definition Component.hpp:9
+
rclcpp::Parameter write_parameter(const std::shared_ptr< state_representation::ParameterInterface > &parameter)
Write a ROS Parameter from a ParameterInterface pointer.
+
rclcpp::ParameterType get_ros_parameter_type(const state_representation::ParameterType &parameter_type)
Given a state representation parameter type, get the corresponding ROS parameter type.
+
void copy_parameter_value(const std::shared_ptr< const state_representation::ParameterInterface > &source_parameter, const std::shared_ptr< state_representation::ParameterInterface > &parameter)
Copy the value of one parameter interface into another.
+
void read_message(state_representation::CartesianState &state, const geometry_msgs::msg::Accel &message)
Convert a ROS geometry_msgs::msg::Accel to a CartesianState.
+
std::shared_ptr< state_representation::ParameterInterface > read_parameter_const(const rclcpp::Parameter &ros_parameter, const std::shared_ptr< const state_representation::ParameterInterface > &parameter)
Update the parameter value of a ParameterInterface from a ROS Parameter object only if the two parame...
+
Modulo Core.
+
Response structure to be returned by component services.
+
+ + + + diff --git a/versions/v5.0.1/_component_interface_8hpp_source.html b/versions/v5.0.1/_component_interface_8hpp_source.html new file mode 100644 index 00000000..92aec4f1 --- /dev/null +++ b/versions/v5.0.1/_component_interface_8hpp_source.html @@ -0,0 +1,622 @@ + + + + + + + +Modulo: /github/workspace/source/modulo_components/include/modulo_components/ComponentInterface.hpp Source File + + + + + + + + + +
+
+ + + + + + +
+
Modulo 5.0.0 +
+
+
+ + + + + + + + + +
+
+ + +
+
+
+
+
+
Loading...
+
Searching...
+
No Matches
+
+
+
+
+ + +
+
+
ComponentInterface.hpp
+
+
+
1#pragma once
+
2
+
3#include <rclcpp/node_interfaces/node_interfaces.hpp>
+
4
+
5#include <tf2_ros/buffer.h>
+
6#include <tf2_ros/static_transform_broadcaster.h>
+
7#include <tf2_ros/transform_broadcaster.h>
+
8#include <tf2_ros/transform_listener.h>
+
9
+
10#include <state_representation/parameters/ParameterMap.hpp>
+
11
+
12#include <modulo_core/Predicate.hpp>
+
13#include <modulo_core/communication/PublisherHandler.hpp>
+
14#include <modulo_core/communication/PublisherType.hpp>
+
15#include <modulo_core/communication/SubscriptionHandler.hpp>
+
16#include <modulo_core/concepts.hpp>
+
17#include <modulo_core/exceptions.hpp>
+
18#include <modulo_core/translators/parameter_translators.hpp>
+
19
+
20#include <modulo_interfaces/msg/predicate_collection.hpp>
+
21#include <modulo_interfaces/srv/empty_trigger.hpp>
+
22#include <modulo_interfaces/srv/string_trigger.hpp>
+
23
+
24#include <modulo_utils/parsing.hpp>
+
25
+
30namespace modulo_components {
+
31
+
+ +
39 bool success;
+
40 std::string message;
+
41};
+
+
42
+ +
48
+
+ +
57public:
+ +
59
+
63 virtual ~ComponentInterface();
+
64
+
65protected:
+
70 explicit ComponentInterface(
+
71 const std::shared_ptr<rclcpp::node_interfaces::NodeInterfaces<ALL_RCLCPP_NODE_INTERFACES>>& interfaces);
+
72
+
77 double get_rate() const;
+
78
+
83 template<typename T>
+
84 T get_period() const;
+
85
+
89 virtual void step();
+
90
+
94 virtual void on_step_callback();
+
95
+
105 void add_parameter(
+
106 const std::shared_ptr<state_representation::ParameterInterface>& parameter, const std::string& description,
+
107 bool read_only = false);
+
108
+
120 template<typename T>
+
121 void add_parameter(const std::string& name, const T& value, const std::string& description, bool read_only = false);
+
122
+
129 [[nodiscard]] std::shared_ptr<state_representation::ParameterInterface> get_parameter(const std::string& name) const;
+
130
+
138 template<typename T>
+
139 [[nodiscard]] T get_parameter_value(const std::string& name) const;
+
140
+
149 template<typename T>
+
150 void set_parameter_value(const std::string& name, const T& value);
+
151
+
162 virtual bool
+
163 on_validate_parameter_callback(const std::shared_ptr<state_representation::ParameterInterface>& parameter);
+
164
+
170 void add_predicate(const std::string& predicate_name, bool predicate_value);
+
171
+
177 void add_predicate(const std::string& predicate_name, const std::function<bool(void)>& predicate_function);
+
178
+
185 [[nodiscard]] bool get_predicate(const std::string& predicate_name) const;
+
186
+
194 void set_predicate(const std::string& predicate_name, bool predicate_value);
+
195
+
203 void set_predicate(const std::string& predicate_name, const std::function<bool(void)>& predicate_function);
+
204
+
210 void add_trigger(const std::string& trigger_name);
+
211
+
216 void trigger(const std::string& trigger_name);
+
217
+
226 void declare_input(const std::string& signal_name, const std::string& default_topic = "", bool fixed_topic = false);
+
227
+
236 void declare_output(const std::string& signal_name, const std::string& default_topic = "", bool fixed_topic = false);
+
237
+
246 template<typename DataT>
+
247 void add_input(
+
248 const std::string& signal_name, const std::shared_ptr<DataT>& data, const std::string& default_topic = "",
+
249 bool fixed_topic = false);
+
250
+
260 template<typename DataT>
+
261 void add_input(
+
262 const std::string& signal_name, const std::shared_ptr<DataT>& data, const std::function<void()>& callback,
+
263 const std::string& default_topic = "", bool fixed_topic = false);
+
264
+
273 template<typename MsgT>
+
274 void add_input(
+
275 const std::string& signal_name, const std::function<void(const std::shared_ptr<MsgT>)>& callback,
+
276 const std::string& default_topic = "", bool fixed_topic = false);
+
277
+
290 template<typename DataT>
+
291 std::string create_output(
+ +
293 const std::shared_ptr<DataT>& data, const std::string& default_topic, bool fixed_topic, bool publish_on_step);
+
294
+
300 void publish_output(const std::string& signal_name);
+
301
+
306 void remove_input(const std::string& signal_name);
+
307
+
312 void remove_output(const std::string& signal_name);
+
313
+
319 void add_service(const std::string& service_name, const std::function<ComponentServiceResponse(void)>& callback);
+
320
+
329 void add_service(
+
330 const std::string& service_name,
+
331 const std::function<ComponentServiceResponse(const std::string& string)>& callback);
+
332
+
339 void add_periodic_callback(const std::string& name, const std::function<void(void)>& callback);
+
340
+
344 void add_tf_broadcaster();
+
345
+ +
350
+
354 void add_tf_listener();
+
355
+
360 void send_transform(const state_representation::CartesianPose& transform);
+
361
+
366 void send_transforms(const std::vector<state_representation::CartesianPose>& transforms);
+
367
+
372 void send_static_transform(const state_representation::CartesianPose& transform);
+
373
+
378 void send_static_transforms(const std::vector<state_representation::CartesianPose>& transforms);
+
379
+
390 [[nodiscard]] state_representation::CartesianPose lookup_transform(
+
391 const std::string& frame, const std::string& reference_frame, const tf2::TimePoint& time_point,
+
392 const tf2::Duration& duration);
+
393
+
404 [[nodiscard]] state_representation::CartesianPose lookup_transform(
+
405 const std::string& frame, const std::string& reference_frame = "world", double validity_period = -1.0,
+
406 const tf2::Duration& duration = tf2::Duration(std::chrono::microseconds(10)));
+
407
+
412 [[nodiscard]] rclcpp::QoS get_qos() const;
+
413
+
418 void set_qos(const rclcpp::QoS& qos);
+
419
+
423 virtual void raise_error();
+
424
+
428 void publish_predicates();
+
429
+
433 void publish_outputs();
+
434
+ +
439
+
443 void finalize_interfaces();
+
444
+
445 std::map<std::string, std::shared_ptr<modulo_core::communication::SubscriptionInterface>> inputs_;
+
446 std::map<std::string, std::shared_ptr<modulo_core::communication::PublisherInterface>> outputs_;
+
447 std::map<std::string, bool> periodic_outputs_;
+
448
+
449private:
+
454 void pre_set_parameters_callback(std::vector<rclcpp::Parameter>& parameters);
+
455
+
462 rcl_interfaces::msg::SetParametersResult on_set_parameters_callback(const std::vector<rclcpp::Parameter>& parameters);
+
463
+
471 bool validate_parameter(const std::shared_ptr<state_representation::ParameterInterface>& parameter);
+
472
+
478 modulo_interfaces::msg::Predicate get_predicate_message(const std::string& name, bool value) const;
+
479
+
489 void declare_signal(
+
490 const std::string& signal_name, const std::string& type, const std::string& default_topic, bool fixed_topic);
+
491
+
500 template<typename T>
+
501 bool remove_signal(
+
502 const std::string& signal_name, std::map<std::string, std::shared_ptr<T>>& signal_map, bool skip_check = false);
+
503
+
512 std::string validate_service_name(const std::string& service_name, const std::string& type) const;
+
513
+
519 void publish_predicate(const std::string& predicate_name, bool value) const;
+
520
+
528 template<typename T>
+
529 void publish_transforms(
+
530 const std::vector<state_representation::CartesianPose>& transforms, const std::shared_ptr<T>& tf_broadcaster,
+
531 bool is_static = false);
+
532
+
543 [[nodiscard]] geometry_msgs::msg::TransformStamped lookup_ros_transform(
+
544 const std::string& frame, const std::string& reference_frame, const tf2::TimePoint& time_point,
+
545 const tf2::Duration& duration);
+
546
+
547 double rate_;
+
548 double period_;
+
549 std::mutex step_mutex_;
+
550
+
551 std::map<std::string, modulo_core::Predicate> predicates_;
+
552 std::shared_ptr<rclcpp::Publisher<modulo_interfaces::msg::PredicateCollection>>
+
553 predicate_publisher_;
+
554 modulo_interfaces::msg::PredicateCollection predicate_message_;
+
555 std::vector<std::string> triggers_;
+
556
+
557 std::map<std::string, std::shared_ptr<rclcpp::Service<modulo_interfaces::srv::EmptyTrigger>>>
+
558 empty_services_;
+
559 std::map<std::string, std::shared_ptr<rclcpp::Service<modulo_interfaces::srv::StringTrigger>>>
+
560 string_services_;
+
561
+
562 std::map<std::string, std::function<void(void)>> periodic_callbacks_;
+
563
+
564 state_representation::ParameterMap parameter_map_;
+
565 std::unordered_map<std::string, bool> read_only_parameters_;
+
566 std::shared_ptr<rclcpp::node_interfaces::PreSetParametersCallbackHandle>
+
567 pre_set_parameter_cb_handle_;
+
568 std::shared_ptr<rclcpp::node_interfaces::OnSetParametersCallbackHandle>
+
569 on_set_parameter_cb_handle_;
+
570 rcl_interfaces::msg::SetParametersResult set_parameters_result_;
+
571 bool pre_set_parameter_callback_called_ = false;
+
572
+
573 std::shared_ptr<rclcpp::TimerBase> step_timer_;
+
574 std::shared_ptr<tf2_ros::Buffer> tf_buffer_;
+
575 std::shared_ptr<tf2_ros::TransformListener> tf_listener_;
+
576 std::shared_ptr<tf2_ros::TransformBroadcaster> tf_broadcaster_;
+
577 std::shared_ptr<tf2_ros::StaticTransformBroadcaster> static_tf_broadcaster_;
+
578
+
579 std::shared_ptr<rclcpp::node_interfaces::NodeBaseInterface> node_base_;
+
580 std::shared_ptr<rclcpp::node_interfaces::NodeClockInterface> node_clock_;
+
581 std::shared_ptr<rclcpp::node_interfaces::NodeLoggingInterface> node_logging_;
+
582 std::shared_ptr<rclcpp::node_interfaces::NodeParametersInterface> node_parameters_;
+
583 std::shared_ptr<rclcpp::node_interfaces::NodeServicesInterface> node_services_;
+
584 std::shared_ptr<rclcpp::node_interfaces::NodeTimersInterface> node_timers_;
+
585 std::shared_ptr<rclcpp::node_interfaces::NodeTopicsInterface> node_topics_;
+
586 rclcpp::QoS qos_ = rclcpp::QoS(10);
+
587};
+
+
588
+
589template<typename T>
+
+ +
591 const std::string& name, const T& value, const std::string& description, bool read_only) {
+
592 if (name.empty()) {
+
593 RCLCPP_ERROR(this->node_logging_->get_logger(), "Failed to add parameter: Provide a non empty string as a name.");
+
594 return;
+
595 }
+
596 this->add_parameter(state_representation::make_shared_parameter(name, value), description, read_only);
+
597}
+
+
598
+
599template<typename T>
+
+
600inline T ComponentInterface::get_parameter_value(const std::string& name) const {
+
601 try {
+
602 return this->parameter_map_.template get_parameter_value<T>(name);
+
603 } catch (const state_representation::exceptions::InvalidParameterException& ex) {
+ +
605 "Failed to get parameter value of parameter '" + name + "': " + ex.what());
+
606 }
+
607}
+
+
608
+
609template<typename T>
+
+
610inline void ComponentInterface::set_parameter_value(const std::string& name, const T& value) {
+
611 try {
+
612 std::vector<rclcpp::Parameter> parameters{
+
613 modulo_core::translators::write_parameter(state_representation::make_shared_parameter(name, value))};
+
614 this->pre_set_parameters_callback(parameters);
+
615 this->pre_set_parameter_callback_called_ = true;
+
616 auto result = this->node_parameters_->set_parameters(parameters).at(0);
+
617 if (!result.successful) {
+ +
619 this->node_logging_->get_logger(), *this->node_clock_->get_clock(), 1000,
+
620 "Failed to set parameter value of parameter '" << name << "': " << result.reason);
+
621 }
+
622 } catch (const std::exception& ex) {
+ +
624 this->node_logging_->get_logger(), *this->node_clock_->get_clock(), 1000,
+
625 "Failed to set parameter value of parameter '" << name << "': " << ex.what());
+
626 }
+
627}
+
+
628
+
629template<typename DataT>
+
+ +
631 const std::string& signal_name, const std::shared_ptr<DataT>& data, const std::string& default_topic,
+
632 bool fixed_topic) {
+
633 this->add_input(signal_name, data, [] {}, default_topic, fixed_topic);
+
634}
+
+
635
+
636template<typename DataT>
+
+ +
638 const std::string& signal_name, const std::shared_ptr<DataT>& data, const std::function<void()>& user_callback,
+
639 const std::string& default_topic, bool fixed_topic) {
+
640 using namespace modulo_core::communication;
+
641 try {
+
642 if (data == nullptr) {
+
643 throw modulo_core::exceptions::NullPointerException("Invalid data pointer for input '" + signal_name + "'.");
+
644 }
+
645 this->declare_input(signal_name, default_topic, fixed_topic);
+
646 std::string parsed_signal_name = modulo_utils::parsing::parse_topic_name(signal_name);
+
647 auto topic_name = this->get_parameter_value<std::string>(parsed_signal_name + "_topic");
+ +
649 this->node_logging_->get_logger(),
+
650 "Adding input '" << parsed_signal_name << "' with topic name '" << topic_name << "'.");
+
651 auto message_pair = make_shared_message_pair(data, this->node_clock_->get_clock());
+
652 std::shared_ptr<SubscriptionInterface> subscription_interface;
+
653 switch (message_pair->get_type()) {
+
654 case MessageType::BOOL: {
+ +
656 std::make_shared<SubscriptionHandler<std_msgs::msg::Bool>>(message_pair, this->node_logging_->get_logger());
+
657 auto subscription = rclcpp::create_subscription<std_msgs::msg::Bool>(
+
658 this->node_parameters_, this->node_topics_, topic_name, this->qos_,
+
659 subscription_handler->get_callback(user_callback));
+
660 subscription_interface = subscription_handler->create_subscription_interface(subscription);
+
661 break;
+
662 }
+
663 case MessageType::FLOAT64: {
+
664 auto subscription_handler = std::make_shared<SubscriptionHandler<std_msgs::msg::Float64>>(
+
665 message_pair, this->node_logging_->get_logger());
+
666 auto subscription = rclcpp::create_subscription<std_msgs::msg::Float64>(
+
667 this->node_parameters_, this->node_topics_, topic_name, this->qos_,
+
668 subscription_handler->get_callback(user_callback));
+
669 subscription_interface = subscription_handler->create_subscription_interface(subscription);
+
670 break;
+
671 }
+
672 case MessageType::FLOAT64_MULTI_ARRAY: {
+
673 auto subscription_handler = std::make_shared<SubscriptionHandler<std_msgs::msg::Float64MultiArray>>(
+
674 message_pair, this->node_logging_->get_logger());
+
675 auto subscription = rclcpp::create_subscription<std_msgs::msg::Float64MultiArray>(
+
676 this->node_parameters_, this->node_topics_, topic_name, this->qos_,
+
677 subscription_handler->get_callback(user_callback));
+
678 subscription_interface = subscription_handler->create_subscription_interface(subscription);
+
679 break;
+
680 }
+
681 case MessageType::INT32: {
+
682 auto subscription_handler = std::make_shared<SubscriptionHandler<std_msgs::msg::Int32>>(
+
683 message_pair, this->node_logging_->get_logger());
+
684 auto subscription = rclcpp::create_subscription<std_msgs::msg::Int32>(
+
685 this->node_parameters_, this->node_topics_, topic_name, this->qos_,
+
686 subscription_handler->get_callback(user_callback));
+
687 subscription_interface = subscription_handler->create_subscription_interface(subscription);
+
688 break;
+
689 }
+
690 case MessageType::STRING: {
+
691 auto subscription_handler = std::make_shared<SubscriptionHandler<std_msgs::msg::String>>(
+
692 message_pair, this->node_logging_->get_logger());
+
693 auto subscription = rclcpp::create_subscription<std_msgs::msg::String>(
+
694 this->node_parameters_, this->node_topics_, topic_name, this->qos_,
+
695 subscription_handler->get_callback(user_callback));
+
696 subscription_interface = subscription_handler->create_subscription_interface(subscription);
+
697 break;
+
698 }
+
699 case MessageType::ENCODED_STATE: {
+
700 auto subscription_handler = std::make_shared<SubscriptionHandler<modulo_core::EncodedState>>(
+
701 message_pair, this->node_logging_->get_logger());
+
702 auto subscription = rclcpp::create_subscription<modulo_core::EncodedState>(
+
703 this->node_parameters_, this->node_topics_, topic_name, this->qos_,
+
704 subscription_handler->get_callback(user_callback));
+
705 subscription_interface = subscription_handler->create_subscription_interface(subscription);
+
706 break;
+
707 }
+
708 case MessageType::CUSTOM_MESSAGE: {
+ + +
711 std::make_shared<SubscriptionHandler<DataT>>(message_pair, this->node_logging_->get_logger());
+
712 auto subscription = rclcpp::create_subscription<DataT>(
+
713 this->node_parameters_, this->node_topics_, topic_name, this->qos_,
+
714 subscription_handler->get_callback(user_callback));
+
715 subscription_interface = subscription_handler->create_subscription_interface(subscription);
+
716 }
+
717 break;
+
718 }
+
719 }
+
720 this->inputs_.insert_or_assign(parsed_signal_name, subscription_interface);
+
721 } catch (const std::exception& ex) {
+ +
723 this->node_logging_->get_logger(), "Failed to add input '" << signal_name << "': " << ex.what());
+
724 }
+
725}
+
+
726
+
727template<typename MsgT>
+
+ +
729 const std::string& signal_name, const std::function<void(const std::shared_ptr<MsgT>)>& callback,
+
730 const std::string& default_topic, bool fixed_topic) {
+
731 using namespace modulo_core::communication;
+
732 try {
+
733 std::string parsed_signal_name = modulo_utils::parsing::parse_topic_name(signal_name);
+
734 this->declare_input(parsed_signal_name, default_topic, fixed_topic);
+
735 auto topic_name = this->get_parameter_value<std::string>(parsed_signal_name + "_topic");
+ +
737 this->node_logging_->get_logger(),
+
738 "Adding input '" << parsed_signal_name << "' with topic name '" << topic_name << "'.");
+
739 auto subscription =
+
740 rclcpp::create_subscription<MsgT>(this->node_parameters_, this->node_topics_, topic_name, this->qos_, callback);
+ +
742 std::make_shared<SubscriptionHandler<MsgT>>()->create_subscription_interface(subscription);
+
743 this->inputs_.insert_or_assign(parsed_signal_name, subscription_interface);
+
744 } catch (const std::exception& ex) {
+ +
746 this->node_logging_->get_logger(), "Failed to add input '" << signal_name << "': " << ex.what());
+
747 }
+
748}
+
+
749
+
750template<typename DataT>
+
+ +
752 modulo_core::communication::PublisherType publisher_type, const std::string& signal_name,
+
753 const std::shared_ptr<DataT>& data, const std::string& default_topic, bool fixed_topic, bool publish_on_step) {
+
754 using namespace modulo_core::communication;
+
755 try {
+
756 if (data == nullptr) {
+
757 throw modulo_core::exceptions::NullPointerException("Invalid data pointer for output '" + signal_name + "'.");
+
758 }
+
759 this->declare_output(signal_name, default_topic, fixed_topic);
+
760 auto parsed_signal_name = modulo_utils::parsing::parse_topic_name(signal_name);
+ +
762 this->node_logging_->get_logger(),
+
763 "Creating output '" << parsed_signal_name << "' (provided signal name was '" << signal_name << "').");
+
764 auto message_pair = make_shared_message_pair(data, this->node_clock_->get_clock());
+
765 this->outputs_.insert_or_assign(
+
766 parsed_signal_name, std::make_shared<PublisherInterface>(publisher_type, message_pair));
+
767 this->periodic_outputs_.insert_or_assign(parsed_signal_name, publish_on_step);
+
768 return parsed_signal_name;
+ +
770 throw;
+
771 } catch (const std::exception& ex) {
+ +
773 }
+
774}
+
+
775
+
776template<typename T>
+
777inline bool ComponentInterface::remove_signal(
+
778 const std::string& signal_name, std::map<std::string, std::shared_ptr<T>>& signal_map, bool skip_check) {
+
779 if (!skip_check && signal_map.find(signal_name) == signal_map.cend()) {
+
780 return false;
+
781 } else {
+
782 RCLCPP_DEBUG_STREAM(this->node_logging_->get_logger(), "Removing signal '" << signal_name << "'.");
+
783 signal_map.at(signal_name).reset();
+
784 return signal_map.erase(signal_name);
+
785 }
+
786}
+
787
+
788template<typename T>
+
789inline void ComponentInterface::publish_transforms(
+
790 const std::vector<state_representation::CartesianPose>& transforms, const std::shared_ptr<T>& tf_broadcaster,
+
791 bool is_static) {
+
792 std::string modifier = is_static ? "static " : "";
+
793 if (tf_broadcaster == nullptr) {
+ +
795 this->node_logging_->get_logger(), *this->node_clock_->get_clock(), 1000,
+
796 "Failed to send " << modifier << "transform: No " << modifier << "TF broadcaster configured.");
+
797 return;
+
798 }
+
799 try {
+
800 std::vector<geometry_msgs::msg::TransformStamped> transform_messages;
+
801 transform_messages.reserve(transforms.size());
+
802 for (const auto& tf : transforms) {
+
803 geometry_msgs::msg::TransformStamped transform_message;
+
804 modulo_core::translators::write_message(transform_message, tf, this->node_clock_->get_clock()->now());
+ +
806 }
+
807 tf_broadcaster->sendTransform(transform_messages);
+
808 } catch (const std::exception& ex) {
+ +
810 this->node_logging_->get_logger(), *this->node_clock_->get_clock(), 1000,
+
811 "Failed to send " << modifier << "transform: " << ex.what());
+
812 }
+
813}
+
814}// namespace modulo_components
+
Friend class to the ComponentInterface to allow test fixtures to access protected and private members...
+
Base interface class for modulo components to wrap a ROS Node with custom behaviour.
+
double get_rate() const
Get the component rate in Hertz.
+
void send_transforms(const std::vector< state_representation::CartesianPose > &transforms)
Send a vector of transforms to TF.
+
virtual bool on_validate_parameter_callback(const std::shared_ptr< state_representation::ParameterInterface > &parameter)
Parameter validation function to be redefined by derived Component classes.
+
void publish_outputs()
Helper function to publish all output signals.
+
void remove_input(const std::string &signal_name)
Remove an input from the map of inputs.
+
void declare_input(const std::string &signal_name, const std::string &default_topic="", bool fixed_topic=false)
Declare an input to create the topic parameter without adding it to the map of inputs yet.
+
void declare_output(const std::string &signal_name, const std::string &default_topic="", bool fixed_topic=false)
Declare an output to create the topic parameter without adding it to the map of outputs yet.
+
T get_period() const
Get the component period.
+
void set_parameter_value(const std::string &name, const T &value)
Set the value of a parameter.
+
void send_static_transforms(const std::vector< state_representation::CartesianPose > &transforms)
Send a vector of static transforms to TF.
+
std::map< std::string, std::shared_ptr< modulo_core::communication::PublisherInterface > > outputs_
Map of outputs.
+
std::shared_ptr< state_representation::ParameterInterface > get_parameter(const std::string &name) const
Get a parameter by name.
+
void finalize_interfaces()
Finalize all interfaces.
+
T get_parameter_value(const std::string &name) const
Get a parameter value by name.
+
virtual ~ComponentInterface()
Virtual destructor.
+
void add_static_tf_broadcaster()
Configure a static transform broadcaster.
+
void add_parameter(const std::shared_ptr< state_representation::ParameterInterface > &parameter, const std::string &description, bool read_only=false)
Add a parameter.
+
void trigger(const std::string &trigger_name)
Latch the trigger with the provided name.
+
void add_input(const std::string &signal_name, const std::shared_ptr< DataT > &data, const std::string &default_topic="", bool fixed_topic=false)
Add and configure an input signal of the component.
+
state_representation::CartesianPose lookup_transform(const std::string &frame, const std::string &reference_frame, const tf2::TimePoint &time_point, const tf2::Duration &duration)
Look up a transform from TF.
+
virtual void on_step_callback()
Steps to execute periodically. To be redefined by derived Component classes.
+
void set_predicate(const std::string &predicate_name, bool predicate_value)
Set the value of the predicate given as parameter, if the predicate is not found does not do anything...
+
virtual void raise_error()
Notify an error in the component.
+
void remove_output(const std::string &signal_name)
Remove an output from the map of outputs.
+
void publish_output(const std::string &signal_name)
Trigger the publishing of an output.
+
virtual void step()
Step function that is called periodically.
+
void publish_predicates()
Helper function to publish all predicates.
+
void set_qos(const rclcpp::QoS &qos)
Set the Quality of Service for ROS publishers and subscribers.
+
std::string create_output(modulo_core::communication::PublisherType publisher_type, const std::string &signal_name, const std::shared_ptr< DataT > &data, const std::string &default_topic, bool fixed_topic, bool publish_on_step)
Helper function to parse the signal name and add an unconfigured PublisherInterface to the map of out...
+
rclcpp::QoS get_qos() const
Getter of the Quality of Service attribute.
+
void add_predicate(const std::string &predicate_name, bool predicate_value)
Add a predicate to the map of predicates.
+
void send_transform(const state_representation::CartesianPose &transform)
Send a transform to TF.
+
void add_trigger(const std::string &trigger_name)
Add a trigger to the component. Triggers are predicates that are always false except when it's trigge...
+
void add_periodic_callback(const std::string &name, const std::function< void(void)> &callback)
Add a periodic callback function.
+
std::map< std::string, std::shared_ptr< modulo_core::communication::SubscriptionInterface > > inputs_
Map of inputs.
+
void add_tf_listener()
Configure a transform buffer and listener.
+
void evaluate_periodic_callbacks()
Helper function to evaluate all periodic function callbacks.
+
void add_tf_broadcaster()
Configure a transform broadcaster.
+
void send_static_transform(const state_representation::CartesianPose &transform)
Send a static transform to TF.
+
bool get_predicate(const std::string &predicate_name) const
Get the logical value of a predicate.
+
std::map< std::string, bool > periodic_outputs_
Map of outputs with periodic publishing flag.
+
void add_service(const std::string &service_name, const std::function< ComponentServiceResponse(void)> &callback)
Add a service to trigger a callback function with no input arguments.
+
An exception class to notify errors when adding a signal.
+
An exception class to notify that a certain pointer is null.
+
An exception class to notify errors with parameters in modulo classes.
+ +
Modulo components.
Definition Component.hpp:9
+
Modulo Core communication module for handling messages on publication and subscription interfaces.
+
PublisherType
Enum of supported ROS publisher types for the PublisherInterface.
+
void write_message(geometry_msgs::msg::Accel &message, const state_representation::CartesianState &state, const rclcpp::Time &time)
Convert a CartesianState to a ROS geometry_msgs::msg::Accel.
+
rclcpp::Parameter write_parameter(const std::shared_ptr< state_representation::ParameterInterface > &parameter)
Write a ROS Parameter from a ParameterInterface pointer.
+
Response structure to be returned by component services.
+
+ + + + diff --git a/versions/v5.0.1/_controller_interface_8cpp_source.html b/versions/v5.0.1/_controller_interface_8cpp_source.html new file mode 100644 index 00000000..eb1248cb --- /dev/null +++ b/versions/v5.0.1/_controller_interface_8cpp_source.html @@ -0,0 +1,451 @@ + + + + + + + +Modulo: /github/workspace/source/modulo_controllers/src/ControllerInterface.cpp Source File + + + + + + + + + +
+
+ + + + + + +
+
Modulo 5.0.0 +
+
+
+ + + + + + + + + +
+
+ + +
+
+
+
+
+
Loading...
+
Searching...
+
No Matches
+
+
+
+
+ + +
+
+
ControllerInterface.cpp
+
+
+
1#include "modulo_controllers/ControllerInterface.hpp"
+
2
+
3using namespace modulo_core;
+
4using namespace state_representation;
+
5using namespace std::chrono_literals;
+
6
+
7namespace modulo_controllers {
+
8
+
+
9ControllerInterface::ControllerInterface(bool claim_all_state_interfaces)
+
10 : BaseControllerInterface(), claim_all_state_interfaces_(claim_all_state_interfaces), on_init_called_(false) {}
+
+
11
+
+
12rclcpp_lifecycle::node_interfaces::LifecycleNodeInterface::CallbackReturn ControllerInterface::on_init() {
+ +
14 if (status != CallbackReturn::SUCCESS) {
+
15 return status;
+
16 }
+
17 on_init_called_ = true;
+
18
+
19 try {
+
20 add_parameter(std::make_shared<Parameter<std::string>>("hardware_name"), "The name of the hardware interface");
+ +
22 std::make_shared<Parameter<std::string>>("robot_description"),
+
23 "The string formatted content of the controller's URDF description");
+ +
25 std::make_shared<Parameter<std::vector<std::string>>>("joints"),
+
26 "A vector of joint names that the controller will claim");
+ +
28 "activation_timeout", 1.0, "The seconds to wait for valid data on the state interfaces before activating");
+ +
30 "input_validity_period", 1.0, "The maximum age of an input state before discarding it as expired");
+
31 add_parameter<int>("predicate_publishing_rate", 10, "The rate at which to publish controller predicates");
+
32
+
33 return add_interfaces();
+
34 } catch (const std::exception& e) {
+
35 RCLCPP_ERROR(get_node()->get_logger(), "Exception thrown during on_init stage with message: %s \n", e.what());
+
36 }
+
37 return CallbackReturn::ERROR;
+
38}
+
+
39
+
+
40rclcpp_lifecycle::node_interfaces::LifecycleNodeInterface::CallbackReturn ControllerInterface::add_interfaces() {
+
41 return CallbackReturn::SUCCESS;
+
42}
+
+
43
+
44rclcpp_lifecycle::node_interfaces::LifecycleNodeInterface::CallbackReturn
+
+
45ControllerInterface::on_configure(const rclcpp_lifecycle::State& previous_state) {
+ +
47 if (status != CallbackReturn::SUCCESS) {
+
48 return status;
+
49 }
+
50
+
51 if (!on_init_called_) {
+ + +
54 "The controller has not been properly initialized! Derived controller classes must call "
+
55 "'ControllerInterface::on_init()' during their own initialization before being configured.");
+
56 return CallbackReturn::ERROR;
+
57 }
+
58
+
59 auto hardware_name = get_parameter("hardware_name");
+
60 if (hardware_name->is_empty()) {
+
61 RCLCPP_ERROR(get_node()->get_logger(), "Parameter 'hardware_name' cannot be empty");
+
62 return CallbackReturn::ERROR;
+
63 }
+
64 hardware_name_ = hardware_name->get_parameter_value<std::string>();
+
65
+ +
67
+
68 RCLCPP_DEBUG(get_node()->get_logger(), "Configuration of ControllerInterface successful");
+
69 try {
+
70 return on_configure();
+
71 } catch (const std::exception& ex) {
+ +
73 }
+
74 return CallbackReturn::ERROR;
+
75}
+
+
76
+
+
77rclcpp_lifecycle::node_interfaces::LifecycleNodeInterface::CallbackReturn ControllerInterface::on_configure() {
+
78 return CallbackReturn::SUCCESS;
+
79}
+
+
80
+
+
81void ControllerInterface::add_state_interface(const std::string& name, const std::string& interface) {
+
82 add_interface(name, interface, state_interface_names_, "state");
+
83}
+
+
84
+
+
85void ControllerInterface::add_command_interface(const std::string& name, const std::string& interface) {
+
86 add_interface(name, interface, command_interface_names_, "command");
+
87}
+
+
88
+
89void ControllerInterface::add_interface(
+
90 const std::string& name, const std::string& interface, std::vector<std::string>& list, const std::string& type) {
+
91 if (get_node()->get_current_state().label() != "configuring") {
+
92 throw std::runtime_error("Interfaces can only be added when the controller is in state 'configuring'");
+
93 }
+
94 auto full_name = name + "/" + interface;
+
95 if (std::find(list.cbegin(), list.cend(), full_name) == list.cend()) {
+
96 list.push_back(full_name);
+ +
98 get_node()->get_logger(), "Adding interface '%s' to the list of desired %s interfaces", full_name.c_str(),
+
99 type.c_str());
+
100 } else {
+ +
102 get_node()->get_logger(), "Interface '%s' is already in the list of desired %s interfaces", full_name.c_str(),
+
103 type.c_str());
+
104 }
+
105}
+
106
+
+
107controller_interface::InterfaceConfiguration ControllerInterface::command_interface_configuration() const {
+
108 controller_interface::InterfaceConfiguration command_interfaces_config;
+
109 if (command_interface_names_.empty()) {
+
110 RCLCPP_DEBUG(get_node()->get_logger(), "List of command interfaces is empty, not claiming any interfaces.");
+
111 command_interfaces_config.type = controller_interface::interface_configuration_type::NONE;
+ +
113 }
+
114
+
115 command_interfaces_config.type = controller_interface::interface_configuration_type::INDIVIDUAL;
+
116 for (const auto& interface : command_interface_names_) {
+
117 RCLCPP_DEBUG(get_node()->get_logger(), "Claiming command interface '%s'", interface.c_str());
+
118 command_interfaces_config.names.push_back(interface);
+
119 }
+
120
+ +
122}
+
+
123
+
+
124controller_interface::InterfaceConfiguration ControllerInterface::state_interface_configuration() const {
+
125 controller_interface::InterfaceConfiguration state_interfaces_config;
+
126 if (claim_all_state_interfaces_) {
+
127 RCLCPP_DEBUG(get_node()->get_logger(), "Claiming all state interfaces.");
+
128 state_interfaces_config.type = controller_interface::interface_configuration_type::ALL;
+ +
130 }
+
131
+
132 state_interfaces_config.type = controller_interface::interface_configuration_type::INDIVIDUAL;
+
133 for (const auto& interface : state_interface_names_) {
+
134 RCLCPP_DEBUG(get_node()->get_logger(), "Claiming state interface '%s'", interface.c_str());
+
135 state_interfaces_config.names.push_back(interface);
+
136 }
+
137
+ +
139}
+
+
140
+
141rclcpp_lifecycle::node_interfaces::LifecycleNodeInterface::CallbackReturn
+
+
142ControllerInterface::on_activate(const rclcpp_lifecycle::State&) {
+
143 // initialize the map of command data from all available interfaces
+
144 command_interface_data_ = std::vector<double>(command_interfaces_.size());
+
145 for (unsigned int i = 0; i < command_interfaces_.size(); ++i) {
+
146 const auto& command_interface = command_interfaces_.at(i);
+
147 if (command_interface_indices_.find(command_interface.get_prefix_name()) == command_interface_indices_.cend()) {
+
148 command_interface_indices_.insert_or_assign(
+
149 command_interface.get_prefix_name(), std::unordered_map<std::string, unsigned int>());
+
150 }
+
151 command_interface_indices_.at(command_interface.get_prefix_name())
+
152 .insert_or_assign(command_interface.get_interface_name(), i);
+
153 command_interface_data_.at(i) = command_interface.get_value();
+
154 }
+
155
+
156 // initialize the map of state data from all available interfaces
+
157 for (const auto& state_interface : state_interfaces_) {
+
158 if (state_interface_data_.find(state_interface.get_prefix_name()) == state_interface_data_.cend()) {
+
159 state_interface_data_.insert_or_assign(
+
160 state_interface.get_prefix_name(), std::unordered_map<std::string, double>());
+
161 }
+
162 state_interface_data_.at(state_interface.get_prefix_name())
+
163 .insert_or_assign(state_interface.get_interface_name(), state_interface.get_value());
+
164 }
+
165
+
166 auto status = CallbackReturn::ERROR;
+
167 try {
+ +
169 } catch (const std::exception& ex) {
+ +
171 }
+
172 if (status != CallbackReturn::SUCCESS) {
+
173 return status;
+
174 }
+
175
+
176 auto start_time = get_node()->get_clock()->now();
+
177 auto activation_timeout = rclcpp::Duration::from_seconds(get_parameter_value<double>("activation_timeout"));
+
178 while (read_state_interfaces() != controller_interface::return_type::OK) {
+ +
180 get_node()->get_logger(), *get_node()->get_clock(), 1000,
+
181 "Activation is not possible yet; the controller did not receive valid states from hardware");
+ + + +
185 get_node()->get_logger(),
+
186 "Activation was not successful; the controller did not receive valid states from hardware");
+
187 return CallbackReturn::FAILURE;
+
188 }
+
189 }
+
190
+
191 RCLCPP_DEBUG(get_node()->get_logger(), "Activation of ControllerInterface successful");
+
192 return CallbackReturn::SUCCESS;
+
193}
+
+
194
+
+
195rclcpp_lifecycle::node_interfaces::LifecycleNodeInterface::CallbackReturn ControllerInterface::on_activate() {
+
196 return CallbackReturn::SUCCESS;
+
197}
+
+
198
+
199rclcpp_lifecycle::node_interfaces::LifecycleNodeInterface::CallbackReturn
+
+
200ControllerInterface::on_deactivate(const rclcpp_lifecycle::State&) {
+
201 try {
+
202 return on_deactivate();
+
203 } catch (const std::exception& ex) {
+ +
205 }
+
206 return CallbackReturn::ERROR;
+
207}
+
+
208
+
+
209rclcpp_lifecycle::node_interfaces::LifecycleNodeInterface::CallbackReturn ControllerInterface::on_deactivate() {
+
210 return CallbackReturn::SUCCESS;
+
211}
+
+
212
+
213controller_interface::return_type
+
+
214ControllerInterface::update(const rclcpp::Time& time, const rclcpp::Duration& period) {
+ +
216 if (status != controller_interface::return_type::OK) {
+
217 return status;
+
218 }
+
219
+
220 try {
+
221 status = evaluate(time, period.to_chrono<std::chrono::nanoseconds>());
+
222 } catch (const std::exception& e) {
+ +
224 get_node()->get_logger(), *get_node()->get_clock(), 1000, "Exception during evaluate(): %s \n", e.what());
+
225 return controller_interface::return_type::ERROR;
+
226 }
+
227 if (status != controller_interface::return_type::OK) {
+
228 return status;
+
229 }
+
230
+
231 if (command_interface_data_.empty()) {
+
232 return controller_interface::return_type::OK;
+
233 }
+
234
+
235 controller_interface::return_type ret;
+
236 if (get_command_mutex().try_lock()) {
+
237 missed_locks_ = 0;
+ +
239 get_command_mutex().unlock();
+
240 } else {
+
241 if (missed_locks_ > 2) {
+ +
243 get_node()->get_logger(),
+
244 "Controller is unable to acquire lock for command interfaces, returning an error now");
+
245 ret = controller_interface::return_type::ERROR;
+
246 }
+
247 ++missed_locks_;
+
248 RCLCPP_WARN(get_node()->get_logger(), "Unable to acquire lock for command interfaces (%u/3)", missed_locks_);
+
249 }
+
250
+
251 return ret;
+
252}
+
+
253
+
+
254controller_interface::return_type ControllerInterface::read_state_interfaces() {
+
255 for (const auto& state_interface : state_interfaces_) {
+
256 state_interface_data_.at(state_interface.get_prefix_name()).at(state_interface.get_interface_name()) =
+
257 state_interface.get_value();
+
258 }
+
259
+
260 return controller_interface::return_type::OK;
+
261}
+
+
262
+
+
263controller_interface::return_type ControllerInterface::write_command_interfaces(const rclcpp::Duration&) {
+ +
265 command_interface.set_value(command_interface_data_.at(
+
266 command_interface_indices_.at(command_interface.get_prefix_name()).at(command_interface.get_interface_name())));
+
267 }
+
268 return controller_interface::return_type::OK;
+
269}
+
+
270
+
+
271std::unordered_map<std::string, double> ControllerInterface::get_state_interfaces(const std::string& name) const {
+
272 return state_interface_data_.at(name);
+
273}
+
+
274
+
+
275double ControllerInterface::get_state_interface(const std::string& name, const std::string& interface) const {
+
276 return state_interface_data_.at(name).at(interface);
+
277}
+
+
278
+
+
279double ControllerInterface::get_command_interface(const std::string& name, const std::string& interface) const {
+
280 return command_interfaces_.at(command_interface_indices_.at(name).at(interface)).get_value();
+
281}
+
+
282
+
+
283void ControllerInterface::set_command_interface(const std::string& name, const std::string& interface, double value) {
+
284 try {
+
285 command_interface_data_.at(command_interface_indices_.at(name).at(interface)) = value;
+
286 } catch (const std::out_of_range&) {
+ +
288 get_node()->get_logger(), *get_node()->get_clock(), 1000,
+
289 "set_command_interface called with an unknown name/interface: %s/%s", name.c_str(), interface.c_str());
+
290 }
+
291}
+
+
292
+
293}// namespace modulo_controllers
+
Base controller class to combine ros2_control, control libraries and modulo.
+
std::shared_ptr< state_representation::ParameterInterface > get_parameter(const std::string &name) const
Get a parameter by name.
+
CallbackReturn on_configure(const rclcpp_lifecycle::State &previous_state) override
Add signals.
+
T get_parameter_value(const std::string &name) const
Get a parameter value by name.
+
void set_input_validity_period(double input_validity_period)
Set the input validity period of input signals.
+
CallbackReturn on_init() override
Declare parameters and register the on_set_parameters callback.
+
void add_parameter(const std::shared_ptr< state_representation::ParameterInterface > &parameter, const std::string &description, bool read_only=false)
Add a parameter.
+
std::timed_mutex & get_command_mutex()
Get the reference to the command mutex.
+
virtual CallbackReturn add_interfaces()
Add interfaces like parameters, signals, services, and predicates to the controller.
+
controller_interface::InterfaceConfiguration command_interface_configuration() const final
Configure the command interfaces.
+
virtual controller_interface::return_type write_command_interfaces(const rclcpp::Duration &period)
Write the command interfaces.
+
virtual CallbackReturn on_configure()
Configure the controller.
+
virtual controller_interface::return_type evaluate(const rclcpp::Time &time, const std::chrono::nanoseconds &period)=0
The control logic callback.
+
virtual controller_interface::return_type read_state_interfaces()
Read the state interfaces.
+
std::unordered_map< std::string, double > get_state_interfaces(const std::string &name) const
Get a map containing the state interfaces by name of the parent tag.
+
CallbackReturn on_init() override
Declare parameters.
+
ControllerInterface(bool claim_all_state_interfaces=false)
Default constructor.
+
void add_state_interface(const std::string &name, const std::string &interface)
Add a state interface to the controller by name.
+
double get_command_interface(const std::string &name, const std::string &interface) const
Get the value of a command interface by name.
+
virtual CallbackReturn on_activate()
Activate the controller.
+
double get_state_interface(const std::string &name, const std::string &interface) const
Get the value of a state interface by name.
+
controller_interface::return_type update(const rclcpp::Time &time, const rclcpp::Duration &period) final
Read the state interfaces, perform control evaluation and write the command interfaces.
+
void set_command_interface(const std::string &name, const std::string &interface, double value)
Set the value of a command interface by name.
+
std::string hardware_name_
The hardware name provided by a parameter.
+
virtual CallbackReturn on_deactivate()
Deactivate the controller.
+
void add_command_interface(const std::string &name, const std::string &interface)
Add a command interface to the controller by name.
+
controller_interface::InterfaceConfiguration state_interface_configuration() const final
Configure the state interfaces.
+
Modulo Core.
+
+ + + + diff --git a/versions/v5.0.1/_controller_interface_8hpp_source.html b/versions/v5.0.1/_controller_interface_8hpp_source.html new file mode 100644 index 00000000..a95233ef --- /dev/null +++ b/versions/v5.0.1/_controller_interface_8hpp_source.html @@ -0,0 +1,189 @@ + + + + + + + +Modulo: /github/workspace/source/modulo_controllers/include/modulo_controllers/ControllerInterface.hpp Source File + + + + + + + + + +
+
+ + + + + + +
+
Modulo 5.0.0 +
+
+
+ + + + + + + + + +
+
+ + +
+
+
+
+
+
Loading...
+
Searching...
+
No Matches
+
+
+
+
+ + +
+
+
ControllerInterface.hpp
+
+
+
1#pragma once
+
2
+
3#include "modulo_controllers/BaseControllerInterface.hpp"
+
4
+
5namespace modulo_controllers {
+
6
+
+ +
11public:
+ +
17
+
22 CallbackReturn on_init() override;
+
23
+
30 CallbackReturn on_configure(const rclcpp_lifecycle::State& previous_state) final;
+
31
+
38 CallbackReturn on_activate(const rclcpp_lifecycle::State& previous_state) final;
+
39
+
45 CallbackReturn on_deactivate(const rclcpp_lifecycle::State& previous_state) final;
+
46
+
53 controller_interface::return_type update(const rclcpp::Time& time, const rclcpp::Duration& period) final;
+
54
+
59 controller_interface::InterfaceConfiguration state_interface_configuration() const final;
+
60
+
65 controller_interface::InterfaceConfiguration command_interface_configuration() const final;
+
66
+
67protected:
+ +
75
+ +
82
+ +
89
+ +
96
+
101 virtual controller_interface::return_type read_state_interfaces();
+
102
+
108 virtual controller_interface::return_type write_command_interfaces(const rclcpp::Duration& period);
+
109
+
118 virtual controller_interface::return_type
+
119 evaluate(const rclcpp::Time& time, const std::chrono::nanoseconds& period) = 0;
+
120
+
126 void add_state_interface(const std::string& name, const std::string& interface);
+
127
+
133 void add_command_interface(const std::string& name, const std::string& interface);
+
134
+
141 std::unordered_map<std::string, double> get_state_interfaces(const std::string& name) const;
+
142
+
150 double get_state_interface(const std::string& name, const std::string& interface) const;
+
151
+
159 double get_command_interface(const std::string& name, const std::string& interface) const;
+
160
+
167 void set_command_interface(const std::string& name, const std::string& interface, double value);
+
168
+
169 std::string hardware_name_;
+
170
+
171private:
+
179 void add_interface(
+
180 const std::string& name, const std::string& interface, std::vector<std::string>& list, const std::string& type);
+
181
+
182 using controller_interface::ControllerInterfaceBase::command_interfaces_;
+
183 using controller_interface::ControllerInterfaceBase::state_interfaces_;
+
184
+
185 std::unordered_map<std::string, std::unordered_map<std::string, double>>
+
186 state_interface_data_;
+
187 std::vector<double> command_interface_data_;
+
188 std::unordered_map<std::string, std::unordered_map<std::string, unsigned int>>
+
189 command_interface_indices_;
+
190 std::vector<std::string> state_interface_names_;
+
191 std::vector<std::string> command_interface_names_;
+
192 bool claim_all_state_interfaces_;
+
193
+
194 // TODO make missed_locks an internal parameter
+
195 unsigned int missed_locks_;
+
196 bool on_init_called_;
+
197};
+
+
198
+
199}// namespace modulo_controllers
+
Base controller class to combine ros2_control, control libraries and modulo.
+
T get_parameter_value(const std::string &name) const
Get a parameter value by name.
+ +
virtual CallbackReturn add_interfaces()
Add interfaces like parameters, signals, services, and predicates to the controller.
+
controller_interface::InterfaceConfiguration command_interface_configuration() const final
Configure the command interfaces.
+
virtual controller_interface::return_type write_command_interfaces(const rclcpp::Duration &period)
Write the command interfaces.
+
virtual CallbackReturn on_configure()
Configure the controller.
+
virtual controller_interface::return_type evaluate(const rclcpp::Time &time, const std::chrono::nanoseconds &period)=0
The control logic callback.
+
virtual controller_interface::return_type read_state_interfaces()
Read the state interfaces.
+
std::unordered_map< std::string, double > get_state_interfaces(const std::string &name) const
Get a map containing the state interfaces by name of the parent tag.
+
CallbackReturn on_init() override
Declare parameters.
+
void add_state_interface(const std::string &name, const std::string &interface)
Add a state interface to the controller by name.
+
double get_command_interface(const std::string &name, const std::string &interface) const
Get the value of a command interface by name.
+
virtual CallbackReturn on_activate()
Activate the controller.
+
double get_state_interface(const std::string &name, const std::string &interface) const
Get the value of a state interface by name.
+
controller_interface::return_type update(const rclcpp::Time &time, const rclcpp::Duration &period) final
Read the state interfaces, perform control evaluation and write the command interfaces.
+
void set_command_interface(const std::string &name, const std::string &interface, double value)
Set the value of a command interface by name.
+
std::string hardware_name_
The hardware name provided by a parameter.
+
virtual CallbackReturn on_deactivate()
Deactivate the controller.
+
void add_command_interface(const std::string &name, const std::string &interface)
Add a command interface to the controller by name.
+
controller_interface::InterfaceConfiguration state_interface_configuration() const final
Configure the state interfaces.
+
+ + + + diff --git a/versions/v5.0.1/_encoded_state_8hpp_source.html b/versions/v5.0.1/_encoded_state_8hpp_source.html new file mode 100644 index 00000000..87e2b2da --- /dev/null +++ b/versions/v5.0.1/_encoded_state_8hpp_source.html @@ -0,0 +1,100 @@ + + + + + + + +Modulo: /github/workspace/source/modulo_core/include/modulo_core/EncodedState.hpp Source File + + + + + + + + + +
+
+ + + + + + +
+
Modulo 5.0.0 +
+
+
+ + + + + + + + + +
+
+ + +
+
+
+
+
+
Loading...
+
Searching...
+
No Matches
+
+
+
+
+ + +
+
+
EncodedState.hpp
+
+
+
1#pragma once
+
2
+
3#include <modulo_interfaces/msg/encoded_state.hpp>
+
4
+
9namespace modulo_core {
+
10
+
14typedef modulo_interfaces::msg::EncodedState EncodedState;
+
15
+
16}// namespace modulo_core
+
Modulo Core.
+
+ + + + diff --git a/versions/v5.0.1/_lifecycle_component_8cpp_source.html b/versions/v5.0.1/_lifecycle_component_8cpp_source.html new file mode 100644 index 00000000..652ed6b4 --- /dev/null +++ b/versions/v5.0.1/_lifecycle_component_8cpp_source.html @@ -0,0 +1,478 @@ + + + + + + + +Modulo: /github/workspace/source/modulo_components/src/LifecycleComponent.cpp Source File + + + + + + + + + +
+
+ + + + + + +
+
Modulo 5.0.0 +
+
+
+ + + + + + + + + +
+
+ + +
+
+
+
+
+
Loading...
+
Searching...
+
No Matches
+
+
+
+
+ + +
+
+
LifecycleComponent.cpp
+
+
+
1#include "modulo_components/LifecycleComponent.hpp"
+
2
+
3using namespace modulo_core::communication;
+
4using namespace rclcpp_lifecycle;
+
5
+
6namespace modulo_components {
+
7
+
+
8LifecycleComponent::LifecycleComponent(const rclcpp::NodeOptions& node_options, const std::string& fallback_name)
+
9 : LifecycleNode(modulo_utils::parsing::parse_node_name(node_options, fallback_name), node_options),
+
10 ComponentInterface(std::make_shared<rclcpp::node_interfaces::NodeInterfaces<ALL_RCLCPP_NODE_INTERFACES>>(
+
11 LifecycleNode::get_node_base_interface(), LifecycleNode::get_node_clock_interface(),
+
12 LifecycleNode::get_node_graph_interface(), LifecycleNode::get_node_logging_interface(),
+
13 LifecycleNode::get_node_parameters_interface(), LifecycleNode::get_node_services_interface(),
+
14 LifecycleNode::get_node_time_source_interface(), LifecycleNode::get_node_timers_interface(),
+
15 LifecycleNode::get_node_topics_interface(), LifecycleNode::get_node_type_descriptions_interface(),
+
16 LifecycleNode::get_node_waitables_interface())),
+
17 has_error_(false) {}
+
+
18
+
19std::shared_ptr<state_representation::ParameterInterface>
+
+
20LifecycleComponent::get_parameter(const std::string& name) const {
+ +
22}
+
+
23
+
24void LifecycleComponent::step() {
+
25 try {
+
26 if (this->get_lifecycle_state().id() == lifecycle_msgs::msg::State::PRIMARY_STATE_ACTIVE) {
+
27 this->evaluate_periodic_callbacks();
+
28 this->on_step_callback();
+
29 this->publish_outputs();
+
30 }
+
31 this->publish_predicates();
+
32 } catch (const std::exception& ex) {
+
33 RCLCPP_ERROR_STREAM(this->get_logger(), "Failed to execute step function: " << ex.what());
+
34 this->raise_error();
+
35 }
+
36}
+
37
+
38node_interfaces::LifecycleNodeInterface::CallbackReturn LifecycleComponent::on_configure(const State& previous_state) {
+
39 RCLCPP_DEBUG(this->get_logger(), "on_configure called from previous state %s", previous_state.label().c_str());
+
40 if (previous_state.id() != lifecycle_msgs::msg::State::PRIMARY_STATE_UNCONFIGURED) {
+
41 RCLCPP_WARN(get_logger(), "Invalid transition 'configure' from state %s.", previous_state.label().c_str());
+
42 return node_interfaces::LifecycleNodeInterface::CallbackReturn::FAILURE;
+
43 }
+
44 if (!this->handle_configure()) {
+
45 RCLCPP_WARN(get_logger(), "Configuration failed! Reverting to the unconfigured state.");
+
46 // perform cleanup actions to ensure the component is unconfigured
+
47 if (this->handle_cleanup()) {
+
48 return node_interfaces::LifecycleNodeInterface::CallbackReturn::FAILURE;
+
49 } else {
+ +
51 get_logger(),
+
52 "Could not revert to the unconfigured state! Entering into the error processing transition state.");
+
53 return node_interfaces::LifecycleNodeInterface::CallbackReturn::ERROR;
+
54 }
+
55 }
+
56 return node_interfaces::LifecycleNodeInterface::CallbackReturn::SUCCESS;
+
57}
+
58
+
59bool LifecycleComponent::handle_configure() {
+
60 bool result;
+
61 try {
+ +
63 } catch (const std::exception& ex) {
+ +
65 return false;
+
66 }
+
67 return result && this->configure_outputs();
+
68}
+
69
+
+ +
71 return true;
+
72}
+
+
73
+
74node_interfaces::LifecycleNodeInterface::CallbackReturn LifecycleComponent::on_cleanup(const State& previous_state) {
+
75 RCLCPP_DEBUG(this->get_logger(), "on_cleanup called from previous state %s", previous_state.label().c_str());
+
76 if (previous_state.id() != lifecycle_msgs::msg::State::PRIMARY_STATE_INACTIVE) {
+
77 RCLCPP_WARN(get_logger(), "Invalid transition 'cleanup' from state %s.", previous_state.label().c_str());
+
78 return node_interfaces::LifecycleNodeInterface::CallbackReturn::FAILURE;
+
79 }
+
80 if (!this->handle_cleanup()) {
+
81 RCLCPP_ERROR(get_logger(), "Cleanup failed! Entering into the error processing transition state.");
+
82 return node_interfaces::LifecycleNodeInterface::CallbackReturn::ERROR;
+
83 }
+
84 return node_interfaces::LifecycleNodeInterface::CallbackReturn::SUCCESS;
+
85}
+
86
+
87bool LifecycleComponent::handle_cleanup() {
+
88 try {
+
89 return this->on_cleanup_callback();
+
90 } catch (const std::exception& ex) {
+ +
92 return false;
+
93 }
+
94}
+
95
+
+ +
97 return true;
+
98}
+
+
99
+
100node_interfaces::LifecycleNodeInterface::CallbackReturn LifecycleComponent::on_activate(const State& previous_state) {
+
101 RCLCPP_DEBUG(this->get_logger(), "on_activate called from previous state %s", previous_state.label().c_str());
+
102 if (previous_state.id() != lifecycle_msgs::msg::State::PRIMARY_STATE_INACTIVE) {
+
103 RCLCPP_WARN(get_logger(), "Invalid transition 'activate' from state %s.", previous_state.label().c_str());
+
104 return node_interfaces::LifecycleNodeInterface::CallbackReturn::FAILURE;
+
105 }
+
106 if (!this->handle_activate()) {
+
107 RCLCPP_WARN(get_logger(), "Activation failed! Reverting to the inactive state.");
+
108 // perform deactivation actions to ensure the component is inactive
+
109 if (this->handle_deactivate()) {
+
110 return node_interfaces::LifecycleNodeInterface::CallbackReturn::FAILURE;
+
111 } else {
+ +
113 get_logger(), "Could not revert to the inactive state! Entering into the error processing transition state.");
+
114 return node_interfaces::LifecycleNodeInterface::CallbackReturn::ERROR;
+
115 }
+
116 }
+
117 return node_interfaces::LifecycleNodeInterface::CallbackReturn::SUCCESS;
+
118}
+
119
+
120bool LifecycleComponent::handle_activate() {
+
121 bool result;
+
122 try {
+ +
124 } catch (const std::exception& ex) {
+ +
126 return false;
+
127 }
+
128 return result && this->activate_outputs();
+
129}
+
130
+
+ +
132 return true;
+
133}
+
+
134
+
135node_interfaces::LifecycleNodeInterface::CallbackReturn LifecycleComponent::on_deactivate(const State& previous_state) {
+
136 RCLCPP_DEBUG(this->get_logger(), "on_deactivate called from previous state %s", previous_state.label().c_str());
+
137 if (previous_state.id() != lifecycle_msgs::msg::State::PRIMARY_STATE_ACTIVE) {
+
138 RCLCPP_WARN(get_logger(), "Invalid transition 'deactivate' from state %s.", previous_state.label().c_str());
+
139 return node_interfaces::LifecycleNodeInterface::CallbackReturn::FAILURE;
+
140 }
+
141 if (!this->handle_deactivate()) {
+
142 RCLCPP_ERROR(get_logger(), "Deactivation failed! Entering into the error processing transition state.");
+
143 return node_interfaces::LifecycleNodeInterface::CallbackReturn::ERROR;
+
144 }
+
145 return node_interfaces::LifecycleNodeInterface::CallbackReturn::SUCCESS;
+
146}
+
147
+
148bool LifecycleComponent::handle_deactivate() {
+
149 auto result = this->deactivate_outputs();
+
150 try {
+
151 return result && this->on_deactivate_callback();
+
152 } catch (const std::exception& ex) {
+ +
154 return false;
+
155 }
+
156}
+
157
+
+ +
159 return true;
+
160}
+
+
161
+
162node_interfaces::LifecycleNodeInterface::CallbackReturn LifecycleComponent::on_shutdown(const State& previous_state) {
+
163 RCLCPP_DEBUG(this->get_logger(), "on_shutdown called from previous state %s", previous_state.label().c_str());
+
164 if (!this->has_error_) {
+
165 switch (previous_state.id()) {
+
166 case lifecycle_msgs::msg::State::PRIMARY_STATE_FINALIZED:
+
167 return node_interfaces::LifecycleNodeInterface::CallbackReturn::SUCCESS;
+
168 case lifecycle_msgs::msg::State::PRIMARY_STATE_ACTIVE:
+
169 if (!this->handle_deactivate()) {
+
170 RCLCPP_DEBUG(get_logger(), "Shutdown failed during intermediate deactivation!");
+
171 break;
+
172 }
+
173 [[fallthrough]];
+
174 case lifecycle_msgs::msg::State::PRIMARY_STATE_INACTIVE:
+
175 if (!this->handle_cleanup()) {
+
176 RCLCPP_DEBUG(get_logger(), "Shutdown failed during intermediate cleanup!");
+
177 break;
+
178 }
+
179 [[fallthrough]];
+
180 case lifecycle_msgs::msg::State::PRIMARY_STATE_UNCONFIGURED:
+
181 if (!this->handle_shutdown()) {
+
182 break;
+
183 }
+
184 this->finalize_interfaces();
+
185 return node_interfaces::LifecycleNodeInterface::CallbackReturn::SUCCESS;
+
186 default:
+
187 RCLCPP_WARN(get_logger(), "Invalid transition 'shutdown' from state %s.", previous_state.label().c_str());
+
188 break;
+
189 }
+
190 }
+
191 RCLCPP_ERROR(get_logger(), "Entering into the error processing transition state.");
+
192 return node_interfaces::LifecycleNodeInterface::CallbackReturn::ERROR;
+
193}
+
194
+
195bool LifecycleComponent::handle_shutdown() {
+
196 bool result;
+
197 try {
+ +
199 } catch (const std::exception& ex) {
+ +
201 return false;
+
202 }
+
203 return result;
+
204}
+
205
+
+ +
207 return true;
+
208}
+
+
209
+
210node_interfaces::LifecycleNodeInterface::CallbackReturn LifecycleComponent::on_error(const State& previous_state) {
+
211 RCLCPP_DEBUG(this->get_logger(), "on_error called from previous state %s", previous_state.label().c_str());
+
212 bool error_handled;
+
213 try {
+
214 error_handled = this->handle_error();
+
215 } catch (const std::exception& ex) {
+
216 RCLCPP_DEBUG(this->get_logger(), "Exception caught during on_error handling: %s", ex.what());
+
217 error_handled = false;
+
218 }
+
219 if (!error_handled) {
+
220 RCLCPP_ERROR(get_logger(), "Error processing failed! Entering into the finalized state.");
+
221 this->finalize_interfaces();
+
222 return node_interfaces::LifecycleNodeInterface::CallbackReturn::ERROR;
+
223 }
+
224 this->has_error_ = false;
+
225 return node_interfaces::LifecycleNodeInterface::CallbackReturn::SUCCESS;
+
226}
+
227
+
228bool LifecycleComponent::handle_error() {
+
229 return this->on_error_callback();
+
230}
+
231
+
+ +
233 return false;
+
234}
+
+
235
+
236bool LifecycleComponent::configure_outputs() {
+
237 bool success = true;
+
238 for (auto& [name, interface] : this->outputs_) {
+
239 try {
+
240 auto topic_name = this->get_parameter_value<std::string>(name + "_topic");
+ +
242 this->get_logger(), "Configuring output '" << name << "' with topic name '" << topic_name << "'.");
+
243 auto message_pair = interface->get_message_pair();
+
244 switch (message_pair->get_type()) {
+
245 case MessageType::BOOL: {
+ +
247 interface = std::make_shared<PublisherHandler<LifecyclePublisher<std_msgs::msg::Bool>, std_msgs::msg::Bool>>(
+
248 PublisherType::LIFECYCLE_PUBLISHER, publisher)
+
249 ->create_publisher_interface(message_pair);
+
250 break;
+
251 }
+
252 case MessageType::FLOAT64: {
+
253 auto publisher = this->create_publisher<std_msgs::msg::Float64>(topic_name, this->get_qos());
+
254 interface =
+
255 std::make_shared<PublisherHandler<LifecyclePublisher<std_msgs::msg::Float64>, std_msgs::msg::Float64>>(
+
256 PublisherType::LIFECYCLE_PUBLISHER, publisher)
+
257 ->create_publisher_interface(message_pair);
+
258 break;
+
259 }
+
260 case MessageType::FLOAT64_MULTI_ARRAY: {
+
261 auto publisher = this->create_publisher<std_msgs::msg::Float64MultiArray>(topic_name, this->get_qos());
+
262 interface = std::make_shared<PublisherHandler<
+
263 LifecyclePublisher<std_msgs::msg::Float64MultiArray>, std_msgs::msg::Float64MultiArray>>(
+
264 PublisherType::LIFECYCLE_PUBLISHER, publisher)
+
265 ->create_publisher_interface(message_pair);
+
266 break;
+
267 }
+
268 case MessageType::INT32: {
+
269 auto publisher = this->create_publisher<std_msgs::msg::Int32>(topic_name, this->get_qos());
+
270 interface =
+
271 std::make_shared<PublisherHandler<LifecyclePublisher<std_msgs::msg::Int32>, std_msgs::msg::Int32>>(
+
272 PublisherType::LIFECYCLE_PUBLISHER, publisher)
+
273 ->create_publisher_interface(message_pair);
+
274 break;
+
275 }
+
276 case MessageType::STRING: {
+
277 auto publisher = this->create_publisher<std_msgs::msg::String>(topic_name, this->get_qos());
+
278 interface =
+
279 std::make_shared<PublisherHandler<LifecyclePublisher<std_msgs::msg::String>, std_msgs::msg::String>>(
+
280 PublisherType::LIFECYCLE_PUBLISHER, publisher)
+
281 ->create_publisher_interface(message_pair);
+
282 break;
+
283 }
+
284 case MessageType::ENCODED_STATE: {
+
285 auto publisher = this->create_publisher<modulo_core::EncodedState>(topic_name, this->get_qos());
+
286 interface = std::make_shared<
+
287 PublisherHandler<LifecyclePublisher<modulo_core::EncodedState>, modulo_core::EncodedState>>(
+
288 PublisherType::LIFECYCLE_PUBLISHER, publisher)
+
289 ->create_publisher_interface(message_pair);
+
290 break;
+
291 }
+
292 case MessageType::CUSTOM_MESSAGE: {
+
293 interface = this->custom_output_configuration_callables_.at(name)(topic_name);
+
294 break;
+
295 }
+
296 }
+
297 } catch (const modulo_core::exceptions::CoreException& ex) {
+
298 success = false;
+
299 RCLCPP_ERROR_STREAM(this->get_logger(), "Failed to configure output '" << name << "': " << ex.what());
+
300 }
+
301 }
+
302 return success;
+
303}
+
304
+
305bool LifecycleComponent::activate_outputs() {
+
306 bool success = true;
+
307 for (auto const& [name, interface] : this->outputs_) {
+
308 try {
+
309 interface->activate();
+
310 } catch (const modulo_core::exceptions::CoreException& ex) {
+
311 success = false;
+
312 RCLCPP_ERROR_STREAM(this->get_logger(), "Failed to activate output '" << name << "': " << ex.what());
+
313 }
+
314 }
+
315 RCLCPP_DEBUG(this->get_logger(), "All outputs activated.");
+
316 return success;
+
317}
+
318
+
319bool LifecycleComponent::deactivate_outputs() {
+
320 bool success = true;
+
321 for (auto const& [name, interface] : this->outputs_) {
+
322 try {
+
323 interface->deactivate();
+
324 } catch (const modulo_core::exceptions::CoreException& ex) {
+
325 success = false;
+
326 RCLCPP_ERROR_STREAM(this->get_logger(), "Failed to deactivate output '" << name << "': " << ex.what());
+
327 }
+
328 }
+
329 RCLCPP_DEBUG(this->get_logger(), "All outputs deactivated.");
+
330 return success;
+
331}
+
332
+
+
333rclcpp_lifecycle::State LifecycleComponent::get_lifecycle_state() const {
+
334 return this->get_current_state();
+
335}
+
+
336
+
+
337void LifecycleComponent::raise_error() {
+
338 ComponentInterface::raise_error();
+
339 this->has_error_ = true;
+
340 if (get_current_state().id() == lifecycle_msgs::msg::State::PRIMARY_STATE_UNCONFIGURED) {
+
341 this->trigger_transition(lifecycle_msgs::msg::Transition::TRANSITION_UNCONFIGURED_SHUTDOWN);
+
342 } else if (get_current_state().id() == lifecycle_msgs::msg::State::PRIMARY_STATE_INACTIVE) {
+
343 this->trigger_transition(lifecycle_msgs::msg::Transition::TRANSITION_INACTIVE_SHUTDOWN);
+
344 } else if (get_current_state().id() == lifecycle_msgs::msg::State::PRIMARY_STATE_ACTIVE) {
+
345 this->trigger_transition(lifecycle_msgs::msg::Transition::TRANSITION_ACTIVE_SHUTDOWN);
+
346 }
+
347}
+
+
348}// namespace modulo_components
+
Base interface class for modulo components to wrap a ROS Node with custom behaviour.
+
std::shared_ptr< state_representation::ParameterInterface > get_parameter(const std::string &name) const
Get a parameter by name.
+
T get_parameter_value(const std::string &name) const
Get a parameter value by name.
+
virtual void on_step_callback()
Steps to execute periodically. To be redefined by derived Component classes.
+
rclcpp::QoS get_qos() const
Getter of the Quality of Service attribute.
+
void raise_error() override
Trigger the shutdown and error transitions.
+
virtual bool on_shutdown_callback()
Steps to execute when shutting down the component.
+
virtual bool on_deactivate_callback()
Steps to execute when deactivating the component.
+
std::shared_ptr< state_representation::ParameterInterface > get_parameter(const std::string &name) const
Get a parameter by name.
+
virtual bool on_activate_callback()
Steps to execute when activating the component.
+
virtual bool on_cleanup_callback()
Steps to execute when cleaning up the component.
+
LifecycleComponent(const rclcpp::NodeOptions &node_options, const std::string &fallback_name="LifecycleComponent")
Constructor from node options.
+
virtual bool on_error_callback()
Steps to execute when handling errors.
+
virtual bool on_configure_callback()
Steps to execute when configuring the component.
+
rclcpp_lifecycle::State get_lifecycle_state() const
Get the current lifecycle state of the component.
+
The PublisherHandler handles different types of ROS publishers to activate, deactivate and publish da...
+
A base class for all core exceptions.
+
Modulo components.
Definition Component.hpp:9
+
Modulo Core communication module for handling messages on publication and subscription interfaces.
+
Modulo Core.
+
+ + + + diff --git a/versions/v5.0.1/_lifecycle_component_8hpp_source.html b/versions/v5.0.1/_lifecycle_component_8hpp_source.html new file mode 100644 index 00000000..244bda8a --- /dev/null +++ b/versions/v5.0.1/_lifecycle_component_8hpp_source.html @@ -0,0 +1,259 @@ + + + + + + + +Modulo: /github/workspace/source/modulo_components/include/modulo_components/LifecycleComponent.hpp Source File + + + + + + + + + +
+
+ + + + + + +
+
Modulo 5.0.0 +
+
+
+ + + + + + + + + +
+
+ + +
+
+
+
+
+
Loading...
+
Searching...
+
No Matches
+
+
+
+
+ + +
+
+
LifecycleComponent.hpp
+
+
+
1#pragma once
+
2
+
3#include <lifecycle_msgs/msg/state.hpp>
+
4#include <rclcpp_lifecycle/lifecycle_node.hpp>
+
5
+
6#include "modulo_components/ComponentInterface.hpp"
+
7
+
8namespace modulo_components {
+
9
+
+
29class LifecycleComponent : public rclcpp_lifecycle::LifecycleNode, public ComponentInterface {
+
30public:
+
31 friend class LifecycleComponentPublicInterface;
+
32
+
38 explicit LifecycleComponent(
+
39 const rclcpp::NodeOptions& node_options, const std::string& fallback_name = "LifecycleComponent");
+
40
+
44 virtual ~LifecycleComponent() = default;
+
45
+
46protected:
+
50 [[nodiscard]] std::shared_ptr<state_representation::ParameterInterface> get_parameter(const std::string& name) const;
+
51
+
58 virtual bool on_configure_callback();
+
59
+
66 virtual bool on_cleanup_callback();
+
67
+
74 virtual bool on_activate_callback();
+
75
+
82 virtual bool on_deactivate_callback();
+
83
+
90 virtual bool on_shutdown_callback();
+
91
+
98 virtual bool on_error_callback();
+
99
+
109 template<typename DataT>
+
110 void add_output(
+
111 const std::string& signal_name, const std::shared_ptr<DataT>& data, const std::string& default_topic = "",
+
112 bool fixed_topic = false, bool publish_on_step = true);
+
113
+
117 rclcpp_lifecycle::State get_lifecycle_state() const;
+
118
+
122 void raise_error() override;
+
123
+
124private:
+
135 rclcpp_lifecycle::node_interfaces::LifecycleNodeInterface::CallbackReturn
+
136 on_configure(const rclcpp_lifecycle::State& previous_state) override;
+
137
+
143 bool handle_configure();
+
144
+
154 rclcpp_lifecycle::node_interfaces::LifecycleNodeInterface::CallbackReturn
+
155 on_cleanup(const rclcpp_lifecycle::State& previous_state) override;
+
156
+
162 bool handle_cleanup();
+
163
+
174 rclcpp_lifecycle::node_interfaces::LifecycleNodeInterface::CallbackReturn
+
175 on_activate(const rclcpp_lifecycle::State& previous_state) override;
+
176
+
182 bool handle_activate();
+
183
+
193 rclcpp_lifecycle::node_interfaces::LifecycleNodeInterface::CallbackReturn
+
194 on_deactivate(const rclcpp_lifecycle::State& previous_state) override;
+
195
+
201 bool handle_deactivate();
+
202
+
212 rclcpp_lifecycle::node_interfaces::LifecycleNodeInterface::CallbackReturn
+
213 on_shutdown(const rclcpp_lifecycle::State& previous_state) override;
+
214
+
220 bool handle_shutdown();
+
221
+
232 rclcpp_lifecycle::node_interfaces::LifecycleNodeInterface::CallbackReturn
+
233 on_error(const rclcpp_lifecycle::State& previous_state) override;
+
234
+
240 bool handle_error();
+
241
+
246 void step() override;
+
247
+
252 bool configure_outputs();
+
253
+
258 bool activate_outputs();
+
259
+
264 bool deactivate_outputs();
+
265
+
266 bool has_error_;
+
267
+
268 // TODO hide ROS methods
+ + + + + + + + + +
278 using rclcpp_lifecycle::LifecycleNode::get_parameter;
+
279
+
280 std::map<
+
281 std::string,
+
282 std::function<std::shared_ptr<modulo_core::communication::PublisherInterface>(const std::string& topic_name)>>
+
283 custom_output_configuration_callables_;
+
284};
+
+
285
+
286template<typename DataT>
+
+ +
288 const std::string& signal_name, const std::shared_ptr<DataT>& data, const std::string& default_topic,
+
289 bool fixed_topic, bool publish_on_step) {
+
290 if (this->get_lifecycle_state().id() != lifecycle_msgs::msg::State::PRIMARY_STATE_UNCONFIGURED
+
291 && this->get_lifecycle_state().id() != lifecycle_msgs::msg::State::PRIMARY_STATE_INACTIVE) {
+ +
293 this->get_logger(), *this->get_clock(), 1000,
+
294 "Adding output in state " << this->get_lifecycle_state().label() << " is not allowed.");
+
295 return;
+
296 }
+
297 try {
+ + +
300
+
301 auto parsed_signal_name = this->create_output(
+
302 PublisherType::LIFECYCLE_PUBLISHER, signal_name, data, default_topic, fixed_topic, publish_on_step);
+
303
+
304 auto message_pair = this->outputs_.at(parsed_signal_name)->get_message_pair();
+
305 if (message_pair->get_type() == modulo_core::communication::MessageType::CUSTOM_MESSAGE) {
+ +
307 this->custom_output_configuration_callables_.insert_or_assign(
+
308 parsed_signal_name, [this, message_pair](const std::string& topic_name) {
+
309 auto publisher = this->create_publisher<DataT>(topic_name, this->get_qos());
+
310 return std::make_shared<PublisherHandler<rclcpp_lifecycle::LifecyclePublisher<DataT>, DataT>>(
+
311 PublisherType::LIFECYCLE_PUBLISHER, publisher)
+
312 ->create_publisher_interface(message_pair);
+
313 });
+
314 }
+
315 }
+ +
317 RCLCPP_ERROR_STREAM(this->get_logger(), "Failed to add output '" << signal_name << "': " << ex.what());
+
318 }
+
319}
+
+
320}// namespace modulo_components
+
Base interface class for modulo components to wrap a ROS Node with custom behaviour.
+
void publish_outputs()
Helper function to publish all output signals.
+
std::map< std::string, std::shared_ptr< modulo_core::communication::PublisherInterface > > outputs_
Map of outputs.
+
std::shared_ptr< state_representation::ParameterInterface > get_parameter(const std::string &name) const
Get a parameter by name.
+
void finalize_interfaces()
Finalize all interfaces.
+
T get_parameter_value(const std::string &name) const
Get a parameter value by name.
+
void publish_predicates()
Helper function to publish all predicates.
+
std::string create_output(modulo_core::communication::PublisherType publisher_type, const std::string &signal_name, const std::shared_ptr< DataT > &data, const std::string &default_topic, bool fixed_topic, bool publish_on_step)
Helper function to parse the signal name and add an unconfigured PublisherInterface to the map of out...
+
rclcpp::QoS get_qos() const
Getter of the Quality of Service attribute.
+
std::map< std::string, std::shared_ptr< modulo_core::communication::SubscriptionInterface > > inputs_
Map of inputs.
+
void evaluate_periodic_callbacks()
Helper function to evaluate all periodic function callbacks.
+
std::map< std::string, bool > periodic_outputs_
Map of outputs with periodic publishing flag.
+
A wrapper for rclcpp_lifecycle::LifecycleNode to simplify application composition through unified com...
+
void raise_error() override
Trigger the shutdown and error transitions.
+
virtual bool on_shutdown_callback()
Steps to execute when shutting down the component.
+
virtual bool on_deactivate_callback()
Steps to execute when deactivating the component.
+
void add_output(const std::string &signal_name, const std::shared_ptr< DataT > &data, const std::string &default_topic="", bool fixed_topic=false, bool publish_on_step=true)
Add an output signal of the component.
+
std::shared_ptr< state_representation::ParameterInterface > get_parameter(const std::string &name) const
Get a parameter by name.
+
virtual bool on_activate_callback()
Steps to execute when activating the component.
+
virtual bool on_cleanup_callback()
Steps to execute when cleaning up the component.
+
virtual ~LifecycleComponent()=default
Virtual default destructor.
+
virtual bool on_error_callback()
Steps to execute when handling errors.
+
virtual bool on_configure_callback()
Steps to execute when configuring the component.
+
rclcpp_lifecycle::State get_lifecycle_state() const
Get the current lifecycle state of the component.
+
The PublisherHandler handles different types of ROS publishers to activate, deactivate and publish da...
+
An exception class to notify errors when adding a signal.
+ +
Modulo components.
Definition Component.hpp:9
+
PublisherType
Enum of supported ROS publisher types for the PublisherInterface.
+
+ + + + diff --git a/versions/v5.0.1/_message_pair_8cpp_source.html b/versions/v5.0.1/_message_pair_8cpp_source.html new file mode 100644 index 00000000..55f650a8 --- /dev/null +++ b/versions/v5.0.1/_message_pair_8cpp_source.html @@ -0,0 +1,128 @@ + + + + + + + +Modulo: /github/workspace/source/modulo_core/src/communication/MessagePair.cpp Source File + + + + + + + + + +
+
+ + + + + + +
+
Modulo 5.0.0 +
+
+
+ + + + + + + + + +
+
+ + +
+
+
+
+
+
Loading...
+
Searching...
+
No Matches
+
+
+
+
+ + +
+
+
MessagePair.cpp
+
+
+
1#include "modulo_core/communication/MessagePair.hpp"
+
2
+
3#include <utility>
+
4
+ +
6
+
7template<>
+
8MessagePair<std_msgs::msg::Bool, bool>::MessagePair(std::shared_ptr<bool> data, std::shared_ptr<rclcpp::Clock> clock)
+
9 : MessagePairInterface(MessageType::BOOL), data_(std::move(data)), clock_(std::move(clock)) {}
+
10
+
11template<>
+
12MessagePair<std_msgs::msg::Float64, double>::MessagePair(
+
13 std::shared_ptr<double> data, std::shared_ptr<rclcpp::Clock> clock)
+
14 : MessagePairInterface(MessageType::FLOAT64), data_(std::move(data)), clock_(std::move(clock)) {}
+
15
+
16template<>
+
17MessagePair<std_msgs::msg::Float64MultiArray, std::vector<double>>::MessagePair(
+
18 std::shared_ptr<std::vector<double>> data, std::shared_ptr<rclcpp::Clock> clock)
+
19 : MessagePairInterface(MessageType::FLOAT64_MULTI_ARRAY), data_(std::move(data)), clock_(std::move(clock)) {}
+
20
+
21template<>
+
22MessagePair<std_msgs::msg::Int32, int>::MessagePair(std::shared_ptr<int> data, std::shared_ptr<rclcpp::Clock> clock)
+
23 : MessagePairInterface(MessageType::INT32), data_(std::move(data)), clock_(std::move(clock)) {}
+
24
+
25template<>
+
26MessagePair<std_msgs::msg::String, std::string>::MessagePair(
+
27 std::shared_ptr<std::string> data, std::shared_ptr<rclcpp::Clock> clock)
+
28 : MessagePairInterface(MessageType::STRING), data_(std::move(data)), clock_(std::move(clock)) {}
+
29
+
30template<>
+
31MessagePair<EncodedState, state_representation::State>::MessagePair(
+
32 std::shared_ptr<state_representation::State> data, std::shared_ptr<rclcpp::Clock> clock)
+
33 : MessagePairInterface(MessageType::ENCODED_STATE), data_(std::move(data)), clock_(std::move(clock)) {}
+
34
+
35}// namespace modulo_core::communication
+
MessagePair(std::shared_ptr< DataT > data, std::shared_ptr< rclcpp::Clock > clock)
Constructor of the MessagePair.
+
Modulo Core communication module for handling messages on publication and subscription interfaces.
+
MessageType
Enum of all supported ROS message types for the MessagePairInterface.
+
+ + + + diff --git a/versions/v5.0.1/_message_pair_8hpp_source.html b/versions/v5.0.1/_message_pair_8hpp_source.html new file mode 100644 index 00000000..fe2f7651 --- /dev/null +++ b/versions/v5.0.1/_message_pair_8hpp_source.html @@ -0,0 +1,284 @@ + + + + + + + +Modulo: /github/workspace/source/modulo_core/include/modulo_core/communication/MessagePair.hpp Source File + + + + + + + + + +
+
+ + + + + + +
+
Modulo 5.0.0 +
+
+
+ + + + + + + + + +
+
+ + +
+
+
+
+
+
Loading...
+
Searching...
+
No Matches
+
+
+
+
+ + +
+
+
MessagePair.hpp
+
+
+
1#pragma once
+
2
+
3#include <rclcpp/clock.hpp>
+
4
+
5#include "modulo_core/communication/MessagePairInterface.hpp"
+
6#include "modulo_core/concepts.hpp"
+
7#include "modulo_core/translators/message_readers.hpp"
+
8#include "modulo_core/translators/message_writers.hpp"
+
9
+
+ +
11
+
19template<typename MsgT, typename DataT>
+
+ +
21public:
+
27 MessagePair(std::shared_ptr<DataT> data, std::shared_ptr<rclcpp::Clock> clock);
+
28
+
+
34 MessagePair(std::shared_ptr<DataT> data, std::shared_ptr<rclcpp::Clock> clock)
+ +
36 : MessagePairInterface(MessageType::CUSTOM_MESSAGE), data_(std::move(data)), clock_(std::move(clock)) {}
+
+
37
+
44 [[nodiscard]] MsgT write_message() const;
+
45
+
52 void read_message(const MsgT& message);
+
53
+
57 [[nodiscard]] std::shared_ptr<DataT> get_data() const;
+
58
+
63 void set_data(const std::shared_ptr<DataT>& data);
+
64
+
65private:
+
71 [[nodiscard]] MsgT write_translated_message() const;
+
72
+
78 [[nodiscard]] MsgT write_encoded_message() const;
+
79
+
84 [[nodiscard]] MsgT write_raw_message() const;
+
85
+
91 void read_translated_message(const MsgT& message);
+
92
+
98 void read_encoded_message(const MsgT& message);
+
99
+
105 void read_raw_message(const MsgT& message);
+
106
+
107 std::shared_ptr<DataT> data_;
+
108 std::shared_ptr<rclcpp::Clock> clock_;
+
109};
+
+
110
+
111template<typename MsgT, typename DataT>
+
+ +
113 if (this->data_ == nullptr) {
+
114 throw exceptions::NullPointerException("The message pair data is not set, nothing to write");
+
115 }
+
116
+
117 MsgT message;
+ +
119 message = write_raw_message();
+
120 } else if constexpr (std::same_as<MsgT, EncodedState>) {
+
121 message = write_encoded_message();
+
122 } else {
+
123 message = write_translated_message();
+
124 }
+
125 return message;
+
126}
+
+
127
+
128template<typename MsgT, typename DataT>
+ +
130 auto message = MsgT();
+
131 translators::write_message(message, *this->data_, clock_->now());
+
132 return message;
+
133}
+
134
+
135template<>
+
136inline EncodedState MessagePair<EncodedState, state_representation::State>::write_encoded_message() const {
+
137 auto message = EncodedState();
+
138 translators::write_message(message, this->data_, clock_->now());
+
139 return message;
+
140}
+
141
+
142template<typename MsgT, typename DataT>
+
143inline MsgT MessagePair<MsgT, DataT>::write_raw_message() const {
+
144 return *this->data_;
+
145}
+
146
+
147template<typename MsgT, typename DataT>
+
+
148inline void MessagePair<MsgT, DataT>::read_message(const MsgT& message) {
+
149 if (this->data_ == nullptr) {
+
150 throw exceptions::NullPointerException("The message pair data is not set, nothing to read");
+
151 }
+
152
+ +
154 read_raw_message(message);
+
155 } else if constexpr (std::same_as<MsgT, EncodedState>) {
+
156 read_encoded_message(message);
+
157 } else {
+
158 read_translated_message(message);
+
159 }
+
160}
+
+
161
+
162template<typename MsgT, typename DataT>
+
163inline void MessagePair<MsgT, DataT>::read_translated_message(const MsgT& message) {
+
164 translators::read_message(*this->data_, message);
+
165}
+
166
+
167template<>
+
168inline void MessagePair<EncodedState, state_representation::State>::read_encoded_message(const EncodedState& message) {
+
169 translators::read_message(this->data_, message);
+
170}
+
171
+
172template<typename MsgT, typename DataT>
+
173inline void MessagePair<MsgT, DataT>::read_raw_message(const MsgT& message) {
+
174 *this->data_ = message;
+
175}
+
176
+
177template<typename MsgT, typename DataT>
+
+
178inline std::shared_ptr<DataT> MessagePair<MsgT, DataT>::get_data() const {
+
179 return this->data_;
+
180}
+
+
181
+
182template<typename MsgT, typename DataT>
+
+
183inline void MessagePair<MsgT, DataT>::set_data(const std::shared_ptr<DataT>& data) {
+
184 if (data == nullptr) {
+
185 throw exceptions::NullPointerException("Provide a valid pointer");
+
186 }
+
187 this->data_ = data;
+
188}
+
+
189
+
190template<concepts::CoreDataT DataT>
+
191inline std::shared_ptr<MessagePairInterface>
+
192make_shared_message_pair(const std::shared_ptr<DataT>& data, const std::shared_ptr<rclcpp::Clock>& clock) {
+
193 return std::make_shared<MessagePair<EncodedState, state_representation::State>>(
+
194 std::dynamic_pointer_cast<state_representation::State>(data), clock);
+
195}
+
196
+
197template<concepts::CustomT DataT>
+
198inline std::shared_ptr<MessagePairInterface>
+
199make_shared_message_pair(const std::shared_ptr<DataT>& data, const std::shared_ptr<rclcpp::Clock>& clock) {
+
200 return std::make_shared<MessagePair<DataT, DataT>>(data, clock);
+
201}
+
202
+
203template<typename DataT = bool>
+
204inline std::shared_ptr<MessagePairInterface>
+
205make_shared_message_pair(const std::shared_ptr<bool>& data, const std::shared_ptr<rclcpp::Clock>& clock) {
+
206 return std::make_shared<MessagePair<std_msgs::msg::Bool, bool>>(data, clock);
+
207}
+
208
+
209template<typename DataT = double>
+
210inline std::shared_ptr<MessagePairInterface>
+
211make_shared_message_pair(const std::shared_ptr<double>& data, const std::shared_ptr<rclcpp::Clock>& clock) {
+
212 return std::make_shared<MessagePair<std_msgs::msg::Float64, double>>(data, clock);
+
213}
+
214
+
215template<typename DataT = std::vector<double>>
+
216inline std::shared_ptr<MessagePairInterface> make_shared_message_pair(
+
217 const std::shared_ptr<std::vector<double>>& data, const std::shared_ptr<rclcpp::Clock>& clock) {
+
218 return std::make_shared<MessagePair<std_msgs::msg::Float64MultiArray, std::vector<double>>>(data, clock);
+
219}
+
220
+
221template<typename DataT = int>
+
222inline std::shared_ptr<MessagePairInterface>
+
223make_shared_message_pair(const std::shared_ptr<int>& data, const std::shared_ptr<rclcpp::Clock>& clock) {
+
224 return std::make_shared<MessagePair<std_msgs::msg::Int32, int>>(data, clock);
+
225}
+
226
+
227template<typename DataT = std::string>
+
228inline std::shared_ptr<MessagePairInterface>
+
229make_shared_message_pair(const std::shared_ptr<std::string>& data, const std::shared_ptr<rclcpp::Clock>& clock) {
+
230 return std::make_shared<MessagePair<std_msgs::msg::String, std::string>>(data, clock);
+
231}
+
232}// namespace modulo_core::communication
+
+
The MessagePair stores a pointer to a variable and translates the value of this pointer back and fort...
+
MessagePair(std::shared_ptr< DataT > data, std::shared_ptr< rclcpp::Clock > clock)
Constructor of the MessagePair that requires custom message types only.
+
std::shared_ptr< DataT > get_data() const
Get the data pointer.
+
MsgT write_message() const
Write the value of the data pointer to a ROS message.
+
void read_message(const MsgT &message)
Read a ROS message and store the value in the data pointer.
+
MessagePair(std::shared_ptr< DataT > data, std::shared_ptr< rclcpp::Clock > clock)
Constructor of the MessagePair.
+
void set_data(const std::shared_ptr< DataT > &data)
Set the data pointer.
+
Interface class to enable non-templated writing and reading ROS messages from derived MessagePair ins...
+
An exception class to notify that a certain pointer is null.
+ +
Modulo Core communication module for handling messages on publication and subscription interfaces.
+
void write_message(geometry_msgs::msg::Accel &message, const state_representation::CartesianState &state, const rclcpp::Time &time)
Convert a CartesianState to a ROS geometry_msgs::msg::Accel.
+
void read_message(state_representation::CartesianState &state, const geometry_msgs::msg::Accel &message)
Convert a ROS geometry_msgs::msg::Accel to a CartesianState.
+
+ + + + diff --git a/versions/v5.0.1/_message_pair_interface_8cpp_source.html b/versions/v5.0.1/_message_pair_interface_8cpp_source.html new file mode 100644 index 00000000..82342b19 --- /dev/null +++ b/versions/v5.0.1/_message_pair_interface_8cpp_source.html @@ -0,0 +1,106 @@ + + + + + + + +Modulo: /github/workspace/source/modulo_core/src/communication/MessagePairInterface.cpp Source File + + + + + + + + + +
+
+ + + + + + +
+
Modulo 5.0.0 +
+
+
+ + + + + + + + + +
+
+ + +
+
+
+
+
+
Loading...
+
Searching...
+
No Matches
+
+
+
+
+ + +
+
+
MessagePairInterface.cpp
+
+
+
1#include "modulo_core/communication/MessagePairInterface.hpp"
+
2
+ +
4
+ +
6
+
+ +
8 return this->type_;
+
9}
+
+
10}// namespace modulo_core::communication
+
MessagePairInterface(MessageType type)
Constructor with the message type.
+
MessageType get_type() const
Get the MessageType of the MessagePairInterface.
+
Modulo Core communication module for handling messages on publication and subscription interfaces.
+
MessageType
Enum of all supported ROS message types for the MessagePairInterface.
+
+ + + + diff --git a/versions/v5.0.1/_message_pair_interface_8hpp_source.html b/versions/v5.0.1/_message_pair_interface_8hpp_source.html new file mode 100644 index 00000000..f478ef75 --- /dev/null +++ b/versions/v5.0.1/_message_pair_interface_8hpp_source.html @@ -0,0 +1,172 @@ + + + + + + + +Modulo: /github/workspace/source/modulo_core/include/modulo_core/communication/MessagePairInterface.hpp Source File + + + + + + + + + +
+
+ + + + + + +
+
Modulo 5.0.0 +
+
+
+ + + + + + + + + +
+
+ + +
+
+
+
+
+
Loading...
+
Searching...
+
No Matches
+
+
+
+
+ + +
+
+
MessagePairInterface.hpp
+
+
+
1#pragma once
+
2
+
3#include <memory>
+
4
+
5#include "modulo_core/communication/MessageType.hpp"
+
6#include "modulo_core/exceptions.hpp"
+
7
+ +
9
+
10// forward declaration of derived MessagePair class
+
11template<typename MsgT, typename DataT>
+
12class MessagePair;
+
13
+
+
19class MessagePairInterface : public std::enable_shared_from_this<MessagePairInterface> {
+
20public:
+
25 explicit MessagePairInterface(MessageType type);
+
26
+
30 virtual ~MessagePairInterface() = default;
+
31
+
35 MessagePairInterface(const MessagePairInterface& message_pair) = default;
+
36
+
55 template<typename MsgT, typename DataT>
+
56 [[nodiscard]] std::shared_ptr<MessagePair<MsgT, DataT>> get_message_pair(bool validate_pointer = true);
+
57
+
67 template<typename MsgT, typename DataT>
+
68 [[nodiscard]] MsgT write();
+
69
+
79 template<typename MsgT, typename DataT>
+
80 void read(const MsgT& message);
+
81
+
86 MessageType get_type() const;
+
87
+
88private:
+
89 MessageType type_;
+
90};
+
+
91
+
92template<typename MsgT, typename DataT>
+
+
93inline std::shared_ptr<MessagePair<MsgT, DataT>> MessagePairInterface::get_message_pair(bool validate_pointer) {
+
94 std::shared_ptr<MessagePair<MsgT, DataT>> message_pair_ptr;
+
95 try {
+
96 message_pair_ptr = std::dynamic_pointer_cast<MessagePair<MsgT, DataT>>(this->shared_from_this());
+
97 } catch (const std::exception& ex) {
+
98 if (validate_pointer) {
+
99 throw exceptions::InvalidPointerException("Message pair interface is not managed by a valid pointer");
+
100 }
+
101 }
+
102 if (message_pair_ptr == nullptr && validate_pointer) {
+ +
104 "Unable to cast message pair interface to a message pair pointer of requested type");
+
105 }
+
106 return message_pair_ptr;
+
107}
+
+
108
+
109template<typename MsgT, typename DataT>
+
+ +
111 return this->template get_message_pair<MsgT, DataT>()->write_message();
+
112}
+
+
113
+
114template<typename MsgT, typename DataT>
+
+
115inline void MessagePairInterface::read(const MsgT& message) {
+
116 this->template get_message_pair<MsgT, DataT>()->read_message(message);
+
117}
+
+
118}// namespace modulo_core::communication
+
Interface class to enable non-templated writing and reading ROS messages from derived MessagePair ins...
+
virtual ~MessagePairInterface()=default
Default virtual destructor.
+
std::shared_ptr< MessagePair< MsgT, DataT > > get_message_pair(bool validate_pointer=true)
Get a pointer to a derived MessagePair instance from a MessagePairInterface pointer.
+
MessageType get_type() const
Get the MessageType of the MessagePairInterface.
+
MsgT write()
Get the ROS message of a derived MessagePair instance through the MessagePairInterface pointer.
+
void read(const MsgT &message)
Read a ROS message and set the data of the derived MessagePair instance through the MessagePairInterf...
+
MessagePairInterface(const MessagePairInterface &message_pair)=default
Copy constructor from another MessagePairInterface.
+
An exception class to notify if the result of getting an instance of a derived class through dynamic ...
+
An exception class to notify if an object has no reference count (if the object is not owned by any p...
+
Modulo Core communication module for handling messages on publication and subscription interfaces.
+
MessageType
Enum of all supported ROS message types for the MessagePairInterface.
+
+ + + + diff --git a/versions/v5.0.1/_message_type_8hpp_source.html b/versions/v5.0.1/_message_type_8hpp_source.html new file mode 100644 index 00000000..765e154d --- /dev/null +++ b/versions/v5.0.1/_message_type_8hpp_source.html @@ -0,0 +1,98 @@ + + + + + + + +Modulo: /github/workspace/source/modulo_core/include/modulo_core/communication/MessageType.hpp Source File + + + + + + + + + +
+
+ + + + + + +
+
Modulo 5.0.0 +
+
+
+ + + + + + + + + +
+
+ + +
+
+
+
+
+
Loading...
+
Searching...
+
No Matches
+
+
+
+
+ + +
+
+
MessageType.hpp
+
+
+
1#pragma once
+
2
+ +
8
+
13enum class MessageType { BOOL, FLOAT64, FLOAT64_MULTI_ARRAY, INT32, STRING, ENCODED_STATE, CUSTOM_MESSAGE };
+
14}// namespace modulo_core::communication
+
Modulo Core communication module for handling messages on publication and subscription interfaces.
+
MessageType
Enum of all supported ROS message types for the MessagePairInterface.
+
+ + + + diff --git a/versions/v5.0.1/_predicate_8hpp_source.html b/versions/v5.0.1/_predicate_8hpp_source.html new file mode 100644 index 00000000..3a0239c7 --- /dev/null +++ b/versions/v5.0.1/_predicate_8hpp_source.html @@ -0,0 +1,125 @@ + + + + + + + +Modulo: /github/workspace/source/modulo_core/include/modulo_core/Predicate.hpp Source File + + + + + + + + + +
+
+ + + + + + +
+
Modulo 5.0.0 +
+
+
+ + + + + + + + + +
+
+ + +
+
+
+
+
+
Loading...
+
Searching...
+
No Matches
+
+
+
+
+ + +
+
+
Predicate.hpp
+
+
+
1#pragma once
+
2
+
3#include <functional>
+
4#include <map>
+
5#include <optional>
+
6#include <string>
+
7
+
8namespace modulo_core {
+
9
+
+
13class Predicate {
+
14public:
+
15 explicit Predicate(const std::function<bool(void)>& predicate_function) : predicate_(std::move(predicate_function)) {}
+
16
+
17 bool get_value() const { return predicate_(); }
+
18
+
19 void set_predicate(const std::function<bool(void)>& predicate_function) { predicate_ = predicate_function; }
+
20
+
21 std::optional<bool> query() {
+
22 if (const auto new_value = predicate_(); !previous_value_ || new_value != *previous_value_) {
+
23 previous_value_ = new_value;
+
24 return new_value;
+
25 }
+
26 return {};
+
27 }
+
28
+
29private:
+
30 std::function<bool(void)> predicate_;
+
31 std::optional<bool> previous_value_;
+
32};
+
+
33
+
34}// namespace modulo_core
+ +
Modulo Core.
+
+ + + + diff --git a/versions/v5.0.1/_predicates_listener_8cpp_source.html b/versions/v5.0.1/_predicates_listener_8cpp_source.html new file mode 100644 index 00000000..26fb33b3 --- /dev/null +++ b/versions/v5.0.1/_predicates_listener_8cpp_source.html @@ -0,0 +1,129 @@ + + + + + + + +Modulo: /github/workspace/source/modulo_utils/src/testutils/PredicatesListener.cpp Source File + + + + + + + + + +
+
+ + + + + + +
+
Modulo 5.0.0 +
+
+
+ + + + + + + + + +
+
+ + +
+
+
+
+
+
Loading...
+
Searching...
+
No Matches
+
+
+
+
+ + +
+
+
PredicatesListener.cpp
+
+
+
1#include "modulo_utils/testutils/PredicatesListener.hpp"
+
2
+
3namespace modulo_utils::testutils {
+
4
+
5PredicatesListener::PredicatesListener(
+
6 const std::string& node, const std::vector<std::string>& predicates, const rclcpp::NodeOptions& node_options)
+
7 : rclcpp::Node("predicates_listener", node_options) {
+
8 this->received_future_ = this->received_.get_future();
+
9 for (const auto& predicate : predicates) {
+
10 this->predicates_.insert_or_assign(predicate, false);
+
11 }
+
12 this->subscription_ = this->create_subscription<modulo_interfaces::msg::PredicateCollection>(
+
13 "/predicates", 10, [this, node](const std::shared_ptr<modulo_interfaces::msg::PredicateCollection> message) {
+
14 if (message->node == node) {
+
15 for (const auto& predicate_msg : message->predicates) {
+
16 if (this->predicates_.find(predicate_msg.predicate) != this->predicates_.end()) {
+
17 this->predicates_.at(predicate_msg.predicate) = predicate_msg.value;
+
18 if (predicate_msg.value) {
+
19 this->received_.set_value();
+
20 }
+
21 }
+
22 }
+
23 }
+
24 });
+
25}
+
26
+
27void PredicatesListener::reset_future() {
+
28 this->received_ = std::promise<void>();
+
29 this->received_future_ = this->received_.get_future();
+
30}
+
31
+
32const std::shared_future<void>& PredicatesListener::get_predicate_future() const {
+
33 return this->received_future_;
+
34}
+
35
+
36const std::map<std::string, bool>& PredicatesListener::get_predicate_values() const {
+
37 return this->predicates_;
+
38}
+
39}// namespace modulo_utils::testutils
+
+ + + + diff --git a/versions/v5.0.1/_predicates_listener_8hpp_source.html b/versions/v5.0.1/_predicates_listener_8hpp_source.html new file mode 100644 index 00000000..531c39e0 --- /dev/null +++ b/versions/v5.0.1/_predicates_listener_8hpp_source.html @@ -0,0 +1,124 @@ + + + + + + + +Modulo: /github/workspace/source/modulo_utils/include/modulo_utils/testutils/PredicatesListener.hpp Source File + + + + + + + + + +
+
+ + + + + + +
+
Modulo 5.0.0 +
+
+
+ + + + + + + + + +
+
+ + +
+
+
+
+
+
Loading...
+
Searching...
+
No Matches
+
+
+
+
+ + +
+
+
PredicatesListener.hpp
+
+
+
1#pragma once
+
2
+
3#include <future>
+
4#include <map>
+
5
+
6#include <modulo_interfaces/msg/predicate_collection.hpp>
+
7#include <rclcpp/rclcpp.hpp>
+
8
+
9namespace modulo_utils::testutils {
+
10
+
11using namespace std::chrono_literals;
+
12
+
+
13class PredicatesListener : public rclcpp::Node {
+
14public:
+ +
16 const std::string& node, const std::vector<std::string>& predicates,
+
17 const rclcpp::NodeOptions& node_options = rclcpp::NodeOptions());
+
18
+
19 void reset_future();
+
20
+
21 [[nodiscard]] const std::shared_future<void>& get_predicate_future() const;
+
22
+
23 [[nodiscard]] const std::map<std::string, bool>& get_predicate_values() const;
+
24
+
25private:
+
26 std::shared_ptr<rclcpp::Subscription<modulo_interfaces::msg::PredicateCollection>> subscription_;
+
27 std::map<std::string, bool> predicates_;
+
28 std::shared_future<void> received_future_;
+
29 std::promise<void> received_;
+
30};
+
+
31}// namespace modulo_utils::testutils
+ +
+ + + + diff --git a/versions/v5.0.1/_publisher_handler_8hpp_source.html b/versions/v5.0.1/_publisher_handler_8hpp_source.html new file mode 100644 index 00000000..25293808 --- /dev/null +++ b/versions/v5.0.1/_publisher_handler_8hpp_source.html @@ -0,0 +1,234 @@ + + + + + + + +Modulo: /github/workspace/source/modulo_core/include/modulo_core/communication/PublisherHandler.hpp Source File + + + + + + + + + +
+
+ + + + + + +
+
Modulo 5.0.0 +
+
+
+ + + + + + + + + +
+
+ + +
+
+
+
+
+
Loading...
+
Searching...
+
No Matches
+
+
+
+
+ + +
+
+
PublisherHandler.hpp
+
+
+
1#pragma once
+
2
+
3#include <rclcpp/logging.hpp>
+
4
+
5#include "modulo_core/communication/PublisherInterface.hpp"
+
6
+
7#include <rclcpp_lifecycle/lifecycle_publisher.hpp>
+
8
+ +
10
+
18template<typename PubT, typename MsgT>
+
+ +
20public:
+
26 PublisherHandler(PublisherType type, std::shared_ptr<PubT> publisher);
+
27
+
31 ~PublisherHandler() override;
+
32
+
36 virtual void activate() override;
+
37
+
41 virtual void deactivate() override;
+
42
+
46 void publish() override;
+
47
+
53 void publish(const MsgT& message) const;
+
54
+
59 std::shared_ptr<PublisherInterface>
+
60 create_publisher_interface(const std::shared_ptr<MessagePairInterface>& message_pair);
+
61
+
62private:
+
63 std::shared_ptr<PubT> publisher_;
+
64
+ +
66};
+
+
67
+
68template<typename PubT, typename MsgT>
+
+ +
70 : PublisherInterface(type), publisher_(std::move(publisher)) {}
+
+
71
+
72template<typename PubT, typename MsgT>
+
+ +
74 this->publisher_.reset();
+
75}
+
+
76
+
77template<typename PubT, typename MsgT>
+
+ +
79 if constexpr (std::derived_from<PubT, rclcpp_lifecycle::LifecyclePublisher<MsgT>>) {
+
80 if (this->publisher_ == nullptr) {
+
81 throw exceptions::NullPointerException("Publisher not set");
+
82 }
+
83 try {
+
84 this->publisher_->on_activate();
+
85 } catch (const std::exception& ex) {
+
86 throw exceptions::CoreException(ex.what());
+
87 }
+
88 }
+
89}
+
+
90
+
91template<typename PubT, typename MsgT>
+
+ +
93 if constexpr (std::derived_from<PubT, rclcpp_lifecycle::LifecyclePublisher<MsgT>>) {
+
94 if (this->publisher_ == nullptr) {
+
95 throw exceptions::NullPointerException("Publisher not set");
+
96 }
+
97 try {
+
98 this->publisher_->on_deactivate();
+
99 } catch (const std::exception& ex) {
+
100 throw exceptions::CoreException(ex.what());
+
101 }
+
102 }
+
103}
+
+
104
+
105template<typename PubT, typename MsgT>
+
+ +
107 try {
+ +
109 if (this->message_pair_ == nullptr) {
+
110 throw exceptions::NullPointerException("Message pair is not set, nothing to publish");
+
111 }
+
112 publish(this->message_pair_->write<MsgT, MsgT>());
+
113 } else {
+ +
115 }
+
116 } catch (const exceptions::CoreException& ex) {
+
117 throw;
+
118 }
+
119}
+
+
120
+
121template<typename PubT, typename MsgT>
+
+
122void PublisherHandler<PubT, MsgT>::publish(const MsgT& message) const {
+
123 if (this->publisher_ == nullptr) {
+
124 throw exceptions::NullPointerException("Publisher not set");
+
125 }
+
126 try {
+
127 this->publisher_->publish(message);
+
128 } catch (const std::exception& ex) {
+
129 throw exceptions::CoreException(ex.what());
+
130 }
+
131}
+
+
132
+
133template<typename PubT, typename MsgT>
+
134inline std::shared_ptr<PublisherInterface>
+
+
135PublisherHandler<PubT, MsgT>::create_publisher_interface(const std::shared_ptr<MessagePairInterface>& message_pair) {
+
136 std::shared_ptr<PublisherInterface> publisher_interface;
+
137 try {
+
138 publisher_interface = std::shared_ptr<PublisherInterface>(this->shared_from_this());
+
139 } catch (const std::exception& ex) {
+
140 throw exceptions::CoreException(ex.what());
+
141 }
+
142 publisher_interface->set_message_pair(message_pair);
+
143 return publisher_interface;
+
144}
+
+
145}// namespace modulo_core::communication
+
The PublisherHandler handles different types of ROS publishers to activate, deactivate and publish da...
+
virtual void activate() override
Activate ROS publisher of a derived PublisherHandler instance through the PublisherInterface pointer.
+
void publish() override
Publish the data stored in the message pair through the ROS publisher of a derived PublisherHandler i...
+
std::shared_ptr< PublisherInterface > create_publisher_interface(const std::shared_ptr< MessagePairInterface > &message_pair)
Create a PublisherInterface instance from the current PublisherHandler.
+
~PublisherHandler() override
Destructor to explicitly reset the publisher pointer.
+
PublisherHandler(PublisherType type, std::shared_ptr< PubT > publisher)
Constructor with the publisher type and the pointer to the ROS publisher.
+
virtual void deactivate() override
Deactivate ROS publisher of a derived PublisherHandler instance through the PublisherInterface pointe...
+
Interface class to enable non-templated activating/deactivating/publishing of ROS publishers from der...
+
virtual void publish()
Publish the data stored in the message pair through the ROS publisher of a derived PublisherHandler i...
+
std::shared_ptr< MessagePairInterface > message_pair_
The pointer to the stored MessagePair instance.
+
A base class for all core exceptions.
+
An exception class to notify that a certain pointer is null.
+ + +
Modulo Core communication module for handling messages on publication and subscription interfaces.
+
PublisherType
Enum of supported ROS publisher types for the PublisherInterface.
+
+ + + + diff --git a/versions/v5.0.1/_publisher_interface_8cpp_source.html b/versions/v5.0.1/_publisher_interface_8cpp_source.html new file mode 100644 index 00000000..cc17990a --- /dev/null +++ b/versions/v5.0.1/_publisher_interface_8cpp_source.html @@ -0,0 +1,208 @@ + + + + + + + +Modulo: /github/workspace/source/modulo_core/src/communication/PublisherInterface.cpp Source File + + + + + + + + + +
+
+ + + + + + +
+
Modulo 5.0.0 +
+
+
+ + + + + + + + + +
+
+ + +
+
+
+
+
+
Loading...
+
Searching...
+
No Matches
+
+
+
+
+ + +
+
+
PublisherInterface.cpp
+
+
+
1#include "modulo_core/communication/PublisherInterface.hpp"
+
2
+
3#include <utility>
+
4
+
5#include <rclcpp/publisher.hpp>
+
6#include <rclcpp_lifecycle/lifecycle_publisher.hpp>
+
7#include <std_msgs/msg/bool.hpp>
+
8#include <std_msgs/msg/float64.hpp>
+
9#include <std_msgs/msg/float64_multi_array.hpp>
+
10#include <std_msgs/msg/int32.hpp>
+
11#include <std_msgs/msg/string.hpp>
+
12
+
13#include "modulo_core/communication/PublisherHandler.hpp"
+
14
+ +
16
+
+
17PublisherInterface::PublisherInterface(PublisherType type, std::shared_ptr<MessagePairInterface> message_pair)
+
18 : message_pair_(std::move(message_pair)), type_(type) {}
+
+
19
+
+ + +
22 "The derived publisher handler is required to override this function to handle activation");
+
23}
+
+
24
+
+ + +
27 "The derived publisher handler is required to override this function to handle deactivation");
+
28}
+
+
29
+
+ +
31 try {
+
32 if (this->message_pair_ == nullptr) {
+
33 throw exceptions::NullPointerException("Message pair is not set, nothing to publish");
+
34 }
+
35 switch (this->message_pair_->get_type()) {
+
36 case MessageType::BOOL:
+
37 this->publish(this->message_pair_->write<std_msgs::msg::Bool, bool>());
+
38 break;
+
39 case MessageType::FLOAT64:
+
40 this->publish(this->message_pair_->write<std_msgs::msg::Float64, double>());
+
41 break;
+
42 case MessageType::FLOAT64_MULTI_ARRAY:
+
43 this->publish(this->message_pair_->write<std_msgs::msg::Float64MultiArray, std::vector<double>>());
+
44 break;
+
45 case MessageType::INT32:
+
46 this->publish(this->message_pair_->write<std_msgs::msg::Int32, int>());
+
47 break;
+
48 case MessageType::STRING:
+
49 this->publish(this->message_pair_->write<std_msgs::msg::String, std::string>());
+
50 break;
+
51 case MessageType::ENCODED_STATE:
+
52 if (!this->message_pair_->get_message_pair<EncodedState, state_representation::State>()
+
53 ->get_data()
+
54 ->is_empty()) {
+
55 this->publish(this->message_pair_->write<EncodedState, state_representation::State>());
+
56 }
+
57 break;
+
58 default:
+
59 break;
+
60 }
+
61 } catch (const exceptions::CoreException& ex) {
+
62 throw;
+
63 }
+
64}
+
+
65
+
66template<typename MsgT>
+
67void PublisherInterface::publish(const MsgT& message) {
+
68 switch (this->get_type()) {
+
69 case PublisherType::PUBLISHER:
+
70 this->template get_handler<rclcpp::Publisher<MsgT>, MsgT>()->publish(message);
+
71 break;
+
72 case PublisherType::LIFECYCLE_PUBLISHER:
+
73 this->template get_handler<rclcpp_lifecycle::LifecyclePublisher<MsgT>, MsgT>()->publish(message);
+
74 break;
+
75 }
+
76}
+
77
+
+
78std::shared_ptr<MessagePairInterface> PublisherInterface::get_message_pair() const {
+
79 return this->message_pair_;
+
80}
+
+
81
+
+
82void PublisherInterface::set_message_pair(const std::shared_ptr<MessagePairInterface>& message_pair) {
+
83 if (message_pair == nullptr) {
+
84 throw exceptions::NullPointerException("Provide a valid pointer");
+
85 }
+
86 this->message_pair_ = message_pair;
+
87}
+
+
88
+
+ +
90 return this->type_;
+
91}
+
+
92}// namespace modulo_core::communication
+
virtual void deactivate()
Deactivate ROS publisher of a derived PublisherHandler instance through the PublisherInterface pointe...
+
PublisherType get_type() const
Get the type of the publisher interface.
+
virtual void publish()
Publish the data stored in the message pair through the ROS publisher of a derived PublisherHandler i...
+
std::shared_ptr< MessagePairInterface > get_message_pair() const
Get the pointer to the message pair of the PublisherInterface.
+
std::shared_ptr< MessagePairInterface > message_pair_
The pointer to the stored MessagePair instance.
+
PublisherInterface(PublisherType type, std::shared_ptr< MessagePairInterface > message_pair=nullptr)
Constructor with the message type and message pair.
+
void set_message_pair(const std::shared_ptr< MessagePairInterface > &message_pair)
Set the pointer to the message pair of the PublisherInterface.
+
virtual void activate()
Activate ROS publisher of a derived PublisherHandler instance through the PublisherInterface pointer.
+
A base class for all core exceptions.
+
An exception class to notify that a certain pointer is null.
+
Modulo Core communication module for handling messages on publication and subscription interfaces.
+
PublisherType
Enum of supported ROS publisher types for the PublisherInterface.
+
+ + + + diff --git a/versions/v5.0.1/_publisher_interface_8hpp_source.html b/versions/v5.0.1/_publisher_interface_8hpp_source.html new file mode 100644 index 00000000..ea3c6991 --- /dev/null +++ b/versions/v5.0.1/_publisher_interface_8hpp_source.html @@ -0,0 +1,173 @@ + + + + + + + +Modulo: /github/workspace/source/modulo_core/include/modulo_core/communication/PublisherInterface.hpp Source File + + + + + + + + + +
+
+ + + + + + +
+
Modulo 5.0.0 +
+
+
+ + + + + + + + + +
+
+ + +
+
+
+
+
+
Loading...
+
Searching...
+
No Matches
+
+
+
+
+ + +
+
+
PublisherInterface.hpp
+
+
+
1#pragma once
+
2
+
3#include <memory>
+
4
+
5#include "modulo_core/communication/MessagePair.hpp"
+
6#include "modulo_core/communication/PublisherType.hpp"
+
7#include "modulo_core/exceptions.hpp"
+
8
+ +
10
+
11// forward declaration of derived Publisher class
+
12template<typename PubT, typename MsgT>
+
13class PublisherHandler;
+
14
+
+
20class PublisherInterface : public std::enable_shared_from_this<PublisherInterface> {
+
21public:
+
27 explicit PublisherInterface(PublisherType type, std::shared_ptr<MessagePairInterface> message_pair = nullptr);
+
28
+
32 PublisherInterface(const PublisherInterface& publisher) = default;
+
33
+
37 virtual ~PublisherInterface() = default;
+
38
+
57 template<typename PubT, typename MsgT>
+
58 std::shared_ptr<PublisherHandler<PubT, MsgT>> get_handler(bool validate_pointer = true);
+
59
+
68 virtual void activate();
+
69
+
78 virtual void deactivate();
+
79
+
90 virtual void publish();
+
91
+
95 [[nodiscard]] std::shared_ptr<MessagePairInterface> get_message_pair() const;
+
96
+
101 void set_message_pair(const std::shared_ptr<MessagePairInterface>& message_pair);
+
102
+
107 PublisherType get_type() const;
+
108
+
109protected:
+
110 std::shared_ptr<MessagePairInterface> message_pair_;
+
111
+
112private:
+
123 template<typename MsgT>
+
124 void publish(const MsgT& message);
+
125
+
126 PublisherType type_;
+
127};
+
+
128
+
129template<typename PubT, typename MsgT>
+
+
130inline std::shared_ptr<PublisherHandler<PubT, MsgT>> PublisherInterface::get_handler(bool validate_pointer) {
+
131 std::shared_ptr<PublisherHandler<PubT, MsgT>> publisher_ptr;
+
132 try {
+
133 publisher_ptr = std::dynamic_pointer_cast<PublisherHandler<PubT, MsgT>>(this->shared_from_this());
+
134 } catch (const std::exception& ex) {
+
135 if (validate_pointer) {
+
136 throw exceptions::InvalidPointerException("Publisher interface is not managed by a valid pointer");
+
137 }
+
138 }
+
139 if (publisher_ptr == nullptr && validate_pointer) {
+ +
141 "Unable to cast publisher interface to a publisher pointer of requested type");
+
142 }
+
143 return publisher_ptr;
+
144}
+
+
145}// namespace modulo_core::communication
+
Interface class to enable non-templated activating/deactivating/publishing of ROS publishers from der...
+
virtual ~PublisherInterface()=default
Default virtual destructor.
+
virtual void deactivate()
Deactivate ROS publisher of a derived PublisherHandler instance through the PublisherInterface pointe...
+
PublisherInterface(const PublisherInterface &publisher)=default
Copy constructor from another PublisherInterface.
+
PublisherType get_type() const
Get the type of the publisher interface.
+
virtual void publish()
Publish the data stored in the message pair through the ROS publisher of a derived PublisherHandler i...
+
std::shared_ptr< MessagePairInterface > get_message_pair() const
Get the pointer to the message pair of the PublisherInterface.
+
std::shared_ptr< MessagePairInterface > message_pair_
The pointer to the stored MessagePair instance.
+
std::shared_ptr< PublisherHandler< PubT, MsgT > > get_handler(bool validate_pointer=true)
Get a pointer to a derived PublisherHandler instance from a PublisherInterface pointer.
+
void set_message_pair(const std::shared_ptr< MessagePairInterface > &message_pair)
Set the pointer to the message pair of the PublisherInterface.
+
virtual void activate()
Activate ROS publisher of a derived PublisherHandler instance through the PublisherInterface pointer.
+
An exception class to notify if the result of getting an instance of a derived class through dynamic ...
+
An exception class to notify if an object has no reference count (if the object is not owned by any p...
+
Modulo Core communication module for handling messages on publication and subscription interfaces.
+
PublisherType
Enum of supported ROS publisher types for the PublisherInterface.
+
+ + + + diff --git a/versions/v5.0.1/_publisher_type_8hpp_source.html b/versions/v5.0.1/_publisher_type_8hpp_source.html new file mode 100644 index 00000000..dd3a2e03 --- /dev/null +++ b/versions/v5.0.1/_publisher_type_8hpp_source.html @@ -0,0 +1,98 @@ + + + + + + + +Modulo: /github/workspace/source/modulo_core/include/modulo_core/communication/PublisherType.hpp Source File + + + + + + + + + +
+
+ + + + + + +
+
Modulo 5.0.0 +
+
+
+ + + + + + + + + +
+
+ + +
+
+
+
+
+
Loading...
+
Searching...
+
No Matches
+
+
+
+
+ + +
+
+
PublisherType.hpp
+
+
+
1#pragma once
+
2
+ +
4
+
9enum class PublisherType { PUBLISHER, LIFECYCLE_PUBLISHER };
+
10}// namespace modulo_core::communication
+
Modulo Core communication module for handling messages on publication and subscription interfaces.
+
PublisherType
Enum of supported ROS publisher types for the PublisherInterface.
+
+ + + + diff --git a/versions/v5.0.1/_robot_controller_interface_8cpp_source.html b/versions/v5.0.1/_robot_controller_interface_8cpp_source.html new file mode 100644 index 00000000..1f995952 --- /dev/null +++ b/versions/v5.0.1/_robot_controller_interface_8cpp_source.html @@ -0,0 +1,502 @@ + + + + + + + +Modulo: /github/workspace/source/modulo_controllers/src/RobotControllerInterface.cpp Source File + + + + + + + + + +
+
+ + + + + + +
+
Modulo 5.0.0 +
+
+
+ + + + + + + + + +
+
+ + +
+
+
+
+
+
Loading...
+
Searching...
+
No Matches
+
+
+
+
+ + +
+
+
RobotControllerInterface.cpp
+
+
+
1#include "modulo_controllers/RobotControllerInterface.hpp"
+
2
+
3#include "ament_index_cpp/get_package_share_directory.hpp"
+
4#include <hardware_interface/types/hardware_interface_type_values.hpp>
+
5
+
6#include <state_representation/exceptions/JointNotFoundException.hpp>
+
7
+
8using namespace state_representation;
+
9
+
10namespace modulo_controllers {
+
11
+
12static const std::map<std::string, JointStateVariable> interface_map =// NOLINT(cert-err58-cpp)
+
13 {{hardware_interface::HW_IF_POSITION, JointStateVariable::POSITIONS},
+
14 {hardware_interface::HW_IF_VELOCITY, JointStateVariable::VELOCITIES},
+
15 {hardware_interface::HW_IF_ACCELERATION, JointStateVariable::ACCELERATIONS},
+
16 {hardware_interface::HW_IF_EFFORT, JointStateVariable::TORQUES}};
+
17
+ +
19
+
+ +
21 bool robot_model_required, const std::string& control_type, bool load_geometries)
+
22 : ControllerInterface(true),
+
23 control_type_(control_type),
+
24 robot_model_required_(robot_model_required),
+
25 load_geometries_(load_geometries),
+
26 new_joint_command_ready_(false),
+
27 command_decay_factor_(0.0),
+
28 command_rate_limit_(std::numeric_limits<double>::infinity()) {
+
29 if (!control_type.empty() && interface_map.find(control_type) == interface_map.cend()) {
+
30 RCLCPP_ERROR(get_node()->get_logger(), "Invalid control type: %s", control_type.c_str());
+
31 throw std::invalid_argument("Invalid control type");
+
32 }
+
33}
+
+
34
+
+
35rclcpp_lifecycle::node_interfaces::LifecycleNodeInterface::CallbackReturn RobotControllerInterface::add_interfaces() {
+ +
37 std::make_shared<Parameter<std::string>>("task_space_frame"),
+
38 "The frame name in the robot model to use for kinematics calculations (defaults to the last frame in the "
+
39 "model)");
+ +
41 "sort_joints", true,
+
42 "If true, re-arrange the 'joints' parameter into a physically correct order according to the robot model");
+ +
44 std::make_shared<Parameter<std::string>>("ft_sensor_name"),
+
45 "Optionally, the name of a force-torque sensor in the hardware interface");
+ +
47 std::make_shared<Parameter<std::string>>("ft_sensor_reference_frame"),
+
48 "The reference frame of the force-torque sensor in the robot model");
+ +
50 "command_half_life", 0.1,
+
51 "A time constant for the exponential decay of the commanded velocity, acceleration or torque if no new command "
+
52 "is set");
+ +
54 "command_rate_limit", command_rate_limit_,
+
55 "The maximum allowable change in command on any interface expressed in command units / second");
+
56 return CallbackReturn::SUCCESS;
+
57}
+
+
58
+
+
59rclcpp_lifecycle::node_interfaces::LifecycleNodeInterface::CallbackReturn RobotControllerInterface::on_configure() {
+
60 if (*get_parameter("robot_description")) {
+
61 std::stringstream timestamp;
+
62 timestamp << std::time(nullptr);
+
63 auto urdf_path = "/tmp/" + hardware_name_ + "_" + timestamp.str();
+
64 try {
+
65 robot_model::Model::create_urdf_from_string(get_parameter_value<std::string>("robot_description"), urdf_path);
+
66 if (load_geometries_) {
+
67 robot_ = std::make_shared<robot_model::Model>(hardware_name_, urdf_path, [](const std::string& package_name) {
+
68 return ament_index_cpp::get_package_share_directory(package_name) + "/";
+
69 });
+
70 RCLCPP_DEBUG(get_node()->get_logger(), "Generated robot model with collision features");
+
71 } else {
+
72 robot_ = std::make_shared<robot_model::Model>(hardware_name_, urdf_path);
+
73 RCLCPP_DEBUG(get_node()->get_logger(), "Generated robot model");
+
74 }
+
75 } catch (const std::exception& ex) {
+ + +
78 "Could not generate robot model with temporary urdf from string content at path %s: %s", urdf_path.c_str(),
+
79 ex.what());
+
80 }
+
81 }
+
82 if (robot_model_required_ && robot_ == nullptr) {
+
83 RCLCPP_ERROR(get_node()->get_logger(), "Robot model is not available even though it's required by the controller.");
+
84 return CallbackReturn::ERROR;
+
85 }
+
86
+
87 if (robot_) {
+
88 if (get_parameter("task_space_frame")->is_empty()) {
+
89 task_space_frame_ = robot_->get_frames().back();
+
90 } else {
+ +
92 if (!robot_->get_pinocchio_model().existFrame(task_space_frame_)) {
+ +
94 get_node()->get_logger(), "Provided task space frame %s does not exist in the robot model!",
+
95 task_space_frame_.c_str());
+
96 return CallbackReturn::ERROR;
+
97 }
+
98 }
+
99 }
+
100
+
101 auto joints = get_parameter("joints");
+
102 if (joints->is_empty() && !control_type_.empty()) {
+ +
104 get_node()->get_logger(), "The 'joints' parameter is required for a non-zero control type %s!",
+
105 control_type_.c_str());
+
106 return CallbackReturn::ERROR;
+
107 }
+
108 joints_ = joints->get_parameter_value<std::vector<std::string>>();
+
109
+
110 // sort the interface joint names using the robot model if necessary
+
111 if (get_parameter_value<bool>("sort_joints") && robot_) {
+
112 if (joints_.size() != robot_->get_number_of_joints()) {
+ +
114 get_node()->get_logger(),
+
115 "The number of interface joints (%zu) does not match the number of joints in the robot model (%u)",
+
116 joints_.size(), robot_->get_number_of_joints());
+
117 }
+
118 std::vector<std::string> ordered_joints;
+
119 for (const auto& ordered_name : robot_->get_joint_frames()) {
+
120 for (const auto& joint_name : joints_) {
+
121 if (joint_name == ordered_name) {
+
122 ordered_joints.push_back(joint_name);
+
123 break;
+
124 }
+
125 }
+
126 }
+
127 if (ordered_joints.size() < joints_.size()) {
+ +
129 get_node()->get_logger(), "%zu interface joints were not found in the robot model",
+
130 joints_.size() - ordered_joints.size());
+
131 return CallbackReturn::ERROR;
+
132 }
+
133 joints_ = ordered_joints;
+
134 }
+
135 joint_state_ = JointState(hardware_name_, joints_);
+
136
+
137 // set command interfaces from joints
+
138 if (!control_type_.empty()) {
+
139 if (control_type_ == hardware_interface::HW_IF_POSITION) {
+
140 previous_joint_command_values_ = std::vector<double>(joints_.size(), std::numeric_limits<double>::quiet_NaN());
+
141 } else {
+
142 previous_joint_command_values_ = std::vector<double>(joints_.size(), 0.0);
+
143 }
+
144 for (const auto& joint : joints_) {
+
145 add_command_interface(joint, control_type_);
+
146 }
+
147 }
+
148
+
149 auto ft_sensor_name = get_parameter("ft_sensor_name");
+
150 if (!ft_sensor_name->is_empty()) {
+
151 ft_sensor_name_ = ft_sensor_name->get_parameter_value<std::string>();
+
152 auto ft_sensor_reference_frame = get_parameter("ft_sensor_reference_frame");
+
153 if (ft_sensor_reference_frame->is_empty()) {
+ +
155 get_node()->get_logger(),
+
156 "The 'ft_sensor_reference_frame' parameter cannot be empty if a force-torque sensor is specified!");
+
157 return CallbackReturn::ERROR;
+
158 }
+
159 ft_sensor_reference_frame_ = ft_sensor_reference_frame->get_parameter_value<std::string>();
+
160 // TODO check that there is no joint in between
+
161 if (robot_ != nullptr && !robot_->get_pinocchio_model().existFrame(ft_sensor_reference_frame_)) {
+ +
163 get_node()->get_logger(), "The FT sensor reference frame '%s' does not exist on the robot model!",
+ +
165 return CallbackReturn::ERROR;
+
166 }
+
167 }
+
168
+
169 command_decay_factor_ = -log(0.5) / get_parameter_value<double>("command_half_life");
+
170 command_rate_limit_ = get_parameter_value<double>("command_rate_limit");
+
171
+
172 RCLCPP_DEBUG(get_node()->get_logger(), "Configuration of RobotControllerInterface successful");
+
173 return CallbackReturn::SUCCESS;
+
174}
+
+
175
+
+
176rclcpp_lifecycle::node_interfaces::LifecycleNodeInterface::CallbackReturn RobotControllerInterface::on_activate() {
+
177 // initialize a force torque sensor state if applicable
+
178 if (!ft_sensor_name_.empty()) {
+
179 try {
+ + + + + + +
186 } catch (const std::out_of_range&) {
+ +
188 get_node()->get_logger(), "The force torque sensor '%s' does not have all the expected state interfaces!",
+
189 ft_sensor_name_.c_str());
+
190 return CallbackReturn::FAILURE;
+
191 }
+ +
193 }
+
194
+
195 RCLCPP_DEBUG(get_node()->get_logger(), "Activation of RobotControllerInterface successful");
+
196 return CallbackReturn::SUCCESS;
+
197}
+
+
198
+
199controller_interface::return_type RobotControllerInterface::read_state_interfaces() {
+ +
201 if (status != controller_interface::return_type::OK) {
+
202 return status;
+
203 }
+
204
+
205 if (joint_state_.get_size() > 0 && joint_state_.is_empty()) {
+
206 RCLCPP_DEBUG(get_node()->get_logger(), "Reading first joint state");
+
207 joint_state_.set_zero();
+
208 }
+
209
+
210 for (const auto& joint : joints_) {
+ +
212 unsigned int joint_index;
+
213 try {
+
214 joint_index = joint_state_.get_joint_index(joint);
+
215 } catch (exceptions::JointNotFoundException& ex) {
+ +
217 return controller_interface::return_type::ERROR;
+
218 }
+
219 for (const auto& [interface, value] : data) {
+
220 if (!std::isfinite(value)) {
+ +
222 get_node()->get_logger(), *get_node()->get_clock(), 1000, "Value of state interface '%s/%s' is not finite",
+
223 joint.c_str(), interface.c_str());
+
224 return controller_interface::return_type::ERROR;
+
225 }
+
226 switch (interface_map.at(interface)) {
+
227 case JointStateVariable::POSITIONS:
+
228 joint_state_.set_position(value, joint_index);
+
229 break;
+
230 case JointStateVariable::VELOCITIES:
+
231 joint_state_.set_velocity(value, joint_index);
+
232 break;
+
233 case JointStateVariable::ACCELERATIONS:
+
234 joint_state_.set_acceleration(value, joint_index);
+
235 break;
+
236 case JointStateVariable::TORQUES:
+
237 joint_state_.set_torque(value, joint_index);
+
238 break;
+
239 default:
+
240 break;
+
241 }
+
242 }
+
243 }
+
244
+
245 if (!ft_sensor_name_.empty()) {
+ +
247 std::vector<double> wrench = {ft_sensor.at("force.x"), ft_sensor.at("force.y"), ft_sensor.at("force.z"),
+
248 ft_sensor.at("torque.x"), ft_sensor.at("torque.y"), ft_sensor.at("torque.z")};
+
249 ft_sensor_.set_wrench(wrench);
+
250 }
+
251
+
252 return controller_interface::return_type::OK;
+
253}
+
254
+
255controller_interface::return_type RobotControllerInterface::write_command_interfaces(const rclcpp::Duration& period) {
+
256 if (!control_type_.empty()) {
+
257 double decay = 1.0 - command_decay_factor_ * period.seconds();
+
258 decay = std::max(0.0, decay);
+
259 double rate_limit = command_rate_limit_ * period.seconds();
+
260
+
261 auto joint_command_values = joint_command_values_.readFromRT();
+
262 if (joint_command_values == nullptr) {
+
263 new_joint_command_ready_ = false;
+
264 }
+
265
+
266 for (std::size_t index = 0; index < joints_.size(); ++index) {
+
267 double previous_command = previous_joint_command_values_.at(index);
+
268 if (new_joint_command_ready_) {
+
269 auto new_command = joint_command_values->at(index);
+
270 if (std::isfinite(previous_command) && std::abs(new_command - previous_command) > rate_limit) {
+ + +
273 }
+
274 set_command_interface(joints_.at(index), control_type_, new_command);
+
275 previous_joint_command_values_.at(index) = new_command;
+
276 } else if (control_type_ != hardware_interface::HW_IF_POSITION) {
+ +
278 set_command_interface(joints_.at(index), control_type_, new_command);
+
279 previous_joint_command_values_.at(index) = new_command;
+
280 }
+
281 }
+
282 new_joint_command_ready_ = false;
+
283 }
+
284
+ +
286}
+
287
+
+ +
289 return joint_state_;
+
290}
+
+
291
+
+ +
293 // TODO check if recompute is necessary?
+ +
295 return cartesian_state_;
+
296}
+
+
297
+
+ +
299 return ft_sensor_;
+
300}
+
+
301
+
+ +
303 if (robot_ != nullptr) {
+
304 cartesian_state_ = robot_->forward_kinematics(joint_state_, task_space_frame_);
+
305 cartesian_state_.set_twist(robot_->forward_velocity(joint_state_, task_space_frame_).get_twist());
+
306
+
307 if (!ft_sensor_.is_empty() && (ft_sensor_.get_reference_frame() == cartesian_state_.get_name())) {
+
308 auto ft_sensor_in_robot_frame = cartesian_state_ * ft_sensor_;
+
309 cartesian_state_.set_wrench(ft_sensor_in_robot_frame.get_wrench());
+
310 }
+
311 }
+
312}
+
+
313
+
+
314void RobotControllerInterface::set_joint_command(const JointState& joint_command) {
+
315 if (!joint_command) {
+
316 RCLCPP_DEBUG(get_node()->get_logger(), "set_joint_command called with an empty JointState");
+
317 return;
+
318 }
+
319
+
320 std::vector<double> joint_command_values;
+
321 joint_command_values.reserve(joints_.size());
+
322
+
323 for (const auto& joint : joints_) {
+
324 try {
+
325 switch (interface_map.at(control_type_)) {
+
326 case JointStateVariable::POSITIONS:
+
327 joint_command_values.push_back(joint_command.get_position(joint));
+
328 break;
+
329 case JointStateVariable::VELOCITIES:
+
330 joint_command_values.push_back(joint_command.get_velocity(joint));
+
331 break;
+
332 case JointStateVariable::ACCELERATIONS:
+
333 joint_command_values.push_back(joint_command.get_acceleration(joint));
+
334 break;
+
335 case JointStateVariable::TORQUES:
+
336 joint_command_values.push_back(joint_command.get_torque(joint));
+
337 break;
+
338 default:
+
339 break;
+
340 }
+
341 } catch (const state_representation::exceptions::JointNotFoundException& ex) {
+ +
343 }
+
344 }
+
345
+
346 if (joint_command_values.size() == joints_.size()) {
+
347 joint_command_values_.writeFromNonRT(joint_command_values);
+
348 new_joint_command_ready_ = true;
+
349 } else {
+ +
351 get_node()->get_logger(), *get_node()->get_clock(), 1000,
+
352 "Unable to set command values from provided joint command");
+
353 }
+
354}
+
+
355
+
+
356bool RobotControllerInterface::on_validate_parameter_callback(const std::shared_ptr<ParameterInterface>& parameter) {
+
357 if ((parameter->get_name() == "command_half_life" || parameter->get_name() == "command_rate_limit")
+
358 && parameter->get_parameter_value<double>() < 0.0) {
+ +
360 get_node()->get_logger(), "Parameter value of '%s' should be greater than 0", parameter->get_name().c_str());
+
361 return false;
+
362 }
+
363 return true;
+
364}
+
+
365
+
366}// namespace modulo_controllers
+
std::shared_ptr< state_representation::ParameterInterface > get_parameter(const std::string &name) const
Get a parameter by name.
+
T get_parameter_value(const std::string &name) const
Get a parameter value by name.
+
void add_parameter(const std::shared_ptr< state_representation::ParameterInterface > &parameter, const std::string &description, bool read_only=false)
Add a parameter.
+ +
virtual controller_interface::return_type write_command_interfaces(const rclcpp::Duration &period)
Write the command interfaces.
+
virtual controller_interface::return_type read_state_interfaces()
Read the state interfaces.
+
std::unordered_map< std::string, double > get_state_interfaces(const std::string &name) const
Get a map containing the state interfaces by name of the parent tag.
+
double get_state_interface(const std::string &name, const std::string &interface) const
Get the value of a state interface by name.
+
void set_command_interface(const std::string &name, const std::string &interface, double value)
Set the value of a command interface by name.
+
std::string hardware_name_
The hardware name provided by a parameter.
+
void add_command_interface(const std::string &name, const std::string &interface)
Add a command interface to the controller by name.
+
Base controller class that automatically associates joints with a JointState object.
+ +
std::string ft_sensor_name_
The name of a force torque sensor in the hardware description.
+
const state_representation::CartesianState & get_cartesian_state()
Access the Cartesian state object.
+
CallbackReturn on_activate() override
Activate the controller.
+
bool on_validate_parameter_callback(const std::shared_ptr< state_representation::ParameterInterface > &parameter) override
Parameter validation function to be redefined by derived controller classes.
+
const state_representation::JointState & get_joint_state()
Access the joint state object.
+
std::string ft_sensor_reference_frame_
The sensing reference frame.
+
const state_representation::CartesianWrench & get_ft_sensor()
Access the Cartesian wrench object.
+
std::shared_ptr< robot_model::Model > robot_
Robot model object generated from URDF.
+
void compute_cartesian_state()
Compute the Cartesian state from forward kinematics of the current joint state.
+
void set_joint_command(const state_representation::JointState &joint_command)
Set the joint command object.
+
CallbackReturn add_interfaces() override
Add interfaces like parameters, signals, services, and predicates to the controller.
+
std::string task_space_frame_
The frame in task space for forward kinematics calculations, if applicable.
+
CallbackReturn on_configure() override
Configure the controller.
+
+ + + + diff --git a/versions/v5.0.1/_robot_controller_interface_8hpp_source.html b/versions/v5.0.1/_robot_controller_interface_8hpp_source.html new file mode 100644 index 00000000..c49c39b7 --- /dev/null +++ b/versions/v5.0.1/_robot_controller_interface_8hpp_source.html @@ -0,0 +1,181 @@ + + + + + + + +Modulo: /github/workspace/source/modulo_controllers/include/modulo_controllers/RobotControllerInterface.hpp Source File + + + + + + + + + +
+
+ + + + + + +
+
Modulo 5.0.0 +
+
+
+ + + + + + + + + +
+
+ + +
+
+
+
+
+
Loading...
+
Searching...
+
No Matches
+
+
+
+
+ + +
+
+
RobotControllerInterface.hpp
+
+
+
1#pragma once
+
2
+
3#include <realtime_tools/realtime_buffer.h>
+
4
+
5#include <robot_model/Model.hpp>
+
6#include <state_representation/space/cartesian/CartesianState.hpp>
+
7#include <state_representation/space/cartesian/CartesianWrench.hpp>
+
8#include <state_representation/space/joint/JointState.hpp>
+
9
+
10#include "modulo_controllers/ControllerInterface.hpp"
+
11
+
12namespace modulo_controllers {
+
13
+
+ +
24public:
+ +
29
+ +
37 bool robot_model_required, const std::string& control_type = "", bool load_geometries = false);
+
38
+ +
44
+ +
51
+
56 CallbackReturn on_activate() override;
+
57
+
58protected:
+
63 const state_representation::JointState& get_joint_state();
+
64
+
70 const state_representation::CartesianState& get_cartesian_state();
+
71
+
76 const state_representation::CartesianWrench& get_ft_sensor();
+
77
+ +
84
+
89 void set_joint_command(const state_representation::JointState& joint_command);
+
90
+
94 bool
+
95 on_validate_parameter_callback(const std::shared_ptr<state_representation::ParameterInterface>& parameter) override;
+
96
+
97 std::shared_ptr<robot_model::Model> robot_;
+
98 std::string task_space_frame_;
+
99
+
100 std::string ft_sensor_name_;
+ +
102
+
103private:
+
108 controller_interface::return_type read_state_interfaces() final;
+
109
+
114 controller_interface::return_type write_command_interfaces(const rclcpp::Duration& period) final;
+
115
+
116 std::vector<std::string> joints_;
+
117 std::string control_type_;
+
118
+
119 bool robot_model_required_;
+
120 bool load_geometries_;
+
121 bool
+
122 new_joint_command_ready_;
+
123 double
+
124 command_decay_factor_;
+
125 double
+
126 command_rate_limit_;
+
127
+
128 realtime_tools::RealtimeBuffer<std::vector<double>> joint_command_values_;
+
129 std::vector<double> previous_joint_command_values_;
+
130
+
131 state_representation::JointState joint_state_;
+
132 state_representation::CartesianState cartesian_state_;
+
133 state_representation::CartesianWrench ft_sensor_;
+
134};
+
+
135
+
136}// namespace modulo_controllers
+
T get_parameter_value(const std::string &name) const
Get a parameter value by name.
+ +
Base controller class that automatically associates joints with a JointState object.
+ +
std::string ft_sensor_name_
The name of a force torque sensor in the hardware description.
+
const state_representation::CartesianState & get_cartesian_state()
Access the Cartesian state object.
+
CallbackReturn on_activate() override
Activate the controller.
+
bool on_validate_parameter_callback(const std::shared_ptr< state_representation::ParameterInterface > &parameter) override
Parameter validation function to be redefined by derived controller classes.
+
const state_representation::JointState & get_joint_state()
Access the joint state object.
+
std::string ft_sensor_reference_frame_
The sensing reference frame.
+
const state_representation::CartesianWrench & get_ft_sensor()
Access the Cartesian wrench object.
+
std::shared_ptr< robot_model::Model > robot_
Robot model object generated from URDF.
+
void compute_cartesian_state()
Compute the Cartesian state from forward kinematics of the current joint state.
+
void set_joint_command(const state_representation::JointState &joint_command)
Set the joint command object.
+
CallbackReturn add_interfaces() override
Add interfaces like parameters, signals, services, and predicates to the controller.
+
std::string task_space_frame_
The frame in task space for forward kinematics calculations, if applicable.
+
CallbackReturn on_configure() override
Configure the controller.
+
+ + + + diff --git a/versions/v5.0.1/_service_client_8hpp_source.html b/versions/v5.0.1/_service_client_8hpp_source.html new file mode 100644 index 00000000..e7c555dc --- /dev/null +++ b/versions/v5.0.1/_service_client_8hpp_source.html @@ -0,0 +1,121 @@ + + + + + + + +Modulo: /github/workspace/source/modulo_utils/include/modulo_utils/testutils/ServiceClient.hpp Source File + + + + + + + + + +
+
+ + + + + + +
+
Modulo 5.0.0 +
+
+
+ + + + + + + + + +
+
+ + +
+
+
+
+
+
Loading...
+
Searching...
+
No Matches
+
+
+
+
+ + +
+
+
ServiceClient.hpp
+
+
+
1#pragma once
+
2
+
3#include <chrono>
+
4#include <exception>
+
5
+
6#include <rclcpp/rclcpp.hpp>
+
7
+
8namespace modulo_utils::testutils {
+
9
+
10using namespace std::chrono_literals;
+
11
+
12template<typename SrvT>
+
+
13class ServiceClient : public rclcpp::Node {
+
14public:
+
15 ServiceClient(const rclcpp::NodeOptions& options, const std::string& service) : rclcpp::Node("client_node", options) {
+
16 this->client_ = this->create_client<SrvT>(service);
+
17 if (!this->client_->wait_for_service(1s)) {
+
18 throw std::runtime_error("Service not available");
+
19 }
+
20 }
+
21
+
22 typename rclcpp::Client<SrvT>::FutureAndRequestId call_async(const std::shared_ptr<typename SrvT::Request>& request) {
+
23 return this->client_->async_send_request(request);
+
24 }
+
25
+
26 std::shared_ptr<rclcpp::Client<SrvT>> client_;
+
27};
+
+
28}// namespace modulo_utils::testutils
+ +
+ + + + diff --git a/versions/v5.0.1/_subscription_handler_8cpp_source.html b/versions/v5.0.1/_subscription_handler_8cpp_source.html new file mode 100644 index 00000000..92afe352 --- /dev/null +++ b/versions/v5.0.1/_subscription_handler_8cpp_source.html @@ -0,0 +1,175 @@ + + + + + + + +Modulo: /github/workspace/source/modulo_core/src/communication/SubscriptionHandler.cpp Source File + + + + + + + + + +
+
+ + + + + + +
+
Modulo 5.0.0 +
+
+
+ + + + + + + + + +
+
+ + +
+
+
+
+
+
Loading...
+
Searching...
+
No Matches
+
+
+
+
+ + +
+
+
SubscriptionHandler.cpp
+
+
+
1#include "modulo_core/communication/SubscriptionHandler.hpp"
+
2
+
3#include <utility>
+
4
+ +
6
+
7template<>
+
8std::function<void(const std::shared_ptr<std_msgs::msg::Bool>)>
+
9SubscriptionHandler<std_msgs::msg::Bool>::get_translated_callback() {
+
10 return [this](const std::shared_ptr<std_msgs::msg::Bool> message) {
+
11 try {
+
12 this->get_message_pair()->template read<std_msgs::msg::Bool, bool>(*message);
+
13 this->user_callback_();
+
14 } catch (...) {
+
15 this->handle_callback_exceptions();
+
16 }
+
17 };
+
18}
+
19
+
20template<>
+
21std::function<void(const std::shared_ptr<std_msgs::msg::Float64>)>
+
22SubscriptionHandler<std_msgs::msg::Float64>::get_translated_callback() {
+
23 return [this](const std::shared_ptr<std_msgs::msg::Float64> message) {
+
24 try {
+
25 this->get_message_pair()->template read<std_msgs::msg::Float64, double>(*message);
+
26 this->user_callback_();
+
27 } catch (...) {
+
28 this->handle_callback_exceptions();
+
29 }
+
30 };
+
31}
+
32
+
33template<>
+
34std::function<void(const std::shared_ptr<std_msgs::msg::Float64MultiArray>)>
+
35SubscriptionHandler<std_msgs::msg::Float64MultiArray>::get_translated_callback() {
+
36 return [this](const std::shared_ptr<std_msgs::msg::Float64MultiArray> message) {
+
37 try {
+
38 this->get_message_pair()->template read<std_msgs::msg::Float64MultiArray, std::vector<double>>(*message);
+
39 this->user_callback_();
+
40 } catch (...) {
+
41 this->handle_callback_exceptions();
+
42 }
+
43 };
+
44}
+
45
+
46template<>
+
47std::function<void(const std::shared_ptr<std_msgs::msg::Int32>)>
+
48SubscriptionHandler<std_msgs::msg::Int32>::get_translated_callback() {
+
49 return [this](const std::shared_ptr<std_msgs::msg::Int32> message) {
+
50 try {
+
51 this->get_message_pair()->template read<std_msgs::msg::Int32, int>(*message);
+
52 this->user_callback_();
+
53 } catch (...) {
+
54 this->handle_callback_exceptions();
+
55 }
+
56 };
+
57}
+
58
+
59template<>
+
60std::function<void(const std::shared_ptr<std_msgs::msg::String>)>
+
61SubscriptionHandler<std_msgs::msg::String>::get_translated_callback() {
+
62 return [this](const std::shared_ptr<std_msgs::msg::String> message) {
+
63 try {
+
64 this->get_message_pair()->template read<std_msgs::msg::String, std::string>(*message);
+
65 this->user_callback_();
+
66 } catch (...) {
+
67 this->handle_callback_exceptions();
+
68 }
+
69 };
+
70}
+
71
+
72template<>
+
73std::function<void(const std::shared_ptr<EncodedState>)> SubscriptionHandler<EncodedState>::get_translated_callback() {
+
74 return [this](const std::shared_ptr<EncodedState> message) {
+
75 try {
+
76 this->get_message_pair()->template read<EncodedState, state_representation::State>(*message);
+
77 this->user_callback_();
+
78 } catch (...) {
+
79 this->handle_callback_exceptions();
+
80 }
+
81 };
+
82}
+
83
+
84}// namespace modulo_core::communication
+
Modulo Core communication module for handling messages on publication and subscription interfaces.
+
+ + + + diff --git a/versions/v5.0.1/_subscription_handler_8hpp_source.html b/versions/v5.0.1/_subscription_handler_8hpp_source.html new file mode 100644 index 00000000..b39f8c00 --- /dev/null +++ b/versions/v5.0.1/_subscription_handler_8hpp_source.html @@ -0,0 +1,243 @@ + + + + + + + +Modulo: /github/workspace/source/modulo_core/include/modulo_core/communication/SubscriptionHandler.hpp Source File + + + + + + + + + +
+
+ + + + + + +
+
Modulo 5.0.0 +
+
+
+ + + + + + + + + +
+
+ + +
+
+
+
+
+
Loading...
+
Searching...
+
No Matches
+
+
+
+
+ + +
+
+
SubscriptionHandler.hpp
+
+
+
1#pragma once
+
2
+
3#include "modulo_core/communication/SubscriptionInterface.hpp"
+
4
+
5#include "modulo_core/concepts.hpp"
+
6
+ +
8
+
14template<typename MsgT>
+
+ +
16public:
+
22 explicit SubscriptionHandler(
+
23 std::shared_ptr<MessagePairInterface> message_pair = nullptr,
+
24 const rclcpp::Logger& logger = rclcpp::get_logger("SubscriptionHandler"));
+
25
+
29 ~SubscriptionHandler() override;
+
30
+
34 [[nodiscard]] std::shared_ptr<rclcpp::Subscription<MsgT>> get_subscription() const;
+
35
+
41 void set_subscription(const std::shared_ptr<rclcpp::Subscription<MsgT>>& subscription);
+
42
+
47 void set_user_callback(const std::function<void()>& user_callback);
+
48
+
52 std::function<void(const std::shared_ptr<MsgT>)> get_callback();
+
53
+
59 std::function<void(const std::shared_ptr<MsgT>)> get_callback(const std::function<void()>& user_callback);
+
60
+
69 std::shared_ptr<SubscriptionInterface>
+
70 create_subscription_interface(const std::shared_ptr<rclcpp::Subscription<MsgT>>& subscription);
+
71
+
72private:
+
76 void handle_callback_exceptions();
+
77
+
84 std::function<void(const std::shared_ptr<MsgT>)> get_translated_callback();
+
85
+
92 std::function<void(const std::shared_ptr<MsgT>)> get_raw_callback();
+
93
+
94 std::shared_ptr<rclcpp::Subscription<MsgT>> subscription_;
+
95 rclcpp::Logger logger_;
+
96 std::shared_ptr<rclcpp::Clock> clock_;
+
97 std::function<void()> user_callback_ = [] {
+
98 };
+
99};
+
+
100
+
101template<typename MsgT>
+
+ +
103 std::shared_ptr<MessagePairInterface> message_pair, const rclcpp::Logger& logger)
+
104 : SubscriptionInterface(std::move(message_pair)), logger_(logger), clock_(std::make_shared<rclcpp::Clock>()) {}
+
+
105
+
106template<typename MsgT>
+
+ +
108 this->subscription_.reset();
+
109}
+
+
110
+
111template<typename MsgT>
+
+
112std::shared_ptr<rclcpp::Subscription<MsgT>> SubscriptionHandler<MsgT>::get_subscription() const {
+
113 return this->subscription_;
+
114}
+
+
115
+
116template<typename MsgT>
+
+
117void SubscriptionHandler<MsgT>::set_subscription(const std::shared_ptr<rclcpp::Subscription<MsgT>>& subscription) {
+
118 if (subscription == nullptr) {
+
119 throw exceptions::NullPointerException("Provide a valid pointer");
+
120 }
+
121 this->subscription_ = subscription;
+
122}
+
+
123
+
124template<typename MsgT>
+
+
125inline std::function<void(const std::shared_ptr<MsgT>)> SubscriptionHandler<MsgT>::get_callback() {
+
126 if constexpr (concepts::TranslatedMsgT<MsgT>) {
+
127 return get_translated_callback();
+
128 } else {
+
129 return get_raw_callback();
+
130 }
+
131}
+
+
132
+
133template<typename MsgT>
+
134std::function<void(const std::shared_ptr<MsgT>)> SubscriptionHandler<MsgT>::get_raw_callback() {
+
135 return [this](const std::shared_ptr<MsgT> message) {
+
136 try {
+
137 this->get_message_pair()->template read<MsgT, MsgT>(*message);
+
138 this->user_callback_();
+
139 } catch (...) {
+
140 this->handle_callback_exceptions();
+
141 }
+
142 };
+
143}
+
144
+
145template<typename MsgT>
+
+
146void SubscriptionHandler<MsgT>::set_user_callback(const std::function<void()>& user_callback) {
+
147 this->user_callback_ = user_callback;
+
148}
+
+
149
+
150template<typename MsgT>
+
151std::function<void(const std::shared_ptr<MsgT>)>
+
+
152SubscriptionHandler<MsgT>::get_callback(const std::function<void()>& user_callback) {
+
153 this->set_user_callback(user_callback);
+
154 return this->get_callback();
+
155}
+
+
156
+
157template<typename MsgT>
+
+
158std::shared_ptr<SubscriptionInterface> SubscriptionHandler<MsgT>::create_subscription_interface(
+
159 const std::shared_ptr<rclcpp::Subscription<MsgT>>& subscription) {
+
160 this->set_subscription(subscription);
+
161 return std::shared_ptr<SubscriptionInterface>(this->shared_from_this());
+
162}
+
+
163
+
164template<typename MsgT>
+ +
166 try {
+
167 // re-throw the original exception
+
168 throw;
+
169 } catch (const exceptions::CoreException& ex) {
+
170 RCLCPP_WARN_STREAM_THROTTLE(
+
171 this->logger_, *this->clock_, 1000, "Exception in subscription callback: " << ex.what());
+
172 } catch (const std::exception& ex) {
+
173 RCLCPP_WARN_STREAM_THROTTLE(
+
174 this->logger_, *this->clock_, 1000, "Unhandled exception in subscription user callback: " << ex.what());
+
175 }
+
176}
+
177
+
178}// namespace modulo_core::communication
+
The SubscriptionHandler handles different types of ROS subscriptions to receive data from those subsc...
+
std::function< void(const std::shared_ptr< MsgT >)> get_callback()
Get a callback function that will be associated with the ROS subscription to receive and translate me...
+
SubscriptionHandler(std::shared_ptr< MessagePairInterface > message_pair=nullptr, const rclcpp::Logger &logger=rclcpp::get_logger("SubscriptionHandler"))
Constructor with the message pair.
+
~SubscriptionHandler() override
Destructor to explicitly reset the subscription pointer.
+
std::shared_ptr< SubscriptionInterface > create_subscription_interface(const std::shared_ptr< rclcpp::Subscription< MsgT > > &subscription)
Create a SubscriptionInterface pointer through an instance of a SubscriptionHandler by providing a RO...
+
std::shared_ptr< rclcpp::Subscription< MsgT > > get_subscription() const
Getter of the ROS subscription.
+
void set_subscription(const std::shared_ptr< rclcpp::Subscription< MsgT > > &subscription)
Setter of the ROS subscription.
+
void set_user_callback(const std::function< void()> &user_callback)
Setter of a user callback function to be executed after the subscription callback.
+
Interface class to enable non-templated subscriptions with ROS subscriptions from derived Subscriptio...
+
A base class for all core exceptions.
+
An exception class to notify that a certain pointer is null.
+ +
Modulo Core communication module for handling messages on publication and subscription interfaces.
+
+ + + + diff --git a/versions/v5.0.1/_subscription_interface_8cpp_source.html b/versions/v5.0.1/_subscription_interface_8cpp_source.html new file mode 100644 index 00000000..55545a20 --- /dev/null +++ b/versions/v5.0.1/_subscription_interface_8cpp_source.html @@ -0,0 +1,120 @@ + + + + + + + +Modulo: /github/workspace/source/modulo_core/src/communication/SubscriptionInterface.cpp Source File + + + + + + + + + +
+
+ + + + + + +
+
Modulo 5.0.0 +
+
+
+ + + + + + + + + +
+
+ + +
+
+
+
+
+
Loading...
+
Searching...
+
No Matches
+
+
+
+
+ + +
+
+
SubscriptionInterface.cpp
+
+
+
1#include "modulo_core/communication/SubscriptionInterface.hpp"
+
2
+ +
4
+
+
5SubscriptionInterface::SubscriptionInterface(std::shared_ptr<MessagePairInterface> message_pair)
+
6 : message_pair_(std::move(message_pair)) {}
+
+
7
+
+
8std::shared_ptr<MessagePairInterface> SubscriptionInterface::get_message_pair() const {
+
9 return this->message_pair_;
+
10}
+
+
11
+
+
12void SubscriptionInterface::set_message_pair(const std::shared_ptr<MessagePairInterface>& message_pair) {
+
13 if (message_pair == nullptr) {
+
14 throw exceptions::NullPointerException("Provide a valid pointer");
+
15 }
+
16 this->message_pair_ = message_pair;
+
17}
+
+
18}// namespace modulo_core::communication
+
SubscriptionInterface(std::shared_ptr< MessagePairInterface > message_pair=nullptr)
Constructor with the message pair.
+
void set_message_pair(const std::shared_ptr< MessagePairInterface > &message_pair)
Set the pointer to the message pair of the SubscriptionInterface.
+
std::shared_ptr< MessagePairInterface > message_pair_
The pointer to the stored MessagePair instance.
+
std::shared_ptr< MessagePairInterface > get_message_pair() const
Get the pointer to the message pair of the SubscriptionInterface.
+
An exception class to notify that a certain pointer is null.
+
Modulo Core communication module for handling messages on publication and subscription interfaces.
+
+ + + + diff --git a/versions/v5.0.1/_subscription_interface_8hpp_source.html b/versions/v5.0.1/_subscription_interface_8hpp_source.html new file mode 100644 index 00000000..fae265b2 --- /dev/null +++ b/versions/v5.0.1/_subscription_interface_8hpp_source.html @@ -0,0 +1,153 @@ + + + + + + + +Modulo: /github/workspace/source/modulo_core/include/modulo_core/communication/SubscriptionInterface.hpp Source File + + + + + + + + + +
+
+ + + + + + +
+
Modulo 5.0.0 +
+
+
+ + + + + + + + + +
+
+ + +
+
+
+
+
+
Loading...
+
Searching...
+
No Matches
+
+
+
+
+ + +
+
+
SubscriptionInterface.hpp
+
+
+
1#pragma once
+
2
+
3#include <rclcpp/subscription.hpp>
+
4
+
5#include "modulo_core/communication/MessagePair.hpp"
+
6#include "modulo_core/exceptions.hpp"
+
7
+ +
9
+
10// forward declaration of derived SubscriptionHandler class
+
11template<typename MsgT>
+
12class SubscriptionHandler;
+
13
+
+
19class SubscriptionInterface : public std::enable_shared_from_this<SubscriptionInterface> {
+
20public:
+
25 explicit SubscriptionInterface(std::shared_ptr<MessagePairInterface> message_pair = nullptr);
+
26
+
30 SubscriptionInterface(const SubscriptionInterface& subscription) = default;
+
31
+
35 virtual ~SubscriptionInterface() = default;
+
36
+
55 template<typename MsgT>
+
56 std::shared_ptr<SubscriptionHandler<MsgT>> get_handler(bool validate_pointer = true);
+
57
+
61 [[nodiscard]] std::shared_ptr<MessagePairInterface> get_message_pair() const;
+
62
+
67 void set_message_pair(const std::shared_ptr<MessagePairInterface>& message_pair);
+
68
+
69protected:
+
70 std::shared_ptr<MessagePairInterface> message_pair_;
+
71};
+
+
72
+
73template<typename MsgT>
+
+
74inline std::shared_ptr<SubscriptionHandler<MsgT>> SubscriptionInterface::get_handler(bool validate_pointer) {
+
75 std::shared_ptr<SubscriptionHandler<MsgT>> subscription_ptr;
+
76 try {
+
77 subscription_ptr = std::dynamic_pointer_cast<SubscriptionHandler<MsgT>>(this->shared_from_this());
+
78 } catch (const std::exception& ex) {
+
79 if (validate_pointer) {
+
80 throw exceptions::InvalidPointerException("Subscription interface is not managed by a valid pointer");
+
81 }
+
82 }
+
83 if (subscription_ptr == nullptr && validate_pointer) {
+ +
85 "Unable to cast subscription interface to a subscription pointer of requested type");
+
86 }
+
87 return subscription_ptr;
+
88}
+
+
89}// namespace modulo_core::communication
+
Interface class to enable non-templated subscriptions with ROS subscriptions from derived Subscriptio...
+
SubscriptionInterface(const SubscriptionInterface &subscription)=default
Copy constructor from another SubscriptionInterface.
+
std::shared_ptr< SubscriptionHandler< MsgT > > get_handler(bool validate_pointer=true)
Get a pointer to a derived SubscriptionHandler instance from a SubscriptionInterface pointer.
+
void set_message_pair(const std::shared_ptr< MessagePairInterface > &message_pair)
Set the pointer to the message pair of the SubscriptionInterface.
+
std::shared_ptr< MessagePairInterface > message_pair_
The pointer to the stored MessagePair instance.
+
std::shared_ptr< MessagePairInterface > get_message_pair() const
Get the pointer to the message pair of the SubscriptionInterface.
+
virtual ~SubscriptionInterface()=default
Default virtual destructor.
+
An exception class to notify if the result of getting an instance of a derived class through dynamic ...
+
An exception class to notify if an object has no reference count (if the object is not owned by any p...
+
Modulo Core communication module for handling messages on publication and subscription interfaces.
+
+ + + + diff --git a/versions/v5.0.1/annotated.html b/versions/v5.0.1/annotated.html new file mode 100644 index 00000000..0403e10e --- /dev/null +++ b/versions/v5.0.1/annotated.html @@ -0,0 +1,121 @@ + + + + + + + +Modulo: Class List + + + + + + + + + +
+
+ + + + + + +
+
Modulo 5.0.0 +
+
+
+ + + + + + + +
+ +
+
+ + +
+
+
+
+
+
Loading...
+
Searching...
+
No Matches
+
+
+
+
+ +
+
Class List
+
+
+
Here are the classes, structs, unions and interfaces with brief descriptions:
+
[detail level 123]
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
 Nmodulo_componentsModulo components
 CComponentA wrapper for rclcpp::Node to simplify application composition through unified component interfaces
 CComponentInterfaceBase interface class for modulo components to wrap a ROS Node with custom behaviour
 CComponentServiceResponseResponse structure to be returned by component services
 CLifecycleComponentA wrapper for rclcpp_lifecycle::LifecycleNode to simplify application composition through unified component interfaces while supporting lifecycle states and transitions
 Nmodulo_controllers
 CBaseControllerInterfaceBase controller class to combine ros2_control, control libraries and modulo
 CControllerInputInput structure to save topic data in a realtime buffer and timestamps in one object
 CControllerInterface
 CControllerServiceResponseResponse structure to be returned by controller services
 CRobotControllerInterfaceBase controller class that automatically associates joints with a JointState object
 Nmodulo_coreModulo Core
 NcommunicationModulo Core communication module for handling messages on publication and subscription interfaces
 CMessagePairThe MessagePair stores a pointer to a variable and translates the value of this pointer back and forth between the corresponding ROS messages
 CMessagePairInterfaceInterface class to enable non-templated writing and reading ROS messages from derived MessagePair instances through dynamic down-casting
 CPublisherHandlerThe PublisherHandler handles different types of ROS publishers to activate, deactivate and publish data with those publishers
 CPublisherInterfaceInterface class to enable non-templated activating/deactivating/publishing of ROS publishers from derived PublisherHandler instances through dynamic down-casting
 CSubscriptionHandlerThe SubscriptionHandler handles different types of ROS subscriptions to receive data from those subscriptions
 CSubscriptionInterfaceInterface class to enable non-templated subscriptions with ROS subscriptions from derived SubscriptionHandler instances through dynamic down-casting
 NexceptionsModulo Core exceptions module for defining exception classes
 CAddServiceExceptionAn exception class to notify errors when adding a service
 CAddSignalExceptionAn exception class to notify errors when adding a signal
 CCoreExceptionA base class for all core exceptions
 CInvalidPointerCastExceptionAn exception class to notify if the result of getting an instance of a derived class through dynamic down-casting of an object of the base class is not a correctly typed instance of the derived class
 CInvalidPointerExceptionAn exception class to notify if an object has no reference count (if the object is not owned by any pointer) when attempting to get a derived instance through dynamic down-casting
 CLookupTransformExceptionAn exception class to notify an error while looking up TF transforms
 CMessageTranslationExceptionAn exception class to notify that the translation of a ROS message failed
 CNullPointerExceptionAn exception class to notify that a certain pointer is null
 CParameterExceptionAn exception class to notify errors with parameters in modulo classes
 CParameterTranslationExceptionAn exception class to notify incompatibility when translating parameters from different sources
 CPredicate
 Nmodulo_utils
 Ntestutils
 CPredicatesListener
 CServiceClient
 CComponentInterfacePublicInterfaceFriend class to the ComponentInterface to allow test fixtures to access protected and private members
+
+
+ + + + diff --git a/versions/v5.0.1/bc_s.png b/versions/v5.0.1/bc_s.png new file mode 100644 index 00000000..224b29aa Binary files /dev/null and b/versions/v5.0.1/bc_s.png differ diff --git a/versions/v5.0.1/bc_sd.png b/versions/v5.0.1/bc_sd.png new file mode 100644 index 00000000..31ca888d Binary files /dev/null and b/versions/v5.0.1/bc_sd.png differ diff --git a/versions/v5.0.1/class_component_interface_public_interface.html b/versions/v5.0.1/class_component_interface_public_interface.html new file mode 100644 index 00000000..e7cfbe46 --- /dev/null +++ b/versions/v5.0.1/class_component_interface_public_interface.html @@ -0,0 +1,91 @@ + + + + + + + +Modulo: ComponentInterfacePublicInterface Class Reference + + + + + + + + + +
+
+ + + + + + +
+
Modulo 5.0.0 +
+
+
+ + + + + + + + +
+
+ + +
+
+
+
+
+
Loading...
+
Searching...
+
No Matches
+
+
+
+
+ +
+
+
ComponentInterfacePublicInterface Class Reference
+
+
+ +

Friend class to the ComponentInterface to allow test fixtures to access protected and private members. + More...

+ +

#include <ComponentInterface.hpp>

+

Detailed Description

+

Friend class to the ComponentInterface to allow test fixtures to access protected and private members.

+

The documentation for this class was generated from the following file: +
+ + + + diff --git a/versions/v5.0.1/classes.html b/versions/v5.0.1/classes.html new file mode 100644 index 00000000..b66715c3 --- /dev/null +++ b/versions/v5.0.1/classes.html @@ -0,0 +1,114 @@ + + + + + + + +Modulo: Class Index + + + + + + + + + +
+
+ + + + + + +
+
Modulo 5.0.0 +
+
+
+ + + + + + + +
+ +
+
+ + +
+
+
+
+
+
Loading...
+
Searching...
+
No Matches
+
+
+
+
+ +
+
Class Index
+
+
+
A | B | C | I | L | M | N | P | R | S
+
+
+
A
+
AddServiceException (modulo_core::exceptions)
AddSignalException (modulo_core::exceptions)
+
+
B
+
BaseControllerInterface (modulo_controllers)
+
+
C
+
Component (modulo_components)
ComponentInterface (modulo_components)
ComponentInterfacePublicInterface
ComponentServiceResponse (modulo_components)
ControllerInput (modulo_controllers)
ControllerInterface (modulo_controllers)
ControllerServiceResponse (modulo_controllers)
CoreException (modulo_core::exceptions)
+
+
I
+
InvalidPointerCastException (modulo_core::exceptions)
InvalidPointerException (modulo_core::exceptions)
+
+
L
+
LifecycleComponent (modulo_components)
LookupTransformException (modulo_core::exceptions)
+
+
M
+
MessagePair (modulo_core::communication)
MessagePairInterface (modulo_core::communication)
MessageTranslationException (modulo_core::exceptions)
+
+
N
+
NullPointerException (modulo_core::exceptions)
+
+
P
+
ParameterException (modulo_core::exceptions)
ParameterTranslationException (modulo_core::exceptions)
Predicate (modulo_core)
PredicatesListener (modulo_utils::testutils)
PublisherHandler (modulo_core::communication)
PublisherInterface (modulo_core::communication)
+
+
R
+
RobotControllerInterface (modulo_controllers)
+
+
S
+
ServiceClient (modulo_utils::testutils)
SubscriptionHandler (modulo_core::communication)
SubscriptionInterface (modulo_core::communication)
+
+
+ + + + diff --git a/versions/v5.0.1/classmodulo__components_1_1_component-members.html b/versions/v5.0.1/classmodulo__components_1_1_component-members.html new file mode 100644 index 00000000..75d86d71 --- /dev/null +++ b/versions/v5.0.1/classmodulo__components_1_1_component-members.html @@ -0,0 +1,138 @@ + + + + + + + +Modulo: Member List + + + + + + + + + +
+
+ + + + + + +
+
Modulo 5.0.0 +
+
+
+ + + + + + + + +
+
+ + +
+
+
+
+
+
Loading...
+
Searching...
+
No Matches
+
+
+
+
+ + +
+
+
modulo_components::Component Member List
+
+
+ +

This is the complete list of members for modulo_components::Component, including all inherited members.

+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
add_input(const std::string &signal_name, const std::shared_ptr< DataT > &data, const std::string &default_topic="", bool fixed_topic=false)modulo_components::ComponentInterfaceinlineprotected
add_input(const std::string &signal_name, const std::shared_ptr< DataT > &data, const std::function< void()> &callback, const std::string &default_topic="", bool fixed_topic=false)modulo_components::ComponentInterfaceinlineprotected
add_input(const std::string &signal_name, const std::function< void(const std::shared_ptr< MsgT >)> &callback, const std::string &default_topic="", bool fixed_topic=false)modulo_components::ComponentInterfaceinlineprotected
add_output(const std::string &signal_name, const std::shared_ptr< DataT > &data, const std::string &default_topic="", bool fixed_topic=false, bool publish_on_step=true)modulo_components::Componentinlineprotected
add_parameter(const std::shared_ptr< state_representation::ParameterInterface > &parameter, const std::string &description, bool read_only=false)modulo_components::ComponentInterfaceprotected
add_parameter(const std::string &name, const T &value, const std::string &description, bool read_only=false)modulo_components::ComponentInterfaceinlineprotected
add_periodic_callback(const std::string &name, const std::function< void(void)> &callback)modulo_components::ComponentInterfaceprotected
add_predicate(const std::string &predicate_name, bool predicate_value)modulo_components::ComponentInterfaceprotected
add_predicate(const std::string &predicate_name, const std::function< bool(void)> &predicate_function)modulo_components::ComponentInterfaceprotected
add_service(const std::string &service_name, const std::function< ComponentServiceResponse(void)> &callback)modulo_components::ComponentInterfaceprotected
add_service(const std::string &service_name, const std::function< ComponentServiceResponse(const std::string &string)> &callback)modulo_components::ComponentInterfaceprotected
add_static_tf_broadcaster()modulo_components::ComponentInterfaceprotected
add_tf_broadcaster()modulo_components::ComponentInterfaceprotected
add_tf_listener()modulo_components::ComponentInterfaceprotected
add_trigger(const std::string &trigger_name)modulo_components::ComponentInterfaceprotected
Component(const rclcpp::NodeOptions &node_options, const std::string &fallback_name="Component")modulo_components::Componentexplicit
ComponentInterface(const std::shared_ptr< rclcpp::node_interfaces::NodeInterfaces< ALL_RCLCPP_NODE_INTERFACES > > &interfaces)modulo_components::ComponentInterfaceexplicitprotected
ComponentPublicInterface (defined in modulo_components::Component)modulo_components::Componentfriend
declare_input(const std::string &signal_name, const std::string &default_topic="", bool fixed_topic=false)modulo_components::ComponentInterfaceprotected
declare_output(const std::string &signal_name, const std::string &default_topic="", bool fixed_topic=false)modulo_components::ComponentInterfaceprotected
execute()modulo_components::Componentprotected
get_parameter(const std::string &name) constmodulo_components::Componentprotected
get_parameter_value(const std::string &name) constmodulo_components::ComponentInterfaceinlineprotected
get_period() constmodulo_components::ComponentInterfaceprotected
get_period() const (defined in modulo_components::ComponentInterface)modulo_components::ComponentInterface
get_period() const (defined in modulo_components::ComponentInterface)modulo_components::ComponentInterface
get_period() const (defined in modulo_components::ComponentInterface)modulo_components::ComponentInterface
get_predicate(const std::string &predicate_name) constmodulo_components::ComponentInterfaceprotected
get_qos() constmodulo_components::ComponentInterfaceprotected
get_rate() constmodulo_components::ComponentInterfaceprotected
lookup_transform(const std::string &frame, const std::string &reference_frame, const tf2::TimePoint &time_point, const tf2::Duration &duration)modulo_components::ComponentInterfaceprotected
lookup_transform(const std::string &frame, const std::string &reference_frame="world", double validity_period=-1.0, const tf2::Duration &duration=tf2::Duration(std::chrono::microseconds(10)))modulo_components::ComponentInterfaceprotected
on_execute_callback()modulo_components::Componentprotectedvirtual
on_step_callback()modulo_components::ComponentInterfaceprotectedvirtual
on_validate_parameter_callback(const std::shared_ptr< state_representation::ParameterInterface > &parameter)modulo_components::ComponentInterfaceprotectedvirtual
publish_output(const std::string &signal_name)modulo_components::ComponentInterfaceprotected
raise_error() overridemodulo_components::Componentprotectedvirtual
remove_input(const std::string &signal_name)modulo_components::ComponentInterfaceprotected
remove_output(const std::string &signal_name)modulo_components::ComponentInterfaceprotected
send_static_transform(const state_representation::CartesianPose &transform)modulo_components::ComponentInterfaceprotected
send_static_transforms(const std::vector< state_representation::CartesianPose > &transforms)modulo_components::ComponentInterfaceprotected
send_transform(const state_representation::CartesianPose &transform)modulo_components::ComponentInterfaceprotected
send_transforms(const std::vector< state_representation::CartesianPose > &transforms)modulo_components::ComponentInterfaceprotected
set_parameter_value(const std::string &name, const T &value)modulo_components::ComponentInterfaceinlineprotected
set_predicate(const std::string &predicate_name, bool predicate_value)modulo_components::ComponentInterfaceprotected
set_predicate(const std::string &predicate_name, const std::function< bool(void)> &predicate_function)modulo_components::ComponentInterfaceprotected
set_qos(const rclcpp::QoS &qos)modulo_components::ComponentInterfaceprotected
trigger(const std::string &trigger_name)modulo_components::ComponentInterfaceprotected
~Component()modulo_components::Componentvirtual
~ComponentInterface()modulo_components::ComponentInterfacevirtual
+ + + + diff --git a/versions/v5.0.1/classmodulo__components_1_1_component.html b/versions/v5.0.1/classmodulo__components_1_1_component.html new file mode 100644 index 00000000..4cd5a032 --- /dev/null +++ b/versions/v5.0.1/classmodulo__components_1_1_component.html @@ -0,0 +1,624 @@ + + + + + + + +Modulo: modulo_components::Component Class Reference + + + + + + + + + +
+
+ + + + + + +
+
Modulo 5.0.0 +
+
+
+ + + + + + + + +
+
+ + +
+
+
+
+
+
Loading...
+
Searching...
+
No Matches
+
+
+
+
+ + +
+
+
+Public Member Functions | +Protected Member Functions | +Friends | +List of all members
+
modulo_components::Component Class Reference
+
+
+ +

A wrapper for rclcpp::Node to simplify application composition through unified component interfaces. + More...

+ +

#include <Component.hpp>

+
+Inheritance diagram for modulo_components::Component:
+
+
+ + +modulo_components::ComponentInterface + +
+ + + + + + + + + + + + + + + + + + + + + +

+Public Member Functions

 Component (const rclcpp::NodeOptions &node_options, const std::string &fallback_name="Component")
 Constructor from node options.
 
virtual ~Component ()
 Destructor that joins the thread if necessary.
 
- Public Member Functions inherited from modulo_components::ComponentInterface
virtual ~ComponentInterface ()
 Virtual destructor.
 
template<>
double get_period () const
 
template<>
std::chrono::nanoseconds get_period () const
 
template<>
rclcpp::Duration get_period () const
 
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +

+Protected Member Functions

std::shared_ptr< state_representation::ParameterInterface > get_parameter (const std::string &name) const
 Get a parameter by name.
 
void execute ()
 Start the execution thread.
 
virtual bool on_execute_callback ()
 Execute the component logic. To be redefined in derived classes.
 
template<typename DataT >
void add_output (const std::string &signal_name, const std::shared_ptr< DataT > &data, const std::string &default_topic="", bool fixed_topic=false, bool publish_on_step=true)
 Add and configure an output signal of the component.
 
void raise_error () override
 
- Protected Member Functions inherited from modulo_components::ComponentInterface
 ComponentInterface (const std::shared_ptr< rclcpp::node_interfaces::NodeInterfaces< ALL_RCLCPP_NODE_INTERFACES > > &interfaces)
 Constructor with all node interfaces.
 
double get_rate () const
 Get the component rate in Hertz.
 
template<typename T >
T get_period () const
 Get the component period.
 
virtual void on_step_callback ()
 Steps to execute periodically. To be redefined by derived Component classes.
 
void add_parameter (const std::shared_ptr< state_representation::ParameterInterface > &parameter, const std::string &description, bool read_only=false)
 Add a parameter.
 
template<typename T >
void add_parameter (const std::string &name, const T &value, const std::string &description, bool read_only=false)
 Add a parameter.
 
std::shared_ptr< state_representation::ParameterInterface > get_parameter (const std::string &name) const
 Get a parameter by name.
 
template<typename T >
get_parameter_value (const std::string &name) const
 Get a parameter value by name.
 
template<typename T >
void set_parameter_value (const std::string &name, const T &value)
 Set the value of a parameter.
 
virtual bool on_validate_parameter_callback (const std::shared_ptr< state_representation::ParameterInterface > &parameter)
 Parameter validation function to be redefined by derived Component classes.
 
void add_predicate (const std::string &predicate_name, bool predicate_value)
 Add a predicate to the map of predicates.
 
void add_predicate (const std::string &predicate_name, const std::function< bool(void)> &predicate_function)
 Add a predicate to the map of predicates based on a function to periodically call.
 
bool get_predicate (const std::string &predicate_name) const
 Get the logical value of a predicate.
 
void set_predicate (const std::string &predicate_name, bool predicate_value)
 Set the value of the predicate given as parameter, if the predicate is not found does not do anything.
 
void set_predicate (const std::string &predicate_name, const std::function< bool(void)> &predicate_function)
 Set the value of the predicate given as parameter, if the predicate is not found does not do anything.
 
void add_trigger (const std::string &trigger_name)
 Add a trigger to the component. Triggers are predicates that are always false except when it's triggered in which case it is set back to false immediately after it is read.
 
void trigger (const std::string &trigger_name)
 Latch the trigger with the provided name.
 
void declare_input (const std::string &signal_name, const std::string &default_topic="", bool fixed_topic=false)
 Declare an input to create the topic parameter without adding it to the map of inputs yet.
 
void declare_output (const std::string &signal_name, const std::string &default_topic="", bool fixed_topic=false)
 Declare an output to create the topic parameter without adding it to the map of outputs yet.
 
template<typename DataT >
void add_input (const std::string &signal_name, const std::shared_ptr< DataT > &data, const std::string &default_topic="", bool fixed_topic=false)
 Add and configure an input signal of the component.
 
template<typename DataT >
void add_input (const std::string &signal_name, const std::shared_ptr< DataT > &data, const std::function< void()> &callback, const std::string &default_topic="", bool fixed_topic=false)
 Add and configure an input signal of the component.
 
template<typename MsgT >
void add_input (const std::string &signal_name, const std::function< void(const std::shared_ptr< MsgT >)> &callback, const std::string &default_topic="", bool fixed_topic=false)
 Add and configure an input signal of the component.
 
template<typename DataT >
std::string create_output (modulo_core::communication::PublisherType publisher_type, const std::string &signal_name, const std::shared_ptr< DataT > &data, const std::string &default_topic, bool fixed_topic, bool publish_on_step)
 Helper function to parse the signal name and add an unconfigured PublisherInterface to the map of outputs.
 
void publish_output (const std::string &signal_name)
 Trigger the publishing of an output.
 
void remove_input (const std::string &signal_name)
 Remove an input from the map of inputs.
 
void remove_output (const std::string &signal_name)
 Remove an output from the map of outputs.
 
void add_service (const std::string &service_name, const std::function< ComponentServiceResponse(void)> &callback)
 Add a service to trigger a callback function with no input arguments.
 
void add_service (const std::string &service_name, const std::function< ComponentServiceResponse(const std::string &string)> &callback)
 Add a service to trigger a callback function with a string payload.
 
void add_periodic_callback (const std::string &name, const std::function< void(void)> &callback)
 Add a periodic callback function.
 
void add_tf_broadcaster ()
 Configure a transform broadcaster.
 
void add_static_tf_broadcaster ()
 Configure a static transform broadcaster.
 
void add_tf_listener ()
 Configure a transform buffer and listener.
 
void send_transform (const state_representation::CartesianPose &transform)
 Send a transform to TF.
 
void send_transforms (const std::vector< state_representation::CartesianPose > &transforms)
 Send a vector of transforms to TF.
 
void send_static_transform (const state_representation::CartesianPose &transform)
 Send a static transform to TF.
 
void send_static_transforms (const std::vector< state_representation::CartesianPose > &transforms)
 Send a vector of static transforms to TF.
 
state_representation::CartesianPose lookup_transform (const std::string &frame, const std::string &reference_frame, const tf2::TimePoint &time_point, const tf2::Duration &duration)
 Look up a transform from TF.
 
state_representation::CartesianPose lookup_transform (const std::string &frame, const std::string &reference_frame="world", double validity_period=-1.0, const tf2::Duration &duration=tf2::Duration(std::chrono::microseconds(10)))
 Look up a transform from TF.
 
rclcpp::QoS get_qos () const
 Getter of the Quality of Service attribute.
 
void set_qos (const rclcpp::QoS &qos)
 Set the Quality of Service for ROS publishers and subscribers.
 
void publish_predicates ()
 Helper function to publish all predicates.
 
void publish_outputs ()
 Helper function to publish all output signals.
 
void evaluate_periodic_callbacks ()
 Helper function to evaluate all periodic function callbacks.
 
void finalize_interfaces ()
 Finalize all interfaces.
 
+ + + +

+Friends

class ComponentPublicInterface
 
+ + + + + + + + + + + +

+Additional Inherited Members

- Protected Attributes inherited from modulo_components::ComponentInterface
std::map< std::string, std::shared_ptr< modulo_core::communication::SubscriptionInterface > > inputs_
 Map of inputs.
 
std::map< std::string, std::shared_ptr< modulo_core::communication::PublisherInterface > > outputs_
 Map of outputs.
 
std::map< std::string, boolperiodic_outputs_
 Map of outputs with periodic publishing flag.
 
+

Detailed Description

+

A wrapper for rclcpp::Node to simplify application composition through unified component interfaces.

+

This class is intended for direct inheritance to implement custom components that perform one-shot or externally triggered operations. Examples of triggered behavior include providing a service, processing signals or publishing outputs on a periodic timer. One-shot behaviors may include interacting with the filesystem or publishing a predefined sequence of outputs. Developers should override on_validate_parameter_callback() if any parameters are added and on_execute_callback() to implement any one-shot behavior. In the latter case, execute() should be invoked at the end of the derived constructor.

See also
LifecycleComponent for a state-based composition alternative
+ +

Definition at line 23 of file Component.hpp.

+

Constructor & Destructor Documentation

+ +

◆ Component()

+ +
+
+ + + + + +
+ + + + + + + + + + + + + + + + + + +
modulo_components::Component::Component (const rclcpp::NodeOptions & node_options,
const std::string & fallback_name = "Component" 
)
+
+explicit
+
+ +

Constructor from node options.

+
Parameters
+ + + +
node_optionsNode options as used in ROS2 Node
fallback_nameThe name of the component if it was not provided through the node options
+
+
+ +

Definition at line 8 of file Component.cpp.

+ +
+
+ +

◆ ~Component()

+ +
+
+ + + + + +
+ + + + + + + +
modulo_components::Component::~Component ()
+
+virtual
+
+ +

Destructor that joins the thread if necessary.

+ +

Definition at line 21 of file Component.cpp.

+ +
+
+

Member Function Documentation

+ +

◆ add_output()

+ +
+
+
+template<typename DataT >
+ + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
void modulo_components::Component::add_output (const std::string & signal_name,
const std::shared_ptr< DataT > & data,
const std::string & default_topic = "",
bool fixed_topic = false,
bool publish_on_step = true 
)
+
+inlineprotected
+
+ +

Add and configure an output signal of the component.

+
Template Parameters
+ + +
DataTType of the data pointer
+
+
+
Parameters
+ + + + + + +
signal_nameName of the output signal
dataData to transmit on the output signal
default_topicIf set, the default value for the topic name to use
fixed_topicIf true, the topic name of the output signal is fixed
publish_on_stepIf true, the output is published periodically on step
+
+
+ +

Definition at line 104 of file Component.hpp.

+ +
+
+ +

◆ execute()

+ +
+
+ + + + + +
+ + + + + + + +
void modulo_components::Component::execute ()
+
+protected
+
+ +

Start the execution thread.

+ +

Definition at line 39 of file Component.cpp.

+ +
+
+ +

◆ get_parameter()

+ +
+
+ + + + + +
+ + + + + + + + +
std::shared_ptr< state_representation::ParameterInterface > modulo_components::Component::get_parameter (const std::string & name) const
+
+protected
+
+ +

Get a parameter by name.

+
Parameters
+ + +
nameThe name of the parameter
+
+
+
Exceptions
+ + +
modulo_core::exceptions::ParameterExceptionif the parameter could not be found
+
+
+
Returns
The ParameterInterface pointer to a Parameter instance
+ +

Definition at line 67 of file Component.cpp.

+ +
+
+ +

◆ on_execute_callback()

+ +
+
+ + + + + +
+ + + + + + + +
bool modulo_components::Component::on_execute_callback ()
+
+protectedvirtual
+
+ +

Execute the component logic. To be redefined in derived classes.

+
Returns
True, if the execution was successful, false otherwise
+ +

Definition at line 63 of file Component.cpp.

+ +
+
+ +

◆ raise_error()

+ +
+
+ + + + + +
+ + + + + + + +
void modulo_components::Component::raise_error ()
+
+overrideprotectedvirtual
+
+

Set the in_error_state predicate to true and cancel the step timer.

+ +

Reimplemented from modulo_components::ComponentInterface.

+ +

Definition at line 71 of file Component.cpp.

+ +
+
+

Friends And Related Symbol Documentation

+ +

◆ ComponentPublicInterface

+ +
+
+ + + + + +
+ + + + +
friend class ComponentPublicInterface
+
+friend
+
+ +

Definition at line 25 of file Component.hpp.

+ +
+
+
The documentation for this class was generated from the following files: +
+ + + + diff --git a/versions/v5.0.1/classmodulo__components_1_1_component.png b/versions/v5.0.1/classmodulo__components_1_1_component.png new file mode 100644 index 00000000..70056ff3 Binary files /dev/null and b/versions/v5.0.1/classmodulo__components_1_1_component.png differ diff --git a/versions/v5.0.1/classmodulo__components_1_1_component_interface-members.html b/versions/v5.0.1/classmodulo__components_1_1_component_interface-members.html new file mode 100644 index 00000000..bdbb3edd --- /dev/null +++ b/versions/v5.0.1/classmodulo__components_1_1_component_interface-members.html @@ -0,0 +1,142 @@ + + + + + + + +Modulo: Member List + + + + + + + + + +
+
+ + + + + + +
+
Modulo 5.0.0 +
+
+
+ + + + + + + + +
+
+ + +
+
+
+
+
+
Loading...
+
Searching...
+
No Matches
+
+
+
+
+ + +
+
+
modulo_components::ComponentInterface Member List
+
+
+ +

This is the complete list of members for modulo_components::ComponentInterface, including all inherited members.

+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
add_input(const std::string &signal_name, const std::shared_ptr< DataT > &data, const std::string &default_topic="", bool fixed_topic=false)modulo_components::ComponentInterfaceinlineprotected
add_input(const std::string &signal_name, const std::shared_ptr< DataT > &data, const std::function< void()> &callback, const std::string &default_topic="", bool fixed_topic=false)modulo_components::ComponentInterfaceinlineprotected
add_input(const std::string &signal_name, const std::function< void(const std::shared_ptr< MsgT >)> &callback, const std::string &default_topic="", bool fixed_topic=false)modulo_components::ComponentInterfaceinlineprotected
add_parameter(const std::shared_ptr< state_representation::ParameterInterface > &parameter, const std::string &description, bool read_only=false)modulo_components::ComponentInterfaceprotected
add_parameter(const std::string &name, const T &value, const std::string &description, bool read_only=false)modulo_components::ComponentInterfaceinlineprotected
add_periodic_callback(const std::string &name, const std::function< void(void)> &callback)modulo_components::ComponentInterfaceprotected
add_predicate(const std::string &predicate_name, bool predicate_value)modulo_components::ComponentInterfaceprotected
add_predicate(const std::string &predicate_name, const std::function< bool(void)> &predicate_function)modulo_components::ComponentInterfaceprotected
add_service(const std::string &service_name, const std::function< ComponentServiceResponse(void)> &callback)modulo_components::ComponentInterfaceprotected
add_service(const std::string &service_name, const std::function< ComponentServiceResponse(const std::string &string)> &callback)modulo_components::ComponentInterfaceprotected
add_static_tf_broadcaster()modulo_components::ComponentInterfaceprotected
add_tf_broadcaster()modulo_components::ComponentInterfaceprotected
add_tf_listener()modulo_components::ComponentInterfaceprotected
add_trigger(const std::string &trigger_name)modulo_components::ComponentInterfaceprotected
ComponentInterface(const std::shared_ptr< rclcpp::node_interfaces::NodeInterfaces< ALL_RCLCPP_NODE_INTERFACES > > &interfaces)modulo_components::ComponentInterfaceexplicitprotected
ComponentInterfacePublicInterface (defined in modulo_components::ComponentInterface)modulo_components::ComponentInterfacefriend
create_output(modulo_core::communication::PublisherType publisher_type, const std::string &signal_name, const std::shared_ptr< DataT > &data, const std::string &default_topic, bool fixed_topic, bool publish_on_step)modulo_components::ComponentInterfaceinlineprotected
declare_input(const std::string &signal_name, const std::string &default_topic="", bool fixed_topic=false)modulo_components::ComponentInterfaceprotected
declare_output(const std::string &signal_name, const std::string &default_topic="", bool fixed_topic=false)modulo_components::ComponentInterfaceprotected
evaluate_periodic_callbacks()modulo_components::ComponentInterfaceprotected
finalize_interfaces()modulo_components::ComponentInterfaceprotected
get_parameter(const std::string &name) constmodulo_components::ComponentInterfaceprotected
get_parameter_value(const std::string &name) constmodulo_components::ComponentInterfaceinlineprotected
get_period() constmodulo_components::ComponentInterfaceprotected
get_period() const (defined in modulo_components::ComponentInterface)modulo_components::ComponentInterface
get_period() const (defined in modulo_components::ComponentInterface)modulo_components::ComponentInterface
get_period() const (defined in modulo_components::ComponentInterface)modulo_components::ComponentInterface
get_predicate(const std::string &predicate_name) constmodulo_components::ComponentInterfaceprotected
get_qos() constmodulo_components::ComponentInterfaceprotected
get_rate() constmodulo_components::ComponentInterfaceprotected
inputs_modulo_components::ComponentInterfaceprotected
lookup_transform(const std::string &frame, const std::string &reference_frame, const tf2::TimePoint &time_point, const tf2::Duration &duration)modulo_components::ComponentInterfaceprotected
lookup_transform(const std::string &frame, const std::string &reference_frame="world", double validity_period=-1.0, const tf2::Duration &duration=tf2::Duration(std::chrono::microseconds(10)))modulo_components::ComponentInterfaceprotected
on_step_callback()modulo_components::ComponentInterfaceprotectedvirtual
on_validate_parameter_callback(const std::shared_ptr< state_representation::ParameterInterface > &parameter)modulo_components::ComponentInterfaceprotectedvirtual
outputs_modulo_components::ComponentInterfaceprotected
periodic_outputs_modulo_components::ComponentInterfaceprotected
publish_output(const std::string &signal_name)modulo_components::ComponentInterfaceprotected
publish_outputs()modulo_components::ComponentInterfaceprotected
publish_predicates()modulo_components::ComponentInterfaceprotected
raise_error()modulo_components::ComponentInterfaceprotectedvirtual
remove_input(const std::string &signal_name)modulo_components::ComponentInterfaceprotected
remove_output(const std::string &signal_name)modulo_components::ComponentInterfaceprotected
send_static_transform(const state_representation::CartesianPose &transform)modulo_components::ComponentInterfaceprotected
send_static_transforms(const std::vector< state_representation::CartesianPose > &transforms)modulo_components::ComponentInterfaceprotected
send_transform(const state_representation::CartesianPose &transform)modulo_components::ComponentInterfaceprotected
send_transforms(const std::vector< state_representation::CartesianPose > &transforms)modulo_components::ComponentInterfaceprotected
set_parameter_value(const std::string &name, const T &value)modulo_components::ComponentInterfaceinlineprotected
set_predicate(const std::string &predicate_name, bool predicate_value)modulo_components::ComponentInterfaceprotected
set_predicate(const std::string &predicate_name, const std::function< bool(void)> &predicate_function)modulo_components::ComponentInterfaceprotected
set_qos(const rclcpp::QoS &qos)modulo_components::ComponentInterfaceprotected
step()modulo_components::ComponentInterfaceprotectedvirtual
trigger(const std::string &trigger_name)modulo_components::ComponentInterfaceprotected
~ComponentInterface()modulo_components::ComponentInterfacevirtual
+ + + + diff --git a/versions/v5.0.1/classmodulo__components_1_1_component_interface.html b/versions/v5.0.1/classmodulo__components_1_1_component_interface.html new file mode 100644 index 00000000..c3e53524 --- /dev/null +++ b/versions/v5.0.1/classmodulo__components_1_1_component_interface.html @@ -0,0 +1,2525 @@ + + + + + + + +Modulo: modulo_components::ComponentInterface Class Reference + + + + + + + + + +
+
+ + + + + + +
+
Modulo 5.0.0 +
+
+
+ + + + + + + + +
+
+ + +
+
+
+
+
+
Loading...
+
Searching...
+
No Matches
+
+
+
+
+ + +
+
+
+Public Member Functions | +Protected Member Functions | +Protected Attributes | +Friends | +List of all members
+
modulo_components::ComponentInterface Class Reference
+
+
+ +

Base interface class for modulo components to wrap a ROS Node with custom behaviour. + More...

+ +

#include <ComponentInterface.hpp>

+
+Inheritance diagram for modulo_components::ComponentInterface:
+
+
+ + +modulo_components::Component +modulo_components::LifecycleComponent + +
+ + + + + + + + + + + + + + +

+Public Member Functions

virtual ~ComponentInterface ()
 Virtual destructor.
 
template<>
double get_period () const
 
template<>
std::chrono::nanoseconds get_period () const
 
template<>
rclcpp::Duration get_period () const
 
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +

+Protected Member Functions

 ComponentInterface (const std::shared_ptr< rclcpp::node_interfaces::NodeInterfaces< ALL_RCLCPP_NODE_INTERFACES > > &interfaces)
 Constructor with all node interfaces.
 
double get_rate () const
 Get the component rate in Hertz.
 
template<typename T >
T get_period () const
 Get the component period.
 
virtual void step ()
 Step function that is called periodically.
 
virtual void on_step_callback ()
 Steps to execute periodically. To be redefined by derived Component classes.
 
void add_parameter (const std::shared_ptr< state_representation::ParameterInterface > &parameter, const std::string &description, bool read_only=false)
 Add a parameter.
 
template<typename T >
void add_parameter (const std::string &name, const T &value, const std::string &description, bool read_only=false)
 Add a parameter.
 
std::shared_ptr< state_representation::ParameterInterface > get_parameter (const std::string &name) const
 Get a parameter by name.
 
template<typename T >
get_parameter_value (const std::string &name) const
 Get a parameter value by name.
 
template<typename T >
void set_parameter_value (const std::string &name, const T &value)
 Set the value of a parameter.
 
virtual bool on_validate_parameter_callback (const std::shared_ptr< state_representation::ParameterInterface > &parameter)
 Parameter validation function to be redefined by derived Component classes.
 
void add_predicate (const std::string &predicate_name, bool predicate_value)
 Add a predicate to the map of predicates.
 
void add_predicate (const std::string &predicate_name, const std::function< bool(void)> &predicate_function)
 Add a predicate to the map of predicates based on a function to periodically call.
 
bool get_predicate (const std::string &predicate_name) const
 Get the logical value of a predicate.
 
void set_predicate (const std::string &predicate_name, bool predicate_value)
 Set the value of the predicate given as parameter, if the predicate is not found does not do anything.
 
void set_predicate (const std::string &predicate_name, const std::function< bool(void)> &predicate_function)
 Set the value of the predicate given as parameter, if the predicate is not found does not do anything.
 
void add_trigger (const std::string &trigger_name)
 Add a trigger to the component. Triggers are predicates that are always false except when it's triggered in which case it is set back to false immediately after it is read.
 
void trigger (const std::string &trigger_name)
 Latch the trigger with the provided name.
 
void declare_input (const std::string &signal_name, const std::string &default_topic="", bool fixed_topic=false)
 Declare an input to create the topic parameter without adding it to the map of inputs yet.
 
void declare_output (const std::string &signal_name, const std::string &default_topic="", bool fixed_topic=false)
 Declare an output to create the topic parameter without adding it to the map of outputs yet.
 
template<typename DataT >
void add_input (const std::string &signal_name, const std::shared_ptr< DataT > &data, const std::string &default_topic="", bool fixed_topic=false)
 Add and configure an input signal of the component.
 
template<typename DataT >
void add_input (const std::string &signal_name, const std::shared_ptr< DataT > &data, const std::function< void()> &callback, const std::string &default_topic="", bool fixed_topic=false)
 Add and configure an input signal of the component.
 
template<typename MsgT >
void add_input (const std::string &signal_name, const std::function< void(const std::shared_ptr< MsgT >)> &callback, const std::string &default_topic="", bool fixed_topic=false)
 Add and configure an input signal of the component.
 
template<typename DataT >
std::string create_output (modulo_core::communication::PublisherType publisher_type, const std::string &signal_name, const std::shared_ptr< DataT > &data, const std::string &default_topic, bool fixed_topic, bool publish_on_step)
 Helper function to parse the signal name and add an unconfigured PublisherInterface to the map of outputs.
 
void publish_output (const std::string &signal_name)
 Trigger the publishing of an output.
 
void remove_input (const std::string &signal_name)
 Remove an input from the map of inputs.
 
void remove_output (const std::string &signal_name)
 Remove an output from the map of outputs.
 
void add_service (const std::string &service_name, const std::function< ComponentServiceResponse(void)> &callback)
 Add a service to trigger a callback function with no input arguments.
 
void add_service (const std::string &service_name, const std::function< ComponentServiceResponse(const std::string &string)> &callback)
 Add a service to trigger a callback function with a string payload.
 
void add_periodic_callback (const std::string &name, const std::function< void(void)> &callback)
 Add a periodic callback function.
 
void add_tf_broadcaster ()
 Configure a transform broadcaster.
 
void add_static_tf_broadcaster ()
 Configure a static transform broadcaster.
 
void add_tf_listener ()
 Configure a transform buffer and listener.
 
void send_transform (const state_representation::CartesianPose &transform)
 Send a transform to TF.
 
void send_transforms (const std::vector< state_representation::CartesianPose > &transforms)
 Send a vector of transforms to TF.
 
void send_static_transform (const state_representation::CartesianPose &transform)
 Send a static transform to TF.
 
void send_static_transforms (const std::vector< state_representation::CartesianPose > &transforms)
 Send a vector of static transforms to TF.
 
state_representation::CartesianPose lookup_transform (const std::string &frame, const std::string &reference_frame, const tf2::TimePoint &time_point, const tf2::Duration &duration)
 Look up a transform from TF.
 
state_representation::CartesianPose lookup_transform (const std::string &frame, const std::string &reference_frame="world", double validity_period=-1.0, const tf2::Duration &duration=tf2::Duration(std::chrono::microseconds(10)))
 Look up a transform from TF.
 
rclcpp::QoS get_qos () const
 Getter of the Quality of Service attribute.
 
void set_qos (const rclcpp::QoS &qos)
 Set the Quality of Service for ROS publishers and subscribers.
 
virtual void raise_error ()
 Notify an error in the component.
 
void publish_predicates ()
 Helper function to publish all predicates.
 
void publish_outputs ()
 Helper function to publish all output signals.
 
void evaluate_periodic_callbacks ()
 Helper function to evaluate all periodic function callbacks.
 
void finalize_interfaces ()
 Finalize all interfaces.
 
+ + + + + + + + + + +

+Protected Attributes

std::map< std::string, std::shared_ptr< modulo_core::communication::SubscriptionInterface > > inputs_
 Map of inputs.
 
std::map< std::string, std::shared_ptr< modulo_core::communication::PublisherInterface > > outputs_
 Map of outputs.
 
std::map< std::string, boolperiodic_outputs_
 Map of outputs with periodic publishing flag.
 
+ + + +

+Friends

class ComponentInterfacePublicInterface
 
+

Detailed Description

+

Base interface class for modulo components to wrap a ROS Node with custom behaviour.

+

This class is not intended for direct inheritance and usage by end-users. Instead, it defines the common interfaces for the derived classes modulo_components::Component and modulo_components::LifecycleComponent.

See also
Component, LifecycleComponent
+ +

Definition at line 56 of file ComponentInterface.hpp.

+

Constructor & Destructor Documentation

+ +

◆ ~ComponentInterface()

+ +
+
+ + + + + +
+ + + + + + + +
modulo_components::ComponentInterface::~ComponentInterface ()
+
+virtual
+
+ +

Virtual destructor.

+ +

Definition at line 49 of file ComponentInterface.cpp.

+ +
+
+ +

◆ ComponentInterface()

+ +
+
+ + + + + +
+ + + + + + + + +
modulo_components::ComponentInterface::ComponentInterface (const std::shared_ptr< rclcpp::node_interfaces::NodeInterfaces< ALL_RCLCPP_NODE_INTERFACES > > & interfaces)
+
+explicitprotected
+
+ +

Constructor with all node interfaces.

+
Parameters
+ + +
interfacesShared pointer to all the node interfaces of parent class
+
+
+ +

Definition at line 13 of file ComponentInterface.cpp.

+ +
+
+

Member Function Documentation

+ +

◆ add_input() [1/3]

+ +
+
+
+template<typename MsgT >
+ + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
void modulo_components::ComponentInterface::add_input (const std::string & signal_name,
const std::function< void(const std::shared_ptr< MsgT >)> & callback,
const std::string & default_topic = "",
bool fixed_topic = false 
)
+
+inlineprotected
+
+ +

Add and configure an input signal of the component.

+
Template Parameters
+ + +
MsgTThe ROS message type of the subscription
+
+
+
Parameters
+ + + + + +
signal_nameName of the input signal
callbackThe callback to use for the subscription
default_topicIf set, the default value for the topic name to use
fixed_topicIf true, the topic name of the input signal is fixed
+
+
+ +

Definition at line 728 of file ComponentInterface.hpp.

+ +
+
+ +

◆ add_input() [2/3]

+ +
+
+
+template<typename DataT >
+ + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
void modulo_components::ComponentInterface::add_input (const std::string & signal_name,
const std::shared_ptr< DataT > & data,
const std::function< void()> & callback,
const std::string & default_topic = "",
bool fixed_topic = false 
)
+
+inlineprotected
+
+ +

Add and configure an input signal of the component.

+
Template Parameters
+ + +
DataTType of the data pointer
+
+
+
Parameters
+ + + + + + +
signal_nameName of the input signal
dataData to receive on the input signal
callbackCallback function to trigger after receiving the input signal
default_topicIf set, the default value for the topic name to use
fixed_topicIf true, the topic name of the input signal is fixed
+
+
+ +

Definition at line 637 of file ComponentInterface.hpp.

+ +
+
+ +

◆ add_input() [3/3]

+ +
+
+
+template<typename DataT >
+ + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
void modulo_components::ComponentInterface::add_input (const std::string & signal_name,
const std::shared_ptr< DataT > & data,
const std::string & default_topic = "",
bool fixed_topic = false 
)
+
+inlineprotected
+
+ +

Add and configure an input signal of the component.

+
Template Parameters
+ + +
DataTType of the data pointer
+
+
+
Parameters
+ + + + + +
signal_nameName of the input signal
dataData to receive on the input signal
default_topicIf set, the default value for the topic name to use
fixed_topicIf true, the topic name of the input signal is fixed
+
+
+ +

Definition at line 630 of file ComponentInterface.hpp.

+ +
+
+ +

◆ add_parameter() [1/2]

+ +
+
+ + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + +
void modulo_components::ComponentInterface::add_parameter (const std::shared_ptr< state_representation::ParameterInterface > & parameter,
const std::string & description,
bool read_only = false 
)
+
+protected
+
+ +

Add a parameter.

+

This method stores a pointer reference to an existing Parameter object in the local parameter map and declares the equivalent ROS parameter on the ROS interface.

Parameters
+ + + + +
parameterA ParameterInterface pointer to a Parameter instance
descriptionThe description of the parameter
read_onlyIf true, the value of the parameter cannot be changed after declaration
+
+
+
Exceptions
+ + +
ParameterExceptionif the parameter could not be added
+
+
+ +

Definition at line 76 of file ComponentInterface.cpp.

+ +
+
+ +

◆ add_parameter() [2/2]

+ +
+
+
+template<typename T >
+ + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
void modulo_components::ComponentInterface::add_parameter (const std::string & name,
const Tvalue,
const std::string & description,
bool read_only = false 
)
+
+inlineprotected
+
+ +

Add a parameter.

+

This method creates a new Parameter object instance to reference in the local parameter map and declares the equivalent ROS parameter on the ROS interface.

Template Parameters
+ + +
TThe type of the parameter
+
+
+
Parameters
+ + + + + +
nameThe name of the parameter
valueThe value of the parameter
descriptionThe description of the parameter
read_onlyIf true, the value of the parameter cannot be changed after declaration
+
+
+
Exceptions
+ + +
ParameterExceptionif the parameter could not be added
+
+
+ +

Definition at line 590 of file ComponentInterface.hpp.

+ +
+
+ +

◆ add_periodic_callback()

+ +
+
+ + + + + +
+ + + + + + + + + + + + + + + + + + +
void modulo_components::ComponentInterface::add_periodic_callback (const std::string & name,
const std::function< void(void)> & callback 
)
+
+protected
+
+ +

Add a periodic callback function.

+

The provided function is evaluated periodically at the component step period.

Parameters
+ + + +
nameThe name of the callback
callbackThe callback function that is evaluated periodically
+
+
+ +

Definition at line 447 of file ComponentInterface.cpp.

+ +
+
+ +

◆ add_predicate() [1/2]

+ +
+
+ + + + + +
+ + + + + + + + + + + + + + + + + + +
void modulo_components::ComponentInterface::add_predicate (const std::string & predicate_name,
bool predicate_value 
)
+
+protected
+
+ +

Add a predicate to the map of predicates.

+
Parameters
+ + + +
predicate_namethe name of the associated predicate
predicate_valuethe boolean value of the predicate
+
+
+ +

Definition at line 190 of file ComponentInterface.cpp.

+ +
+
+ +

◆ add_predicate() [2/2]

+ +
+
+ + + + + +
+ + + + + + + + + + + + + + + + + + +
void modulo_components::ComponentInterface::add_predicate (const std::string & predicate_name,
const std::function< bool(void)> & predicate_function 
)
+
+protected
+
+ +

Add a predicate to the map of predicates based on a function to periodically call.

+
Parameters
+ + + +
predicate_namethe name of the associated predicate
predicate_functionthe function to call that returns the value of the predicate
+
+
+ +

Definition at line 194 of file ComponentInterface.cpp.

+ +
+
+ +

◆ add_service() [1/2]

+ +
+
+ + + + + +
+ + + + + + + + + + + + + + + + + + +
void modulo_components::ComponentInterface::add_service (const std::string & service_name,
const std::function< ComponentServiceResponse(const std::string &string)> & callback 
)
+
+protected
+
+ +

Add a service to trigger a callback function with a string payload.

+

The string payload can have an arbitrary format to parameterize and control the callback behaviour as desired. It is the responsibility of the service callback to parse the string according to some payload format. When adding a service with a string payload, be sure to document the payload format appropriately.

Parameters
+ + + +
service_nameThe name of the service
callbackA service callback function with a string argument that returns a ComponentServiceResponse
+
+
+ +

Definition at line 394 of file ComponentInterface.cpp.

+ +
+
+ +

◆ add_service() [2/2]

+ +
+
+ + + + + +
+ + + + + + + + + + + + + + + + + + +
void modulo_components::ComponentInterface::add_service (const std::string & service_name,
const std::function< ComponentServiceResponse(void)> & callback 
)
+
+protected
+
+ +

Add a service to trigger a callback function with no input arguments.

+
Parameters
+ + + +
service_nameThe name of the service
callbackA service callback function with no arguments that returns a ComponentServiceResponse
+
+
+ +

Definition at line 367 of file ComponentInterface.cpp.

+ +
+
+ +

◆ add_static_tf_broadcaster()

+ +
+
+ + + + + +
+ + + + + + + +
void modulo_components::ComponentInterface::add_static_tf_broadcaster ()
+
+protected
+
+ +

Configure a static transform broadcaster.

+ +

Definition at line 473 of file ComponentInterface.cpp.

+ +
+
+ +

◆ add_tf_broadcaster()

+ +
+
+ + + + + +
+ + + + + + + +
void modulo_components::ComponentInterface::add_tf_broadcaster ()
+
+protected
+
+ +

Configure a transform broadcaster.

+ +

Definition at line 462 of file ComponentInterface.cpp.

+ +
+
+ +

◆ add_tf_listener()

+ +
+
+ + + + + +
+ + + + + + + +
void modulo_components::ComponentInterface::add_tf_listener ()
+
+protected
+
+ +

Configure a transform buffer and listener.

+ +

Definition at line 486 of file ComponentInterface.cpp.

+ +
+
+ +

◆ add_trigger()

+ +
+
+ + + + + +
+ + + + + + + + +
void modulo_components::ComponentInterface::add_trigger (const std::string & trigger_name)
+
+protected
+
+ +

Add a trigger to the component. Triggers are predicates that are always false except when it's triggered in which case it is set back to false immediately after it is read.

+
Parameters
+ + +
trigger_nameThe name of the trigger
+
+
+ +

Definition at line 253 of file ComponentInterface.cpp.

+ +
+
+ +

◆ create_output()

+ +
+
+
+template<typename DataT >
+ + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
std::string modulo_components::ComponentInterface::create_output (modulo_core::communication::PublisherType publisher_type,
const std::string & signal_name,
const std::shared_ptr< DataT > & data,
const std::string & default_topic,
bool fixed_topic,
bool publish_on_step 
)
+
+inlineprotected
+
+ +

Helper function to parse the signal name and add an unconfigured PublisherInterface to the map of outputs.

+
Template Parameters
+ + +
DataTType of the data pointer
+
+
+
Parameters
+ + + + + + +
signal_nameName of the output signal
dataData to transmit on the output signal
default_topicIf set, the default value for the topic name to use
fixed_topicIf true, the topic name of the output signal is fixed
publish_on_stepIf true, the output is published periodically on step
+
+
+
Exceptions
+ + +
modulo_core::exceptions::AddSignalExceptionif the output could not be created (empty name, already registered)
+
+
+
Returns
The parsed signal name
+ +

Definition at line 751 of file ComponentInterface.hpp.

+ +
+
+ +

◆ declare_input()

+ +
+
+ + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + +
void modulo_components::ComponentInterface::declare_input (const std::string & signal_name,
const std::string & default_topic = "",
bool fixed_topic = false 
)
+
+protected
+
+ +

Declare an input to create the topic parameter without adding it to the map of inputs yet.

+
Parameters
+ + + + +
signal_nameThe signal name of the input
default_topicIf set, the default value for the topic name to use
fixed_topicIf true, the topic name of the signal is fixed
+
+
+
Exceptions
+ + +
modulo_core::exceptions::AddSignalExceptionif the input could not be declared (empty name or already created)
+
+
+ +

Definition at line 286 of file ComponentInterface.cpp.

+ +
+
+ +

◆ declare_output()

+ +
+
+ + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + +
void modulo_components::ComponentInterface::declare_output (const std::string & signal_name,
const std::string & default_topic = "",
bool fixed_topic = false 
)
+
+protected
+
+ +

Declare an output to create the topic parameter without adding it to the map of outputs yet.

+
Parameters
+ + + + +
signal_nameThe signal name of the output
default_topicIf set, the default value for the topic name to use
fixed_topicIf true, the topic name of the signal is fixed
+
+
+
Exceptions
+ + +
modulo_core::exceptions::AddSignalExceptionif the output could not be declared (empty name or already created)
+
+
+ +

Definition at line 291 of file ComponentInterface.cpp.

+ +
+
+ +

◆ evaluate_periodic_callbacks()

+ +
+
+ + + + + +
+ + + + + + + +
void modulo_components::ComponentInterface::evaluate_periodic_callbacks ()
+
+protected
+
+ +

Helper function to evaluate all periodic function callbacks.

+ +

Definition at line 600 of file ComponentInterface.cpp.

+ +
+
+ +

◆ finalize_interfaces()

+ +
+
+ + + + + +
+ + + + + + + +
void modulo_components::ComponentInterface::finalize_interfaces ()
+
+protected
+
+ +

Finalize all interfaces.

+ +

Definition at line 612 of file ComponentInterface.cpp.

+ +
+
+ +

◆ get_parameter()

+ +
+
+ + + + + +
+ + + + + + + + +
std::shared_ptr< state_representation::ParameterInterface > modulo_components::ComponentInterface::get_parameter (const std::string & name) const
+
+protected
+
+ +

Get a parameter by name.

+
Parameters
+ + +
nameThe name of the parameter
+
+
+
Exceptions
+ + +
modulo_core::exceptions::ParameterExceptionif the parameter could not be found
+
+
+
Returns
The ParameterInterface pointer to a Parameter instance
+ +

Definition at line 123 of file ComponentInterface.cpp.

+ +
+
+ +

◆ get_parameter_value()

+ +
+
+
+template<typename T >
+ + + + + +
+ + + + + + + + +
T modulo_components::ComponentInterface::get_parameter_value (const std::string & name) const
+
+inlineprotected
+
+ +

Get a parameter value by name.

+
Template Parameters
+ + +
TThe type of the parameter
+
+
+
Parameters
+ + +
nameThe name of the parameter
+
+
+
Exceptions
+ + +
modulo_core::exceptions::ParameterExceptionif the parameter value could not be accessed
+
+
+
Returns
The value of the parameter
+ +

Definition at line 600 of file ComponentInterface.hpp.

+ +
+
+ +

◆ get_period() [1/4]

+ +
+
+
+template<typename T >
+ + + + + +
+ + + + + + + +
T modulo_components::ComponentInterface::get_period () const
+
+protected
+
+ +

Get the component period.

+
Returns
The component period
+ +
+
+ +

◆ get_period() [2/4]

+ +
+
+
+template<>
+ + + + + + + +
double modulo_components::ComponentInterface::get_period () const
+
+ +

Definition at line 58 of file ComponentInterface.cpp.

+ +
+
+ +

◆ get_period() [3/4]

+ +
+
+
+template<>
+ + + + + + + +
std::chrono::nanoseconds modulo_components::ComponentInterface::get_period () const
+
+ +

Definition at line 63 of file ComponentInterface.cpp.

+ +
+
+ +

◆ get_period() [4/4]

+ +
+
+
+template<>
+ + + + + + + +
rclcpp::Duration modulo_components::ComponentInterface::get_period () const
+
+ +

Definition at line 68 of file ComponentInterface.cpp.

+ +
+
+ +

◆ get_predicate()

+ +
+
+ + + + + +
+ + + + + + + + +
bool modulo_components::ComponentInterface::get_predicate (const std::string & predicate_name) const
+
+protected
+
+ +

Get the logical value of a predicate.

+

If the predicate is not found or the callable function fails, the return value is false.

Parameters
+ + +
predicate_namethe name of the predicate to retrieve from the map of predicates
+
+
+
Returns
the value of the predicate as a boolean
+ +

Definition at line 216 of file ComponentInterface.cpp.

+ +
+
+ +

◆ get_qos()

+ +
+
+ + + + + +
+ + + + + + + +
rclcpp::QoS modulo_components::ComponentInterface::get_qos () const
+
+protected
+
+ +

Getter of the Quality of Service attribute.

+
Returns
The Quality of Service attribute
+ +

Definition at line 549 of file ComponentInterface.cpp.

+ +
+
+ +

◆ get_rate()

+ +
+
+ + + + + +
+ + + + + + + +
double modulo_components::ComponentInterface::get_rate () const
+
+protected
+
+ +

Get the component rate in Hertz.

+
Returns
The component rate
+ +

Definition at line 53 of file ComponentInterface.cpp.

+ +
+
+ +

◆ lookup_transform() [1/2]

+ +
+
+ + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
state_representation::CartesianPose modulo_components::ComponentInterface::lookup_transform (const std::string & frame,
const std::string & reference_frame,
const tf2::TimePoint & time_point,
const tf2::Duration & duration 
)
+
+protected
+
+ +

Look up a transform from TF.

+
Parameters
+ + + + + +
frameThe desired frame of the transform
reference_frameThe desired reference frame of the transform
time_pointThe time at which the value of the transform is desired
durationHow long to block the lookup call before failing
+
+
+
Exceptions
+ + +
modulo_core::exceptions::LookupTransformExceptionif TF buffer/listener are unconfigured or if the lookupTransform call failed
+
+
+
Returns
If it exists, the requested transform
+ +

Definition at line 513 of file ComponentInterface.cpp.

+ +
+
+ +

◆ lookup_transform() [2/2]

+ +
+
+ + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
state_representation::CartesianPose modulo_components::ComponentInterface::lookup_transform (const std::string & frame,
const std::string & reference_frame = "world",
double validity_period = -1.0,
const tf2::Duration & duration = tf2::Duration(std::chrono::microseconds(10)) 
)
+
+protected
+
+ +

Look up a transform from TF.

+
Parameters
+ + + + + +
frameThe desired frame of the transform
reference_frameThe desired reference frame of the transform
validity_periodThe validity period of the latest transform from the time of lookup in seconds
durationHow long to block the lookup call before failing
+
+
+
Exceptions
+ + +
modulo_core::exceptions::LookupTransformExceptionif TF buffer/listener are unconfigured, if the lookupTransform call failed, or if the transform is too old
+
+
+
Returns
If it exists and is still valid, the requested transform
+ +

Definition at line 522 of file ComponentInterface.cpp.

+ +
+
+ +

◆ on_step_callback()

+ +
+
+ + + + + +
+ + + + + + + +
void modulo_components::ComponentInterface::on_step_callback ()
+
+protectedvirtual
+
+ +

Steps to execute periodically. To be redefined by derived Component classes.

+ +

Definition at line 74 of file ComponentInterface.cpp.

+ +
+
+ +

◆ on_validate_parameter_callback()

+ +
+
+ + + + + +
+ + + + + + + + +
bool modulo_components::ComponentInterface::on_validate_parameter_callback (const std::shared_ptr< state_representation::ParameterInterface > & parameter)
+
+protectedvirtual
+
+ +

Parameter validation function to be redefined by derived Component classes.

+

This method is automatically invoked whenever the ROS interface tried to modify a parameter. Validation and sanitization can be performed by reading or writing the value of the parameter through the ParameterInterface pointer, depending on the parameter name and desired component behaviour. If the validation returns true, the updated parameter value (including any modifications) is applied. If the validation returns false, any changes to the parameter are discarded and the parameter value is not changed.

Parameters
+ + +
parameterA ParameterInterface pointer to a Parameter instance
+
+
+
Returns
The validation result
+ +

Definition at line 185 of file ComponentInterface.cpp.

+ +
+
+ +

◆ publish_output()

+ +
+
+ + + + + +
+ + + + + + + + +
void modulo_components::ComponentInterface::publish_output (const std::string & signal_name)
+
+protected
+
+ +

Trigger the publishing of an output.

+
Parameters
+ + +
signal_nameThe name of the output signal
+
+
+
Exceptions
+ + +
ComponentExceptionif the output is being published periodically or if the signal name could not be found
+
+
+ +

Definition at line 328 of file ComponentInterface.cpp.

+ +
+
+ +

◆ publish_outputs()

+ +
+
+ + + + + +
+ + + + + + + +
void modulo_components::ComponentInterface::publish_outputs ()
+
+protected
+
+ +

Helper function to publish all output signals.

+ +

Definition at line 586 of file ComponentInterface.cpp.

+ +
+
+ +

◆ publish_predicates()

+ +
+
+ + + + + +
+ + + + + + + +
void modulo_components::ComponentInterface::publish_predicates ()
+
+protected
+
+ +

Helper function to publish all predicates.

+ +

Definition at line 574 of file ComponentInterface.cpp.

+ +
+
+ +

◆ raise_error()

+ +
+
+ + + + + +
+ + + + + + + +
void modulo_components::ComponentInterface::raise_error ()
+
+protectedvirtual
+
+ +

Notify an error in the component.

+ +

Reimplemented in modulo_components::Component, and modulo_components::LifecycleComponent.

+ +

Definition at line 557 of file ComponentInterface.cpp.

+ +
+
+ +

◆ remove_input()

+ +
+
+ + + + + +
+ + + + + + + + +
void modulo_components::ComponentInterface::remove_input (const std::string & signal_name)
+
+protected
+
+ +

Remove an input from the map of inputs.

+
Parameters
+ + +
signal_nameThe name of the input
+
+
+ +

Definition at line 345 of file ComponentInterface.cpp.

+ +
+
+ +

◆ remove_output()

+ +
+
+ + + + + +
+ + + + + + + + +
void modulo_components::ComponentInterface::remove_output (const std::string & signal_name)
+
+protected
+
+ +

Remove an output from the map of outputs.

+
Parameters
+ + +
signal_nameThe name of the output
+
+
+ +

Definition at line 356 of file ComponentInterface.cpp.

+ +
+
+ +

◆ send_static_transform()

+ +
+
+ + + + + +
+ + + + + + + + +
void modulo_components::ComponentInterface::send_static_transform (const state_representation::CartesianPose & transform)
+
+protected
+
+ +

Send a static transform to TF.

+
Parameters
+ + +
transformThe transform to send
+
+
+ +

Definition at line 505 of file ComponentInterface.cpp.

+ +
+
+ +

◆ send_static_transforms()

+ +
+
+ + + + + +
+ + + + + + + + +
void modulo_components::ComponentInterface::send_static_transforms (const std::vector< state_representation::CartesianPose > & transforms)
+
+protected
+
+ +

Send a vector of static transforms to TF.

+
Parameters
+ + +
transformsThe vector of transforms to send
+
+
+ +

Definition at line 509 of file ComponentInterface.cpp.

+ +
+
+ +

◆ send_transform()

+ +
+
+ + + + + +
+ + + + + + + + +
void modulo_components::ComponentInterface::send_transform (const state_representation::CartesianPose & transform)
+
+protected
+
+ +

Send a transform to TF.

+
Parameters
+ + +
transformThe transform to send
+
+
+ +

Definition at line 497 of file ComponentInterface.cpp.

+ +
+
+ +

◆ send_transforms()

+ +
+
+ + + + + +
+ + + + + + + + +
void modulo_components::ComponentInterface::send_transforms (const std::vector< state_representation::CartesianPose > & transforms)
+
+protected
+
+ +

Send a vector of transforms to TF.

+
Parameters
+ + +
transformsThe vector of transforms to send
+
+
+ +

Definition at line 501 of file ComponentInterface.cpp.

+ +
+
+ +

◆ set_parameter_value()

+ +
+
+
+template<typename T >
+ + + + + +
+ + + + + + + + + + + + + + + + + + +
void modulo_components::ComponentInterface::set_parameter_value (const std::string & name,
const Tvalue 
)
+
+inlineprotected
+
+ +

Set the value of a parameter.

+

The parameter must have been previously declared. This method preserves the reference to the original Parameter instance

Template Parameters
+ + +
TThe type of the parameter
+
+
+
Parameters
+ + +
nameThe name of the parameter
+
+
+
Returns
The value of the parameter
+ +

Definition at line 610 of file ComponentInterface.hpp.

+ +
+
+ +

◆ set_predicate() [1/2]

+ +
+
+ + + + + +
+ + + + + + + + + + + + + + + + + + +
void modulo_components::ComponentInterface::set_predicate (const std::string & predicate_name,
bool predicate_value 
)
+
+protected
+
+ +

Set the value of the predicate given as parameter, if the predicate is not found does not do anything.

+

Even though the predicates are published periodically, the new value of this predicate will be published once immediately after setting it.

Parameters
+ + + +
predicate_namethe name of the predicate to retrieve from the map of predicates
predicate_valuethe new value of the predicate
+
+
+ +

Definition at line 234 of file ComponentInterface.cpp.

+ +
+
+ +

◆ set_predicate() [2/2]

+ +
+
+ + + + + +
+ + + + + + + + + + + + + + + + + + +
void modulo_components::ComponentInterface::set_predicate (const std::string & predicate_name,
const std::function< bool(void)> & predicate_function 
)
+
+protected
+
+ +

Set the value of the predicate given as parameter, if the predicate is not found does not do anything.

+

Even though the predicates are published periodically, the new value of this predicate will be published once immediately after setting it.

Parameters
+ + + +
predicate_namethe name of the predicate to retrieve from the map of predicates
predicate_functionthe function to call that returns the value of the predicate
+
+
+ +

Definition at line 238 of file ComponentInterface.cpp.

+ +
+
+ +

◆ set_qos()

+ +
+
+ + + + + +
+ + + + + + + + +
void modulo_components::ComponentInterface::set_qos (const rclcpp::QoS & qos)
+
+protected
+
+ +

Set the Quality of Service for ROS publishers and subscribers.

+
Parameters
+ + +
qosThe desired Quality of Service
+
+
+ +

Definition at line 553 of file ComponentInterface.cpp.

+ +
+
+ +

◆ step()

+ +
+
+ + + + + +
+ + + + + + + +
void modulo_components::ComponentInterface::step ()
+
+protectedvirtual
+
+ +

Step function that is called periodically.

+ +

Definition at line 72 of file ComponentInterface.cpp.

+ +
+
+ +

◆ trigger()

+ +
+
+ + + + + +
+ + + + + + + + +
void modulo_components::ComponentInterface::trigger (const std::string & trigger_name)
+
+protected
+
+ +

Latch the trigger with the provided name.

+
Parameters
+ + +
trigger_nameThe name of the trigger
+
+
+ +

Definition at line 274 of file ComponentInterface.cpp.

+ +
+
+

Friends And Related Symbol Documentation

+ +

◆ ComponentInterfacePublicInterface

+ +
+
+ + + + + +
+ + + + +
friend class ComponentInterfacePublicInterface
+
+friend
+
+ +

Definition at line 58 of file ComponentInterface.hpp.

+ +
+
+

Member Data Documentation

+ +

◆ inputs_

+ +
+
+ + + + + +
+ + + + +
std::map<std::string, std::shared_ptr<modulo_core::communication::SubscriptionInterface> > modulo_components::ComponentInterface::inputs_
+
+protected
+
+ +

Map of inputs.

+ +

Definition at line 445 of file ComponentInterface.hpp.

+ +
+
+ +

◆ outputs_

+ +
+
+ + + + + +
+ + + + +
std::map<std::string, std::shared_ptr<modulo_core::communication::PublisherInterface> > modulo_components::ComponentInterface::outputs_
+
+protected
+
+ +

Map of outputs.

+ +

Definition at line 446 of file ComponentInterface.hpp.

+ +
+
+ +

◆ periodic_outputs_

+ +
+
+ + + + + +
+ + + + +
std::map<std::string, bool> modulo_components::ComponentInterface::periodic_outputs_
+
+protected
+
+ +

Map of outputs with periodic publishing flag.

+ +

Definition at line 447 of file ComponentInterface.hpp.

+ +
+
+
The documentation for this class was generated from the following files: +
+ + + + diff --git a/versions/v5.0.1/classmodulo__components_1_1_component_interface.png b/versions/v5.0.1/classmodulo__components_1_1_component_interface.png new file mode 100644 index 00000000..e327a755 Binary files /dev/null and b/versions/v5.0.1/classmodulo__components_1_1_component_interface.png differ diff --git a/versions/v5.0.1/classmodulo__components_1_1_lifecycle_component-members.html b/versions/v5.0.1/classmodulo__components_1_1_lifecycle_component-members.html new file mode 100644 index 00000000..e41b8437 --- /dev/null +++ b/versions/v5.0.1/classmodulo__components_1_1_lifecycle_component-members.html @@ -0,0 +1,143 @@ + + + + + + + +Modulo: Member List + + + + + + + + + +
+
+ + + + + + +
+
Modulo 5.0.0 +
+
+
+ + + + + + + + +
+
+ + +
+
+
+
+
+
Loading...
+
Searching...
+
No Matches
+
+
+
+
+ + +
+
+
modulo_components::LifecycleComponent Member List
+
+
+ +

This is the complete list of members for modulo_components::LifecycleComponent, including all inherited members.

+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
add_input(const std::string &signal_name, const std::shared_ptr< DataT > &data, const std::string &default_topic="", bool fixed_topic=false)modulo_components::ComponentInterfaceinlineprotected
add_input(const std::string &signal_name, const std::shared_ptr< DataT > &data, const std::function< void()> &callback, const std::string &default_topic="", bool fixed_topic=false)modulo_components::ComponentInterfaceinlineprotected
add_input(const std::string &signal_name, const std::function< void(const std::shared_ptr< MsgT >)> &callback, const std::string &default_topic="", bool fixed_topic=false)modulo_components::ComponentInterfaceinlineprotected
add_output(const std::string &signal_name, const std::shared_ptr< DataT > &data, const std::string &default_topic="", bool fixed_topic=false, bool publish_on_step=true)modulo_components::LifecycleComponentinlineprotected
add_parameter(const std::shared_ptr< state_representation::ParameterInterface > &parameter, const std::string &description, bool read_only=false)modulo_components::ComponentInterfaceprotected
add_parameter(const std::string &name, const T &value, const std::string &description, bool read_only=false)modulo_components::ComponentInterfaceinlineprotected
add_periodic_callback(const std::string &name, const std::function< void(void)> &callback)modulo_components::ComponentInterfaceprotected
add_predicate(const std::string &predicate_name, bool predicate_value)modulo_components::ComponentInterfaceprotected
add_predicate(const std::string &predicate_name, const std::function< bool(void)> &predicate_function)modulo_components::ComponentInterfaceprotected
add_service(const std::string &service_name, const std::function< ComponentServiceResponse(void)> &callback)modulo_components::ComponentInterfaceprotected
add_service(const std::string &service_name, const std::function< ComponentServiceResponse(const std::string &string)> &callback)modulo_components::ComponentInterfaceprotected
add_static_tf_broadcaster()modulo_components::ComponentInterfaceprotected
add_tf_broadcaster()modulo_components::ComponentInterfaceprotected
add_tf_listener()modulo_components::ComponentInterfaceprotected
add_trigger(const std::string &trigger_name)modulo_components::ComponentInterfaceprotected
ComponentInterface(const std::shared_ptr< rclcpp::node_interfaces::NodeInterfaces< ALL_RCLCPP_NODE_INTERFACES > > &interfaces)modulo_components::ComponentInterfaceexplicitprotected
declare_input(const std::string &signal_name, const std::string &default_topic="", bool fixed_topic=false)modulo_components::ComponentInterfaceprotected
declare_output(const std::string &signal_name, const std::string &default_topic="", bool fixed_topic=false)modulo_components::ComponentInterfaceprotected
get_lifecycle_state() constmodulo_components::LifecycleComponentprotected
get_parameter(const std::string &name) constmodulo_components::LifecycleComponentprotected
get_parameter_value(const std::string &name) constmodulo_components::ComponentInterfaceinlineprotected
get_period() constmodulo_components::ComponentInterfaceprotected
get_period() const (defined in modulo_components::ComponentInterface)modulo_components::ComponentInterface
get_period() const (defined in modulo_components::ComponentInterface)modulo_components::ComponentInterface
get_period() const (defined in modulo_components::ComponentInterface)modulo_components::ComponentInterface
get_predicate(const std::string &predicate_name) constmodulo_components::ComponentInterfaceprotected
get_qos() constmodulo_components::ComponentInterfaceprotected
get_rate() constmodulo_components::ComponentInterfaceprotected
LifecycleComponent(const rclcpp::NodeOptions &node_options, const std::string &fallback_name="LifecycleComponent")modulo_components::LifecycleComponentexplicit
LifecycleComponentPublicInterface (defined in modulo_components::LifecycleComponent)modulo_components::LifecycleComponentfriend
lookup_transform(const std::string &frame, const std::string &reference_frame, const tf2::TimePoint &time_point, const tf2::Duration &duration)modulo_components::ComponentInterfaceprotected
lookup_transform(const std::string &frame, const std::string &reference_frame="world", double validity_period=-1.0, const tf2::Duration &duration=tf2::Duration(std::chrono::microseconds(10)))modulo_components::ComponentInterfaceprotected
on_activate_callback()modulo_components::LifecycleComponentprotectedvirtual
on_cleanup_callback()modulo_components::LifecycleComponentprotectedvirtual
on_configure_callback()modulo_components::LifecycleComponentprotectedvirtual
on_deactivate_callback()modulo_components::LifecycleComponentprotectedvirtual
on_error_callback()modulo_components::LifecycleComponentprotectedvirtual
on_shutdown_callback()modulo_components::LifecycleComponentprotectedvirtual
on_step_callback()modulo_components::ComponentInterfaceprotectedvirtual
on_validate_parameter_callback(const std::shared_ptr< state_representation::ParameterInterface > &parameter)modulo_components::ComponentInterfaceprotectedvirtual
publish_output(const std::string &signal_name)modulo_components::ComponentInterfaceprotected
raise_error() overridemodulo_components::LifecycleComponentprotectedvirtual
remove_input(const std::string &signal_name)modulo_components::ComponentInterfaceprotected
remove_output(const std::string &signal_name)modulo_components::ComponentInterfaceprotected
send_static_transform(const state_representation::CartesianPose &transform)modulo_components::ComponentInterfaceprotected
send_static_transforms(const std::vector< state_representation::CartesianPose > &transforms)modulo_components::ComponentInterfaceprotected
send_transform(const state_representation::CartesianPose &transform)modulo_components::ComponentInterfaceprotected
send_transforms(const std::vector< state_representation::CartesianPose > &transforms)modulo_components::ComponentInterfaceprotected
set_parameter_value(const std::string &name, const T &value)modulo_components::ComponentInterfaceinlineprotected
set_predicate(const std::string &predicate_name, bool predicate_value)modulo_components::ComponentInterfaceprotected
set_predicate(const std::string &predicate_name, const std::function< bool(void)> &predicate_function)modulo_components::ComponentInterfaceprotected
set_qos(const rclcpp::QoS &qos)modulo_components::ComponentInterfaceprotected
trigger(const std::string &trigger_name)modulo_components::ComponentInterfaceprotected
~ComponentInterface()modulo_components::ComponentInterfacevirtual
~LifecycleComponent()=defaultmodulo_components::LifecycleComponentvirtual
+ + + + diff --git a/versions/v5.0.1/classmodulo__components_1_1_lifecycle_component.html b/versions/v5.0.1/classmodulo__components_1_1_lifecycle_component.html new file mode 100644 index 00000000..2ec747ee --- /dev/null +++ b/versions/v5.0.1/classmodulo__components_1_1_lifecycle_component.html @@ -0,0 +1,772 @@ + + + + + + + +Modulo: modulo_components::LifecycleComponent Class Reference + + + + + + + + + +
+
+ + + + + + +
+
Modulo 5.0.0 +
+
+
+ + + + + + + + +
+
+ + +
+
+
+
+
+
Loading...
+
Searching...
+
No Matches
+
+
+
+
+ + +
+
+
+Public Member Functions | +Protected Member Functions | +Friends | +List of all members
+
modulo_components::LifecycleComponent Class Reference
+
+
+ +

A wrapper for rclcpp_lifecycle::LifecycleNode to simplify application composition through unified component interfaces while supporting lifecycle states and transitions. + More...

+ +

#include <LifecycleComponent.hpp>

+
+Inheritance diagram for modulo_components::LifecycleComponent:
+
+
+ + +modulo_components::ComponentInterface + +
+ + + + + + + + + + + + + + + + + + + + + +

+Public Member Functions

 LifecycleComponent (const rclcpp::NodeOptions &node_options, const std::string &fallback_name="LifecycleComponent")
 Constructor from node options.
 
+virtual ~LifecycleComponent ()=default
 Virtual default destructor.
 
- Public Member Functions inherited from modulo_components::ComponentInterface
virtual ~ComponentInterface ()
 Virtual destructor.
 
template<>
double get_period () const
 
template<>
std::chrono::nanoseconds get_period () const
 
template<>
rclcpp::Duration get_period () const
 
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +

+Protected Member Functions

std::shared_ptr< state_representation::ParameterInterface > get_parameter (const std::string &name) const
 Get a parameter by name.
 
virtual bool on_configure_callback ()
 Steps to execute when configuring the component.
 
virtual bool on_cleanup_callback ()
 Steps to execute when cleaning up the component.
 
virtual bool on_activate_callback ()
 Steps to execute when activating the component.
 
virtual bool on_deactivate_callback ()
 Steps to execute when deactivating the component.
 
virtual bool on_shutdown_callback ()
 Steps to execute when shutting down the component.
 
virtual bool on_error_callback ()
 Steps to execute when handling errors.
 
template<typename DataT >
void add_output (const std::string &signal_name, const std::shared_ptr< DataT > &data, const std::string &default_topic="", bool fixed_topic=false, bool publish_on_step=true)
 Add an output signal of the component.
 
rclcpp_lifecycle::State get_lifecycle_state () const
 Get the current lifecycle state of the component.
 
void raise_error () override
 Trigger the shutdown and error transitions.
 
- Protected Member Functions inherited from modulo_components::ComponentInterface
 ComponentInterface (const std::shared_ptr< rclcpp::node_interfaces::NodeInterfaces< ALL_RCLCPP_NODE_INTERFACES > > &interfaces)
 Constructor with all node interfaces.
 
double get_rate () const
 Get the component rate in Hertz.
 
template<typename T >
T get_period () const
 Get the component period.
 
virtual void on_step_callback ()
 Steps to execute periodically. To be redefined by derived Component classes.
 
void add_parameter (const std::shared_ptr< state_representation::ParameterInterface > &parameter, const std::string &description, bool read_only=false)
 Add a parameter.
 
template<typename T >
void add_parameter (const std::string &name, const T &value, const std::string &description, bool read_only=false)
 Add a parameter.
 
std::shared_ptr< state_representation::ParameterInterface > get_parameter (const std::string &name) const
 Get a parameter by name.
 
template<typename T >
get_parameter_value (const std::string &name) const
 Get a parameter value by name.
 
template<typename T >
void set_parameter_value (const std::string &name, const T &value)
 Set the value of a parameter.
 
virtual bool on_validate_parameter_callback (const std::shared_ptr< state_representation::ParameterInterface > &parameter)
 Parameter validation function to be redefined by derived Component classes.
 
void add_predicate (const std::string &predicate_name, bool predicate_value)
 Add a predicate to the map of predicates.
 
void add_predicate (const std::string &predicate_name, const std::function< bool(void)> &predicate_function)
 Add a predicate to the map of predicates based on a function to periodically call.
 
bool get_predicate (const std::string &predicate_name) const
 Get the logical value of a predicate.
 
void set_predicate (const std::string &predicate_name, bool predicate_value)
 Set the value of the predicate given as parameter, if the predicate is not found does not do anything.
 
void set_predicate (const std::string &predicate_name, const std::function< bool(void)> &predicate_function)
 Set the value of the predicate given as parameter, if the predicate is not found does not do anything.
 
void add_trigger (const std::string &trigger_name)
 Add a trigger to the component. Triggers are predicates that are always false except when it's triggered in which case it is set back to false immediately after it is read.
 
void trigger (const std::string &trigger_name)
 Latch the trigger with the provided name.
 
void declare_input (const std::string &signal_name, const std::string &default_topic="", bool fixed_topic=false)
 Declare an input to create the topic parameter without adding it to the map of inputs yet.
 
void declare_output (const std::string &signal_name, const std::string &default_topic="", bool fixed_topic=false)
 Declare an output to create the topic parameter without adding it to the map of outputs yet.
 
template<typename DataT >
void add_input (const std::string &signal_name, const std::shared_ptr< DataT > &data, const std::string &default_topic="", bool fixed_topic=false)
 Add and configure an input signal of the component.
 
template<typename DataT >
void add_input (const std::string &signal_name, const std::shared_ptr< DataT > &data, const std::function< void()> &callback, const std::string &default_topic="", bool fixed_topic=false)
 Add and configure an input signal of the component.
 
template<typename MsgT >
void add_input (const std::string &signal_name, const std::function< void(const std::shared_ptr< MsgT >)> &callback, const std::string &default_topic="", bool fixed_topic=false)
 Add and configure an input signal of the component.
 
template<typename DataT >
std::string create_output (modulo_core::communication::PublisherType publisher_type, const std::string &signal_name, const std::shared_ptr< DataT > &data, const std::string &default_topic, bool fixed_topic, bool publish_on_step)
 Helper function to parse the signal name and add an unconfigured PublisherInterface to the map of outputs.
 
void publish_output (const std::string &signal_name)
 Trigger the publishing of an output.
 
void remove_input (const std::string &signal_name)
 Remove an input from the map of inputs.
 
void remove_output (const std::string &signal_name)
 Remove an output from the map of outputs.
 
void add_service (const std::string &service_name, const std::function< ComponentServiceResponse(void)> &callback)
 Add a service to trigger a callback function with no input arguments.
 
void add_service (const std::string &service_name, const std::function< ComponentServiceResponse(const std::string &string)> &callback)
 Add a service to trigger a callback function with a string payload.
 
void add_periodic_callback (const std::string &name, const std::function< void(void)> &callback)
 Add a periodic callback function.
 
void add_tf_broadcaster ()
 Configure a transform broadcaster.
 
void add_static_tf_broadcaster ()
 Configure a static transform broadcaster.
 
void add_tf_listener ()
 Configure a transform buffer and listener.
 
void send_transform (const state_representation::CartesianPose &transform)
 Send a transform to TF.
 
void send_transforms (const std::vector< state_representation::CartesianPose > &transforms)
 Send a vector of transforms to TF.
 
void send_static_transform (const state_representation::CartesianPose &transform)
 Send a static transform to TF.
 
void send_static_transforms (const std::vector< state_representation::CartesianPose > &transforms)
 Send a vector of static transforms to TF.
 
state_representation::CartesianPose lookup_transform (const std::string &frame, const std::string &reference_frame, const tf2::TimePoint &time_point, const tf2::Duration &duration)
 Look up a transform from TF.
 
state_representation::CartesianPose lookup_transform (const std::string &frame, const std::string &reference_frame="world", double validity_period=-1.0, const tf2::Duration &duration=tf2::Duration(std::chrono::microseconds(10)))
 Look up a transform from TF.
 
rclcpp::QoS get_qos () const
 Getter of the Quality of Service attribute.
 
void set_qos (const rclcpp::QoS &qos)
 Set the Quality of Service for ROS publishers and subscribers.
 
void publish_predicates ()
 Helper function to publish all predicates.
 
void publish_outputs ()
 Helper function to publish all output signals.
 
void evaluate_periodic_callbacks ()
 Helper function to evaluate all periodic function callbacks.
 
void finalize_interfaces ()
 Finalize all interfaces.
 
+ + + +

+Friends

class LifecycleComponentPublicInterface
 
+ + + + + + + + + + + +

+Additional Inherited Members

- Protected Attributes inherited from modulo_components::ComponentInterface
std::map< std::string, std::shared_ptr< modulo_core::communication::SubscriptionInterface > > inputs_
 Map of inputs.
 
std::map< std::string, std::shared_ptr< modulo_core::communication::PublisherInterface > > outputs_
 Map of outputs.
 
std::map< std::string, boolperiodic_outputs_
 Map of outputs with periodic publishing flag.
 
+

Detailed Description

+

A wrapper for rclcpp_lifecycle::LifecycleNode to simplify application composition through unified component interfaces while supporting lifecycle states and transitions.

+

This class is intended for direct inheritance to implement custom state-based components that perform different behaviors based on their state and on state transitions. An example of state-based behaviour is a signal component that requires configuration steps to determine which inputs to register and subsequently should publish outputs only when the component is activated. Developers should override on_validate_parameter_callback() if any parameters are added. In addition, the following state transition callbacks should be overridden whenever custom transition behavior is needed:

+ +

Definition at line 29 of file LifecycleComponent.hpp.

+

Constructor & Destructor Documentation

+ +

◆ LifecycleComponent()

+ +
+
+ + + + + +
+ + + + + + + + + + + + + + + + + + +
modulo_components::LifecycleComponent::LifecycleComponent (const rclcpp::NodeOptions & node_options,
const std::string & fallback_name = "LifecycleComponent" 
)
+
+explicit
+
+ +

Constructor from node options.

+
Parameters
+ + + +
node_optionsNode options as used in ROS2 LifecycleNode
fallback_nameThe name of the component if it was not provided through the node options
+
+
+ +

Definition at line 8 of file LifecycleComponent.cpp.

+ +
+
+

Member Function Documentation

+ +

◆ add_output()

+ +
+
+
+template<typename DataT >
+ + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
void modulo_components::LifecycleComponent::add_output (const std::string & signal_name,
const std::shared_ptr< DataT > & data,
const std::string & default_topic = "",
bool fixed_topic = false,
bool publish_on_step = true 
)
+
+inlineprotected
+
+ +

Add an output signal of the component.

+
Template Parameters
+ + +
DataTType of the data pointer
+
+
+
Parameters
+ + + + + + +
signal_nameName of the output signal
dataData to transmit on the output signal
default_topicIf set, the default value for the topic name to use
fixed_topicIf true, the topic name of the output signal is fixed
publish_on_stepIf true, the output is published periodically on step
+
+
+ +

Definition at line 287 of file LifecycleComponent.hpp.

+ +
+
+ +

◆ get_lifecycle_state()

+ +
+
+ + + + + +
+ + + + + + + +
rclcpp_lifecycle::State modulo_components::LifecycleComponent::get_lifecycle_state () const
+
+protected
+
+ +

Get the current lifecycle state of the component.

+ +

Definition at line 333 of file LifecycleComponent.cpp.

+ +
+
+ +

◆ get_parameter()

+ +
+
+ + + + + +
+ + + + + + + + +
std::shared_ptr< state_representation::ParameterInterface > modulo_components::LifecycleComponent::get_parameter (const std::string & name) const
+
+protected
+
+ +

Get a parameter by name.

+
Parameters
+ + +
nameThe name of the parameter
+
+
+
Exceptions
+ + +
modulo_core::exceptions::ParameterExceptionif the parameter could not be found
+
+
+
Returns
The ParameterInterface pointer to a Parameter instance
+ +

Definition at line 20 of file LifecycleComponent.cpp.

+ +
+
+ +

◆ on_activate_callback()

+ +
+
+ + + + + +
+ + + + + + + +
bool modulo_components::LifecycleComponent::on_activate_callback ()
+
+protectedvirtual
+
+ +

Steps to execute when activating the component.

+

This method can be overridden by derived Component classes. Activation generally involves final setup steps before the on_step callback is periodically evaluated.

Returns
True if activation is successful, false otherwise
+ +

Definition at line 131 of file LifecycleComponent.cpp.

+ +
+
+ +

◆ on_cleanup_callback()

+ +
+
+ + + + + +
+ + + + + + + +
bool modulo_components::LifecycleComponent::on_cleanup_callback ()
+
+protectedvirtual
+
+ +

Steps to execute when cleaning up the component.

+

This method can be overridden by derived Component classes. Cleanup generally involves resetting the properties and states to initial conditions.

Returns
True if cleanup is successful, false otherwise
+ +

Definition at line 96 of file LifecycleComponent.cpp.

+ +
+
+ +

◆ on_configure_callback()

+ +
+
+ + + + + +
+ + + + + + + +
bool modulo_components::LifecycleComponent::on_configure_callback ()
+
+protectedvirtual
+
+ +

Steps to execute when configuring the component.

+

This method can be overridden by derived Component classes. Configuration generally involves reading parameters and adding inputs and outputs.

Returns
True if configuration is successful, false otherwise
+ +

Definition at line 70 of file LifecycleComponent.cpp.

+ +
+
+ +

◆ on_deactivate_callback()

+ +
+
+ + + + + +
+ + + + + + + +
bool modulo_components::LifecycleComponent::on_deactivate_callback ()
+
+protectedvirtual
+
+ +

Steps to execute when deactivating the component.

+

This method can be overridden by derived Component classes. Deactivation generally involves any steps to reset the component to an inactive state.

Returns
True if deactivation is successful, false otherwise
+ +

Definition at line 158 of file LifecycleComponent.cpp.

+ +
+
+ +

◆ on_error_callback()

+ +
+
+ + + + + +
+ + + + + + + +
bool modulo_components::LifecycleComponent::on_error_callback ()
+
+protectedvirtual
+
+ +

Steps to execute when handling errors.

+

This method can be overridden by derived Component classes. Error handling generally involves recovering and resetting the component to an unconfigured state.

Returns
True if error handling is successful, false otherwise
+ +

Definition at line 232 of file LifecycleComponent.cpp.

+ +
+
+ +

◆ on_shutdown_callback()

+ +
+
+ + + + + +
+ + + + + + + +
bool modulo_components::LifecycleComponent::on_shutdown_callback ()
+
+protectedvirtual
+
+ +

Steps to execute when shutting down the component.

+

This method can be overridden by derived Component classes. Shutdown generally involves the destruction of any threads or properties not handled by the base class.

Returns
True if shutdown is successful, false otherwise
+ +

Definition at line 206 of file LifecycleComponent.cpp.

+ +
+
+ +

◆ raise_error()

+ +
+
+ + + + + +
+ + + + + + + +
void modulo_components::LifecycleComponent::raise_error ()
+
+overrideprotectedvirtual
+
+ +

Trigger the shutdown and error transitions.

+ +

Reimplemented from modulo_components::ComponentInterface.

+ +

Definition at line 337 of file LifecycleComponent.cpp.

+ +
+
+

Friends And Related Symbol Documentation

+ +

◆ LifecycleComponentPublicInterface

+ +
+
+ + + + + +
+ + + + +
friend class LifecycleComponentPublicInterface
+
+friend
+
+ +

Definition at line 31 of file LifecycleComponent.hpp.

+ +
+
+
The documentation for this class was generated from the following files: +
+ + + + diff --git a/versions/v5.0.1/classmodulo__components_1_1_lifecycle_component.png b/versions/v5.0.1/classmodulo__components_1_1_lifecycle_component.png new file mode 100644 index 00000000..08cfe69b Binary files /dev/null and b/versions/v5.0.1/classmodulo__components_1_1_lifecycle_component.png differ diff --git a/versions/v5.0.1/classmodulo__controllers_1_1_base_controller_interface-members.html b/versions/v5.0.1/classmodulo__controllers_1_1_base_controller_interface-members.html new file mode 100644 index 00000000..c3fcf97f --- /dev/null +++ b/versions/v5.0.1/classmodulo__controllers_1_1_base_controller_interface-members.html @@ -0,0 +1,129 @@ + + + + + + + +Modulo: Member List + + + + + + + + + +
+
+ + + + + + +
+
Modulo 5.0.0 +
+
+
+ + + + + + + + +
+
+ + +
+
+
+
+
+
Loading...
+
Searching...
+
No Matches
+
+
+
+
+ + +
+
+
modulo_controllers::BaseControllerInterface Member List
+
+
+ +

This is the complete list of members for modulo_controllers::BaseControllerInterface, including all inherited members.

+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
add_input(const std::string &name, const std::string &topic_name="")modulo_controllers::BaseControllerInterfaceinlineprotected
add_input(const std::string &name, const std::string &topic_name) (defined in modulo_controllers::BaseControllerInterface)modulo_controllers::BaseControllerInterfaceinlineprotected
add_input(const std::string &name, const std::string &topic_name) (defined in modulo_controllers::BaseControllerInterface)modulo_controllers::BaseControllerInterfaceinlineprotected
add_input(const std::string &name, const std::string &topic_name) (defined in modulo_controllers::BaseControllerInterface)modulo_controllers::BaseControllerInterfaceinlineprotected
add_output(const std::string &name, const std::string &topic_name="")modulo_controllers::BaseControllerInterfaceinlineprotected
add_output(const std::string &name, const std::string &topic_name) (defined in modulo_controllers::BaseControllerInterface)modulo_controllers::BaseControllerInterfaceinlineprotected
add_output(const std::string &name, const std::string &topic_name) (defined in modulo_controllers::BaseControllerInterface)modulo_controllers::BaseControllerInterfaceinlineprotected
add_output(const std::string &name, const std::string &topic_name) (defined in modulo_controllers::BaseControllerInterface)modulo_controllers::BaseControllerInterfaceinlineprotected
add_parameter(const std::shared_ptr< state_representation::ParameterInterface > &parameter, const std::string &description, bool read_only=false)modulo_controllers::BaseControllerInterfaceprotected
add_parameter(const std::string &name, const T &value, const std::string &description, bool read_only=false)modulo_controllers::BaseControllerInterfaceinlineprotected
add_predicate(const std::string &predicate_name, bool predicate_value)modulo_controllers::BaseControllerInterfaceprotected
add_predicate(const std::string &predicate_name, const std::function< bool(void)> &predicate_function)modulo_controllers::BaseControllerInterfaceprotected
add_service(const std::string &service_name, const std::function< ControllerServiceResponse(void)> &callback)modulo_controllers::BaseControllerInterfaceprotected
add_service(const std::string &service_name, const std::function< ControllerServiceResponse(const std::string &string)> &callback)modulo_controllers::BaseControllerInterfaceprotected
add_trigger(const std::string &trigger_name)modulo_controllers::BaseControllerInterfaceprotected
BaseControllerInterface()modulo_controllers::BaseControllerInterface
get_command_mutex()modulo_controllers::BaseControllerInterfaceprotected
get_parameter(const std::string &name) constmodulo_controllers::BaseControllerInterfaceprotected
get_parameter_value(const std::string &name) constmodulo_controllers::BaseControllerInterfaceinlineprotected
get_predicate(const std::string &predicate_name) constmodulo_controllers::BaseControllerInterfaceprotected
get_qos() constmodulo_controllers::BaseControllerInterfaceprotected
is_active() constmodulo_controllers::BaseControllerInterfaceprotected
on_configure(const rclcpp_lifecycle::State &previous_state) overridemodulo_controllers::BaseControllerInterface
on_init() overridemodulo_controllers::BaseControllerInterface
on_validate_parameter_callback(const std::shared_ptr< state_representation::ParameterInterface > &parameter)modulo_controllers::BaseControllerInterfaceprotectedvirtual
read_input(const std::string &name)modulo_controllers::BaseControllerInterfaceinlineprotected
read_input(const std::string &name) (defined in modulo_controllers::BaseControllerInterface)modulo_controllers::BaseControllerInterfaceinlineprotected
read_input(const std::string &name) (defined in modulo_controllers::BaseControllerInterface)modulo_controllers::BaseControllerInterfaceinlineprotected
read_input(const std::string &name) (defined in modulo_controllers::BaseControllerInterface)modulo_controllers::BaseControllerInterfaceinlineprotected
set_input_validity_period(double input_validity_period)modulo_controllers::BaseControllerInterfaceprotected
set_parameter_value(const std::string &name, const T &value)modulo_controllers::BaseControllerInterfaceinlineprotected
set_predicate(const std::string &predicate_name, bool predicate_value)modulo_controllers::BaseControllerInterfaceprotected
set_predicate(const std::string &predicate_name, const std::function< bool(void)> &predicate_function)modulo_controllers::BaseControllerInterfaceprotected
set_qos(const rclcpp::QoS &qos)modulo_controllers::BaseControllerInterfaceprotected
trigger(const std::string &trigger_name)modulo_controllers::BaseControllerInterfaceprotected
write_output(const std::string &name, const T &data)modulo_controllers::BaseControllerInterfaceinlineprotected
write_output(const std::string &name, const bool &data) (defined in modulo_controllers::BaseControllerInterface)modulo_controllers::BaseControllerInterfaceinline
write_output(const std::string &name, const double &data) (defined in modulo_controllers::BaseControllerInterface)modulo_controllers::BaseControllerInterfaceinline
write_output(const std::string &name, const std::vector< double > &data) (defined in modulo_controllers::BaseControllerInterface)modulo_controllers::BaseControllerInterfaceinline
write_output(const std::string &name, const int &data) (defined in modulo_controllers::BaseControllerInterface)modulo_controllers::BaseControllerInterfaceinline
write_output(const std::string &name, const std::string &data) (defined in modulo_controllers::BaseControllerInterface)modulo_controllers::BaseControllerInterfaceinline
+ + + + diff --git a/versions/v5.0.1/classmodulo__controllers_1_1_base_controller_interface.html b/versions/v5.0.1/classmodulo__controllers_1_1_base_controller_interface.html new file mode 100644 index 00000000..ab6a05b9 --- /dev/null +++ b/versions/v5.0.1/classmodulo__controllers_1_1_base_controller_interface.html @@ -0,0 +1,1929 @@ + + + + + + + +Modulo: modulo_controllers::BaseControllerInterface Class Reference + + + + + + + + + +
+
+ + + + + + +
+
Modulo 5.0.0 +
+
+
+ + + + + + + + +
+
+ + +
+
+
+
+
+
Loading...
+
Searching...
+
No Matches
+
+
+
+
+ + +
+
+
+Public Member Functions | +Protected Member Functions | +List of all members
+
modulo_controllers::BaseControllerInterface Class Reference
+
+
+ +

Base controller class to combine ros2_control, control libraries and modulo. + More...

+ +

#include <BaseControllerInterface.hpp>

+
+Inheritance diagram for modulo_controllers::BaseControllerInterface:
+
+
+ + +modulo_controllers::ControllerInterface +modulo_controllers::RobotControllerInterface + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + +

+Public Member Functions

 BaseControllerInterface ()
 Default constructor.
 
CallbackReturn on_init () override
 Declare parameters and register the on_set_parameters callback.
 
CallbackReturn on_configure (const rclcpp_lifecycle::State &previous_state) override
 Add signals.
 
template<>
void write_output (const std::string &name, const bool &data)
 
template<>
void write_output (const std::string &name, const double &data)
 
template<>
void write_output (const std::string &name, const std::vector< double > &data)
 
template<>
void write_output (const std::string &name, const int &data)
 
template<>
void write_output (const std::string &name, const std::string &data)
 
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +

+Protected Member Functions

void add_parameter (const std::shared_ptr< state_representation::ParameterInterface > &parameter, const std::string &description, bool read_only=false)
 Add a parameter.
 
template<typename T >
void add_parameter (const std::string &name, const T &value, const std::string &description, bool read_only=false)
 Add a parameter.
 
virtual bool on_validate_parameter_callback (const std::shared_ptr< state_representation::ParameterInterface > &parameter)
 Parameter validation function to be redefined by derived controller classes.
 
std::shared_ptr< state_representation::ParameterInterface > get_parameter (const std::string &name) const
 Get a parameter by name.
 
template<typename T >
get_parameter_value (const std::string &name) const
 Get a parameter value by name.
 
template<typename T >
void set_parameter_value (const std::string &name, const T &value)
 Set the value of a parameter.
 
void add_predicate (const std::string &predicate_name, bool predicate_value)
 Add a predicate to the map of predicates.
 
void add_predicate (const std::string &predicate_name, const std::function< bool(void)> &predicate_function)
 Add a predicate to the map of predicates based on a function to periodically call.
 
bool get_predicate (const std::string &predicate_name) const
 Get the logical value of a predicate.
 
void set_predicate (const std::string &predicate_name, bool predicate_value)
 Set the value of the predicate given as parameter, if the predicate is not found does not do anything.
 
void set_predicate (const std::string &predicate_name, const std::function< bool(void)> &predicate_function)
 Set the value of the predicate given as parameter, if the predicate is not found does not do anything.
 
void add_trigger (const std::string &trigger_name)
 Add a trigger to the controller.
 
void trigger (const std::string &trigger_name)
 Latch the trigger with the provided name.
 
template<typename T >
void add_input (const std::string &name, const std::string &topic_name="")
 Add an input to the controller.
 
template<typename T >
void add_output (const std::string &name, const std::string &topic_name="")
 Add an output to the controller.
 
void set_input_validity_period (double input_validity_period)
 Set the input validity period of input signals.
 
template<typename T >
std::optional< Tread_input (const std::string &name)
 Read the most recent message of an input.
 
template<typename T >
void write_output (const std::string &name, const T &data)
 Write an object to an output.
 
void add_service (const std::string &service_name, const std::function< ControllerServiceResponse(void)> &callback)
 Add a service to trigger a callback function with no input arguments.
 
void add_service (const std::string &service_name, const std::function< ControllerServiceResponse(const std::string &string)> &callback)
 Add a service to trigger a callback function with a string payload.
 
rclcpp::QoS get_qos () const
 Getter of the Quality of Service attribute.
 
void set_qos (const rclcpp::QoS &qos)
 Set the Quality of Service for ROS publishers and subscribers.
 
bool is_active () const
 Check if the controller is currently in state active or not.
 
std::timed_mutex & get_command_mutex ()
 Get the reference to the command mutex.
 
template<>
void add_input (const std::string &name, const std::string &topic_name)
 
template<>
void add_input (const std::string &name, const std::string &topic_name)
 
template<>
void add_input (const std::string &name, const std::string &topic_name)
 
template<>
void add_output (const std::string &name, const std::string &topic_name)
 
template<>
void add_output (const std::string &name, const std::string &topic_name)
 
template<>
void add_output (const std::string &name, const std::string &topic_name)
 
template<>
std::optional< boolread_input (const std::string &name)
 
template<>
std::optional< doubleread_input (const std::string &name)
 
template<>
std::optional< intread_input (const std::string &name)
 
+

Detailed Description

+

Base controller class to combine ros2_control, control libraries and modulo.

+ +

Definition at line 105 of file BaseControllerInterface.hpp.

+

Constructor & Destructor Documentation

+ +

◆ BaseControllerInterface()

+ +
+
+ + + + + + + +
modulo_controllers::BaseControllerInterface::BaseControllerInterface ()
+
+ +

Default constructor.

+ +

Definition at line 22 of file BaseControllerInterface.cpp.

+ +
+
+

Member Function Documentation

+ +

◆ add_input() [1/4]

+ +
+
+
+template<>
+ + + + + +
+ + + + + + + + + + + + + + + + + + +
void modulo_controllers::BaseControllerInterface::add_input (const std::string & name,
const std::string & topic_name 
)
+
+inlineprotected
+
+ +

Definition at line 562 of file BaseControllerInterface.hpp.

+ +
+
+ +

◆ add_input() [2/4]

+ +
+
+
+template<>
+ + + + + +
+ + + + + + + + + + + + + + + + + + +
void modulo_controllers::BaseControllerInterface::add_input (const std::string & name,
const std::string & topic_name 
)
+
+inlineprotected
+
+ +

Definition at line 569 of file BaseControllerInterface.hpp.

+ +
+
+ +

◆ add_input() [3/4]

+ +
+
+
+template<>
+ + + + + +
+ + + + + + + + + + + + + + + + + + +
void modulo_controllers::BaseControllerInterface::add_input (const std::string & name,
const std::string & topic_name 
)
+
+inlineprotected
+
+ +

Definition at line 584 of file BaseControllerInterface.hpp.

+ +
+
+ +

◆ add_input() [4/4]

+ +
+
+
+template<typename T >
+ + + + + +
+ + + + + + + + + + + + + + + + + + +
void modulo_controllers::BaseControllerInterface::add_input (const std::string & name,
const std::string & topic_name = "" 
)
+
+inlineprotected
+
+ +

Add an input to the controller.

+

Inputs should be added in the on_init function of the derived controllers. Doing this will create a ROS 2 subscription for the message type.

Template Parameters
+ + +
TThe type of the input data
+
+
+
Parameters
+ + + +
nameThe name of the input
topic_nameThe topic name of the input (defaults to ~/name)
+
+
+ +

Definition at line 528 of file BaseControllerInterface.hpp.

+ +
+
+ +

◆ add_output() [1/4]

+ +
+
+
+template<>
+ + + + + +
+ + + + + + + + + + + + + + + + + + +
void modulo_controllers::BaseControllerInterface::add_output (const std::string & name,
const std::string & topic_name 
)
+
+inlineprotected
+
+ +

Definition at line 627 of file BaseControllerInterface.hpp.

+ +
+
+ +

◆ add_output() [2/4]

+ +
+
+
+template<>
+ + + + + +
+ + + + + + + + + + + + + + + + + + +
void modulo_controllers::BaseControllerInterface::add_output (const std::string & name,
const std::string & topic_name 
)
+
+inlineprotected
+
+ +

Definition at line 632 of file BaseControllerInterface.hpp.

+ +
+
+ +

◆ add_output() [3/4]

+ +
+
+
+template<>
+ + + + + +
+ + + + + + + + + + + + + + + + + + +
void modulo_controllers::BaseControllerInterface::add_output (const std::string & name,
const std::string & topic_name 
)
+
+inlineprotected
+
+ +

Definition at line 643 of file BaseControllerInterface.hpp.

+ +
+
+ +

◆ add_output() [4/4]

+ +
+
+
+template<typename T >
+ + + + + +
+ + + + + + + + + + + + + + + + + + +
void modulo_controllers::BaseControllerInterface::add_output (const std::string & name,
const std::string & topic_name = "" 
)
+
+inlineprotected
+
+ +

Add an output to the controller.

+

Outputs should be added in the on_init function of the derived controllers. Doing this will create a ROS 2 publisher for the message type and wrap it in a RealtimePublisher.

Template Parameters
+ + +
TThe type of the output data
+
+
+
Parameters
+ + + +
nameThe name of the output
topic_nameThe topic name of the output (defaults to ~/name)
+
+
+ +

Definition at line 607 of file BaseControllerInterface.hpp.

+ +
+
+ +

◆ add_parameter() [1/2]

+ +
+
+ + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + +
void modulo_controllers::BaseControllerInterface::add_parameter (const std::shared_ptr< state_representation::ParameterInterface > & parameter,
const std::string & description,
bool read_only = false 
)
+
+protected
+
+ +

Add a parameter.

+

This method stores a pointer reference to an existing Parameter object in the local parameter map and declares the equivalent ROS parameter on the ROS interface.

Parameters
+ + + + +
parameterA ParameterInterface pointer to a Parameter instance
descriptionThe description of the parameter
read_onlyIf true, the value of the parameter cannot be changed after declaration
+
+
+ +
+
+ +

◆ add_parameter() [2/2]

+ +
+
+
+template<typename T >
+ + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
void modulo_controllers::BaseControllerInterface::add_parameter (const std::string & name,
const Tvalue,
const std::string & description,
bool read_only = false 
)
+
+inlineprotected
+
+ +

Add a parameter.

+

This method creates a new Parameter object instance to reference in the local parameter map and declares the equivalent ROS parameter on the ROS interface.

Template Parameters
+ + +
TThe type of the parameter
+
+
+
Parameters
+ + + + + +
nameThe name of the parameter
valueThe value of the parameter
descriptionThe description of the parameter
read_onlyIf true, the value of the parameter cannot be changed after declaration
+
+
+ +

Definition at line 488 of file BaseControllerInterface.hpp.

+ +
+
+ +

◆ add_predicate() [1/2]

+ +
+
+ + + + + +
+ + + + + + + + + + + + + + + + + + +
void modulo_controllers::BaseControllerInterface::add_predicate (const std::string & predicate_name,
bool predicate_value 
)
+
+protected
+
+ +

Add a predicate to the map of predicates.

+
Parameters
+ + + +
predicate_namethe name of the associated predicate
predicate_valuethe boolean value of the predicate
+
+
+ +

Definition at line 168 of file BaseControllerInterface.cpp.

+ +
+
+ +

◆ add_predicate() [2/2]

+ +
+
+ + + + + +
+ + + + + + + + + + + + + + + + + + +
void modulo_controllers::BaseControllerInterface::add_predicate (const std::string & predicate_name,
const std::function< bool(void)> & predicate_function 
)
+
+protected
+
+ +

Add a predicate to the map of predicates based on a function to periodically call.

+
Parameters
+ + + +
predicate_namethe name of the associated predicate
predicate_functionthe function to call that returns the value of the predicate
+
+
+ +

Definition at line 172 of file BaseControllerInterface.cpp.

+ +
+
+ +

◆ add_service() [1/2]

+ +
+
+ + + + + +
+ + + + + + + + + + + + + + + + + + +
void modulo_controllers::BaseControllerInterface::add_service (const std::string & service_name,
const std::function< ControllerServiceResponse(const std::string &string)> & callback 
)
+
+protected
+
+ +

Add a service to trigger a callback function with a string payload.

+

The string payload can have an arbitrary format to parameterize and control the callback behaviour as desired. It is the responsibility of the service callback to parse the string according to some payload format. When adding a service with a string payload, be sure to document the payload format appropriately.

Parameters
+ + + +
service_nameThe name of the service
callbackA service callback function with a string argument that returns a ControllerServiceResponse
+
+
+ +

Definition at line 508 of file BaseControllerInterface.cpp.

+ +
+
+ +

◆ add_service() [2/2]

+ +
+
+ + + + + +
+ + + + + + + + + + + + + + + + + + +
void modulo_controllers::BaseControllerInterface::add_service (const std::string & service_name,
const std::function< ControllerServiceResponse(void)> & callback 
)
+
+protected
+
+ +

Add a service to trigger a callback function with no input arguments.

+
Parameters
+ + + +
service_nameThe name of the service
callbackA service callback function with no arguments that returns a ControllerServiceResponse
+
+
+ +

Definition at line 475 of file BaseControllerInterface.cpp.

+ +
+
+ +

◆ add_trigger()

+ +
+
+ + + + + +
+ + + + + + + + +
void modulo_controllers::BaseControllerInterface::add_trigger (const std::string & trigger_name)
+
+protected
+
+ +

Add a trigger to the controller.

+

Triggers are predicates that are always false except when it's triggered in which case it is set back to false immediately after it is read.

Parameters
+ + +
trigger_nameThe name of the trigger
+
+
+ +

Definition at line 230 of file BaseControllerInterface.cpp.

+ +
+
+ +

◆ get_command_mutex()

+ +
+
+ + + + + +
+ + + + + + + +
std::timed_mutex & modulo_controllers::BaseControllerInterface::get_command_mutex ()
+
+protected
+
+ +

Get the reference to the command mutex.

+
Returns
The reference to the command mutex
+ +

Definition at line 554 of file BaseControllerInterface.cpp.

+ +
+
+ +

◆ get_parameter()

+ +
+
+ + + + + +
+ + + + + + + + +
std::shared_ptr< ParameterInterface > modulo_controllers::BaseControllerInterface::get_parameter (const std::string & name) const
+
+protected
+
+ +

Get a parameter by name.

+
Parameters
+ + +
nameThe name of the parameter
+
+
+
Returns
The ParameterInterface pointer to a Parameter instance
+ +

Definition at line 102 of file BaseControllerInterface.cpp.

+ +
+
+ +

◆ get_parameter_value()

+ +
+
+
+template<typename T >
+ + + + + +
+ + + + + + + + +
T modulo_controllers::BaseControllerInterface::get_parameter_value (const std::string & name) const
+
+inlineprotected
+
+ +

Get a parameter value by name.

+
Template Parameters
+ + +
TThe type of the parameter
+
+
+
Parameters
+ + +
nameThe name of the parameter
+
+
+
Returns
The value of the parameter
+ +

Definition at line 498 of file BaseControllerInterface.hpp.

+ +
+
+ +

◆ get_predicate()

+ +
+
+ + + + + +
+ + + + + + + + +
bool modulo_controllers::BaseControllerInterface::get_predicate (const std::string & predicate_name) const
+
+protected
+
+ +

Get the logical value of a predicate.

+

If the predicate is not found or the callable function fails, the return value is false.

Parameters
+ + +
predicate_namethe name of the predicate to retrieve from the map of predicates
+
+
+
Returns
the value of the predicate as a boolean
+ +

Definition at line 193 of file BaseControllerInterface.cpp.

+ +
+
+ +

◆ get_qos()

+ +
+
+ + + + + +
+ + + + + + + +
rclcpp::QoS modulo_controllers::BaseControllerInterface::get_qos () const
+
+protected
+
+ +

Getter of the Quality of Service attribute.

+
Returns
The Quality of Service attribute
+ +

Definition at line 542 of file BaseControllerInterface.cpp.

+ +
+
+ +

◆ is_active()

+ +
+
+ + + + + +
+ + + + + + + +
bool modulo_controllers::BaseControllerInterface::is_active () const
+
+protected
+
+ +

Check if the controller is currently in state active or not.

+
Returns
True if the controller is active, false otherwise
+ +

Definition at line 550 of file BaseControllerInterface.cpp.

+ +
+
+ +

◆ on_configure()

+ +
+
+ + + + + +
+ + + + + + + + +
rclcpp_lifecycle::node_interfaces::LifecycleNodeInterface::CallbackReturn modulo_controllers::BaseControllerInterface::on_configure (const rclcpp_lifecycle::State & previous_state)
+
+override
+
+ +

Add signals.

+
Parameters
+ + +
previous_stateThe previous lifecycle state
+
+
+
Returns
SUCCESS or ERROR
+ +

Definition at line 39 of file BaseControllerInterface.cpp.

+ +
+
+ +

◆ on_init()

+ +
+
+ + + + + +
+ + + + + + + +
rclcpp_lifecycle::node_interfaces::LifecycleNodeInterface::CallbackReturn modulo_controllers::BaseControllerInterface::on_init ()
+
+override
+
+ +

Declare parameters and register the on_set_parameters callback.

+
Returns
CallbackReturn status
+ +

Definition at line 25 of file BaseControllerInterface.cpp.

+ +
+
+ +

◆ on_validate_parameter_callback()

+ +
+
+ + + + + +
+ + + + + + + + +
bool modulo_controllers::BaseControllerInterface::on_validate_parameter_callback (const std::shared_ptr< state_representation::ParameterInterface > & parameter)
+
+protectedvirtual
+
+ +

Parameter validation function to be redefined by derived controller classes.

+

This method is automatically invoked whenever the ROS interface tried to modify a parameter. Validation and sanitization can be performed by reading or writing the value of the parameter through the ParameterInterface pointer, depending on the parameter name and desired controller behaviour. If the validation returns true, the updated parameter value (including any modifications) is applied. If the validation returns false, any changes to the parameter are discarded and the parameter value is not changed.

Parameters
+ + +
parameterA ParameterInterface pointer to a Parameter instance
+
+
+
Returns
The validation result
+ +

Reimplemented in modulo_controllers::RobotControllerInterface.

+ +

Definition at line 164 of file BaseControllerInterface.cpp.

+ +
+
+ +

◆ read_input() [1/4]

+ +
+
+
+template<typename T >
+ + + + + +
+ + + + + + + + +
std::optional< T > modulo_controllers::BaseControllerInterface::read_input (const std::string & name)
+
+inlineprotected
+
+ +

Read the most recent message of an input.

+
Template Parameters
+ + +
TThe expected type of the input data
+
+
+
Parameters
+ + +
nameThe name of the input
+
+
+
Returns
The data on the desired input channel if the input exists and is not older than parameter 'input_validity_period'
+ +

Definition at line 653 of file BaseControllerInterface.hpp.

+ +
+
+ +

◆ read_input() [2/4]

+ +
+
+
+template<>
+ + + + + +
+ + + + + + + + +
std::optional< int > modulo_controllers::BaseControllerInterface::read_input (const std::string & name)
+
+inlineprotected
+
+ +

Definition at line 653 of file BaseControllerInterface.hpp.

+ +
+
+ +

◆ read_input() [3/4]

+ +
+
+
+template<>
+ + + + + +
+ + + + + + + + +
std::optional< double > modulo_controllers::BaseControllerInterface::read_input (const std::string & name)
+
+inlineprotected
+
+ +

Definition at line 653 of file BaseControllerInterface.hpp.

+ +
+
+ +

◆ read_input() [4/4]

+ +
+
+
+template<>
+ + + + + +
+ + + + + + + + +
std::optional< bool > modulo_controllers::BaseControllerInterface::read_input (const std::string & name)
+
+inlineprotected
+
+ +

Definition at line 653 of file BaseControllerInterface.hpp.

+ +
+
+ +

◆ set_input_validity_period()

+ +
+
+ + + + + +
+ + + + + + + + +
void modulo_controllers::BaseControllerInterface::set_input_validity_period (double input_validity_period)
+
+protected
+
+ +

Set the input validity period of input signals.

+
Parameters
+ + +
input_validity_periodThe desired input validity period
+
+
+ +

Definition at line 421 of file BaseControllerInterface.cpp.

+ +
+
+ +

◆ set_parameter_value()

+ +
+
+
+template<typename T >
+ + + + + +
+ + + + + + + + + + + + + + + + + + +
void modulo_controllers::BaseControllerInterface::set_parameter_value (const std::string & name,
const Tvalue 
)
+
+inlineprotected
+
+ +

Set the value of a parameter.

+

The parameter must have been previously declared. This method preserves the reference to the original Parameter instance

Template Parameters
+ + +
TThe type of the parameter
+
+
+
Parameters
+ + +
nameThe name of the parameter
+
+
+
Returns
The value of the parameter
+ +

Definition at line 508 of file BaseControllerInterface.hpp.

+ +
+
+ +

◆ set_predicate() [1/2]

+ +
+
+ + + + + +
+ + + + + + + + + + + + + + + + + + +
void modulo_controllers::BaseControllerInterface::set_predicate (const std::string & predicate_name,
bool predicate_value 
)
+
+protected
+
+ +

Set the value of the predicate given as parameter, if the predicate is not found does not do anything.

+

Even though the predicates are published periodically, the new value of this predicate will be published once immediately after setting it.

Parameters
+ + + +
predicate_namethe name of the predicate to retrieve from the map of predicates
predicate_valuethe new value of the predicate
+
+
+ +

Definition at line 211 of file BaseControllerInterface.cpp.

+ +
+
+ +

◆ set_predicate() [2/2]

+ +
+
+ + + + + +
+ + + + + + + + + + + + + + + + + + +
void modulo_controllers::BaseControllerInterface::set_predicate (const std::string & predicate_name,
const std::function< bool(void)> & predicate_function 
)
+
+protected
+
+ +

Set the value of the predicate given as parameter, if the predicate is not found does not do anything.

+

Even though the predicates are published periodically, the new value of this predicate will be published once immediately after setting it.

Parameters
+ + + +
predicate_namethe name of the predicate to retrieve from the map of predicates
predicate_functionthe function to call that returns the value of the predicate
+
+
+ +

Definition at line 215 of file BaseControllerInterface.cpp.

+ +
+
+ +

◆ set_qos()

+ +
+
+ + + + + +
+ + + + + + + + +
void modulo_controllers::BaseControllerInterface::set_qos (const rclcpp::QoS & qos)
+
+protected
+
+ +

Set the Quality of Service for ROS publishers and subscribers.

+
Parameters
+ + +
qosThe desired Quality of Service
+
+
+ +

Definition at line 546 of file BaseControllerInterface.cpp.

+ +
+
+ +

◆ trigger()

+ +
+
+ + + + + +
+ + + + + + + + +
void modulo_controllers::BaseControllerInterface::trigger (const std::string & trigger_name)
+
+protected
+
+ +

Latch the trigger with the provided name.

+
Parameters
+ + +
trigger_nameThe name of the trigger
+
+
+ +

Definition at line 251 of file BaseControllerInterface.cpp.

+ +
+
+ +

◆ write_output() [1/6]

+ +
+
+
+template<>
+ + + + + +
+ + + + + + + + + + + + + + + + + + +
void modulo_controllers::BaseControllerInterface::write_output (const std::string & name,
const booldata 
)
+
+inline
+
+ +

Definition at line 846 of file BaseControllerInterface.hpp.

+ +
+
+ +

◆ write_output() [2/6]

+ +
+
+
+template<>
+ + + + + +
+ + + + + + + + + + + + + + + + + + +
void modulo_controllers::BaseControllerInterface::write_output (const std::string & name,
const doubledata 
)
+
+inline
+
+ +

Definition at line 851 of file BaseControllerInterface.hpp.

+ +
+
+ +

◆ write_output() [3/6]

+ +
+
+
+template<>
+ + + + + +
+ + + + + + + + + + + + + + + + + + +
void modulo_controllers::BaseControllerInterface::write_output (const std::string & name,
const intdata 
)
+
+inline
+
+ +

Definition at line 861 of file BaseControllerInterface.hpp.

+ +
+
+ +

◆ write_output() [4/6]

+ +
+
+
+template<>
+ + + + + +
+ + + + + + + + + + + + + + + + + + +
void modulo_controllers::BaseControllerInterface::write_output (const std::string & name,
const std::string & data 
)
+
+inline
+
+ +

Definition at line 866 of file BaseControllerInterface.hpp.

+ +
+
+ +

◆ write_output() [5/6]

+ +
+
+
+template<>
+ + + + + +
+ + + + + + + + + + + + + + + + + + +
void modulo_controllers::BaseControllerInterface::write_output (const std::string & name,
const std::vector< double > & data 
)
+
+inline
+
+ +

Definition at line 856 of file BaseControllerInterface.hpp.

+ +
+
+ +

◆ write_output() [6/6]

+ +
+
+
+template<typename T >
+ + + + + +
+ + + + + + + + + + + + + + + + + + +
void modulo_controllers::BaseControllerInterface::write_output (const std::string & name,
const Tdata 
)
+
+inlineprotected
+
+ +

Write an object to an output.

+

This uses the realtime publisher from add_output() to simplify publishing data in the realtime context of the control loop.

Template Parameters
+ + +
TThe type of the the object to publish
+
+
+
Parameters
+ + + +
nameThe name of the output
stateThe object to publish
+
+
+ +

Definition at line 753 of file BaseControllerInterface.hpp.

+ +
+
+
The documentation for this class was generated from the following files: +
+ + + + diff --git a/versions/v5.0.1/classmodulo__controllers_1_1_base_controller_interface.png b/versions/v5.0.1/classmodulo__controllers_1_1_base_controller_interface.png new file mode 100644 index 00000000..29d1b761 Binary files /dev/null and b/versions/v5.0.1/classmodulo__controllers_1_1_base_controller_interface.png differ diff --git a/versions/v5.0.1/classmodulo__controllers_1_1_controller_interface-members.html b/versions/v5.0.1/classmodulo__controllers_1_1_controller_interface-members.html new file mode 100644 index 00000000..b73902d3 --- /dev/null +++ b/versions/v5.0.1/classmodulo__controllers_1_1_controller_interface-members.html @@ -0,0 +1,149 @@ + + + + + + + +Modulo: Member List + + + + + + + + + +
+
+ + + + + + +
+
Modulo 5.0.0 +
+
+
+ + + + + + + + +
+
+ + +
+
+
+
+
+
Loading...
+
Searching...
+
No Matches
+
+
+
+
+ + +
+
+
modulo_controllers::ControllerInterface Member List
+
+
+ +

This is the complete list of members for modulo_controllers::ControllerInterface, including all inherited members.

+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
add_command_interface(const std::string &name, const std::string &interface)modulo_controllers::ControllerInterfaceprotected
add_input(const std::string &name, const std::string &topic_name="")modulo_controllers::BaseControllerInterfaceinlineprotected
add_input(const std::string &name, const std::string &topic_name) (defined in modulo_controllers::BaseControllerInterface)modulo_controllers::BaseControllerInterfaceinlineprotected
add_input(const std::string &name, const std::string &topic_name) (defined in modulo_controllers::BaseControllerInterface)modulo_controllers::BaseControllerInterfaceinlineprotected
add_input(const std::string &name, const std::string &topic_name) (defined in modulo_controllers::BaseControllerInterface)modulo_controllers::BaseControllerInterfaceinlineprotected
add_interfaces()modulo_controllers::ControllerInterfaceprotectedvirtual
add_output(const std::string &name, const std::string &topic_name="")modulo_controllers::BaseControllerInterfaceinlineprotected
add_output(const std::string &name, const std::string &topic_name) (defined in modulo_controllers::BaseControllerInterface)modulo_controllers::BaseControllerInterfaceinlineprotected
add_output(const std::string &name, const std::string &topic_name) (defined in modulo_controllers::BaseControllerInterface)modulo_controllers::BaseControllerInterfaceinlineprotected
add_output(const std::string &name, const std::string &topic_name) (defined in modulo_controllers::BaseControllerInterface)modulo_controllers::BaseControllerInterfaceinlineprotected
add_parameter(const std::shared_ptr< state_representation::ParameterInterface > &parameter, const std::string &description, bool read_only=false)modulo_controllers::BaseControllerInterfaceprotected
add_parameter(const std::string &name, const T &value, const std::string &description, bool read_only=false)modulo_controllers::BaseControllerInterfaceinlineprotected
add_predicate(const std::string &predicate_name, bool predicate_value)modulo_controllers::BaseControllerInterfaceprotected
add_predicate(const std::string &predicate_name, const std::function< bool(void)> &predicate_function)modulo_controllers::BaseControllerInterfaceprotected
add_service(const std::string &service_name, const std::function< ControllerServiceResponse(void)> &callback)modulo_controllers::BaseControllerInterfaceprotected
add_service(const std::string &service_name, const std::function< ControllerServiceResponse(const std::string &string)> &callback)modulo_controllers::BaseControllerInterfaceprotected
add_state_interface(const std::string &name, const std::string &interface)modulo_controllers::ControllerInterfaceprotected
add_trigger(const std::string &trigger_name)modulo_controllers::BaseControllerInterfaceprotected
BaseControllerInterface()modulo_controllers::BaseControllerInterface
command_interface_configuration() const finalmodulo_controllers::ControllerInterface
ControllerInterface(bool claim_all_state_interfaces=false)modulo_controllers::ControllerInterface
evaluate(const rclcpp::Time &time, const std::chrono::nanoseconds &period)=0modulo_controllers::ControllerInterfaceprotectedpure virtual
get_command_interface(const std::string &name, const std::string &interface) constmodulo_controllers::ControllerInterfaceprotected
get_command_mutex()modulo_controllers::BaseControllerInterfaceprotected
get_parameter(const std::string &name) constmodulo_controllers::BaseControllerInterfaceprotected
get_parameter_value(const std::string &name) constmodulo_controllers::BaseControllerInterfaceinlineprotected
get_predicate(const std::string &predicate_name) constmodulo_controllers::BaseControllerInterfaceprotected
get_qos() constmodulo_controllers::BaseControllerInterfaceprotected
get_state_interface(const std::string &name, const std::string &interface) constmodulo_controllers::ControllerInterfaceprotected
get_state_interfaces(const std::string &name) constmodulo_controllers::ControllerInterfaceprotected
hardware_name_modulo_controllers::ControllerInterfaceprotected
is_active() constmodulo_controllers::BaseControllerInterfaceprotected
on_activate(const rclcpp_lifecycle::State &previous_state) finalmodulo_controllers::ControllerInterface
on_activate()modulo_controllers::ControllerInterfaceprotectedvirtual
on_configure(const rclcpp_lifecycle::State &previous_state) finalmodulo_controllers::ControllerInterface
on_configure()modulo_controllers::ControllerInterfaceprotectedvirtual
on_deactivate(const rclcpp_lifecycle::State &previous_state) finalmodulo_controllers::ControllerInterface
on_deactivate()modulo_controllers::ControllerInterfaceprotectedvirtual
on_init() overridemodulo_controllers::ControllerInterface
on_validate_parameter_callback(const std::shared_ptr< state_representation::ParameterInterface > &parameter)modulo_controllers::BaseControllerInterfaceprotectedvirtual
read_input(const std::string &name)modulo_controllers::BaseControllerInterfaceinlineprotected
read_input(const std::string &name) (defined in modulo_controllers::BaseControllerInterface)modulo_controllers::BaseControllerInterfaceinlineprotected
read_input(const std::string &name) (defined in modulo_controllers::BaseControllerInterface)modulo_controllers::BaseControllerInterfaceinlineprotected
read_input(const std::string &name) (defined in modulo_controllers::BaseControllerInterface)modulo_controllers::BaseControllerInterfaceinlineprotected
read_state_interfaces()modulo_controllers::ControllerInterfaceprotectedvirtual
set_command_interface(const std::string &name, const std::string &interface, double value)modulo_controllers::ControllerInterfaceprotected
set_input_validity_period(double input_validity_period)modulo_controllers::BaseControllerInterfaceprotected
set_parameter_value(const std::string &name, const T &value)modulo_controllers::BaseControllerInterfaceinlineprotected
set_predicate(const std::string &predicate_name, bool predicate_value)modulo_controllers::BaseControllerInterfaceprotected
set_predicate(const std::string &predicate_name, const std::function< bool(void)> &predicate_function)modulo_controllers::BaseControllerInterfaceprotected
set_qos(const rclcpp::QoS &qos)modulo_controllers::BaseControllerInterfaceprotected
state_interface_configuration() const finalmodulo_controllers::ControllerInterface
trigger(const std::string &trigger_name)modulo_controllers::BaseControllerInterfaceprotected
update(const rclcpp::Time &time, const rclcpp::Duration &period) finalmodulo_controllers::ControllerInterface
write_command_interfaces(const rclcpp::Duration &period)modulo_controllers::ControllerInterfaceprotectedvirtual
write_output(const std::string &name, const T &data)modulo_controllers::BaseControllerInterfaceinlineprotected
write_output(const std::string &name, const bool &data) (defined in modulo_controllers::BaseControllerInterface)modulo_controllers::BaseControllerInterfaceinline
write_output(const std::string &name, const double &data) (defined in modulo_controllers::BaseControllerInterface)modulo_controllers::BaseControllerInterfaceinline
write_output(const std::string &name, const std::vector< double > &data) (defined in modulo_controllers::BaseControllerInterface)modulo_controllers::BaseControllerInterfaceinline
write_output(const std::string &name, const int &data) (defined in modulo_controllers::BaseControllerInterface)modulo_controllers::BaseControllerInterfaceinline
write_output(const std::string &name, const std::string &data) (defined in modulo_controllers::BaseControllerInterface)modulo_controllers::BaseControllerInterfaceinline
+ + + + diff --git a/versions/v5.0.1/classmodulo__controllers_1_1_controller_interface.html b/versions/v5.0.1/classmodulo__controllers_1_1_controller_interface.html new file mode 100644 index 00000000..277fdbba --- /dev/null +++ b/versions/v5.0.1/classmodulo__controllers_1_1_controller_interface.html @@ -0,0 +1,1159 @@ + + + + + + + +Modulo: modulo_controllers::ControllerInterface Class Reference + + + + + + + + + +
+
+ + + + + + +
+
Modulo 5.0.0 +
+
+
+ + + + + + + + +
+
+ + +
+
+
+
+
+
Loading...
+
Searching...
+
No Matches
+
+
+
+
+ + +
+
+
+Public Member Functions | +Protected Member Functions | +Protected Attributes | +List of all members
+
modulo_controllers::ControllerInterface Class Referenceabstract
+
+
+
+Inheritance diagram for modulo_controllers::ControllerInterface:
+
+
+ + +modulo_controllers::BaseControllerInterface +modulo_controllers::RobotControllerInterface + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +

+Public Member Functions

 ControllerInterface (bool claim_all_state_interfaces=false)
 Default constructor.
 
CallbackReturn on_init () override
 Declare parameters.
 
CallbackReturn on_configure (const rclcpp_lifecycle::State &previous_state) final
 Set class properties from parameters.
 
CallbackReturn on_activate (const rclcpp_lifecycle::State &previous_state) final
 Initialize internal data attributes from configured interfaces and wait for valid states from hardware.
 
CallbackReturn on_deactivate (const rclcpp_lifecycle::State &previous_state) final
 Deactivate the controller.
 
controller_interface::return_type update (const rclcpp::Time &time, const rclcpp::Duration &period) final
 Read the state interfaces, perform control evaluation and write the command interfaces.
 
controller_interface::InterfaceConfiguration state_interface_configuration () const final
 Configure the state interfaces.
 
controller_interface::InterfaceConfiguration command_interface_configuration () const final
 Configure the command interfaces.
 
- Public Member Functions inherited from modulo_controllers::BaseControllerInterface
 BaseControllerInterface ()
 Default constructor.
 
CallbackReturn on_init () override
 Declare parameters and register the on_set_parameters callback.
 
CallbackReturn on_configure (const rclcpp_lifecycle::State &previous_state) override
 Add signals.
 
template<>
void write_output (const std::string &name, const bool &data)
 
template<>
void write_output (const std::string &name, const double &data)
 
template<>
void write_output (const std::string &name, const std::vector< double > &data)
 
template<>
void write_output (const std::string &name, const int &data)
 
template<>
void write_output (const std::string &name, const std::string &data)
 
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +

+Protected Member Functions

virtual CallbackReturn add_interfaces ()
 Add interfaces like parameters, signals, services, and predicates to the controller.
 
virtual CallbackReturn on_configure ()
 Configure the controller.
 
virtual CallbackReturn on_activate ()
 Activate the controller.
 
virtual CallbackReturn on_deactivate ()
 Deactivate the controller.
 
virtual controller_interface::return_type read_state_interfaces ()
 Read the state interfaces.
 
virtual controller_interface::return_type write_command_interfaces (const rclcpp::Duration &period)
 Write the command interfaces.
 
virtual controller_interface::return_type evaluate (const rclcpp::Time &time, const std::chrono::nanoseconds &period)=0
 The control logic callback.
 
void add_state_interface (const std::string &name, const std::string &interface)
 Add a state interface to the controller by name.
 
void add_command_interface (const std::string &name, const std::string &interface)
 Add a command interface to the controller by name.
 
std::unordered_map< std::string, doubleget_state_interfaces (const std::string &name) const
 Get a map containing the state interfaces by name of the parent tag.
 
double get_state_interface (const std::string &name, const std::string &interface) const
 Get the value of a state interface by name.
 
double get_command_interface (const std::string &name, const std::string &interface) const
 Get the value of a command interface by name.
 
void set_command_interface (const std::string &name, const std::string &interface, double value)
 Set the value of a command interface by name.
 
- Protected Member Functions inherited from modulo_controllers::BaseControllerInterface
void add_parameter (const std::shared_ptr< state_representation::ParameterInterface > &parameter, const std::string &description, bool read_only=false)
 Add a parameter.
 
template<typename T >
void add_parameter (const std::string &name, const T &value, const std::string &description, bool read_only=false)
 Add a parameter.
 
virtual bool on_validate_parameter_callback (const std::shared_ptr< state_representation::ParameterInterface > &parameter)
 Parameter validation function to be redefined by derived controller classes.
 
std::shared_ptr< state_representation::ParameterInterface > get_parameter (const std::string &name) const
 Get a parameter by name.
 
template<typename T >
get_parameter_value (const std::string &name) const
 Get a parameter value by name.
 
template<typename T >
void set_parameter_value (const std::string &name, const T &value)
 Set the value of a parameter.
 
void add_predicate (const std::string &predicate_name, bool predicate_value)
 Add a predicate to the map of predicates.
 
void add_predicate (const std::string &predicate_name, const std::function< bool(void)> &predicate_function)
 Add a predicate to the map of predicates based on a function to periodically call.
 
bool get_predicate (const std::string &predicate_name) const
 Get the logical value of a predicate.
 
void set_predicate (const std::string &predicate_name, bool predicate_value)
 Set the value of the predicate given as parameter, if the predicate is not found does not do anything.
 
void set_predicate (const std::string &predicate_name, const std::function< bool(void)> &predicate_function)
 Set the value of the predicate given as parameter, if the predicate is not found does not do anything.
 
void add_trigger (const std::string &trigger_name)
 Add a trigger to the controller.
 
void trigger (const std::string &trigger_name)
 Latch the trigger with the provided name.
 
template<typename T >
void add_input (const std::string &name, const std::string &topic_name="")
 Add an input to the controller.
 
template<typename T >
void add_output (const std::string &name, const std::string &topic_name="")
 Add an output to the controller.
 
void set_input_validity_period (double input_validity_period)
 Set the input validity period of input signals.
 
template<typename T >
std::optional< Tread_input (const std::string &name)
 Read the most recent message of an input.
 
template<typename T >
void write_output (const std::string &name, const T &data)
 Write an object to an output.
 
void add_service (const std::string &service_name, const std::function< ControllerServiceResponse(void)> &callback)
 Add a service to trigger a callback function with no input arguments.
 
void add_service (const std::string &service_name, const std::function< ControllerServiceResponse(const std::string &string)> &callback)
 Add a service to trigger a callback function with a string payload.
 
rclcpp::QoS get_qos () const
 Getter of the Quality of Service attribute.
 
void set_qos (const rclcpp::QoS &qos)
 Set the Quality of Service for ROS publishers and subscribers.
 
bool is_active () const
 Check if the controller is currently in state active or not.
 
std::timed_mutex & get_command_mutex ()
 Get the reference to the command mutex.
 
template<>
void add_input (const std::string &name, const std::string &topic_name)
 
template<>
void add_input (const std::string &name, const std::string &topic_name)
 
template<>
void add_input (const std::string &name, const std::string &topic_name)
 
template<>
void add_output (const std::string &name, const std::string &topic_name)
 
template<>
void add_output (const std::string &name, const std::string &topic_name)
 
template<>
void add_output (const std::string &name, const std::string &topic_name)
 
template<>
std::optional< boolread_input (const std::string &name)
 
template<>
std::optional< doubleread_input (const std::string &name)
 
template<>
std::optional< intread_input (const std::string &name)
 
+ + + + +

+Protected Attributes

std::string hardware_name_
 The hardware name provided by a parameter.
 
+

Detailed Description

+
+

Definition at line 10 of file ControllerInterface.hpp.

+

Constructor & Destructor Documentation

+ +

◆ ControllerInterface()

+ +
+
+ + + + + + + + +
modulo_controllers::ControllerInterface::ControllerInterface (bool claim_all_state_interfaces = false)
+
+ +

Default constructor.

+
Parameters
+ + +
claim_all_state_interfacesFlag to indicate if all state interfaces should be claimed
+
+
+ +

Definition at line 9 of file ControllerInterface.cpp.

+ +
+
+

Member Function Documentation

+ +

◆ add_command_interface()

+ +
+
+ + + + + +
+ + + + + + + + + + + + + + + + + + +
void modulo_controllers::ControllerInterface::add_command_interface (const std::string & name,
const std::string & interface 
)
+
+protected
+
+ +

Add a command interface to the controller by name.

+
Parameters
+ + + +
nameThe name of the parent tag, e.g. the name of the joint, sensor or gpio
interfaceThe desired command interface
+
+
+ +

Definition at line 85 of file ControllerInterface.cpp.

+ +
+
+ +

◆ add_interfaces()

+ +
+
+ + + + + +
+ + + + + + + +
rclcpp_lifecycle::node_interfaces::LifecycleNodeInterface::CallbackReturn modulo_controllers::ControllerInterface::add_interfaces ()
+
+protectedvirtual
+
+ +

Add interfaces like parameters, signals, services, and predicates to the controller.

+

This function is called during the on_init callback of the base class to perform post-construction steps.

Returns
SUCCESS or ERROR
+ +

Reimplemented in modulo_controllers::RobotControllerInterface.

+ +

Definition at line 40 of file ControllerInterface.cpp.

+ +
+
+ +

◆ add_state_interface()

+ +
+
+ + + + + +
+ + + + + + + + + + + + + + + + + + +
void modulo_controllers::ControllerInterface::add_state_interface (const std::string & name,
const std::string & interface 
)
+
+protected
+
+ +

Add a state interface to the controller by name.

+
Parameters
+ + + +
nameThe name of the parent tag, e.g. the name of the joint, sensor or gpio
interfaceThe desired state interface
+
+
+ +

Definition at line 81 of file ControllerInterface.cpp.

+ +
+
+ +

◆ command_interface_configuration()

+ +
+
+ + + + + +
+ + + + + + + +
controller_interface::InterfaceConfiguration modulo_controllers::ControllerInterface::command_interface_configuration () const
+
+final
+
+ +

Configure the command interfaces.

+
Returns
The command interface configuration
+ +

Definition at line 107 of file ControllerInterface.cpp.

+ +
+
+ +

◆ evaluate()

+ +
+
+ + + + + +
+ + + + + + + + + + + + + + + + + + +
virtual controller_interface::return_type modulo_controllers::ControllerInterface::evaluate (const rclcpp::Time & time,
const std::chrono::nanoseconds & period 
)
+
+protectedpure virtual
+
+ +

The control logic callback.

+

This method should be overridden by derived classes. It is called in the update() method between reading the state interfaces and writing the command interfaces.

Parameters
+ + + +
timeThe controller clock time
periodTime elapsed since the last control evaluation
+
+
+
Returns
OK or ERROR
+ +
+
+ +

◆ get_command_interface()

+ +
+
+ + + + + +
+ + + + + + + + + + + + + + + + + + +
double modulo_controllers::ControllerInterface::get_command_interface (const std::string & name,
const std::string & interface 
) const
+
+protected
+
+ +

Get the value of a command interface by name.

+
Parameters
+ + + +
nameThe name of the parent tag, e.g. the name of the joint, sensor or gpio
interfaceThe desired command interface
+
+
+
Exceptions
+ + +
out_of_rangeif the desired command interface is not available
+
+
+
Returns
The value of the command interface
+ +

Definition at line 279 of file ControllerInterface.cpp.

+ +
+
+ +

◆ get_state_interface()

+ +
+
+ + + + + +
+ + + + + + + + + + + + + + + + + + +
double modulo_controllers::ControllerInterface::get_state_interface (const std::string & name,
const std::string & interface 
) const
+
+protected
+
+ +

Get the value of a state interface by name.

+
Parameters
+ + + +
nameThe name of the parent tag, e.g. the name of the joint, sensor or gpio
interfaceThe desired state interface
+
+
+
Exceptions
+ + +
out_of_rangeif the desired state interface is not available
+
+
+
Returns
The value of the state interface
+ +

Definition at line 275 of file ControllerInterface.cpp.

+ +
+
+ +

◆ get_state_interfaces()

+ +
+
+ + + + + +
+ + + + + + + + +
std::unordered_map< std::string, double > modulo_controllers::ControllerInterface::get_state_interfaces (const std::string & name) const
+
+protected
+
+ +

Get a map containing the state interfaces by name of the parent tag.

+
Parameters
+ + +
nameThe name of the parent tag, e.g. the name of the joint, sensor or gpio
+
+
+
Exceptions
+ + +
out_of_rangeif the desired state interface is not available
+
+
+
Returns
The map containing the values of the state interfaces
+ +

Definition at line 271 of file ControllerInterface.cpp.

+ +
+
+ +

◆ on_activate() [1/2]

+ +
+
+ + + + + +
+ + + + + + + +
rclcpp_lifecycle::node_interfaces::LifecycleNodeInterface::CallbackReturn modulo_controllers::ControllerInterface::on_activate ()
+
+protectedvirtual
+
+ +

Activate the controller.

+

This method should be overridden by derived classes.

Returns
SUCCESS or ERROR
+ +

Reimplemented in modulo_controllers::RobotControllerInterface.

+ +

Definition at line 195 of file ControllerInterface.cpp.

+ +
+
+ +

◆ on_activate() [2/2]

+ +
+
+ + + + + +
+ + + + + + + + +
rclcpp_lifecycle::node_interfaces::LifecycleNodeInterface::CallbackReturn modulo_controllers::ControllerInterface::on_activate (const rclcpp_lifecycle::State & previous_state)
+
+final
+
+ +

Initialize internal data attributes from configured interfaces and wait for valid states from hardware.

+

This functions calls the internal on_activate() method

Parameters
+ + +
previous_stateThe previous lifecycle state
+
+
+
Returns
SUCCESS or ERROR
+ +

Definition at line 142 of file ControllerInterface.cpp.

+ +
+
+ +

◆ on_configure() [1/2]

+ +
+
+ + + + + +
+ + + + + + + +
rclcpp_lifecycle::node_interfaces::LifecycleNodeInterface::CallbackReturn modulo_controllers::ControllerInterface::on_configure ()
+
+protectedvirtual
+
+ +

Configure the controller.

+

This method should be overridden by derived classes.

Returns
SUCCESS or ERROR
+ +

Reimplemented in modulo_controllers::RobotControllerInterface.

+ +

Definition at line 77 of file ControllerInterface.cpp.

+ +
+
+ +

◆ on_configure() [2/2]

+ +
+
+ + + + + +
+ + + + + + + + +
rclcpp_lifecycle::node_interfaces::LifecycleNodeInterface::CallbackReturn modulo_controllers::ControllerInterface::on_configure (const rclcpp_lifecycle::State & previous_state)
+
+final
+
+ +

Set class properties from parameters.

+

This functions calls the internal on_configure() method

Parameters
+ + +
previous_stateThe previous lifecycle state
+
+
+
Returns
SUCCESS or ERROR
+ +

Definition at line 45 of file ControllerInterface.cpp.

+ +
+
+ +

◆ on_deactivate() [1/2]

+ +
+
+ + + + + +
+ + + + + + + +
rclcpp_lifecycle::node_interfaces::LifecycleNodeInterface::CallbackReturn modulo_controllers::ControllerInterface::on_deactivate ()
+
+protectedvirtual
+
+ +

Deactivate the controller.

+

This method should be overridden by derived classes.

Returns
SUCCESS or ERROR
+ +

Definition at line 209 of file ControllerInterface.cpp.

+ +
+
+ +

◆ on_deactivate() [2/2]

+ +
+
+ + + + + +
+ + + + + + + + +
rclcpp_lifecycle::node_interfaces::LifecycleNodeInterface::CallbackReturn modulo_controllers::ControllerInterface::on_deactivate (const rclcpp_lifecycle::State & previous_state)
+
+final
+
+ +

Deactivate the controller.

+
Parameters
+ + +
previous_stateThe previous lifecycle state
+
+
+
Returns
SUCCESS or ERROR
+ +

Definition at line 200 of file ControllerInterface.cpp.

+ +
+
+ +

◆ on_init()

+ +
+
+ + + + + +
+ + + + + + + +
rclcpp_lifecycle::node_interfaces::LifecycleNodeInterface::CallbackReturn modulo_controllers::ControllerInterface::on_init ()
+
+override
+
+ +

Declare parameters.

+
Returns
CallbackReturn status
+ +

Definition at line 12 of file ControllerInterface.cpp.

+ +
+
+ +

◆ read_state_interfaces()

+ +
+
+ + + + + +
+ + + + + + + +
controller_interface::return_type modulo_controllers::ControllerInterface::read_state_interfaces ()
+
+protectedvirtual
+
+ +

Read the state interfaces.

+
Returns
OK or ERROR
+ +

Definition at line 254 of file ControllerInterface.cpp.

+ +
+
+ +

◆ set_command_interface()

+ +
+
+ + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + +
void modulo_controllers::ControllerInterface::set_command_interface (const std::string & name,
const std::string & interface,
double value 
)
+
+protected
+
+ +

Set the value of a command interface by name.

+
Parameters
+ + + + +
nameThe name of the parent tag, e.g. the name of the sensor or gpio
interfaceThe name of the command interface
valueThe new value of the interface
+
+
+ +

Definition at line 283 of file ControllerInterface.cpp.

+ +
+
+ +

◆ state_interface_configuration()

+ +
+
+ + + + + +
+ + + + + + + +
controller_interface::InterfaceConfiguration modulo_controllers::ControllerInterface::state_interface_configuration () const
+
+final
+
+ +

Configure the state interfaces.

+
Returns
The state interface configuration
+ +

Definition at line 124 of file ControllerInterface.cpp.

+ +
+
+ +

◆ update()

+ +
+
+ + + + + +
+ + + + + + + + + + + + + + + + + + +
controller_interface::return_type modulo_controllers::ControllerInterface::update (const rclcpp::Time & time,
const rclcpp::Duration & period 
)
+
+final
+
+ +

Read the state interfaces, perform control evaluation and write the command interfaces.

+
Parameters
+ + + +
timeThe controller clock time
periodTime elapsed since the last control evaluation
+
+
+
Returns
OK or ERROR
+ +

Definition at line 214 of file ControllerInterface.cpp.

+ +
+
+ +

◆ write_command_interfaces()

+ +
+
+ + + + + +
+ + + + + + + + +
controller_interface::return_type modulo_controllers::ControllerInterface::write_command_interfaces (const rclcpp::Duration & period)
+
+protectedvirtual
+
+ +

Write the command interfaces.

+
Parameters
+ + +
periodTime elapsed since the last control evaluation
+
+
+
Returns
OK or ERROR
+ +

Definition at line 263 of file ControllerInterface.cpp.

+ +
+
+

Member Data Documentation

+ +

◆ hardware_name_

+ +
+
+ + + + + +
+ + + + +
std::string modulo_controllers::ControllerInterface::hardware_name_
+
+protected
+
+ +

The hardware name provided by a parameter.

+ +

Definition at line 169 of file ControllerInterface.hpp.

+ +
+
+
The documentation for this class was generated from the following files: +
+ + + + diff --git a/versions/v5.0.1/classmodulo__controllers_1_1_controller_interface.png b/versions/v5.0.1/classmodulo__controllers_1_1_controller_interface.png new file mode 100644 index 00000000..6b1cb428 Binary files /dev/null and b/versions/v5.0.1/classmodulo__controllers_1_1_controller_interface.png differ diff --git a/versions/v5.0.1/classmodulo__controllers_1_1_robot_controller_interface-members.html b/versions/v5.0.1/classmodulo__controllers_1_1_robot_controller_interface-members.html new file mode 100644 index 00000000..e37e659a --- /dev/null +++ b/versions/v5.0.1/classmodulo__controllers_1_1_robot_controller_interface-members.html @@ -0,0 +1,158 @@ + + + + + + + +Modulo: Member List + + + + + + + + + +
+
+ + + + + + +
+
Modulo 5.0.0 +
+
+
+ + + + + + + + +
+
+ + +
+
+
+
+
+
Loading...
+
Searching...
+
No Matches
+
+
+
+
+ + +
+
+
modulo_controllers::RobotControllerInterface Member List
+
+
+ +

This is the complete list of members for modulo_controllers::RobotControllerInterface, including all inherited members.

+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
add_command_interface(const std::string &name, const std::string &interface)modulo_controllers::ControllerInterfaceprotected
add_input(const std::string &name, const std::string &topic_name="")modulo_controllers::BaseControllerInterfaceinlineprotected
add_input(const std::string &name, const std::string &topic_name) (defined in modulo_controllers::BaseControllerInterface)modulo_controllers::BaseControllerInterfaceinlineprotected
add_input(const std::string &name, const std::string &topic_name) (defined in modulo_controllers::BaseControllerInterface)modulo_controllers::BaseControllerInterfaceinlineprotected
add_input(const std::string &name, const std::string &topic_name) (defined in modulo_controllers::BaseControllerInterface)modulo_controllers::BaseControllerInterfaceinlineprotected
add_interfaces() overridemodulo_controllers::RobotControllerInterfacevirtual
add_output(const std::string &name, const std::string &topic_name="")modulo_controllers::BaseControllerInterfaceinlineprotected
add_output(const std::string &name, const std::string &topic_name) (defined in modulo_controllers::BaseControllerInterface)modulo_controllers::BaseControllerInterfaceinlineprotected
add_output(const std::string &name, const std::string &topic_name) (defined in modulo_controllers::BaseControllerInterface)modulo_controllers::BaseControllerInterfaceinlineprotected
add_output(const std::string &name, const std::string &topic_name) (defined in modulo_controllers::BaseControllerInterface)modulo_controllers::BaseControllerInterfaceinlineprotected
add_parameter(const std::shared_ptr< state_representation::ParameterInterface > &parameter, const std::string &description, bool read_only=false)modulo_controllers::BaseControllerInterfaceprotected
add_parameter(const std::string &name, const T &value, const std::string &description, bool read_only=false)modulo_controllers::BaseControllerInterfaceinlineprotected
add_predicate(const std::string &predicate_name, bool predicate_value)modulo_controllers::BaseControllerInterfaceprotected
add_predicate(const std::string &predicate_name, const std::function< bool(void)> &predicate_function)modulo_controllers::BaseControllerInterfaceprotected
add_service(const std::string &service_name, const std::function< ControllerServiceResponse(void)> &callback)modulo_controllers::BaseControllerInterfaceprotected
add_service(const std::string &service_name, const std::function< ControllerServiceResponse(const std::string &string)> &callback)modulo_controllers::BaseControllerInterfaceprotected
add_state_interface(const std::string &name, const std::string &interface)modulo_controllers::ControllerInterfaceprotected
add_trigger(const std::string &trigger_name)modulo_controllers::BaseControllerInterfaceprotected
BaseControllerInterface()modulo_controllers::BaseControllerInterface
command_interface_configuration() const finalmodulo_controllers::ControllerInterface
compute_cartesian_state()modulo_controllers::RobotControllerInterfaceprotected
ControllerInterface(bool claim_all_state_interfaces=false)modulo_controllers::ControllerInterface
evaluate(const rclcpp::Time &time, const std::chrono::nanoseconds &period)=0modulo_controllers::ControllerInterfaceprotectedpure virtual
ft_sensor_name_modulo_controllers::RobotControllerInterfaceprotected
ft_sensor_reference_frame_modulo_controllers::RobotControllerInterfaceprotected
get_cartesian_state()modulo_controllers::RobotControllerInterfaceprotected
get_command_interface(const std::string &name, const std::string &interface) constmodulo_controllers::ControllerInterfaceprotected
get_command_mutex()modulo_controllers::BaseControllerInterfaceprotected
get_ft_sensor()modulo_controllers::RobotControllerInterfaceprotected
get_joint_state()modulo_controllers::RobotControllerInterfaceprotected
get_parameter(const std::string &name) constmodulo_controllers::BaseControllerInterfaceprotected
get_parameter_value(const std::string &name) constmodulo_controllers::BaseControllerInterfaceinlineprotected
get_predicate(const std::string &predicate_name) constmodulo_controllers::BaseControllerInterfaceprotected
get_qos() constmodulo_controllers::BaseControllerInterfaceprotected
get_state_interface(const std::string &name, const std::string &interface) constmodulo_controllers::ControllerInterfaceprotected
get_state_interfaces(const std::string &name) constmodulo_controllers::ControllerInterfaceprotected
hardware_name_modulo_controllers::ControllerInterfaceprotected
is_active() constmodulo_controllers::BaseControllerInterfaceprotected
on_activate() overridemodulo_controllers::RobotControllerInterfacevirtual
modulo_controllers::ControllerInterface::on_activate(const rclcpp_lifecycle::State &previous_state) finalmodulo_controllers::ControllerInterface
on_configure() overridemodulo_controllers::RobotControllerInterfacevirtual
modulo_controllers::ControllerInterface::on_configure(const rclcpp_lifecycle::State &previous_state) finalmodulo_controllers::ControllerInterface
on_deactivate(const rclcpp_lifecycle::State &previous_state) finalmodulo_controllers::ControllerInterface
on_deactivate()modulo_controllers::ControllerInterfaceprotectedvirtual
on_init() overridemodulo_controllers::ControllerInterface
on_validate_parameter_callback(const std::shared_ptr< state_representation::ParameterInterface > &parameter) overridemodulo_controllers::RobotControllerInterfaceprotectedvirtual
read_input(const std::string &name)modulo_controllers::BaseControllerInterfaceinlineprotected
read_input(const std::string &name) (defined in modulo_controllers::BaseControllerInterface)modulo_controllers::BaseControllerInterfaceinlineprotected
read_input(const std::string &name) (defined in modulo_controllers::BaseControllerInterface)modulo_controllers::BaseControllerInterfaceinlineprotected
read_input(const std::string &name) (defined in modulo_controllers::BaseControllerInterface)modulo_controllers::BaseControllerInterfaceinlineprotected
robot_modulo_controllers::RobotControllerInterfaceprotected
RobotControllerInterface()modulo_controllers::RobotControllerInterface
RobotControllerInterface(bool robot_model_required, const std::string &control_type="", bool load_geometries=false)modulo_controllers::RobotControllerInterfaceexplicit
set_command_interface(const std::string &name, const std::string &interface, double value)modulo_controllers::ControllerInterfaceprotected
set_input_validity_period(double input_validity_period)modulo_controllers::BaseControllerInterfaceprotected
set_joint_command(const state_representation::JointState &joint_command)modulo_controllers::RobotControllerInterfaceprotected
set_parameter_value(const std::string &name, const T &value)modulo_controllers::BaseControllerInterfaceinlineprotected
set_predicate(const std::string &predicate_name, bool predicate_value)modulo_controllers::BaseControllerInterfaceprotected
set_predicate(const std::string &predicate_name, const std::function< bool(void)> &predicate_function)modulo_controllers::BaseControllerInterfaceprotected
set_qos(const rclcpp::QoS &qos)modulo_controllers::BaseControllerInterfaceprotected
state_interface_configuration() const finalmodulo_controllers::ControllerInterface
task_space_frame_modulo_controllers::RobotControllerInterfaceprotected
trigger(const std::string &trigger_name)modulo_controllers::BaseControllerInterfaceprotected
update(const rclcpp::Time &time, const rclcpp::Duration &period) finalmodulo_controllers::ControllerInterface
write_output(const std::string &name, const T &data)modulo_controllers::BaseControllerInterfaceinlineprotected
write_output(const std::string &name, const bool &data) (defined in modulo_controllers::BaseControllerInterface)modulo_controllers::BaseControllerInterfaceinline
write_output(const std::string &name, const double &data) (defined in modulo_controllers::BaseControllerInterface)modulo_controllers::BaseControllerInterfaceinline
write_output(const std::string &name, const std::vector< double > &data) (defined in modulo_controllers::BaseControllerInterface)modulo_controllers::BaseControllerInterfaceinline
write_output(const std::string &name, const int &data) (defined in modulo_controllers::BaseControllerInterface)modulo_controllers::BaseControllerInterfaceinline
write_output(const std::string &name, const std::string &data) (defined in modulo_controllers::BaseControllerInterface)modulo_controllers::BaseControllerInterfaceinline
+ + + + diff --git a/versions/v5.0.1/classmodulo__controllers_1_1_robot_controller_interface.html b/versions/v5.0.1/classmodulo__controllers_1_1_robot_controller_interface.html new file mode 100644 index 00000000..4cabc566 --- /dev/null +++ b/versions/v5.0.1/classmodulo__controllers_1_1_robot_controller_interface.html @@ -0,0 +1,828 @@ + + + + + + + +Modulo: modulo_controllers::RobotControllerInterface Class Reference + + + + + + + + + +
+
+ + + + + + +
+
Modulo 5.0.0 +
+
+
+ + + + + + + + +
+
+ + +
+
+
+
+
+
Loading...
+
Searching...
+
No Matches
+
+
+
+
+ + +
+
+
+Public Member Functions | +Protected Member Functions | +Protected Attributes | +List of all members
+
modulo_controllers::RobotControllerInterface Class Reference
+
+
+ +

Base controller class that automatically associates joints with a JointState object. + More...

+ +

#include <RobotControllerInterface.hpp>

+
+Inheritance diagram for modulo_controllers::RobotControllerInterface:
+
+
+ + +modulo_controllers::ControllerInterface +modulo_controllers::BaseControllerInterface + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +

+Public Member Functions

 RobotControllerInterface ()
 Default constructor.
 
 RobotControllerInterface (bool robot_model_required, const std::string &control_type="", bool load_geometries=false)
 Constructor with robot model flag and a control type to determine the command interfaces to claim.
 
CallbackReturn add_interfaces () override
 Add interfaces like parameters, signals, services, and predicates to the controller.
 
CallbackReturn on_configure () override
 Configure the controller.
 
CallbackReturn on_activate () override
 Activate the controller.
 
- Public Member Functions inherited from modulo_controllers::ControllerInterface
 ControllerInterface (bool claim_all_state_interfaces=false)
 Default constructor.
 
CallbackReturn on_init () override
 Declare parameters.
 
CallbackReturn on_configure (const rclcpp_lifecycle::State &previous_state) final
 Set class properties from parameters.
 
CallbackReturn on_activate (const rclcpp_lifecycle::State &previous_state) final
 Initialize internal data attributes from configured interfaces and wait for valid states from hardware.
 
CallbackReturn on_deactivate (const rclcpp_lifecycle::State &previous_state) final
 Deactivate the controller.
 
controller_interface::return_type update (const rclcpp::Time &time, const rclcpp::Duration &period) final
 Read the state interfaces, perform control evaluation and write the command interfaces.
 
controller_interface::InterfaceConfiguration state_interface_configuration () const final
 Configure the state interfaces.
 
controller_interface::InterfaceConfiguration command_interface_configuration () const final
 Configure the command interfaces.
 
- Public Member Functions inherited from modulo_controllers::BaseControllerInterface
 BaseControllerInterface ()
 Default constructor.
 
CallbackReturn on_init () override
 Declare parameters and register the on_set_parameters callback.
 
CallbackReturn on_configure (const rclcpp_lifecycle::State &previous_state) override
 Add signals.
 
template<>
void write_output (const std::string &name, const bool &data)
 
template<>
void write_output (const std::string &name, const double &data)
 
template<>
void write_output (const std::string &name, const std::vector< double > &data)
 
template<>
void write_output (const std::string &name, const int &data)
 
template<>
void write_output (const std::string &name, const std::string &data)
 
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +

+Protected Member Functions

const state_representation::JointState & get_joint_state ()
 Access the joint state object.
 
const state_representation::CartesianState & get_cartesian_state ()
 Access the Cartesian state object.
 
const state_representation::CartesianWrench & get_ft_sensor ()
 Access the Cartesian wrench object.
 
void compute_cartesian_state ()
 Compute the Cartesian state from forward kinematics of the current joint state.
 
void set_joint_command (const state_representation::JointState &joint_command)
 Set the joint command object.
 
bool on_validate_parameter_callback (const std::shared_ptr< state_representation::ParameterInterface > &parameter) override
 Parameter validation function to be redefined by derived controller classes.
 
- Protected Member Functions inherited from modulo_controllers::ControllerInterface
virtual CallbackReturn on_deactivate ()
 Deactivate the controller.
 
virtual controller_interface::return_type evaluate (const rclcpp::Time &time, const std::chrono::nanoseconds &period)=0
 The control logic callback.
 
void add_state_interface (const std::string &name, const std::string &interface)
 Add a state interface to the controller by name.
 
void add_command_interface (const std::string &name, const std::string &interface)
 Add a command interface to the controller by name.
 
std::unordered_map< std::string, doubleget_state_interfaces (const std::string &name) const
 Get a map containing the state interfaces by name of the parent tag.
 
double get_state_interface (const std::string &name, const std::string &interface) const
 Get the value of a state interface by name.
 
double get_command_interface (const std::string &name, const std::string &interface) const
 Get the value of a command interface by name.
 
void set_command_interface (const std::string &name, const std::string &interface, double value)
 Set the value of a command interface by name.
 
- Protected Member Functions inherited from modulo_controllers::BaseControllerInterface
void add_parameter (const std::shared_ptr< state_representation::ParameterInterface > &parameter, const std::string &description, bool read_only=false)
 Add a parameter.
 
template<typename T >
void add_parameter (const std::string &name, const T &value, const std::string &description, bool read_only=false)
 Add a parameter.
 
std::shared_ptr< state_representation::ParameterInterface > get_parameter (const std::string &name) const
 Get a parameter by name.
 
template<typename T >
get_parameter_value (const std::string &name) const
 Get a parameter value by name.
 
template<typename T >
void set_parameter_value (const std::string &name, const T &value)
 Set the value of a parameter.
 
void add_predicate (const std::string &predicate_name, bool predicate_value)
 Add a predicate to the map of predicates.
 
void add_predicate (const std::string &predicate_name, const std::function< bool(void)> &predicate_function)
 Add a predicate to the map of predicates based on a function to periodically call.
 
bool get_predicate (const std::string &predicate_name) const
 Get the logical value of a predicate.
 
void set_predicate (const std::string &predicate_name, bool predicate_value)
 Set the value of the predicate given as parameter, if the predicate is not found does not do anything.
 
void set_predicate (const std::string &predicate_name, const std::function< bool(void)> &predicate_function)
 Set the value of the predicate given as parameter, if the predicate is not found does not do anything.
 
void add_trigger (const std::string &trigger_name)
 Add a trigger to the controller.
 
void trigger (const std::string &trigger_name)
 Latch the trigger with the provided name.
 
template<typename T >
void add_input (const std::string &name, const std::string &topic_name="")
 Add an input to the controller.
 
template<typename T >
void add_output (const std::string &name, const std::string &topic_name="")
 Add an output to the controller.
 
void set_input_validity_period (double input_validity_period)
 Set the input validity period of input signals.
 
template<typename T >
std::optional< Tread_input (const std::string &name)
 Read the most recent message of an input.
 
template<typename T >
void write_output (const std::string &name, const T &data)
 Write an object to an output.
 
void add_service (const std::string &service_name, const std::function< ControllerServiceResponse(void)> &callback)
 Add a service to trigger a callback function with no input arguments.
 
void add_service (const std::string &service_name, const std::function< ControllerServiceResponse(const std::string &string)> &callback)
 Add a service to trigger a callback function with a string payload.
 
rclcpp::QoS get_qos () const
 Getter of the Quality of Service attribute.
 
void set_qos (const rclcpp::QoS &qos)
 Set the Quality of Service for ROS publishers and subscribers.
 
bool is_active () const
 Check if the controller is currently in state active or not.
 
std::timed_mutex & get_command_mutex ()
 Get the reference to the command mutex.
 
template<>
void add_input (const std::string &name, const std::string &topic_name)
 
template<>
void add_input (const std::string &name, const std::string &topic_name)
 
template<>
void add_input (const std::string &name, const std::string &topic_name)
 
template<>
void add_output (const std::string &name, const std::string &topic_name)
 
template<>
void add_output (const std::string &name, const std::string &topic_name)
 
template<>
void add_output (const std::string &name, const std::string &topic_name)
 
template<>
std::optional< boolread_input (const std::string &name)
 
template<>
std::optional< doubleread_input (const std::string &name)
 
template<>
std::optional< intread_input (const std::string &name)
 
+ + + + + + + + + + + + + + + + + +

+Protected Attributes

std::shared_ptr< robot_model::Model > robot_
 Robot model object generated from URDF.
 
std::string task_space_frame_
 The frame in task space for forward kinematics calculations, if applicable.
 
std::string ft_sensor_name_
 The name of a force torque sensor in the hardware description.
 
std::string ft_sensor_reference_frame_
 The sensing reference frame.
 
- Protected Attributes inherited from modulo_controllers::ControllerInterface
std::string hardware_name_
 The hardware name provided by a parameter.
 
+

Detailed Description

+

Base controller class that automatically associates joints with a JointState object.

+

The robot controller interface extends the functionality of the modulo controller interface byautomatically claiming all state interfaces from joints and command interfaces of a given type (position, velocity, effort or acceleration) for those same joints. Joint state and command are associated with these interfaces and abstracted as JointState pointers for derived classes to access. A robot model, Cartesian state and force-torque sensor state are similarly available based on the URDF and state interfaces.

+ +

Definition at line 23 of file RobotControllerInterface.hpp.

+

Constructor & Destructor Documentation

+ +

◆ RobotControllerInterface() [1/2]

+ +
+
+ + + + + + + +
modulo_controllers::RobotControllerInterface::RobotControllerInterface ()
+
+ +

Default constructor.

+ +

Definition at line 18 of file RobotControllerInterface.cpp.

+ +
+
+ +

◆ RobotControllerInterface() [2/2]

+ +
+
+ + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + +
modulo_controllers::RobotControllerInterface::RobotControllerInterface (bool robot_model_required,
const std::string & control_type = "",
bool load_geometries = false 
)
+
+explicit
+
+ +

Constructor with robot model flag and a control type to determine the command interfaces to claim.

+
Parameters
+ + + + +
robot_model_requiredFlag to indicate if a robot model is required for the controller
control_typeOne of [position, velocity, effort or acceleration]
load_geometriesIf true, load the URDF geometries into the robot model for collision features
+
+
+ +

Definition at line 20 of file RobotControllerInterface.cpp.

+ +
+
+

Member Function Documentation

+ +

◆ add_interfaces()

+ +
+
+ + + + + +
+ + + + + + + +
rclcpp_lifecycle::node_interfaces::LifecycleNodeInterface::CallbackReturn modulo_controllers::RobotControllerInterface::add_interfaces ()
+
+overridevirtual
+
+ +

Add interfaces like parameters, signals, services, and predicates to the controller.

+

This function is called during the on_init callback of the base class to perform post-construction steps.

Returns
SUCCESS or ERROR
+

Declare additional parameters.

+ +

Reimplemented from modulo_controllers::ControllerInterface.

+ +

Definition at line 35 of file RobotControllerInterface.cpp.

+ +
+
+ +

◆ compute_cartesian_state()

+ +
+
+ + + + + +
+ + + + + + + +
void modulo_controllers::RobotControllerInterface::compute_cartesian_state ()
+
+protected
+
+ +

Compute the Cartesian state from forward kinematics of the current joint state.

+

This should only be used if a robot model has been generated, in which case the forward kinematics is calculated to get pose and twist for the desired target frame.

+ +

Definition at line 302 of file RobotControllerInterface.cpp.

+ +
+
+ +

◆ get_cartesian_state()

+ +
+
+ + + + + +
+ + + + + + + +
const CartesianState & modulo_controllers::RobotControllerInterface::get_cartesian_state ()
+
+protected
+
+ +

Access the Cartesian state object.

+

This internally calls compute_cartesian_state()

Returns
A const reference to the CartesianState object
+ +

Definition at line 292 of file RobotControllerInterface.cpp.

+ +
+
+ +

◆ get_ft_sensor()

+ +
+
+ + + + + +
+ + + + + + + +
const CartesianWrench & modulo_controllers::RobotControllerInterface::get_ft_sensor ()
+
+protected
+
+ +

Access the Cartesian wrench object.

+
Returns
A const reference to the CartesianWrench object
+ +

Definition at line 298 of file RobotControllerInterface.cpp.

+ +
+
+ +

◆ get_joint_state()

+ +
+
+ + + + + +
+ + + + + + + +
const JointState & modulo_controllers::RobotControllerInterface::get_joint_state ()
+
+protected
+
+ +

Access the joint state object.

+
Returns
A const reference to the JointState object
+ +

Definition at line 288 of file RobotControllerInterface.cpp.

+ +
+
+ +

◆ on_activate()

+ +
+
+ + + + + +
+ + + + + + + +
rclcpp_lifecycle::node_interfaces::LifecycleNodeInterface::CallbackReturn modulo_controllers::RobotControllerInterface::on_activate ()
+
+overridevirtual
+
+ +

Activate the controller.

+

This method should be overridden by derived classes.

Returns
SUCCESS or ERROR
+

Initialize a fore torque sensor if applicable

+ +

Reimplemented from modulo_controllers::ControllerInterface.

+ +

Definition at line 176 of file RobotControllerInterface.cpp.

+ +
+
+ +

◆ on_configure()

+ +
+
+ + + + + +
+ + + + + + + +
rclcpp_lifecycle::node_interfaces::LifecycleNodeInterface::CallbackReturn modulo_controllers::RobotControllerInterface::on_configure ()
+
+overridevirtual
+
+ +

Configure the controller.

+

This method should be overridden by derived classes.

Returns
SUCCESS or ERROR
+

Create a robot model from the robot description, get and sort the joints and construct the internal joint state object.

+ +

Reimplemented from modulo_controllers::ControllerInterface.

+ +

Definition at line 59 of file RobotControllerInterface.cpp.

+ +
+
+ +

◆ on_validate_parameter_callback()

+ +
+
+ + + + + +
+ + + + + + + + +
bool modulo_controllers::RobotControllerInterface::on_validate_parameter_callback (const std::shared_ptr< state_representation::ParameterInterface > & parameter)
+
+overrideprotectedvirtual
+
+ +

Parameter validation function to be redefined by derived controller classes.

+

This method is automatically invoked whenever the ROS interface tried to modify a parameter. Validation and sanitization can be performed by reading or writing the value of the parameter through the ParameterInterface pointer, depending on the parameter name and desired controller behaviour. If the validation returns true, the updated parameter value (including any modifications) is applied. If the validation returns false, any changes to the parameter are discarded and the parameter value is not changed.

Parameters
+ + +
parameterA ParameterInterface pointer to a Parameter instance
+
+
+
Returns
The validation result
+ +

Reimplemented from modulo_controllers::BaseControllerInterface.

+ +

Definition at line 356 of file RobotControllerInterface.cpp.

+ +
+
+ +

◆ set_joint_command()

+ +
+
+ + + + + +
+ + + + + + + + +
void modulo_controllers::RobotControllerInterface::set_joint_command (const state_representation::JointState & joint_command)
+
+protected
+
+ +

Set the joint command object.

+
Parameters
+ + +
joint_commandA JointState command object
+
+
+ +

Definition at line 314 of file RobotControllerInterface.cpp.

+ +
+
+

Member Data Documentation

+ +

◆ ft_sensor_name_

+ +
+
+ + + + + +
+ + + + +
std::string modulo_controllers::RobotControllerInterface::ft_sensor_name_
+
+protected
+
+ +

The name of a force torque sensor in the hardware description.

+ +

Definition at line 100 of file RobotControllerInterface.hpp.

+ +
+
+ +

◆ ft_sensor_reference_frame_

+ +
+
+ + + + + +
+ + + + +
std::string modulo_controllers::RobotControllerInterface::ft_sensor_reference_frame_
+
+protected
+
+ +

The sensing reference frame.

+ +

Definition at line 101 of file RobotControllerInterface.hpp.

+ +
+
+ +

◆ robot_

+ +
+
+ + + + + +
+ + + + +
std::shared_ptr<robot_model::Model> modulo_controllers::RobotControllerInterface::robot_
+
+protected
+
+ +

Robot model object generated from URDF.

+ +

Definition at line 97 of file RobotControllerInterface.hpp.

+ +
+
+ +

◆ task_space_frame_

+ +
+
+ + + + + +
+ + + + +
std::string modulo_controllers::RobotControllerInterface::task_space_frame_
+
+protected
+
+ +

The frame in task space for forward kinematics calculations, if applicable.

+ +

Definition at line 98 of file RobotControllerInterface.hpp.

+ +
+
+
The documentation for this class was generated from the following files: +
+ + + + diff --git a/versions/v5.0.1/classmodulo__controllers_1_1_robot_controller_interface.png b/versions/v5.0.1/classmodulo__controllers_1_1_robot_controller_interface.png new file mode 100644 index 00000000..676c9905 Binary files /dev/null and b/versions/v5.0.1/classmodulo__controllers_1_1_robot_controller_interface.png differ diff --git a/versions/v5.0.1/classmodulo__core_1_1_predicate-members.html b/versions/v5.0.1/classmodulo__core_1_1_predicate-members.html new file mode 100644 index 00000000..78e04612 --- /dev/null +++ b/versions/v5.0.1/classmodulo__core_1_1_predicate-members.html @@ -0,0 +1,92 @@ + + + + + + + +Modulo: Member List + + + + + + + + + +
+
+ + + + + + +
+
Modulo 5.0.0 +
+
+
+ + + + + + + + +
+
+ + +
+
+
+
+
+
Loading...
+
Searching...
+
No Matches
+
+
+
+
+ + +
+
+
modulo_core::Predicate Member List
+
+
+ +

This is the complete list of members for modulo_core::Predicate, including all inherited members.

+ + + + + +
get_value() const (defined in modulo_core::Predicate)modulo_core::Predicateinline
Predicate(const std::function< bool(void)> &predicate_function) (defined in modulo_core::Predicate)modulo_core::Predicateinlineexplicit
query() (defined in modulo_core::Predicate)modulo_core::Predicateinline
set_predicate(const std::function< bool(void)> &predicate_function) (defined in modulo_core::Predicate)modulo_core::Predicateinline
+ + + + diff --git a/versions/v5.0.1/classmodulo__core_1_1_predicate.html b/versions/v5.0.1/classmodulo__core_1_1_predicate.html new file mode 100644 index 00000000..69ac9f45 --- /dev/null +++ b/versions/v5.0.1/classmodulo__core_1_1_predicate.html @@ -0,0 +1,218 @@ + + + + + + + +Modulo: modulo_core::Predicate Class Reference + + + + + + + + + +
+
+ + + + + + +
+
Modulo 5.0.0 +
+
+
+ + + + + + + + +
+
+ + +
+
+
+
+
+
Loading...
+
Searching...
+
No Matches
+
+
+
+
+ + +
+
+
+Public Member Functions | +List of all members
+
modulo_core::Predicate Class Reference
+
+
+ + + + + + + + + + +

+Public Member Functions

 Predicate (const std::function< bool(void)> &predicate_function)
 
bool get_value () const
 
void set_predicate (const std::function< bool(void)> &predicate_function)
 
std::optional< bool > query ()
 
+

Detailed Description

+
+

Definition at line 13 of file Predicate.hpp.

+

Constructor & Destructor Documentation

+ +

◆ Predicate()

+ +
+
+ + + + + +
+ + + + + + + + +
modulo_core::Predicate::Predicate (const std::function< bool(void)> & predicate_function)
+
+inlineexplicit
+
+ +

Definition at line 15 of file Predicate.hpp.

+ +
+
+

Member Function Documentation

+ +

◆ get_value()

+ +
+
+ + + + + +
+ + + + + + + +
bool modulo_core::Predicate::get_value () const
+
+inline
+
+ +

Definition at line 17 of file Predicate.hpp.

+ +
+
+ +

◆ query()

+ +
+
+ + + + + +
+ + + + + + + +
std::optional< bool > modulo_core::Predicate::query ()
+
+inline
+
+ +

Definition at line 21 of file Predicate.hpp.

+ +
+
+ +

◆ set_predicate()

+ +
+
+ + + + + +
+ + + + + + + + +
void modulo_core::Predicate::set_predicate (const std::function< bool(void)> & predicate_function)
+
+inline
+
+ +

Definition at line 19 of file Predicate.hpp.

+ +
+
+
The documentation for this class was generated from the following file: +
+ + + + diff --git a/versions/v5.0.1/classmodulo__core_1_1communication_1_1_message_pair-members.html b/versions/v5.0.1/classmodulo__core_1_1communication_1_1_message_pair-members.html new file mode 100644 index 00000000..df77eef0 --- /dev/null +++ b/versions/v5.0.1/classmodulo__core_1_1communication_1_1_message_pair-members.html @@ -0,0 +1,107 @@ + + + + + + + +Modulo: Member List + + + + + + + + + +
+
+ + + + + + +
+
Modulo 5.0.0 +
+
+
+ + + + + + + + +
+
+ + +
+
+
+
+
+
Loading...
+
Searching...
+
No Matches
+
+
+
+
+ + +
+
+
modulo_core::communication::MessagePair< MsgT, DataT > Member List
+
+
+ +

This is the complete list of members for modulo_core::communication::MessagePair< MsgT, DataT >, including all inherited members.

+ + + + + + + + + + + + + + + + + + + + +
get_data() constmodulo_core::communication::MessagePair< MsgT, DataT >inline
get_message_pair(bool validate_pointer=true)modulo_core::communication::MessagePairInterfaceinline
get_type() constmodulo_core::communication::MessagePairInterface
MessagePair(std::shared_ptr< DataT > data, std::shared_ptr< rclcpp::Clock > clock)modulo_core::communication::MessagePair< MsgT, DataT >
MessagePair(std::shared_ptr< DataT > data, std::shared_ptr< rclcpp::Clock > clock)modulo_core::communication::MessagePair< MsgT, DataT >inline
MessagePair(std::shared_ptr< bool > data, std::shared_ptr< rclcpp::Clock > clock) (defined in modulo_core::communication::MessagePair< MsgT, DataT >)modulo_core::communication::MessagePair< MsgT, DataT >
MessagePair(std::shared_ptr< double > data, std::shared_ptr< rclcpp::Clock > clock) (defined in modulo_core::communication::MessagePair< MsgT, DataT >)modulo_core::communication::MessagePair< MsgT, DataT >
MessagePair(std::shared_ptr< std::vector< double > > data, std::shared_ptr< rclcpp::Clock > clock) (defined in modulo_core::communication::MessagePair< MsgT, DataT >)modulo_core::communication::MessagePair< MsgT, DataT >
MessagePair(std::shared_ptr< int > data, std::shared_ptr< rclcpp::Clock > clock) (defined in modulo_core::communication::MessagePair< MsgT, DataT >)modulo_core::communication::MessagePair< MsgT, DataT >
MessagePair(std::shared_ptr< std::string > data, std::shared_ptr< rclcpp::Clock > clock) (defined in modulo_core::communication::MessagePair< MsgT, DataT >)modulo_core::communication::MessagePair< MsgT, DataT >
MessagePair(std::shared_ptr< state_representation::State > data, std::shared_ptr< rclcpp::Clock > clock) (defined in modulo_core::communication::MessagePair< MsgT, DataT >)modulo_core::communication::MessagePair< MsgT, DataT >
MessagePairInterface(MessageType type)modulo_core::communication::MessagePairInterfaceexplicit
MessagePairInterface(const MessagePairInterface &message_pair)=defaultmodulo_core::communication::MessagePairInterface
read(const MsgT &message)modulo_core::communication::MessagePairInterfaceinline
read_message(const MsgT &message)modulo_core::communication::MessagePair< MsgT, DataT >inline
set_data(const std::shared_ptr< DataT > &data)modulo_core::communication::MessagePair< MsgT, DataT >inline
write()modulo_core::communication::MessagePairInterfaceinline
write_message() constmodulo_core::communication::MessagePair< MsgT, DataT >inline
~MessagePairInterface()=defaultmodulo_core::communication::MessagePairInterfacevirtual
+ + + + diff --git a/versions/v5.0.1/classmodulo__core_1_1communication_1_1_message_pair.html b/versions/v5.0.1/classmodulo__core_1_1communication_1_1_message_pair.html new file mode 100644 index 00000000..5af38ecc --- /dev/null +++ b/versions/v5.0.1/classmodulo__core_1_1communication_1_1_message_pair.html @@ -0,0 +1,601 @@ + + + + + + + +Modulo: modulo_core::communication::MessagePair< MsgT, DataT > Class Template Reference + + + + + + + + + +
+
+ + + + + + +
+
Modulo 5.0.0 +
+
+
+ + + + + + + + +
+
+ + +
+
+
+
+
+
Loading...
+
Searching...
+
No Matches
+
+
+
+
+ + +
+
+
+Public Member Functions | +List of all members
+
modulo_core::communication::MessagePair< MsgT, DataT > Class Template Reference
+
+
+ +

The MessagePair stores a pointer to a variable and translates the value of this pointer back and forth between the corresponding ROS messages. + More...

+ +

#include <MessagePair.hpp>

+
+Inheritance diagram for modulo_core::communication::MessagePair< MsgT, DataT >:
+
+
+ + +modulo_core::communication::MessagePairInterface + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +

+Public Member Functions

 MessagePair (std::shared_ptr< DataT > data, std::shared_ptr< rclcpp::Clock > clock)
 Constructor of the MessagePair.
 
 MessagePair (std::shared_ptr< DataT > data, std::shared_ptr< rclcpp::Clock > clock)
 Constructor of the MessagePair that requires custom message types only.
 
MsgT write_message () const
 Write the value of the data pointer to a ROS message.
 
void read_message (const MsgT &message)
 Read a ROS message and store the value in the data pointer.
 
std::shared_ptr< DataT > get_data () const
 Get the data pointer.
 
void set_data (const std::shared_ptr< DataT > &data)
 Set the data pointer.
 
 MessagePair (std::shared_ptr< bool > data, std::shared_ptr< rclcpp::Clock > clock)
 
 MessagePair (std::shared_ptr< double > data, std::shared_ptr< rclcpp::Clock > clock)
 
 MessagePair (std::shared_ptr< std::vector< double > > data, std::shared_ptr< rclcpp::Clock > clock)
 
 MessagePair (std::shared_ptr< int > data, std::shared_ptr< rclcpp::Clock > clock)
 
 MessagePair (std::shared_ptr< std::string > data, std::shared_ptr< rclcpp::Clock > clock)
 
 MessagePair (std::shared_ptr< state_representation::State > data, std::shared_ptr< rclcpp::Clock > clock)
 
- Public Member Functions inherited from modulo_core::communication::MessagePairInterface
 MessagePairInterface (MessageType type)
 Constructor with the message type.
 
+virtual ~MessagePairInterface ()=default
 Default virtual destructor.
 
MessagePairInterface (const MessagePairInterface &message_pair)=default
 Copy constructor from another MessagePairInterface.
 
template<typename MsgT , typename DataT >
std::shared_ptr< MessagePair< MsgT, DataT > > get_message_pair (bool validate_pointer=true)
 Get a pointer to a derived MessagePair instance from a MessagePairInterface pointer.
 
template<typename MsgT , typename DataT >
MsgT write ()
 Get the ROS message of a derived MessagePair instance through the MessagePairInterface pointer.
 
template<typename MsgT , typename DataT >
void read (const MsgT &message)
 Read a ROS message and set the data of the derived MessagePair instance through the MessagePairInterface pointer.
 
MessageType get_type () const
 Get the MessageType of the MessagePairInterface.
 
+

Detailed Description

+
template<typename MsgT, typename DataT>
+class modulo_core::communication::MessagePair< MsgT, DataT >

The MessagePair stores a pointer to a variable and translates the value of this pointer back and forth between the corresponding ROS messages.

+
Template Parameters
+ + + +
MsgTROS message type of the MessagePair
DataTData type corresponding to the ROS message type
+
+
+ +

Definition at line 20 of file MessagePair.hpp.

+

Constructor & Destructor Documentation

+ +

◆ MessagePair() [1/8]

+ +
+
+
+template<typename MsgT , typename DataT >
+ + + + + + + + + + + + + + + + + + +
modulo_core::communication::MessagePair< MsgT, DataT >::MessagePair (std::shared_ptr< DataT > data,
std::shared_ptr< rclcpp::Clock > clock 
)
+
+ +

Constructor of the MessagePair.

+
Parameters
+ + + +
dataThe pointer referring to the data stored in the MessagePair
clockThe ROS clock for translating messages
+
+
+ +
+
+ +

◆ MessagePair() [2/8]

+ +
+
+
+template<typename MsgT , typename DataT >
+ + + + + +
+ + + + + + + + + + + + + + + + + + +
modulo_core::communication::MessagePair< MsgT, DataT >::MessagePair (std::shared_ptr< DataT > data,
std::shared_ptr< rclcpp::Clock > clock 
)
+
+inline
+
+ +

Constructor of the MessagePair that requires custom message types only.

+
Parameters
+ + + +
dataThe pointer referring to the data stored in the MessagePair
clockThe ROS clock for translating messages
+
+
+ +

Definition at line 34 of file MessagePair.hpp.

+ +
+
+ +

◆ MessagePair() [3/8]

+ +
+
+ + + + + + + + + + + + + + + + + + +
modulo_core::communication::MessagePair< std_msgs::msg::Bool, bool >::MessagePair (std::shared_ptr< bool > data,
std::shared_ptr< rclcpp::Clock > clock 
)
+
+ +

Definition at line 8 of file MessagePair.cpp.

+ +
+
+ +

◆ MessagePair() [4/8]

+ +
+
+ + + + + + + + + + + + + + + + + + +
modulo_core::communication::MessagePair< std_msgs::msg::Float64, double >::MessagePair (std::shared_ptr< double > data,
std::shared_ptr< rclcpp::Clock > clock 
)
+
+ +

Definition at line 12 of file MessagePair.cpp.

+ +
+
+ +

◆ MessagePair() [5/8]

+ +
+
+ + + + + + + + + + + + + + + + + + +
modulo_core::communication::MessagePair< std_msgs::msg::Float64MultiArray, std::vector< double > >::MessagePair (std::shared_ptr< std::vector< double > > data,
std::shared_ptr< rclcpp::Clock > clock 
)
+
+ +

Definition at line 17 of file MessagePair.cpp.

+ +
+
+ +

◆ MessagePair() [6/8]

+ +
+
+ + + + + + + + + + + + + + + + + + +
modulo_core::communication::MessagePair< std_msgs::msg::Int32, int >::MessagePair (std::shared_ptr< int > data,
std::shared_ptr< rclcpp::Clock > clock 
)
+
+ +

Definition at line 22 of file MessagePair.cpp.

+ +
+
+ +

◆ MessagePair() [7/8]

+ +
+
+ + + + + + + + + + + + + + + + + + +
modulo_core::communication::MessagePair< std_msgs::msg::String, std::string >::MessagePair (std::shared_ptr< std::string > data,
std::shared_ptr< rclcpp::Clock > clock 
)
+
+ +

Definition at line 26 of file MessagePair.cpp.

+ +
+
+ +

◆ MessagePair() [8/8]

+ +
+
+ + + + + + + + + + + + + + + + + + +
modulo_core::communication::MessagePair< EncodedState, state_representation::State >::MessagePair (std::shared_ptr< state_representation::State > data,
std::shared_ptr< rclcpp::Clock > clock 
)
+
+ +

Definition at line 31 of file MessagePair.cpp.

+ +
+
+

Member Function Documentation

+ +

◆ get_data()

+ +
+
+
+template<typename MsgT , typename DataT >
+ + + + + +
+ + + + + + + +
std::shared_ptr< DataT > modulo_core::communication::MessagePair< MsgT, DataT >::get_data () const
+
+inline
+
+ +

Get the data pointer.

+ +

Definition at line 178 of file MessagePair.hpp.

+ +
+
+ +

◆ read_message()

+ +
+
+
+template<typename MsgT , typename DataT >
+ + + + + +
+ + + + + + + + +
void modulo_core::communication::MessagePair< MsgT, DataT >::read_message (const MsgT & message)
+
+inline
+
+ +

Read a ROS message and store the value in the data pointer.

+
Parameters
+ + +
messageThe ROS message to read
+
+
+
Exceptions
+ + + +
modulo_core::exceptions::NullPointerExceptionif the data pointer is null
modulo_core::exceptions::MessageTranslationExceptionif the message could not be read
+
+
+ +

Definition at line 148 of file MessagePair.hpp.

+ +
+
+ +

◆ set_data()

+ +
+
+
+template<typename MsgT , typename DataT >
+ + + + + +
+ + + + + + + + +
void modulo_core::communication::MessagePair< MsgT, DataT >::set_data (const std::shared_ptr< DataT > & data)
+
+inline
+
+ +

Set the data pointer.

+
Exceptions
+ + +
modulo_core::exceptions::NullPointerExceptionif the provided data pointer is null
+
+
+ +

Definition at line 183 of file MessagePair.hpp.

+ +
+
+ +

◆ write_message()

+ +
+
+
+template<typename MsgT , typename DataT >
+ + + + + +
+ + + + + + + +
MsgT modulo_core::communication::MessagePair< MsgT, DataT >::write_message () const
+
+inline
+
+ +

Write the value of the data pointer to a ROS message.

+
Returns
The value of the data pointer as a ROS message
+
Exceptions
+ + + +
modulo_core::exceptions::NullPointerExceptionif the data pointer is null
modulo_core::exceptions::MessageTranslationExceptionif the data could not be written to message
+
+
+ +

Definition at line 112 of file MessagePair.hpp.

+ +
+
+
The documentation for this class was generated from the following file: +
+ + + + diff --git a/versions/v5.0.1/classmodulo__core_1_1communication_1_1_message_pair.png b/versions/v5.0.1/classmodulo__core_1_1communication_1_1_message_pair.png new file mode 100644 index 00000000..23861810 Binary files /dev/null and b/versions/v5.0.1/classmodulo__core_1_1communication_1_1_message_pair.png differ diff --git a/versions/v5.0.1/classmodulo__core_1_1communication_1_1_message_pair_interface-members.html b/versions/v5.0.1/classmodulo__core_1_1communication_1_1_message_pair_interface-members.html new file mode 100644 index 00000000..7545fb25 --- /dev/null +++ b/versions/v5.0.1/classmodulo__core_1_1communication_1_1_message_pair_interface-members.html @@ -0,0 +1,95 @@ + + + + + + + +Modulo: Member List + + + + + + + + + +
+
+ + + + + + +
+
Modulo 5.0.0 +
+
+
+ + + + + + + + +
+
+ + +
+
+
+
+
+
Loading...
+
Searching...
+
No Matches
+
+
+
+
+ + +
+
+
modulo_core::communication::MessagePairInterface Member List
+
+
+ +

This is the complete list of members for modulo_core::communication::MessagePairInterface, including all inherited members.

+ + + + + + + + +
get_message_pair(bool validate_pointer=true)modulo_core::communication::MessagePairInterfaceinline
get_type() constmodulo_core::communication::MessagePairInterface
MessagePairInterface(MessageType type)modulo_core::communication::MessagePairInterfaceexplicit
MessagePairInterface(const MessagePairInterface &message_pair)=defaultmodulo_core::communication::MessagePairInterface
read(const MsgT &message)modulo_core::communication::MessagePairInterfaceinline
write()modulo_core::communication::MessagePairInterfaceinline
~MessagePairInterface()=defaultmodulo_core::communication::MessagePairInterfacevirtual
+ + + + diff --git a/versions/v5.0.1/classmodulo__core_1_1communication_1_1_message_pair_interface.html b/versions/v5.0.1/classmodulo__core_1_1communication_1_1_message_pair_interface.html new file mode 100644 index 00000000..876317e4 --- /dev/null +++ b/versions/v5.0.1/classmodulo__core_1_1communication_1_1_message_pair_interface.html @@ -0,0 +1,338 @@ + + + + + + + +Modulo: modulo_core::communication::MessagePairInterface Class Reference + + + + + + + + + +
+
+ + + + + + +
+
Modulo 5.0.0 +
+
+
+ + + + + + + + +
+
+ + +
+
+
+
+
+
Loading...
+
Searching...
+
No Matches
+
+
+
+
+ + +
+
+
+Public Member Functions | +List of all members
+
modulo_core::communication::MessagePairInterface Class Reference
+
+
+ +

Interface class to enable non-templated writing and reading ROS messages from derived MessagePair instances through dynamic down-casting. + More...

+ +

#include <MessagePairInterface.hpp>

+
+Inheritance diagram for modulo_core::communication::MessagePairInterface:
+
+
+ + +modulo_core::communication::MessagePair< MsgT, DataT > + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + +

+Public Member Functions

 MessagePairInterface (MessageType type)
 Constructor with the message type.
 
+virtual ~MessagePairInterface ()=default
 Default virtual destructor.
 
MessagePairInterface (const MessagePairInterface &message_pair)=default
 Copy constructor from another MessagePairInterface.
 
template<typename MsgT , typename DataT >
std::shared_ptr< MessagePair< MsgT, DataT > > get_message_pair (bool validate_pointer=true)
 Get a pointer to a derived MessagePair instance from a MessagePairInterface pointer.
 
template<typename MsgT , typename DataT >
MsgT write ()
 Get the ROS message of a derived MessagePair instance through the MessagePairInterface pointer.
 
template<typename MsgT , typename DataT >
void read (const MsgT &message)
 Read a ROS message and set the data of the derived MessagePair instance through the MessagePairInterface pointer.
 
MessageType get_type () const
 Get the MessageType of the MessagePairInterface.
 
+

Detailed Description

+

Interface class to enable non-templated writing and reading ROS messages from derived MessagePair instances through dynamic down-casting.

+ +

Definition at line 19 of file MessagePairInterface.hpp.

+

Constructor & Destructor Documentation

+ +

◆ MessagePairInterface()

+ +
+
+ + + + + +
+ + + + + + + + +
modulo_core::communication::MessagePairInterface::MessagePairInterface (MessageType type)
+
+explicit
+
+ +

Constructor with the message type.

+
Parameters
+ + +
typeThe message type of the message pair
+
+
+ +

Definition at line 5 of file MessagePairInterface.cpp.

+ +
+
+

Member Function Documentation

+ +

◆ get_message_pair()

+ +
+
+
+template<typename MsgT , typename DataT >
+ + + + + +
+ + + + + + + + +
std::shared_ptr< MessagePair< MsgT, DataT > > modulo_core::communication::MessagePairInterface::get_message_pair (bool validate_pointer = true)
+
+inline
+
+ +

Get a pointer to a derived MessagePair instance from a MessagePairInterface pointer.

+

If a MessagePairInterface pointer is used to address a derived MessagePair instance, this method will return a pointer to that derived instance through dynamic down-casting. The downcast will fail if the base MessagePairInterface object has no reference count (if the object is not owned by any pointer), or if the derived object is not a correctly typed instance of a MessagePair. By default, an InvalidPointerCastException is thrown when the downcast fails. If this validation is disabled by setting the validate_pointer flag to false, it will not throw an exception and instead return a null pointer.

Template Parameters
+ + + +
MsgTThe ROS message type of the MessagePair
DataTThe data type of the MessagePair
+
+
+
Parameters
+ + +
validate_pointerIf true, throw an exception when down-casting fails
+
+
+
Exceptions
+ + + +
modulo_core::exceptions::InvalidPointerExceptionif the base MessagePairInterface object has no reference count and validate_pointer is set to true
modulo_core::exceptions::InvalidPointerCastExceptionif the derived object from the dynamic down-casting is not a correctly typed instance of a MessagePair
+
+
+
Returns
A pointer to a derived MessagePair instance of the desired type, or a null pointer if down-casting failed and validate_pointer was set to false.
+ +

Definition at line 93 of file MessagePairInterface.hpp.

+ +
+
+ +

◆ get_type()

+ +
+
+ + + + + + + +
MessageType modulo_core::communication::MessagePairInterface::get_type () const
+
+ +

Get the MessageType of the MessagePairInterface.

+
See also
MessageType
+ +

Definition at line 7 of file MessagePairInterface.cpp.

+ +
+
+ +

◆ read()

+ +
+
+
+template<typename MsgT , typename DataT >
+ + + + + +
+ + + + + + + + +
void modulo_core::communication::MessagePairInterface::read (const MsgT & message)
+
+inline
+
+ +

Read a ROS message and set the data of the derived MessagePair instance through the MessagePairInterface pointer.

+

This throws an InvalidPointerCastException if the MessagePairInterface does not point to a valid MessagePair instance or if the specified types does not match the type of the MessagePair instance.

Template Parameters
+ + + +
MsgTThe ROS message type of the MessagePair
DataTThe data type of the MessagePair
+
+
+
Parameters
+ + +
messageThe ROS message to read from
+
+
+ +

Definition at line 115 of file MessagePairInterface.hpp.

+ +
+
+ +

◆ write()

+ +
+
+
+template<typename MsgT , typename DataT >
+ + + + + +
+ + + + + + + +
MsgT modulo_core::communication::MessagePairInterface::write ()
+
+inline
+
+ +

Get the ROS message of a derived MessagePair instance through the MessagePairInterface pointer.

+

This throws an InvalidPointerCastException if the MessagePairInterface does not point to a valid MessagePair instance or if the specified types does not match the type of the MessagePair instance.

See also
MessagePairInterface::get_message_pair()
+
Template Parameters
+ + + +
MsgTThe ROS message type of the MessagePair
DataTThe data type of the MessagePair
+
+
+
Returns
The ROS message containing the data from the underlying MessagePair instance
+ +

Definition at line 110 of file MessagePairInterface.hpp.

+ +
+
+
The documentation for this class was generated from the following files: +
+ + + + diff --git a/versions/v5.0.1/classmodulo__core_1_1communication_1_1_message_pair_interface.png b/versions/v5.0.1/classmodulo__core_1_1communication_1_1_message_pair_interface.png new file mode 100644 index 00000000..173df8fb Binary files /dev/null and b/versions/v5.0.1/classmodulo__core_1_1communication_1_1_message_pair_interface.png differ diff --git a/versions/v5.0.1/classmodulo__core_1_1communication_1_1_publisher_handler-members.html b/versions/v5.0.1/classmodulo__core_1_1communication_1_1_publisher_handler-members.html new file mode 100644 index 00000000..68109969 --- /dev/null +++ b/versions/v5.0.1/classmodulo__core_1_1communication_1_1_publisher_handler-members.html @@ -0,0 +1,102 @@ + + + + + + + +Modulo: Member List + + + + + + + + + +
+
+ + + + + + +
+
Modulo 5.0.0 +
+
+
+ + + + + + + + +
+
+ + +
+
+
+
+
+
Loading...
+
Searching...
+
No Matches
+
+
+
+
+ + +
+
+
modulo_core::communication::PublisherHandler< PubT, MsgT > Member List
+
+
+ +

This is the complete list of members for modulo_core::communication::PublisherHandler< PubT, MsgT >, including all inherited members.

+ + + + + + + + + + + + + + + +
activate() overridemodulo_core::communication::PublisherHandler< PubT, MsgT >inlinevirtual
create_publisher_interface(const std::shared_ptr< MessagePairInterface > &message_pair)modulo_core::communication::PublisherHandler< PubT, MsgT >inline
deactivate() overridemodulo_core::communication::PublisherHandler< PubT, MsgT >inlinevirtual
get_handler(bool validate_pointer=true)modulo_core::communication::PublisherInterfaceinline
get_message_pair() constmodulo_core::communication::PublisherInterface
get_type() constmodulo_core::communication::PublisherInterface
publish() overridemodulo_core::communication::PublisherHandler< PubT, MsgT >inlinevirtual
publish(const MsgT &message) constmodulo_core::communication::PublisherHandler< PubT, MsgT >
PublisherHandler(PublisherType type, std::shared_ptr< PubT > publisher)modulo_core::communication::PublisherHandler< PubT, MsgT >
PublisherInterface(PublisherType type, std::shared_ptr< MessagePairInterface > message_pair=nullptr)modulo_core::communication::PublisherInterfaceexplicit
PublisherInterface(const PublisherInterface &publisher)=defaultmodulo_core::communication::PublisherInterface
set_message_pair(const std::shared_ptr< MessagePairInterface > &message_pair)modulo_core::communication::PublisherInterface
~PublisherHandler() overridemodulo_core::communication::PublisherHandler< PubT, MsgT >
~PublisherInterface()=defaultmodulo_core::communication::PublisherInterfacevirtual
+ + + + diff --git a/versions/v5.0.1/classmodulo__core_1_1communication_1_1_publisher_handler.html b/versions/v5.0.1/classmodulo__core_1_1communication_1_1_publisher_handler.html new file mode 100644 index 00000000..2b9b372d --- /dev/null +++ b/versions/v5.0.1/classmodulo__core_1_1communication_1_1_publisher_handler.html @@ -0,0 +1,442 @@ + + + + + + + +Modulo: modulo_core::communication::PublisherHandler< PubT, MsgT > Class Template Reference + + + + + + + + + +
+
+ + + + + + +
+
Modulo 5.0.0 +
+
+
+ + + + + + + + +
+
+ + +
+
+
+
+
+
Loading...
+
Searching...
+
No Matches
+
+
+
+
+ + +
+
+
+Public Member Functions | +List of all members
+
modulo_core::communication::PublisherHandler< PubT, MsgT > Class Template Reference
+
+
+ +

The PublisherHandler handles different types of ROS publishers to activate, deactivate and publish data with those publishers. + More...

+ +

#include <PublisherHandler.hpp>

+
+Inheritance diagram for modulo_core::communication::PublisherHandler< PubT, MsgT >:
+
+
+ + +modulo_core::communication::PublisherInterface + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +

+Public Member Functions

 PublisherHandler (PublisherType type, std::shared_ptr< PubT > publisher)
 Constructor with the publisher type and the pointer to the ROS publisher.
 
 ~PublisherHandler () override
 Destructor to explicitly reset the publisher pointer.
 
virtual void activate () override
 Activate ROS publisher of a derived PublisherHandler instance through the PublisherInterface pointer.
 
virtual void deactivate () override
 Deactivate ROS publisher of a derived PublisherHandler instance through the PublisherInterface pointer.
 
void publish () override
 Publish the data stored in the message pair through the ROS publisher of a derived PublisherHandler instance through the PublisherInterface pointer.
 
void publish (const MsgT &message) const
 Publish the ROS message through the ROS publisher.
 
std::shared_ptr< PublisherInterfacecreate_publisher_interface (const std::shared_ptr< MessagePairInterface > &message_pair)
 Create a PublisherInterface instance from the current PublisherHandler.
 
- Public Member Functions inherited from modulo_core::communication::PublisherInterface
 PublisherInterface (PublisherType type, std::shared_ptr< MessagePairInterface > message_pair=nullptr)
 Constructor with the message type and message pair.
 
PublisherInterface (const PublisherInterface &publisher)=default
 Copy constructor from another PublisherInterface.
 
+virtual ~PublisherInterface ()=default
 Default virtual destructor.
 
template<typename PubT , typename MsgT >
std::shared_ptr< PublisherHandler< PubT, MsgT > > get_handler (bool validate_pointer=true)
 Get a pointer to a derived PublisherHandler instance from a PublisherInterface pointer.
 
std::shared_ptr< MessagePairInterfaceget_message_pair () const
 Get the pointer to the message pair of the PublisherInterface.
 
void set_message_pair (const std::shared_ptr< MessagePairInterface > &message_pair)
 Set the pointer to the message pair of the PublisherInterface.
 
PublisherType get_type () const
 Get the type of the publisher interface.
 
+ + + + + +

+Additional Inherited Members

- Protected Attributes inherited from modulo_core::communication::PublisherInterface
std::shared_ptr< MessagePairInterfacemessage_pair_
 The pointer to the stored MessagePair instance.
 
+

Detailed Description

+
template<typename PubT, typename MsgT>
+class modulo_core::communication::PublisherHandler< PubT, MsgT >

The PublisherHandler handles different types of ROS publishers to activate, deactivate and publish data with those publishers.

+
Template Parameters
+ + + +
PubTThe ROS publisher type
MsgTThe ROS message type of the ROS publisher
+
+
+ +

Definition at line 19 of file PublisherHandler.hpp.

+

Constructor & Destructor Documentation

+ +

◆ PublisherHandler()

+ +
+
+
+template<typename PubT , typename MsgT >
+ + + + + + + + + + + + + + + + + + +
modulo_core::communication::PublisherHandler< PubT, MsgT >::PublisherHandler (PublisherType type,
std::shared_ptr< PubT > publisher 
)
+
+ +

Constructor with the publisher type and the pointer to the ROS publisher.

+
Parameters
+ + + +
typeThe publisher type
publisherThe pointer to the ROS publisher
+
+
+ +

Definition at line 69 of file PublisherHandler.hpp.

+ +
+
+ +

◆ ~PublisherHandler()

+ +
+
+
+template<typename PubT , typename MsgT >
+ + + + + +
+ + + + + + + +
modulo_core::communication::PublisherHandler< PubT, MsgT >::~PublisherHandler ()
+
+override
+
+ +

Destructor to explicitly reset the publisher pointer.

+ +

Definition at line 73 of file PublisherHandler.hpp.

+ +
+
+

Member Function Documentation

+ +

◆ activate()

+ +
+
+
+template<typename PubT , typename MsgT >
+ + + + + +
+ + + + + + + +
void modulo_core::communication::PublisherHandler< PubT, MsgT >::activate ()
+
+inlineoverridevirtual
+
+ +

Activate ROS publisher of a derived PublisherHandler instance through the PublisherInterface pointer.

+

This throws an InvalidPointerCastException if the PublisherInterface does not point to a valid PublisherHandler instance or if the type of the message pair does not match the type of the PublisherHandler instance.

See also
PublisherInterface::get_handler
+
Exceptions
+ + +
modulo_core::exceptions::NullPointerExceptionif the message pair pointer is null
+
+
+ +

Reimplemented from modulo_core::communication::PublisherInterface.

+ +

Definition at line 78 of file PublisherHandler.hpp.

+ +
+
+ +

◆ create_publisher_interface()

+ +
+
+
+template<typename PubT , typename MsgT >
+ + + + + +
+ + + + + + + + +
std::shared_ptr< PublisherInterface > modulo_core::communication::PublisherHandler< PubT, MsgT >::create_publisher_interface (const std::shared_ptr< MessagePairInterface > & message_pair)
+
+inline
+
+ +

Create a PublisherInterface instance from the current PublisherHandler.

+
Parameters
+ + +
message_pairThe message pair of the PublisherInterface
+
+
+ +

Definition at line 135 of file PublisherHandler.hpp.

+ +
+
+ +

◆ deactivate()

+ +
+
+
+template<typename PubT , typename MsgT >
+ + + + + +
+ + + + + + + +
void modulo_core::communication::PublisherHandler< PubT, MsgT >::deactivate ()
+
+inlineoverridevirtual
+
+ +

Deactivate ROS publisher of a derived PublisherHandler instance through the PublisherInterface pointer.

+

This throws an InvalidPointerCastException if the PublisherInterface does not point to a valid PublisherHandler instance or if the type of the message pair does not match the type of the PublisherHandler instance.

See also
PublisherInterface::get_handler
+
Exceptions
+ + +
modulo_core::exceptions::NullPointerExceptionif the message pair pointer is null
+
+
+ +

Reimplemented from modulo_core::communication::PublisherInterface.

+ +

Definition at line 92 of file PublisherHandler.hpp.

+ +
+
+ +

◆ publish() [1/2]

+ +
+
+
+template<typename PubT , typename MsgT >
+ + + + + +
+ + + + + + + +
void modulo_core::communication::PublisherHandler< PubT, MsgT >::publish ()
+
+inlineoverridevirtual
+
+ +

Publish the data stored in the message pair through the ROS publisher of a derived PublisherHandler instance through the PublisherInterface pointer.

+

This throws an InvalidPointerCastException if the PublisherInterface does not point to a valid PublisherHandler instance or if the type of the message pair does not match the type of the PublisherHandler instance.

See also
PublisherInterface::get_handler
+
Exceptions
+ + +
modulo_core::exceptions::CoreExceptionif the publishing failed for some reason (translation, null pointer, pointer cast, ...)
+
+
+ +

Reimplemented from modulo_core::communication::PublisherInterface.

+ +

Definition at line 106 of file PublisherHandler.hpp.

+ +
+
+ +

◆ publish() [2/2]

+ +
+
+
+template<typename PubT , typename MsgT >
+ + + + + + + + +
void modulo_core::communication::PublisherHandler< PubT, MsgT >::publish (const MsgT & message) const
+
+ +

Publish the ROS message through the ROS publisher.

+
Parameters
+ + +
messageThe ROS message to publish
+
+
+
Exceptions
+ + +
modulo_core::exceptions::NullPointerExceptionif the publisher pointer is null
+
+
+ +

Definition at line 122 of file PublisherHandler.hpp.

+ +
+
+
The documentation for this class was generated from the following file: +
+ + + + diff --git a/versions/v5.0.1/classmodulo__core_1_1communication_1_1_publisher_handler.png b/versions/v5.0.1/classmodulo__core_1_1communication_1_1_publisher_handler.png new file mode 100644 index 00000000..42d50947 Binary files /dev/null and b/versions/v5.0.1/classmodulo__core_1_1communication_1_1_publisher_handler.png differ diff --git a/versions/v5.0.1/classmodulo__core_1_1communication_1_1_publisher_interface-members.html b/versions/v5.0.1/classmodulo__core_1_1communication_1_1_publisher_interface-members.html new file mode 100644 index 00000000..462d8667 --- /dev/null +++ b/versions/v5.0.1/classmodulo__core_1_1communication_1_1_publisher_interface-members.html @@ -0,0 +1,99 @@ + + + + + + + +Modulo: Member List + + + + + + + + + +
+
+ + + + + + +
+
Modulo 5.0.0 +
+
+
+ + + + + + + + +
+
+ + +
+
+
+
+
+
Loading...
+
Searching...
+
No Matches
+
+
+
+
+ + +
+
+
modulo_core::communication::PublisherInterface Member List
+
+
+ +

This is the complete list of members for modulo_core::communication::PublisherInterface, including all inherited members.

+ + + + + + + + + + + + +
activate()modulo_core::communication::PublisherInterfacevirtual
deactivate()modulo_core::communication::PublisherInterfacevirtual
get_handler(bool validate_pointer=true)modulo_core::communication::PublisherInterfaceinline
get_message_pair() constmodulo_core::communication::PublisherInterface
get_type() constmodulo_core::communication::PublisherInterface
message_pair_modulo_core::communication::PublisherInterfaceprotected
publish()modulo_core::communication::PublisherInterfacevirtual
PublisherInterface(PublisherType type, std::shared_ptr< MessagePairInterface > message_pair=nullptr)modulo_core::communication::PublisherInterfaceexplicit
PublisherInterface(const PublisherInterface &publisher)=defaultmodulo_core::communication::PublisherInterface
set_message_pair(const std::shared_ptr< MessagePairInterface > &message_pair)modulo_core::communication::PublisherInterface
~PublisherInterface()=defaultmodulo_core::communication::PublisherInterfacevirtual
+ + + + diff --git a/versions/v5.0.1/classmodulo__core_1_1communication_1_1_publisher_interface.html b/versions/v5.0.1/classmodulo__core_1_1communication_1_1_publisher_interface.html new file mode 100644 index 00000000..266a837f --- /dev/null +++ b/versions/v5.0.1/classmodulo__core_1_1communication_1_1_publisher_interface.html @@ -0,0 +1,468 @@ + + + + + + + +Modulo: modulo_core::communication::PublisherInterface Class Reference + + + + + + + + + +
+
+ + + + + + +
+
Modulo 5.0.0 +
+
+
+ + + + + + + + +
+
+ + +
+
+
+
+
+
Loading...
+
Searching...
+
No Matches
+
+
+
+
+ + +
+
+
+Public Member Functions | +Protected Attributes | +List of all members
+
modulo_core::communication::PublisherInterface Class Reference
+
+
+ +

Interface class to enable non-templated activating/deactivating/publishing of ROS publishers from derived PublisherHandler instances through dynamic down-casting. + More...

+ +

#include <PublisherInterface.hpp>

+
+Inheritance diagram for modulo_core::communication::PublisherInterface:
+
+
+ + +modulo_core::communication::PublisherHandler< PubT, MsgT > + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +

+Public Member Functions

 PublisherInterface (PublisherType type, std::shared_ptr< MessagePairInterface > message_pair=nullptr)
 Constructor with the message type and message pair.
 
PublisherInterface (const PublisherInterface &publisher)=default
 Copy constructor from another PublisherInterface.
 
+virtual ~PublisherInterface ()=default
 Default virtual destructor.
 
template<typename PubT , typename MsgT >
std::shared_ptr< PublisherHandler< PubT, MsgT > > get_handler (bool validate_pointer=true)
 Get a pointer to a derived PublisherHandler instance from a PublisherInterface pointer.
 
virtual void activate ()
 Activate ROS publisher of a derived PublisherHandler instance through the PublisherInterface pointer.
 
virtual void deactivate ()
 Deactivate ROS publisher of a derived PublisherHandler instance through the PublisherInterface pointer.
 
virtual void publish ()
 Publish the data stored in the message pair through the ROS publisher of a derived PublisherHandler instance through the PublisherInterface pointer.
 
std::shared_ptr< MessagePairInterfaceget_message_pair () const
 Get the pointer to the message pair of the PublisherInterface.
 
void set_message_pair (const std::shared_ptr< MessagePairInterface > &message_pair)
 Set the pointer to the message pair of the PublisherInterface.
 
PublisherType get_type () const
 Get the type of the publisher interface.
 
+ + + + +

+Protected Attributes

std::shared_ptr< MessagePairInterfacemessage_pair_
 The pointer to the stored MessagePair instance.
 
+

Detailed Description

+

Interface class to enable non-templated activating/deactivating/publishing of ROS publishers from derived PublisherHandler instances through dynamic down-casting.

+ +

Definition at line 20 of file PublisherInterface.hpp.

+

Constructor & Destructor Documentation

+ +

◆ PublisherInterface()

+ +
+
+ + + + + +
+ + + + + + + + + + + + + + + + + + +
modulo_core::communication::PublisherInterface::PublisherInterface (PublisherType type,
std::shared_ptr< MessagePairInterfacemessage_pair = nullptr 
)
+
+explicit
+
+ +

Constructor with the message type and message pair.

+
Parameters
+ + + +
typeThe type of the publisher interface
message_pairThe message pair with the data to be published
+
+
+ +

Definition at line 17 of file PublisherInterface.cpp.

+ +
+
+

Member Function Documentation

+ +

◆ activate()

+ +
+
+ + + + + +
+ + + + + + + +
void modulo_core::communication::PublisherInterface::activate ()
+
+virtual
+
+ +

Activate ROS publisher of a derived PublisherHandler instance through the PublisherInterface pointer.

+

This throws an InvalidPointerCastException if the PublisherInterface does not point to a valid PublisherHandler instance or if the type of the message pair does not match the type of the PublisherHandler instance.

See also
PublisherInterface::get_handler
+
Exceptions
+ + +
modulo_core::exceptions::NullPointerExceptionif the message pair pointer is null
+
+
+ +

Reimplemented in modulo_core::communication::PublisherHandler< PubT, MsgT >.

+ +

Definition at line 20 of file PublisherInterface.cpp.

+ +
+
+ +

◆ deactivate()

+ +
+
+ + + + + +
+ + + + + + + +
void modulo_core::communication::PublisherInterface::deactivate ()
+
+virtual
+
+ +

Deactivate ROS publisher of a derived PublisherHandler instance through the PublisherInterface pointer.

+

This throws an InvalidPointerCastException if the PublisherInterface does not point to a valid PublisherHandler instance or if the type of the message pair does not match the type of the PublisherHandler instance.

See also
PublisherInterface::get_handler
+
Exceptions
+ + +
modulo_core::exceptions::NullPointerExceptionif the message pair pointer is null
+
+
+ +

Reimplemented in modulo_core::communication::PublisherHandler< PubT, MsgT >.

+ +

Definition at line 25 of file PublisherInterface.cpp.

+ +
+
+ +

◆ get_handler()

+ +
+
+
+template<typename PubT , typename MsgT >
+ + + + + +
+ + + + + + + + +
std::shared_ptr< PublisherHandler< PubT, MsgT > > modulo_core::communication::PublisherInterface::get_handler (bool validate_pointer = true)
+
+inline
+
+ +

Get a pointer to a derived PublisherHandler instance from a PublisherInterface pointer.

+

If a PublisherInterface pointer is used to address a derived PublisherHandler instance, this method will return a pointer to that derived instance through dynamic down-casting. The downcast will fail if the base PublisherInterface object has no reference count (if the object is not owned by any pointer), or if the derived object is not a correctly typed instance of a PublisherHandler. By default, an InvalidPointerCastException is thrown when the downcast fails. If this validation is disabled by setting the validate_pointer flag to false, it will not throw an exception and instead return a null pointer.

Template Parameters
+ + + +
PubTThe ROS publisher type
MsgTThe ROS message type
+
+
+
Exceptions
+ + + +
modulo_core::exceptions::InvalidPointerExceptionif the base PublisherInterface object has no reference count and validate_pointer is set to true
modulo_core::exceptions::InvalidPointerCastExceptionif the derived object from the dynamic down-casting is not a correctly typed instance of a PublisherHandler
+
+
+
Parameters
+ + +
validate_pointerIf true, throw an exception when down-casting fails
+
+
+
Returns
A pointer to a derived PublisherHandler instance of the desired type, or a null pointer if down-casting failed and validate_pointer was set to false.
+ +

Definition at line 130 of file PublisherInterface.hpp.

+ +
+
+ +

◆ get_message_pair()

+ +
+
+ + + + + + + +
std::shared_ptr< MessagePairInterface > modulo_core::communication::PublisherInterface::get_message_pair () const
+
+ +

Get the pointer to the message pair of the PublisherInterface.

+ +

Definition at line 78 of file PublisherInterface.cpp.

+ +
+
+ +

◆ get_type()

+ +
+
+ + + + + + + +
PublisherType modulo_core::communication::PublisherInterface::get_type () const
+
+ +

Get the type of the publisher interface.

+
See also
PublisherType
+ +

Definition at line 89 of file PublisherInterface.cpp.

+ +
+
+ +

◆ publish()

+ +
+
+ + + + + +
+ + + + + + + +
void modulo_core::communication::PublisherInterface::publish ()
+
+virtual
+
+ +

Publish the data stored in the message pair through the ROS publisher of a derived PublisherHandler instance through the PublisherInterface pointer.

+

This throws an InvalidPointerCastException if the PublisherInterface does not point to a valid PublisherHandler instance or if the type of the message pair does not match the type of the PublisherHandler instance.

See also
PublisherInterface::get_handler
+
Exceptions
+ + +
modulo_core::exceptions::CoreExceptionif the publishing failed for some reason (translation, null pointer, pointer cast, ...)
+
+
+ +

Reimplemented in modulo_core::communication::PublisherHandler< PubT, MsgT >.

+ +

Definition at line 30 of file PublisherInterface.cpp.

+ +
+
+ +

◆ set_message_pair()

+ +
+
+ + + + + + + + +
void modulo_core::communication::PublisherInterface::set_message_pair (const std::shared_ptr< MessagePairInterface > & message_pair)
+
+ +

Set the pointer to the message pair of the PublisherInterface.

+
Exceptions
+ + +
modulo_core::exceptions::NullPointerExceptionif the provided message pair pointer is null
+
+
+ +

Definition at line 82 of file PublisherInterface.cpp.

+ +
+
+

Member Data Documentation

+ +

◆ message_pair_

+ +
+
+ + + + + +
+ + + + +
std::shared_ptr<MessagePairInterface> modulo_core::communication::PublisherInterface::message_pair_
+
+protected
+
+ +

The pointer to the stored MessagePair instance.

+ +

Definition at line 110 of file PublisherInterface.hpp.

+ +
+
+
The documentation for this class was generated from the following files: +
+ + + + diff --git a/versions/v5.0.1/classmodulo__core_1_1communication_1_1_publisher_interface.png b/versions/v5.0.1/classmodulo__core_1_1communication_1_1_publisher_interface.png new file mode 100644 index 00000000..c4195016 Binary files /dev/null and b/versions/v5.0.1/classmodulo__core_1_1communication_1_1_publisher_interface.png differ diff --git a/versions/v5.0.1/classmodulo__core_1_1communication_1_1_subscription_handler-members.html b/versions/v5.0.1/classmodulo__core_1_1communication_1_1_subscription_handler-members.html new file mode 100644 index 00000000..5fcd32e8 --- /dev/null +++ b/versions/v5.0.1/classmodulo__core_1_1communication_1_1_subscription_handler-members.html @@ -0,0 +1,103 @@ + + + + + + + +Modulo: Member List + + + + + + + + + +
+
+ + + + + + +
+
Modulo 5.0.0 +
+
+
+ + + + + + + + +
+
+ + +
+
+
+
+
+
Loading...
+
Searching...
+
No Matches
+
+
+
+
+ + +
+
+
modulo_core::communication::SubscriptionHandler< MsgT > Member List
+
+
+ +

This is the complete list of members for modulo_core::communication::SubscriptionHandler< MsgT >, including all inherited members.

+ + + + + + + + + + + + + + + + +
create_subscription_interface(const std::shared_ptr< rclcpp::Subscription< MsgT > > &subscription)modulo_core::communication::SubscriptionHandler< MsgT >
get_callback()modulo_core::communication::SubscriptionHandler< MsgT >inline
get_callback(const std::function< void()> &user_callback)modulo_core::communication::SubscriptionHandler< MsgT >
get_handler(bool validate_pointer=true)modulo_core::communication::SubscriptionInterfaceinline
get_message_pair() constmodulo_core::communication::SubscriptionInterface
get_subscription() constmodulo_core::communication::SubscriptionHandler< MsgT >
message_pair_modulo_core::communication::SubscriptionInterfaceprotected
set_message_pair(const std::shared_ptr< MessagePairInterface > &message_pair)modulo_core::communication::SubscriptionInterface
set_subscription(const std::shared_ptr< rclcpp::Subscription< MsgT > > &subscription)modulo_core::communication::SubscriptionHandler< MsgT >
set_user_callback(const std::function< void()> &user_callback)modulo_core::communication::SubscriptionHandler< MsgT >
SubscriptionHandler(std::shared_ptr< MessagePairInterface > message_pair=nullptr, const rclcpp::Logger &logger=rclcpp::get_logger("SubscriptionHandler"))modulo_core::communication::SubscriptionHandler< MsgT >explicit
SubscriptionInterface(std::shared_ptr< MessagePairInterface > message_pair=nullptr)modulo_core::communication::SubscriptionInterfaceexplicit
SubscriptionInterface(const SubscriptionInterface &subscription)=defaultmodulo_core::communication::SubscriptionInterface
~SubscriptionHandler() overridemodulo_core::communication::SubscriptionHandler< MsgT >
~SubscriptionInterface()=defaultmodulo_core::communication::SubscriptionInterfacevirtual
+ + + + diff --git a/versions/v5.0.1/classmodulo__core_1_1communication_1_1_subscription_handler.html b/versions/v5.0.1/classmodulo__core_1_1communication_1_1_subscription_handler.html new file mode 100644 index 00000000..5cc66d2b --- /dev/null +++ b/versions/v5.0.1/classmodulo__core_1_1communication_1_1_subscription_handler.html @@ -0,0 +1,437 @@ + + + + + + + +Modulo: modulo_core::communication::SubscriptionHandler< MsgT > Class Template Reference + + + + + + + + + +
+
+ + + + + + +
+
Modulo 5.0.0 +
+
+
+ + + + + + + + +
+
+ + +
+
+
+
+
+
Loading...
+
Searching...
+
No Matches
+
+
+
+
+ + +
+
+
+Public Member Functions | +List of all members
+
modulo_core::communication::SubscriptionHandler< MsgT > Class Template Reference
+
+
+ +

The SubscriptionHandler handles different types of ROS subscriptions to receive data from those subscriptions. + More...

+ +

#include <SubscriptionHandler.hpp>

+
+Inheritance diagram for modulo_core::communication::SubscriptionHandler< MsgT >:
+
+
+ + +modulo_core::communication::SubscriptionInterface + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +

+Public Member Functions

 SubscriptionHandler (std::shared_ptr< MessagePairInterface > message_pair=nullptr, const rclcpp::Logger &logger=rclcpp::get_logger("SubscriptionHandler"))
 Constructor with the message pair.
 
 ~SubscriptionHandler () override
 Destructor to explicitly reset the subscription pointer.
 
std::shared_ptr< rclcpp::Subscription< MsgT > > get_subscription () const
 Getter of the ROS subscription.
 
void set_subscription (const std::shared_ptr< rclcpp::Subscription< MsgT > > &subscription)
 Setter of the ROS subscription.
 
void set_user_callback (const std::function< void()> &user_callback)
 Setter of a user callback function to be executed after the subscription callback.
 
std::function< void(const std::shared_ptr< MsgT >)> get_callback ()
 Get a callback function that will be associated with the ROS subscription to receive and translate messages.
 
std::function< void(const std::shared_ptr< MsgT >)> get_callback (const std::function< void()> &user_callback)
 Get a callback function that will be associated with the ROS subscription to receive and translate messages.
 
std::shared_ptr< SubscriptionInterfacecreate_subscription_interface (const std::shared_ptr< rclcpp::Subscription< MsgT > > &subscription)
 Create a SubscriptionInterface pointer through an instance of a SubscriptionHandler by providing a ROS subscription.
 
- Public Member Functions inherited from modulo_core::communication::SubscriptionInterface
 SubscriptionInterface (std::shared_ptr< MessagePairInterface > message_pair=nullptr)
 Constructor with the message pair.
 
SubscriptionInterface (const SubscriptionInterface &subscription)=default
 Copy constructor from another SubscriptionInterface.
 
+virtual ~SubscriptionInterface ()=default
 Default virtual destructor.
 
template<typename MsgT >
std::shared_ptr< SubscriptionHandler< MsgT > > get_handler (bool validate_pointer=true)
 Get a pointer to a derived SubscriptionHandler instance from a SubscriptionInterface pointer.
 
std::shared_ptr< MessagePairInterfaceget_message_pair () const
 Get the pointer to the message pair of the SubscriptionInterface.
 
void set_message_pair (const std::shared_ptr< MessagePairInterface > &message_pair)
 Set the pointer to the message pair of the SubscriptionInterface.
 
+ + + + + +

+Additional Inherited Members

- Protected Attributes inherited from modulo_core::communication::SubscriptionInterface
std::shared_ptr< MessagePairInterfacemessage_pair_
 The pointer to the stored MessagePair instance.
 
+

Detailed Description

+
template<typename MsgT>
+class modulo_core::communication::SubscriptionHandler< MsgT >

The SubscriptionHandler handles different types of ROS subscriptions to receive data from those subscriptions.

+
Template Parameters
+ + +
MsgTThe ROS message type of the ROS subscription
+
+
+ +

Definition at line 15 of file SubscriptionHandler.hpp.

+

Constructor & Destructor Documentation

+ +

◆ SubscriptionHandler()

+ +
+
+
+template<typename MsgT >
+ + + + + +
+ + + + + + + + + + + + + + + + + + +
modulo_core::communication::SubscriptionHandler< MsgT >::SubscriptionHandler (std::shared_ptr< MessagePairInterfacemessage_pair = nullptr,
const rclcpp::Logger & logger = rclcpp::get_logger("SubscriptionHandler< MsgT >") 
)
+
+explicit
+
+ +

Constructor with the message pair.

+
Parameters
+ + + +
message_pairThe pointer to the message pair with the data that should be updated through the subscription
loggerAn optional ROS logger to do logging from the subscription callback
+
+
+ +

Definition at line 102 of file SubscriptionHandler.hpp.

+ +
+
+ +

◆ ~SubscriptionHandler()

+ +
+
+
+template<typename MsgT >
+ + + + + +
+ + + + + + + +
modulo_core::communication::SubscriptionHandler< MsgT >::~SubscriptionHandler ()
+
+override
+
+ +

Destructor to explicitly reset the subscription pointer.

+ +

Definition at line 107 of file SubscriptionHandler.hpp.

+ +
+
+

Member Function Documentation

+ +

◆ create_subscription_interface()

+ +
+
+
+template<typename MsgT >
+ + + + + + + + +
std::shared_ptr< SubscriptionInterface > modulo_core::communication::SubscriptionHandler< MsgT >::create_subscription_interface (const std::shared_ptr< rclcpp::Subscription< MsgT > > & subscription)
+
+ +

Create a SubscriptionInterface pointer through an instance of a SubscriptionHandler by providing a ROS subscription.

+

This throws a NullPointerException if the ROS subscription is null.

See also
SubscriptionHandler::set_subscription
+
Parameters
+ + +
subscriptionThe ROS subscription
+
+
+
Returns
The resulting SubscriptionInterface pointer
+ +

Definition at line 158 of file SubscriptionHandler.hpp.

+ +
+
+ +

◆ get_callback() [1/2]

+ +
+
+
+template<typename MsgT >
+ + + + + +
+ + + + + + + +
std::function< void(const std::shared_ptr< MsgT >)> modulo_core::communication::SubscriptionHandler< MsgT >::get_callback ()
+
+inline
+
+ +

Get a callback function that will be associated with the ROS subscription to receive and translate messages.

+ +

Definition at line 125 of file SubscriptionHandler.hpp.

+ +
+
+ +

◆ get_callback() [2/2]

+ +
+
+
+template<typename MsgT >
+ + + + + + + + +
std::function< void(const std::shared_ptr< MsgT >)> modulo_core::communication::SubscriptionHandler< MsgT >::get_callback (const std::function< void()> & user_callback)
+
+ +

Get a callback function that will be associated with the ROS subscription to receive and translate messages.

+

This variant also takes a user callback function to execute after the message is received and translated.

Parameters
+ + +
user_callbackVoid callback function for additional logic after the message is received and translated.
+
+
+ +

Definition at line 152 of file SubscriptionHandler.hpp.

+ +
+
+ +

◆ get_subscription()

+ +
+
+
+template<typename MsgT >
+ + + + + + + +
std::shared_ptr< rclcpp::Subscription< MsgT > > modulo_core::communication::SubscriptionHandler< MsgT >::get_subscription () const
+
+ +

Getter of the ROS subscription.

+ +

Definition at line 112 of file SubscriptionHandler.hpp.

+ +
+
+ +

◆ set_subscription()

+ +
+
+
+template<typename MsgT >
+ + + + + + + + +
void modulo_core::communication::SubscriptionHandler< MsgT >::set_subscription (const std::shared_ptr< rclcpp::Subscription< MsgT > > & subscription)
+
+ +

Setter of the ROS subscription.

+
Parameters
+ + +
subscriptionThe ROS subscription
+
+
+
Exceptions
+ + +
modulo_core::exceptions::NullPointerExceptionif the provided subscription pointer is null
+
+
+ +

Definition at line 117 of file SubscriptionHandler.hpp.

+ +
+
+ +

◆ set_user_callback()

+ +
+
+
+template<typename MsgT >
+ + + + + + + + +
void modulo_core::communication::SubscriptionHandler< MsgT >::set_user_callback (const std::function< void()> & user_callback)
+
+ +

Setter of a user callback function to be executed after the subscription callback.

+
Parameters
+ + +
user_callbackThe ser callback function
+
+
+ +

Definition at line 146 of file SubscriptionHandler.hpp.

+ +
+
+
The documentation for this class was generated from the following file: +
+ + + + diff --git a/versions/v5.0.1/classmodulo__core_1_1communication_1_1_subscription_handler.png b/versions/v5.0.1/classmodulo__core_1_1communication_1_1_subscription_handler.png new file mode 100644 index 00000000..a6eb5ca6 Binary files /dev/null and b/versions/v5.0.1/classmodulo__core_1_1communication_1_1_subscription_handler.png differ diff --git a/versions/v5.0.1/classmodulo__core_1_1communication_1_1_subscription_interface-members.html b/versions/v5.0.1/classmodulo__core_1_1communication_1_1_subscription_interface-members.html new file mode 100644 index 00000000..2a7c36ab --- /dev/null +++ b/versions/v5.0.1/classmodulo__core_1_1communication_1_1_subscription_interface-members.html @@ -0,0 +1,95 @@ + + + + + + + +Modulo: Member List + + + + + + + + + +
+
+ + + + + + +
+
Modulo 5.0.0 +
+
+
+ + + + + + + + +
+
+ + +
+
+
+
+
+
Loading...
+
Searching...
+
No Matches
+
+
+
+
+ + +
+
+
modulo_core::communication::SubscriptionInterface Member List
+
+
+ +

This is the complete list of members for modulo_core::communication::SubscriptionInterface, including all inherited members.

+ + + + + + + + +
get_handler(bool validate_pointer=true)modulo_core::communication::SubscriptionInterfaceinline
get_message_pair() constmodulo_core::communication::SubscriptionInterface
message_pair_modulo_core::communication::SubscriptionInterfaceprotected
set_message_pair(const std::shared_ptr< MessagePairInterface > &message_pair)modulo_core::communication::SubscriptionInterface
SubscriptionInterface(std::shared_ptr< MessagePairInterface > message_pair=nullptr)modulo_core::communication::SubscriptionInterfaceexplicit
SubscriptionInterface(const SubscriptionInterface &subscription)=defaultmodulo_core::communication::SubscriptionInterface
~SubscriptionInterface()=defaultmodulo_core::communication::SubscriptionInterfacevirtual
+ + + + diff --git a/versions/v5.0.1/classmodulo__core_1_1communication_1_1_subscription_interface.html b/versions/v5.0.1/classmodulo__core_1_1communication_1_1_subscription_interface.html new file mode 100644 index 00000000..e61915bc --- /dev/null +++ b/versions/v5.0.1/classmodulo__core_1_1communication_1_1_subscription_interface.html @@ -0,0 +1,309 @@ + + + + + + + +Modulo: modulo_core::communication::SubscriptionInterface Class Reference + + + + + + + + + +
+
+ + + + + + +
+
Modulo 5.0.0 +
+
+
+ + + + + + + + +
+
+ + +
+
+
+
+
+
Loading...
+
Searching...
+
No Matches
+
+
+
+
+ + +
+
+
+Public Member Functions | +Protected Attributes | +List of all members
+
modulo_core::communication::SubscriptionInterface Class Reference
+
+
+ +

Interface class to enable non-templated subscriptions with ROS subscriptions from derived SubscriptionHandler instances through dynamic down-casting. + More...

+ +

#include <SubscriptionInterface.hpp>

+
+Inheritance diagram for modulo_core::communication::SubscriptionInterface:
+
+
+ + +modulo_core::communication::SubscriptionHandler< MsgT > + +
+ + + + + + + + + + + + + + + + + + + + + +

+Public Member Functions

 SubscriptionInterface (std::shared_ptr< MessagePairInterface > message_pair=nullptr)
 Constructor with the message pair.
 
SubscriptionInterface (const SubscriptionInterface &subscription)=default
 Copy constructor from another SubscriptionInterface.
 
+virtual ~SubscriptionInterface ()=default
 Default virtual destructor.
 
template<typename MsgT >
std::shared_ptr< SubscriptionHandler< MsgT > > get_handler (bool validate_pointer=true)
 Get a pointer to a derived SubscriptionHandler instance from a SubscriptionInterface pointer.
 
std::shared_ptr< MessagePairInterfaceget_message_pair () const
 Get the pointer to the message pair of the SubscriptionInterface.
 
void set_message_pair (const std::shared_ptr< MessagePairInterface > &message_pair)
 Set the pointer to the message pair of the SubscriptionInterface.
 
+ + + + +

+Protected Attributes

std::shared_ptr< MessagePairInterfacemessage_pair_
 The pointer to the stored MessagePair instance.
 
+

Detailed Description

+

Interface class to enable non-templated subscriptions with ROS subscriptions from derived SubscriptionHandler instances through dynamic down-casting.

+ +

Definition at line 19 of file SubscriptionInterface.hpp.

+

Constructor & Destructor Documentation

+ +

◆ SubscriptionInterface()

+ +
+
+ + + + + +
+ + + + + + + + +
modulo_core::communication::SubscriptionInterface::SubscriptionInterface (std::shared_ptr< MessagePairInterfacemessage_pair = nullptr)
+
+explicit
+
+ +

Constructor with the message pair.

+
Parameters
+ + +
message_pairThe pointer to the message pair with the data that should be updated through the subscription
+
+
+ +

Definition at line 5 of file SubscriptionInterface.cpp.

+ +
+
+

Member Function Documentation

+ +

◆ get_handler()

+ +
+
+
+template<typename MsgT >
+ + + + + +
+ + + + + + + + +
std::shared_ptr< SubscriptionHandler< MsgT > > modulo_core::communication::SubscriptionInterface::get_handler (bool validate_pointer = true)
+
+inline
+
+ +

Get a pointer to a derived SubscriptionHandler instance from a SubscriptionInterface pointer.

+

If a SubscriptionInterface pointer is used to address a derived SubscriptionHandler instance, this method will return a pointer to that derived instance through dynamic down-casting. The downcast will fail if the base SubscriptionInterface object has no reference count (if the object is not owned by any pointer), or if the derived object is not a correctly typed instance of a SubscriptionHandler. By default, an InvalidPointerCastException is thrown when the downcast fails. If this validation is disabled by setting the validate_pointer flag to false, it will not throw an exception and instead return a null pointer.

Template Parameters
+ + + +
PubTThe ROS publisher type
MsgTThe ROS message type
+
+
+
Exceptions
+ + + +
modulo_core::exceptions::InvalidPointerExceptionif the base SubscriptionInterface object has no reference count and validate_pointer is set to true
modulo_core::exceptions::InvalidPointerCastExceptionif the derived object from the dynamic down-casting is not a correctly typed instance of a SubscriptionHandler
+
+
+
Parameters
+ + +
validate_pointerIf true, throw an exception when down-casting fails
+
+
+
Returns
A pointer to a derived SubscriptionHandler instance of the desired type, or a null pointer if down-casting failed and validate_pointer was set to false.
+ +

Definition at line 74 of file SubscriptionInterface.hpp.

+ +
+
+ +

◆ get_message_pair()

+ +
+
+ + + + + + + +
std::shared_ptr< MessagePairInterface > modulo_core::communication::SubscriptionInterface::get_message_pair () const
+
+ +

Get the pointer to the message pair of the SubscriptionInterface.

+ +

Definition at line 8 of file SubscriptionInterface.cpp.

+ +
+
+ +

◆ set_message_pair()

+ +
+
+ + + + + + + + +
void modulo_core::communication::SubscriptionInterface::set_message_pair (const std::shared_ptr< MessagePairInterface > & message_pair)
+
+ +

Set the pointer to the message pair of the SubscriptionInterface.

+
Exceptions
+ + +
modulo_core::exceptions::NullPointerExceptionif the provided message pair pointer is null
+
+
+ +

Definition at line 12 of file SubscriptionInterface.cpp.

+ +
+
+

Member Data Documentation

+ +

◆ message_pair_

+ +
+
+ + + + + +
+ + + + +
std::shared_ptr<MessagePairInterface> modulo_core::communication::SubscriptionInterface::message_pair_
+
+protected
+
+ +

The pointer to the stored MessagePair instance.

+ +

Definition at line 70 of file SubscriptionInterface.hpp.

+ +
+
+
The documentation for this class was generated from the following files: +
+ + + + diff --git a/versions/v5.0.1/classmodulo__core_1_1communication_1_1_subscription_interface.png b/versions/v5.0.1/classmodulo__core_1_1communication_1_1_subscription_interface.png new file mode 100644 index 00000000..3add2369 Binary files /dev/null and b/versions/v5.0.1/classmodulo__core_1_1communication_1_1_subscription_interface.png differ diff --git a/versions/v5.0.1/classmodulo__core_1_1exceptions_1_1_add_service_exception-members.html b/versions/v5.0.1/classmodulo__core_1_1exceptions_1_1_add_service_exception-members.html new file mode 100644 index 00000000..23282593 --- /dev/null +++ b/versions/v5.0.1/classmodulo__core_1_1exceptions_1_1_add_service_exception-members.html @@ -0,0 +1,91 @@ + + + + + + + +Modulo: Member List + + + + + + + + + +
+
+ + + + + + +
+
Modulo 5.0.0 +
+
+
+ + + + + + + + +
+
+ + +
+
+
+
+
+
Loading...
+
Searching...
+
No Matches
+
+
+
+
+ + +
+
+
modulo_core::exceptions::AddServiceException Member List
+
+
+ +

This is the complete list of members for modulo_core::exceptions::AddServiceException, including all inherited members.

+ + + + +
AddServiceException(const std::string &msg) (defined in modulo_core::exceptions::AddServiceException)modulo_core::exceptions::AddServiceExceptioninlineexplicit
CoreException(const std::string &msg) (defined in modulo_core::exceptions::CoreException)modulo_core::exceptions::CoreExceptioninlineexplicit
CoreException(const std::string &prefix, const std::string &msg) (defined in modulo_core::exceptions::CoreException)modulo_core::exceptions::CoreExceptioninlineprotected
+ + + + diff --git a/versions/v5.0.1/classmodulo__core_1_1exceptions_1_1_add_service_exception.html b/versions/v5.0.1/classmodulo__core_1_1exceptions_1_1_add_service_exception.html new file mode 100644 index 00000000..ace1ccfd --- /dev/null +++ b/versions/v5.0.1/classmodulo__core_1_1exceptions_1_1_add_service_exception.html @@ -0,0 +1,154 @@ + + + + + + + +Modulo: modulo_core::exceptions::AddServiceException Class Reference + + + + + + + + + +
+
+ + + + + + +
+
Modulo 5.0.0 +
+
+
+ + + + + + + + +
+
+ + +
+
+
+
+
+
Loading...
+
Searching...
+
No Matches
+
+
+
+
+ + +
+
+
+Public Member Functions | +List of all members
+
modulo_core::exceptions::AddServiceException Class Reference
+
+
+ +

An exception class to notify errors when adding a service. + More...

+ +

#include <exceptions.hpp>

+
+Inheritance diagram for modulo_core::exceptions::AddServiceException:
+
+
+ + +modulo_core::exceptions::CoreException + +
+ + + + + + + +

+Public Member Functions

 AddServiceException (const std::string &msg)
 
- Public Member Functions inherited from modulo_core::exceptions::CoreException
 CoreException (const std::string &msg)
 
+ + + + +

+Additional Inherited Members

- Protected Member Functions inherited from modulo_core::exceptions::CoreException
 CoreException (const std::string &prefix, const std::string &msg)
 
+

Detailed Description

+

An exception class to notify errors when adding a service.

+

This is an exception class to be thrown if there is a problem while adding a service to a modulo class.

+ +

Definition at line 30 of file exceptions.hpp.

+

Constructor & Destructor Documentation

+ +

◆ AddServiceException()

+ +
+
+ + + + + +
+ + + + + + + + +
modulo_core::exceptions::AddServiceException::AddServiceException (const std::string & msg)
+
+inlineexplicit
+
+ +

Definition at line 32 of file exceptions.hpp.

+ +
+
+
The documentation for this class was generated from the following file: +
+ + + + diff --git a/versions/v5.0.1/classmodulo__core_1_1exceptions_1_1_add_service_exception.png b/versions/v5.0.1/classmodulo__core_1_1exceptions_1_1_add_service_exception.png new file mode 100644 index 00000000..543863c7 Binary files /dev/null and b/versions/v5.0.1/classmodulo__core_1_1exceptions_1_1_add_service_exception.png differ diff --git a/versions/v5.0.1/classmodulo__core_1_1exceptions_1_1_add_signal_exception-members.html b/versions/v5.0.1/classmodulo__core_1_1exceptions_1_1_add_signal_exception-members.html new file mode 100644 index 00000000..5dace7ab --- /dev/null +++ b/versions/v5.0.1/classmodulo__core_1_1exceptions_1_1_add_signal_exception-members.html @@ -0,0 +1,91 @@ + + + + + + + +Modulo: Member List + + + + + + + + + +
+
+ + + + + + +
+
Modulo 5.0.0 +
+
+
+ + + + + + + + +
+
+ + +
+
+
+
+
+
Loading...
+
Searching...
+
No Matches
+
+
+
+
+ + +
+
+
modulo_core::exceptions::AddSignalException Member List
+
+
+ +

This is the complete list of members for modulo_core::exceptions::AddSignalException, including all inherited members.

+ + + + +
AddSignalException(const std::string &msg) (defined in modulo_core::exceptions::AddSignalException)modulo_core::exceptions::AddSignalExceptioninlineexplicit
CoreException(const std::string &msg) (defined in modulo_core::exceptions::CoreException)modulo_core::exceptions::CoreExceptioninlineexplicit
CoreException(const std::string &prefix, const std::string &msg) (defined in modulo_core::exceptions::CoreException)modulo_core::exceptions::CoreExceptioninlineprotected
+ + + + diff --git a/versions/v5.0.1/classmodulo__core_1_1exceptions_1_1_add_signal_exception.html b/versions/v5.0.1/classmodulo__core_1_1exceptions_1_1_add_signal_exception.html new file mode 100644 index 00000000..71b0154d --- /dev/null +++ b/versions/v5.0.1/classmodulo__core_1_1exceptions_1_1_add_signal_exception.html @@ -0,0 +1,154 @@ + + + + + + + +Modulo: modulo_core::exceptions::AddSignalException Class Reference + + + + + + + + + +
+
+ + + + + + +
+
Modulo 5.0.0 +
+
+
+ + + + + + + + +
+
+ + +
+
+
+
+
+
Loading...
+
Searching...
+
No Matches
+
+
+
+
+ + +
+
+
+Public Member Functions | +List of all members
+
modulo_core::exceptions::AddSignalException Class Reference
+
+
+ +

An exception class to notify errors when adding a signal. + More...

+ +

#include <exceptions.hpp>

+
+Inheritance diagram for modulo_core::exceptions::AddSignalException:
+
+
+ + +modulo_core::exceptions::CoreException + +
+ + + + + + + +

+Public Member Functions

 AddSignalException (const std::string &msg)
 
- Public Member Functions inherited from modulo_core::exceptions::CoreException
 CoreException (const std::string &msg)
 
+ + + + +

+Additional Inherited Members

- Protected Member Functions inherited from modulo_core::exceptions::CoreException
 CoreException (const std::string &prefix, const std::string &msg)
 
+

Detailed Description

+

An exception class to notify errors when adding a signal.

+

This is an exception class to be thrown if there is a problem while adding a signal to a modulo class.

+ +

Definition at line 40 of file exceptions.hpp.

+

Constructor & Destructor Documentation

+ +

◆ AddSignalException()

+ +
+
+ + + + + +
+ + + + + + + + +
modulo_core::exceptions::AddSignalException::AddSignalException (const std::string & msg)
+
+inlineexplicit
+
+ +

Definition at line 42 of file exceptions.hpp.

+ +
+
+
The documentation for this class was generated from the following file: +
+ + + + diff --git a/versions/v5.0.1/classmodulo__core_1_1exceptions_1_1_add_signal_exception.png b/versions/v5.0.1/classmodulo__core_1_1exceptions_1_1_add_signal_exception.png new file mode 100644 index 00000000..f7e8e060 Binary files /dev/null and b/versions/v5.0.1/classmodulo__core_1_1exceptions_1_1_add_signal_exception.png differ diff --git a/versions/v5.0.1/classmodulo__core_1_1exceptions_1_1_core_exception-members.html b/versions/v5.0.1/classmodulo__core_1_1exceptions_1_1_core_exception-members.html new file mode 100644 index 00000000..84fc8701 --- /dev/null +++ b/versions/v5.0.1/classmodulo__core_1_1exceptions_1_1_core_exception-members.html @@ -0,0 +1,90 @@ + + + + + + + +Modulo: Member List + + + + + + + + + +
+
+ + + + + + +
+
Modulo 5.0.0 +
+
+
+ + + + + + + + +
+
+ + +
+
+
+
+
+
Loading...
+
Searching...
+
No Matches
+
+
+
+
+ + +
+
+
modulo_core::exceptions::CoreException Member List
+
+
+ +

This is the complete list of members for modulo_core::exceptions::CoreException, including all inherited members.

+ + + +
CoreException(const std::string &msg) (defined in modulo_core::exceptions::CoreException)modulo_core::exceptions::CoreExceptioninlineexplicit
CoreException(const std::string &prefix, const std::string &msg) (defined in modulo_core::exceptions::CoreException)modulo_core::exceptions::CoreExceptioninlineprotected
+ + + + diff --git a/versions/v5.0.1/classmodulo__core_1_1exceptions_1_1_core_exception.html b/versions/v5.0.1/classmodulo__core_1_1exceptions_1_1_core_exception.html new file mode 100644 index 00000000..662e704e --- /dev/null +++ b/versions/v5.0.1/classmodulo__core_1_1exceptions_1_1_core_exception.html @@ -0,0 +1,197 @@ + + + + + + + +Modulo: modulo_core::exceptions::CoreException Class Reference + + + + + + + + + +
+
+ + + + + + +
+
Modulo 5.0.0 +
+
+
+ + + + + + + + +
+
+ + +
+
+
+
+
+
Loading...
+
Searching...
+
No Matches
+
+
+
+
+ + +
+
+
+Public Member Functions | +Protected Member Functions | +List of all members
+
modulo_core::exceptions::CoreException Class Reference
+
+
+ +

A base class for all core exceptions. + More...

+ +

#include <exceptions.hpp>

+
+Inheritance diagram for modulo_core::exceptions::CoreException:
+
+
+ + +modulo_core::exceptions::AddServiceException +modulo_core::exceptions::AddSignalException +modulo_core::exceptions::InvalidPointerCastException +modulo_core::exceptions::InvalidPointerException +modulo_core::exceptions::LookupTransformException +modulo_core::exceptions::MessageTranslationException +modulo_core::exceptions::NullPointerException +modulo_core::exceptions::ParameterException +modulo_core::exceptions::ParameterTranslationException + +
+ + + + +

+Public Member Functions

 CoreException (const std::string &msg)
 
+ + + +

+Protected Member Functions

 CoreException (const std::string &prefix, const std::string &msg)
 
+

Detailed Description

+

A base class for all core exceptions.

+

This inherits from std::runtime_exception.

+ +

Definition at line 17 of file exceptions.hpp.

+

Constructor & Destructor Documentation

+ +

◆ CoreException() [1/2]

+ +
+
+ + + + + +
+ + + + + + + + +
modulo_core::exceptions::CoreException::CoreException (const std::string & msg)
+
+inlineexplicit
+
+ +

Definition at line 19 of file exceptions.hpp.

+ +
+
+ +

◆ CoreException() [2/2]

+ +
+
+ + + + + +
+ + + + + + + + + + + + + + + + + + +
modulo_core::exceptions::CoreException::CoreException (const std::string & prefix,
const std::string & msg 
)
+
+inlineprotected
+
+ +

Definition at line 22 of file exceptions.hpp.

+ +
+
+
The documentation for this class was generated from the following file: +
+ + + + diff --git a/versions/v5.0.1/classmodulo__core_1_1exceptions_1_1_core_exception.png b/versions/v5.0.1/classmodulo__core_1_1exceptions_1_1_core_exception.png new file mode 100644 index 00000000..9bfd002d Binary files /dev/null and b/versions/v5.0.1/classmodulo__core_1_1exceptions_1_1_core_exception.png differ diff --git a/versions/v5.0.1/classmodulo__core_1_1exceptions_1_1_invalid_pointer_cast_exception-members.html b/versions/v5.0.1/classmodulo__core_1_1exceptions_1_1_invalid_pointer_cast_exception-members.html new file mode 100644 index 00000000..a4c6c1d9 --- /dev/null +++ b/versions/v5.0.1/classmodulo__core_1_1exceptions_1_1_invalid_pointer_cast_exception-members.html @@ -0,0 +1,91 @@ + + + + + + + +Modulo: Member List + + + + + + + + + +
+
+ + + + + + +
+
Modulo 5.0.0 +
+
+
+ + + + + + + + +
+
+ + +
+
+
+
+
+
Loading...
+
Searching...
+
No Matches
+
+
+
+
+ + +
+
+
modulo_core::exceptions::InvalidPointerCastException Member List
+
+
+ +

This is the complete list of members for modulo_core::exceptions::InvalidPointerCastException, including all inherited members.

+ + + + +
CoreException(const std::string &msg) (defined in modulo_core::exceptions::CoreException)modulo_core::exceptions::CoreExceptioninlineexplicit
CoreException(const std::string &prefix, const std::string &msg) (defined in modulo_core::exceptions::CoreException)modulo_core::exceptions::CoreExceptioninlineprotected
InvalidPointerCastException(const std::string &msg) (defined in modulo_core::exceptions::InvalidPointerCastException)modulo_core::exceptions::InvalidPointerCastExceptioninlineexplicit
+ + + + diff --git a/versions/v5.0.1/classmodulo__core_1_1exceptions_1_1_invalid_pointer_cast_exception.html b/versions/v5.0.1/classmodulo__core_1_1exceptions_1_1_invalid_pointer_cast_exception.html new file mode 100644 index 00000000..0ad3b243 --- /dev/null +++ b/versions/v5.0.1/classmodulo__core_1_1exceptions_1_1_invalid_pointer_cast_exception.html @@ -0,0 +1,153 @@ + + + + + + + +Modulo: modulo_core::exceptions::InvalidPointerCastException Class Reference + + + + + + + + + +
+
+ + + + + + +
+
Modulo 5.0.0 +
+
+
+ + + + + + + + +
+
+ + +
+
+
+
+
+
Loading...
+
Searching...
+
No Matches
+
+
+
+
+ + +
+
+
+Public Member Functions | +List of all members
+
modulo_core::exceptions::InvalidPointerCastException Class Reference
+
+
+ +

An exception class to notify if the result of getting an instance of a derived class through dynamic down-casting of an object of the base class is not a correctly typed instance of the derived class. + More...

+ +

#include <exceptions.hpp>

+
+Inheritance diagram for modulo_core::exceptions::InvalidPointerCastException:
+
+
+ + +modulo_core::exceptions::CoreException + +
+ + + + + + + +

+Public Member Functions

 InvalidPointerCastException (const std::string &msg)
 
- Public Member Functions inherited from modulo_core::exceptions::CoreException
 CoreException (const std::string &msg)
 
+ + + + +

+Additional Inherited Members

- Protected Member Functions inherited from modulo_core::exceptions::CoreException
 CoreException (const std::string &prefix, const std::string &msg)
 
+

Detailed Description

+

An exception class to notify if the result of getting an instance of a derived class through dynamic down-casting of an object of the base class is not a correctly typed instance of the derived class.

+ +

Definition at line 50 of file exceptions.hpp.

+

Constructor & Destructor Documentation

+ +

◆ InvalidPointerCastException()

+ +
+
+ + + + + +
+ + + + + + + + +
modulo_core::exceptions::InvalidPointerCastException::InvalidPointerCastException (const std::string & msg)
+
+inlineexplicit
+
+ +

Definition at line 52 of file exceptions.hpp.

+ +
+
+
The documentation for this class was generated from the following file: +
+ + + + diff --git a/versions/v5.0.1/classmodulo__core_1_1exceptions_1_1_invalid_pointer_cast_exception.png b/versions/v5.0.1/classmodulo__core_1_1exceptions_1_1_invalid_pointer_cast_exception.png new file mode 100644 index 00000000..30f0bf63 Binary files /dev/null and b/versions/v5.0.1/classmodulo__core_1_1exceptions_1_1_invalid_pointer_cast_exception.png differ diff --git a/versions/v5.0.1/classmodulo__core_1_1exceptions_1_1_invalid_pointer_exception-members.html b/versions/v5.0.1/classmodulo__core_1_1exceptions_1_1_invalid_pointer_exception-members.html new file mode 100644 index 00000000..348b26b1 --- /dev/null +++ b/versions/v5.0.1/classmodulo__core_1_1exceptions_1_1_invalid_pointer_exception-members.html @@ -0,0 +1,91 @@ + + + + + + + +Modulo: Member List + + + + + + + + + +
+
+ + + + + + +
+
Modulo 5.0.0 +
+
+
+ + + + + + + + +
+
+ + +
+
+
+
+
+
Loading...
+
Searching...
+
No Matches
+
+
+
+
+ + +
+
+
modulo_core::exceptions::InvalidPointerException Member List
+
+
+ +

This is the complete list of members for modulo_core::exceptions::InvalidPointerException, including all inherited members.

+ + + + +
CoreException(const std::string &msg) (defined in modulo_core::exceptions::CoreException)modulo_core::exceptions::CoreExceptioninlineexplicit
CoreException(const std::string &prefix, const std::string &msg) (defined in modulo_core::exceptions::CoreException)modulo_core::exceptions::CoreExceptioninlineprotected
InvalidPointerException(const std::string &msg) (defined in modulo_core::exceptions::InvalidPointerException)modulo_core::exceptions::InvalidPointerExceptioninlineexplicit
+ + + + diff --git a/versions/v5.0.1/classmodulo__core_1_1exceptions_1_1_invalid_pointer_exception.html b/versions/v5.0.1/classmodulo__core_1_1exceptions_1_1_invalid_pointer_exception.html new file mode 100644 index 00000000..ac514035 --- /dev/null +++ b/versions/v5.0.1/classmodulo__core_1_1exceptions_1_1_invalid_pointer_exception.html @@ -0,0 +1,153 @@ + + + + + + + +Modulo: modulo_core::exceptions::InvalidPointerException Class Reference + + + + + + + + + +
+
+ + + + + + +
+
Modulo 5.0.0 +
+
+
+ + + + + + + + +
+
+ + +
+
+
+
+
+
Loading...
+
Searching...
+
No Matches
+
+
+
+
+ + +
+
+
+Public Member Functions | +List of all members
+
modulo_core::exceptions::InvalidPointerException Class Reference
+
+
+ +

An exception class to notify if an object has no reference count (if the object is not owned by any pointer) when attempting to get a derived instance through dynamic down-casting. + More...

+ +

#include <exceptions.hpp>

+
+Inheritance diagram for modulo_core::exceptions::InvalidPointerException:
+
+
+ + +modulo_core::exceptions::CoreException + +
+ + + + + + + +

+Public Member Functions

 InvalidPointerException (const std::string &msg)
 
- Public Member Functions inherited from modulo_core::exceptions::CoreException
 CoreException (const std::string &msg)
 
+ + + + +

+Additional Inherited Members

- Protected Member Functions inherited from modulo_core::exceptions::CoreException
 CoreException (const std::string &prefix, const std::string &msg)
 
+

Detailed Description

+

An exception class to notify if an object has no reference count (if the object is not owned by any pointer) when attempting to get a derived instance through dynamic down-casting.

+ +

Definition at line 60 of file exceptions.hpp.

+

Constructor & Destructor Documentation

+ +

◆ InvalidPointerException()

+ +
+
+ + + + + +
+ + + + + + + + +
modulo_core::exceptions::InvalidPointerException::InvalidPointerException (const std::string & msg)
+
+inlineexplicit
+
+ +

Definition at line 62 of file exceptions.hpp.

+ +
+
+
The documentation for this class was generated from the following file: +
+ + + + diff --git a/versions/v5.0.1/classmodulo__core_1_1exceptions_1_1_invalid_pointer_exception.png b/versions/v5.0.1/classmodulo__core_1_1exceptions_1_1_invalid_pointer_exception.png new file mode 100644 index 00000000..2d961438 Binary files /dev/null and b/versions/v5.0.1/classmodulo__core_1_1exceptions_1_1_invalid_pointer_exception.png differ diff --git a/versions/v5.0.1/classmodulo__core_1_1exceptions_1_1_lookup_transform_exception-members.html b/versions/v5.0.1/classmodulo__core_1_1exceptions_1_1_lookup_transform_exception-members.html new file mode 100644 index 00000000..a48dbf81 --- /dev/null +++ b/versions/v5.0.1/classmodulo__core_1_1exceptions_1_1_lookup_transform_exception-members.html @@ -0,0 +1,91 @@ + + + + + + + +Modulo: Member List + + + + + + + + + +
+
+ + + + + + +
+
Modulo 5.0.0 +
+
+
+ + + + + + + + +
+
+ + +
+
+
+
+
+
Loading...
+
Searching...
+
No Matches
+
+
+
+
+ + +
+
+
modulo_core::exceptions::LookupTransformException Member List
+
+
+ +

This is the complete list of members for modulo_core::exceptions::LookupTransformException, including all inherited members.

+ + + + +
CoreException(const std::string &msg) (defined in modulo_core::exceptions::CoreException)modulo_core::exceptions::CoreExceptioninlineexplicit
CoreException(const std::string &prefix, const std::string &msg) (defined in modulo_core::exceptions::CoreException)modulo_core::exceptions::CoreExceptioninlineprotected
LookupTransformException(const std::string &msg) (defined in modulo_core::exceptions::LookupTransformException)modulo_core::exceptions::LookupTransformExceptioninlineexplicit
+ + + + diff --git a/versions/v5.0.1/classmodulo__core_1_1exceptions_1_1_lookup_transform_exception.html b/versions/v5.0.1/classmodulo__core_1_1exceptions_1_1_lookup_transform_exception.html new file mode 100644 index 00000000..319f3d04 --- /dev/null +++ b/versions/v5.0.1/classmodulo__core_1_1exceptions_1_1_lookup_transform_exception.html @@ -0,0 +1,154 @@ + + + + + + + +Modulo: modulo_core::exceptions::LookupTransformException Class Reference + + + + + + + + + +
+
+ + + + + + +
+
Modulo 5.0.0 +
+
+
+ + + + + + + + +
+
+ + +
+
+
+
+
+
Loading...
+
Searching...
+
No Matches
+
+
+
+
+ + +
+
+
+Public Member Functions | +List of all members
+
modulo_core::exceptions::LookupTransformException Class Reference
+
+
+ +

An exception class to notify an error while looking up TF transforms. + More...

+ +

#include <exceptions.hpp>

+
+Inheritance diagram for modulo_core::exceptions::LookupTransformException:
+
+
+ + +modulo_core::exceptions::CoreException + +
+ + + + + + + +

+Public Member Functions

 LookupTransformException (const std::string &msg)
 
- Public Member Functions inherited from modulo_core::exceptions::CoreException
 CoreException (const std::string &msg)
 
+ + + + +

+Additional Inherited Members

- Protected Member Functions inherited from modulo_core::exceptions::CoreException
 CoreException (const std::string &prefix, const std::string &msg)
 
+

Detailed Description

+

An exception class to notify an error while looking up TF transforms.

+

This is an exception class to be thrown if there is a problem with looking up a TF transform (unconfigured buffer/listener, TF2 exception).

+ +

Definition at line 71 of file exceptions.hpp.

+

Constructor & Destructor Documentation

+ +

◆ LookupTransformException()

+ +
+
+ + + + + +
+ + + + + + + + +
modulo_core::exceptions::LookupTransformException::LookupTransformException (const std::string & msg)
+
+inlineexplicit
+
+ +

Definition at line 73 of file exceptions.hpp.

+ +
+
+
The documentation for this class was generated from the following file: +
+ + + + diff --git a/versions/v5.0.1/classmodulo__core_1_1exceptions_1_1_lookup_transform_exception.png b/versions/v5.0.1/classmodulo__core_1_1exceptions_1_1_lookup_transform_exception.png new file mode 100644 index 00000000..ced4d9f4 Binary files /dev/null and b/versions/v5.0.1/classmodulo__core_1_1exceptions_1_1_lookup_transform_exception.png differ diff --git a/versions/v5.0.1/classmodulo__core_1_1exceptions_1_1_message_translation_exception-members.html b/versions/v5.0.1/classmodulo__core_1_1exceptions_1_1_message_translation_exception-members.html new file mode 100644 index 00000000..814c020b --- /dev/null +++ b/versions/v5.0.1/classmodulo__core_1_1exceptions_1_1_message_translation_exception-members.html @@ -0,0 +1,91 @@ + + + + + + + +Modulo: Member List + + + + + + + + + +
+
+ + + + + + +
+
Modulo 5.0.0 +
+
+
+ + + + + + + + +
+
+ + +
+
+
+
+
+
Loading...
+
Searching...
+
No Matches
+
+
+
+
+ + +
+
+
modulo_core::exceptions::MessageTranslationException Member List
+
+
+ +

This is the complete list of members for modulo_core::exceptions::MessageTranslationException, including all inherited members.

+ + + + +
CoreException(const std::string &msg) (defined in modulo_core::exceptions::CoreException)modulo_core::exceptions::CoreExceptioninlineexplicit
CoreException(const std::string &prefix, const std::string &msg) (defined in modulo_core::exceptions::CoreException)modulo_core::exceptions::CoreExceptioninlineprotected
MessageTranslationException(const std::string &msg) (defined in modulo_core::exceptions::MessageTranslationException)modulo_core::exceptions::MessageTranslationExceptioninlineexplicit
+ + + + diff --git a/versions/v5.0.1/classmodulo__core_1_1exceptions_1_1_message_translation_exception.html b/versions/v5.0.1/classmodulo__core_1_1exceptions_1_1_message_translation_exception.html new file mode 100644 index 00000000..68a3194e --- /dev/null +++ b/versions/v5.0.1/classmodulo__core_1_1exceptions_1_1_message_translation_exception.html @@ -0,0 +1,153 @@ + + + + + + + +Modulo: modulo_core::exceptions::MessageTranslationException Class Reference + + + + + + + + + +
+
+ + + + + + +
+
Modulo 5.0.0 +
+
+
+ + + + + + + + +
+
+ + +
+
+
+
+
+
Loading...
+
Searching...
+
No Matches
+
+
+
+
+ + +
+
+
+Public Member Functions | +List of all members
+
modulo_core::exceptions::MessageTranslationException Class Reference
+
+
+ +

An exception class to notify that the translation of a ROS message failed. + More...

+ +

#include <exceptions.hpp>

+
+Inheritance diagram for modulo_core::exceptions::MessageTranslationException:
+
+
+ + +modulo_core::exceptions::CoreException + +
+ + + + + + + +

+Public Member Functions

 MessageTranslationException (const std::string &msg)
 
- Public Member Functions inherited from modulo_core::exceptions::CoreException
 CoreException (const std::string &msg)
 
+ + + + +

+Additional Inherited Members

- Protected Member Functions inherited from modulo_core::exceptions::CoreException
 CoreException (const std::string &prefix, const std::string &msg)
 
+

Detailed Description

+

An exception class to notify that the translation of a ROS message failed.

+ +

Definition at line 80 of file exceptions.hpp.

+

Constructor & Destructor Documentation

+ +

◆ MessageTranslationException()

+ +
+
+ + + + + +
+ + + + + + + + +
modulo_core::exceptions::MessageTranslationException::MessageTranslationException (const std::string & msg)
+
+inlineexplicit
+
+ +

Definition at line 82 of file exceptions.hpp.

+ +
+
+
The documentation for this class was generated from the following file: +
+ + + + diff --git a/versions/v5.0.1/classmodulo__core_1_1exceptions_1_1_message_translation_exception.png b/versions/v5.0.1/classmodulo__core_1_1exceptions_1_1_message_translation_exception.png new file mode 100644 index 00000000..4b020d21 Binary files /dev/null and b/versions/v5.0.1/classmodulo__core_1_1exceptions_1_1_message_translation_exception.png differ diff --git a/versions/v5.0.1/classmodulo__core_1_1exceptions_1_1_null_pointer_exception-members.html b/versions/v5.0.1/classmodulo__core_1_1exceptions_1_1_null_pointer_exception-members.html new file mode 100644 index 00000000..a7dc1fec --- /dev/null +++ b/versions/v5.0.1/classmodulo__core_1_1exceptions_1_1_null_pointer_exception-members.html @@ -0,0 +1,91 @@ + + + + + + + +Modulo: Member List + + + + + + + + + +
+
+ + + + + + +
+
Modulo 5.0.0 +
+
+
+ + + + + + + + +
+
+ + +
+
+
+
+
+
Loading...
+
Searching...
+
No Matches
+
+
+
+
+ + +
+
+
modulo_core::exceptions::NullPointerException Member List
+
+
+ +

This is the complete list of members for modulo_core::exceptions::NullPointerException, including all inherited members.

+ + + + +
CoreException(const std::string &msg) (defined in modulo_core::exceptions::CoreException)modulo_core::exceptions::CoreExceptioninlineexplicit
CoreException(const std::string &prefix, const std::string &msg) (defined in modulo_core::exceptions::CoreException)modulo_core::exceptions::CoreExceptioninlineprotected
NullPointerException(const std::string &msg) (defined in modulo_core::exceptions::NullPointerException)modulo_core::exceptions::NullPointerExceptioninlineexplicit
+ + + + diff --git a/versions/v5.0.1/classmodulo__core_1_1exceptions_1_1_null_pointer_exception.html b/versions/v5.0.1/classmodulo__core_1_1exceptions_1_1_null_pointer_exception.html new file mode 100644 index 00000000..2d38ed85 --- /dev/null +++ b/versions/v5.0.1/classmodulo__core_1_1exceptions_1_1_null_pointer_exception.html @@ -0,0 +1,154 @@ + + + + + + + +Modulo: modulo_core::exceptions::NullPointerException Class Reference + + + + + + + + + +
+
+ + + + + + +
+
Modulo 5.0.0 +
+
+
+ + + + + + + + +
+
+ + +
+
+
+
+
+
Loading...
+
Searching...
+
No Matches
+
+
+
+
+ + +
+
+
+Public Member Functions | +List of all members
+
modulo_core::exceptions::NullPointerException Class Reference
+
+
+ +

An exception class to notify that a certain pointer is null. + More...

+ +

#include <exceptions.hpp>

+
+Inheritance diagram for modulo_core::exceptions::NullPointerException:
+
+
+ + +modulo_core::exceptions::CoreException + +
+ + + + + + + +

+Public Member Functions

 NullPointerException (const std::string &msg)
 
- Public Member Functions inherited from modulo_core::exceptions::CoreException
 CoreException (const std::string &msg)
 
+ + + + +

+Additional Inherited Members

- Protected Member Functions inherited from modulo_core::exceptions::CoreException
 CoreException (const std::string &prefix, const std::string &msg)
 
+

Detailed Description

+

An exception class to notify that a certain pointer is null.

+

This is an exception class to be thrown if a pointer is null or is trying to be set to a null pointer.

+ +

Definition at line 90 of file exceptions.hpp.

+

Constructor & Destructor Documentation

+ +

◆ NullPointerException()

+ +
+
+ + + + + +
+ + + + + + + + +
modulo_core::exceptions::NullPointerException::NullPointerException (const std::string & msg)
+
+inlineexplicit
+
+ +

Definition at line 92 of file exceptions.hpp.

+ +
+
+
The documentation for this class was generated from the following file: +
+ + + + diff --git a/versions/v5.0.1/classmodulo__core_1_1exceptions_1_1_null_pointer_exception.png b/versions/v5.0.1/classmodulo__core_1_1exceptions_1_1_null_pointer_exception.png new file mode 100644 index 00000000..aba21048 Binary files /dev/null and b/versions/v5.0.1/classmodulo__core_1_1exceptions_1_1_null_pointer_exception.png differ diff --git a/versions/v5.0.1/classmodulo__core_1_1exceptions_1_1_parameter_exception-members.html b/versions/v5.0.1/classmodulo__core_1_1exceptions_1_1_parameter_exception-members.html new file mode 100644 index 00000000..aca576bf --- /dev/null +++ b/versions/v5.0.1/classmodulo__core_1_1exceptions_1_1_parameter_exception-members.html @@ -0,0 +1,91 @@ + + + + + + + +Modulo: Member List + + + + + + + + + +
+
+ + + + + + +
+
Modulo 5.0.0 +
+
+
+ + + + + + + + +
+
+ + +
+
+
+
+
+
Loading...
+
Searching...
+
No Matches
+
+
+
+
+ + +
+
+
modulo_core::exceptions::ParameterException Member List
+
+
+ +

This is the complete list of members for modulo_core::exceptions::ParameterException, including all inherited members.

+ + + + +
CoreException(const std::string &msg) (defined in modulo_core::exceptions::CoreException)modulo_core::exceptions::CoreExceptioninlineexplicit
CoreException(const std::string &prefix, const std::string &msg) (defined in modulo_core::exceptions::CoreException)modulo_core::exceptions::CoreExceptioninlineprotected
ParameterException(const std::string &msg) (defined in modulo_core::exceptions::ParameterException)modulo_core::exceptions::ParameterExceptioninlineexplicit
+ + + + diff --git a/versions/v5.0.1/classmodulo__core_1_1exceptions_1_1_parameter_exception.html b/versions/v5.0.1/classmodulo__core_1_1exceptions_1_1_parameter_exception.html new file mode 100644 index 00000000..dc4eacc9 --- /dev/null +++ b/versions/v5.0.1/classmodulo__core_1_1exceptions_1_1_parameter_exception.html @@ -0,0 +1,154 @@ + + + + + + + +Modulo: modulo_core::exceptions::ParameterException Class Reference + + + + + + + + + +
+
+ + + + + + +
+
Modulo 5.0.0 +
+
+
+ + + + + + + + +
+
+ + +
+
+
+
+
+
Loading...
+
Searching...
+
No Matches
+
+
+
+
+ + +
+
+
+Public Member Functions | +List of all members
+
modulo_core::exceptions::ParameterException Class Reference
+
+
+ +

An exception class to notify errors with parameters in modulo classes. + More...

+ +

#include <exceptions.hpp>

+
+Inheritance diagram for modulo_core::exceptions::ParameterException:
+
+
+ + +modulo_core::exceptions::CoreException + +
+ + + + + + + +

+Public Member Functions

 ParameterException (const std::string &msg)
 
- Public Member Functions inherited from modulo_core::exceptions::CoreException
 CoreException (const std::string &msg)
 
+ + + + +

+Additional Inherited Members

- Protected Member Functions inherited from modulo_core::exceptions::CoreException
 CoreException (const std::string &prefix, const std::string &msg)
 
+

Detailed Description

+

An exception class to notify errors with parameters in modulo classes.

+

This is an exception class to be thrown if there is a problem with parameters (overriding, inconsistent types, undeclared, ...).

+ +

Definition at line 101 of file exceptions.hpp.

+

Constructor & Destructor Documentation

+ +

◆ ParameterException()

+ +
+
+ + + + + +
+ + + + + + + + +
modulo_core::exceptions::ParameterException::ParameterException (const std::string & msg)
+
+inlineexplicit
+
+ +

Definition at line 103 of file exceptions.hpp.

+ +
+
+
The documentation for this class was generated from the following file: +
+ + + + diff --git a/versions/v5.0.1/classmodulo__core_1_1exceptions_1_1_parameter_exception.png b/versions/v5.0.1/classmodulo__core_1_1exceptions_1_1_parameter_exception.png new file mode 100644 index 00000000..ed3c5599 Binary files /dev/null and b/versions/v5.0.1/classmodulo__core_1_1exceptions_1_1_parameter_exception.png differ diff --git a/versions/v5.0.1/classmodulo__core_1_1exceptions_1_1_parameter_translation_exception-members.html b/versions/v5.0.1/classmodulo__core_1_1exceptions_1_1_parameter_translation_exception-members.html new file mode 100644 index 00000000..ec48606d --- /dev/null +++ b/versions/v5.0.1/classmodulo__core_1_1exceptions_1_1_parameter_translation_exception-members.html @@ -0,0 +1,91 @@ + + + + + + + +Modulo: Member List + + + + + + + + + +
+
+ + + + + + +
+
Modulo 5.0.0 +
+
+
+ + + + + + + + +
+
+ + +
+
+
+
+
+
Loading...
+
Searching...
+
No Matches
+
+
+
+
+ + +
+
+
modulo_core::exceptions::ParameterTranslationException Member List
+
+
+ +

This is the complete list of members for modulo_core::exceptions::ParameterTranslationException, including all inherited members.

+ + + + +
CoreException(const std::string &msg) (defined in modulo_core::exceptions::CoreException)modulo_core::exceptions::CoreExceptioninlineexplicit
CoreException(const std::string &prefix, const std::string &msg) (defined in modulo_core::exceptions::CoreException)modulo_core::exceptions::CoreExceptioninlineprotected
ParameterTranslationException(const std::string &msg) (defined in modulo_core::exceptions::ParameterTranslationException)modulo_core::exceptions::ParameterTranslationExceptioninlineexplicit
+ + + + diff --git a/versions/v5.0.1/classmodulo__core_1_1exceptions_1_1_parameter_translation_exception.html b/versions/v5.0.1/classmodulo__core_1_1exceptions_1_1_parameter_translation_exception.html new file mode 100644 index 00000000..317a374e --- /dev/null +++ b/versions/v5.0.1/classmodulo__core_1_1exceptions_1_1_parameter_translation_exception.html @@ -0,0 +1,154 @@ + + + + + + + +Modulo: modulo_core::exceptions::ParameterTranslationException Class Reference + + + + + + + + + +
+
+ + + + + + +
+
Modulo 5.0.0 +
+
+
+ + + + + + + + +
+
+ + +
+
+
+
+
+
Loading...
+
Searching...
+
No Matches
+
+
+
+
+ + +
+
+
+Public Member Functions | +List of all members
+
modulo_core::exceptions::ParameterTranslationException Class Reference
+
+
+ +

An exception class to notify incompatibility when translating parameters from different sources. + More...

+ +

#include <exceptions.hpp>

+
+Inheritance diagram for modulo_core::exceptions::ParameterTranslationException:
+
+
+ + +modulo_core::exceptions::CoreException + +
+ + + + + + + +

+Public Member Functions

 ParameterTranslationException (const std::string &msg)
 
- Public Member Functions inherited from modulo_core::exceptions::CoreException
 CoreException (const std::string &msg)
 
+ + + + +

+Additional Inherited Members

- Protected Member Functions inherited from modulo_core::exceptions::CoreException
 CoreException (const std::string &prefix, const std::string &msg)
 
+

Detailed Description

+

An exception class to notify incompatibility when translating parameters from different sources.

+

This is an exception class to be thrown if there is a problem while translating from a ROS parameter to a state_representation parameter and vice versa.

+ +

Definition at line 112 of file exceptions.hpp.

+

Constructor & Destructor Documentation

+ +

◆ ParameterTranslationException()

+ +
+
+ + + + + +
+ + + + + + + + +
modulo_core::exceptions::ParameterTranslationException::ParameterTranslationException (const std::string & msg)
+
+inlineexplicit
+
+ +

Definition at line 114 of file exceptions.hpp.

+ +
+
+
The documentation for this class was generated from the following file: +
+ + + + diff --git a/versions/v5.0.1/classmodulo__core_1_1exceptions_1_1_parameter_translation_exception.png b/versions/v5.0.1/classmodulo__core_1_1exceptions_1_1_parameter_translation_exception.png new file mode 100644 index 00000000..29afe23b Binary files /dev/null and b/versions/v5.0.1/classmodulo__core_1_1exceptions_1_1_parameter_translation_exception.png differ diff --git a/versions/v5.0.1/classmodulo__utils_1_1testutils_1_1_predicates_listener-members.html b/versions/v5.0.1/classmodulo__utils_1_1testutils_1_1_predicates_listener-members.html new file mode 100644 index 00000000..e9f2e671 --- /dev/null +++ b/versions/v5.0.1/classmodulo__utils_1_1testutils_1_1_predicates_listener-members.html @@ -0,0 +1,92 @@ + + + + + + + +Modulo: Member List + + + + + + + + + +
+
+ + + + + + +
+
Modulo 5.0.0 +
+
+
+ + + + + + + + +
+
+ + +
+
+
+
+
+
Loading...
+
Searching...
+
No Matches
+
+
+
+
+ + +
+
+
modulo_utils::testutils::PredicatesListener Member List
+
+
+ +

This is the complete list of members for modulo_utils::testutils::PredicatesListener, including all inherited members.

+ + + + + +
get_predicate_future() const (defined in modulo_utils::testutils::PredicatesListener)modulo_utils::testutils::PredicatesListener
get_predicate_values() const (defined in modulo_utils::testutils::PredicatesListener)modulo_utils::testutils::PredicatesListener
PredicatesListener(const std::string &node, const std::vector< std::string > &predicates, const rclcpp::NodeOptions &node_options=rclcpp::NodeOptions()) (defined in modulo_utils::testutils::PredicatesListener)modulo_utils::testutils::PredicatesListener
reset_future() (defined in modulo_utils::testutils::PredicatesListener)modulo_utils::testutils::PredicatesListener
+ + + + diff --git a/versions/v5.0.1/classmodulo__utils_1_1testutils_1_1_predicates_listener.html b/versions/v5.0.1/classmodulo__utils_1_1testutils_1_1_predicates_listener.html new file mode 100644 index 00000000..3fdeb1f1 --- /dev/null +++ b/versions/v5.0.1/classmodulo__utils_1_1testutils_1_1_predicates_listener.html @@ -0,0 +1,208 @@ + + + + + + + +Modulo: modulo_utils::testutils::PredicatesListener Class Reference + + + + + + + + + +
+
+ + + + + + +
+
Modulo 5.0.0 +
+
+
+ + + + + + + + +
+
+ + +
+
+
+
+
+
Loading...
+
Searching...
+
No Matches
+
+
+
+
+ + +
+
+
+Public Member Functions | +List of all members
+
modulo_utils::testutils::PredicatesListener Class Reference
+
+
+
+Inheritance diagram for modulo_utils::testutils::PredicatesListener:
+
+
+ +
+ + + + + + + + + + +

+Public Member Functions

 PredicatesListener (const std::string &node, const std::vector< std::string > &predicates, const rclcpp::NodeOptions &node_options=rclcpp::NodeOptions())
 
void reset_future ()
 
const std::shared_future< void > & get_predicate_future () const
 
const std::map< std::string, bool > & get_predicate_values () const
 
+

Detailed Description

+
+

Definition at line 13 of file PredicatesListener.hpp.

+

Constructor & Destructor Documentation

+ +

◆ PredicatesListener()

+ +
+
+ + + + + + + + + + + + + + + + + + + + + + + + +
modulo_utils::testutils::PredicatesListener::PredicatesListener (const std::string & node,
const std::vector< std::string > & predicates,
const rclcpp::NodeOptions & node_options = rclcpp::NodeOptions() 
)
+
+ +

Definition at line 5 of file PredicatesListener.cpp.

+ +
+
+

Member Function Documentation

+ +

◆ get_predicate_future()

+ +
+
+ + + + + + + +
const std::shared_future< void > & modulo_utils::testutils::PredicatesListener::get_predicate_future () const
+
+ +

Definition at line 32 of file PredicatesListener.cpp.

+ +
+
+ +

◆ get_predicate_values()

+ +
+
+ + + + + + + +
const std::map< std::string, bool > & modulo_utils::testutils::PredicatesListener::get_predicate_values () const
+
+ +

Definition at line 36 of file PredicatesListener.cpp.

+ +
+
+ +

◆ reset_future()

+ +
+
+ + + + + + + +
void modulo_utils::testutils::PredicatesListener::reset_future ()
+
+ +

Definition at line 27 of file PredicatesListener.cpp.

+ +
+
+
The documentation for this class was generated from the following files: +
+ + + + diff --git a/versions/v5.0.1/classmodulo__utils_1_1testutils_1_1_predicates_listener.png b/versions/v5.0.1/classmodulo__utils_1_1testutils_1_1_predicates_listener.png new file mode 100644 index 00000000..6d7d53c6 Binary files /dev/null and b/versions/v5.0.1/classmodulo__utils_1_1testutils_1_1_predicates_listener.png differ diff --git a/versions/v5.0.1/classmodulo__utils_1_1testutils_1_1_service_client-members.html b/versions/v5.0.1/classmodulo__utils_1_1testutils_1_1_service_client-members.html new file mode 100644 index 00000000..1e55be11 --- /dev/null +++ b/versions/v5.0.1/classmodulo__utils_1_1testutils_1_1_service_client-members.html @@ -0,0 +1,91 @@ + + + + + + + +Modulo: Member List + + + + + + + + + +
+
+ + + + + + +
+
Modulo 5.0.0 +
+
+
+ + + + + + + + +
+
+ + +
+
+
+
+
+
Loading...
+
Searching...
+
No Matches
+
+
+
+
+ + +
+
+
modulo_utils::testutils::ServiceClient< SrvT > Member List
+
+
+ +

This is the complete list of members for modulo_utils::testutils::ServiceClient< SrvT >, including all inherited members.

+ + + + +
call_async(const std::shared_ptr< typename SrvT::Request > &request) (defined in modulo_utils::testutils::ServiceClient< SrvT >)modulo_utils::testutils::ServiceClient< SrvT >inline
client_ (defined in modulo_utils::testutils::ServiceClient< SrvT >)modulo_utils::testutils::ServiceClient< SrvT >
ServiceClient(const rclcpp::NodeOptions &options, const std::string &service) (defined in modulo_utils::testutils::ServiceClient< SrvT >)modulo_utils::testutils::ServiceClient< SrvT >inline
+ + + + diff --git a/versions/v5.0.1/classmodulo__utils_1_1testutils_1_1_service_client.html b/versions/v5.0.1/classmodulo__utils_1_1testutils_1_1_service_client.html new file mode 100644 index 00000000..c1511619 --- /dev/null +++ b/versions/v5.0.1/classmodulo__utils_1_1testutils_1_1_service_client.html @@ -0,0 +1,206 @@ + + + + + + + +Modulo: modulo_utils::testutils::ServiceClient< SrvT > Class Template Reference + + + + + + + + + +
+
+ + + + + + +
+
Modulo 5.0.0 +
+
+
+ + + + + + + + +
+
+ + +
+
+
+
+
+
Loading...
+
Searching...
+
No Matches
+
+
+
+
+ + +
+
+
+Public Member Functions | +Public Attributes | +List of all members
+
modulo_utils::testutils::ServiceClient< SrvT > Class Template Reference
+
+
+
+Inheritance diagram for modulo_utils::testutils::ServiceClient< SrvT >:
+
+
+ +
+ + + + + + +

+Public Member Functions

 ServiceClient (const rclcpp::NodeOptions &options, const std::string &service)
 
rclcpp::Client< SrvT >::FutureAndRequestId call_async (const std::shared_ptr< typename SrvT::Request > &request)
 
+ + + +

+Public Attributes

std::shared_ptr< rclcpp::Client< SrvT > > client_
 
+

Detailed Description

+
template<typename SrvT>
+class modulo_utils::testutils::ServiceClient< SrvT >
+

Definition at line 13 of file ServiceClient.hpp.

+

Constructor & Destructor Documentation

+ +

◆ ServiceClient()

+ +
+
+
+template<typename SrvT >
+ + + + + +
+ + + + + + + + + + + + + + + + + + +
modulo_utils::testutils::ServiceClient< SrvT >::ServiceClient (const rclcpp::NodeOptions & options,
const std::string & service 
)
+
+inline
+
+ +

Definition at line 15 of file ServiceClient.hpp.

+ +
+
+

Member Function Documentation

+ +

◆ call_async()

+ +
+
+
+template<typename SrvT >
+ + + + + +
+ + + + + + + + +
rclcpp::Client< SrvT >::FutureAndRequestId modulo_utils::testutils::ServiceClient< SrvT >::call_async (const std::shared_ptr< typename SrvT::Request > & request)
+
+inline
+
+ +

Definition at line 22 of file ServiceClient.hpp.

+ +
+
+

Member Data Documentation

+ +

◆ client_

+ +
+
+
+template<typename SrvT >
+ + + + +
std::shared_ptr<rclcpp::Client<SrvT> > modulo_utils::testutils::ServiceClient< SrvT >::client_
+
+ +

Definition at line 26 of file ServiceClient.hpp.

+ +
+
+
The documentation for this class was generated from the following file: +
+ + + + diff --git a/versions/v5.0.1/classmodulo__utils_1_1testutils_1_1_service_client.png b/versions/v5.0.1/classmodulo__utils_1_1testutils_1_1_service_client.png new file mode 100644 index 00000000..31fbccf0 Binary files /dev/null and b/versions/v5.0.1/classmodulo__utils_1_1testutils_1_1_service_client.png differ diff --git a/versions/v5.0.1/closed.png b/versions/v5.0.1/closed.png new file mode 100644 index 00000000..98cc2c90 Binary files /dev/null and b/versions/v5.0.1/closed.png differ diff --git a/versions/v5.0.1/conceptmodulo__core_1_1concepts_1_1_core_data_t.html b/versions/v5.0.1/conceptmodulo__core_1_1concepts_1_1_core_data_t.html new file mode 100644 index 00000000..019608fe --- /dev/null +++ b/versions/v5.0.1/conceptmodulo__core_1_1concepts_1_1_core_data_t.html @@ -0,0 +1,93 @@ + + + + + + + +Modulo: modulo_core::concepts::CoreDataT Concept Reference + + + + + + + + + +
+
+ + + + + + +
+
Modulo 5.0.0 +
+
+
+ + + + + + + + +
+
+ + +
+
+
+
+
+
Loading...
+
Searching...
+
No Matches
+
+
+
+
+ + +
+
+
modulo_core::concepts::CoreDataT Concept Reference
+
+
+

Concept definition

+
template<typename T>
+
concept modulo_core::concepts::CoreDataT = std::derived_from<T, state_representation::State> || PrimitiveDataT<T>
+ + +

Detailed Description

+
+

Definition at line 21 of file concepts.hpp.

+
+ + + + diff --git a/versions/v5.0.1/conceptmodulo__core_1_1concepts_1_1_custom_t.html b/versions/v5.0.1/conceptmodulo__core_1_1concepts_1_1_custom_t.html new file mode 100644 index 00000000..aba95add --- /dev/null +++ b/versions/v5.0.1/conceptmodulo__core_1_1concepts_1_1_custom_t.html @@ -0,0 +1,93 @@ + + + + + + + +Modulo: modulo_core::concepts::CustomT Concept Reference + + + + + + + + + +
+
+ + + + + + +
+
Modulo 5.0.0 +
+
+
+ + + + + + + + +
+
+ + +
+
+
+
+
+
Loading...
+
Searching...
+
No Matches
+
+
+
+
+ + +
+
+
modulo_core::concepts::CustomT Concept Reference
+
+
+

Concept definition

+
template<typename T>
+
concept modulo_core::concepts::CustomT = !CoreDataT<T> && !std::same_as<T, modulo_core::EncodedState>
+ + +

Detailed Description

+
+

Definition at line 31 of file concepts.hpp.

+
+ + + + diff --git a/versions/v5.0.1/conceptmodulo__core_1_1concepts_1_1_primitive_data_t.html b/versions/v5.0.1/conceptmodulo__core_1_1concepts_1_1_primitive_data_t.html new file mode 100644 index 00000000..ac69b916 --- /dev/null +++ b/versions/v5.0.1/conceptmodulo__core_1_1concepts_1_1_primitive_data_t.html @@ -0,0 +1,93 @@ + + + + + + + +Modulo: modulo_core::concepts::PrimitiveDataT Concept Reference + + + + + + + + + +
+
+ + + + + + +
+
Modulo 5.0.0 +
+
+
+ + + + + + + + +
+
+ + +
+
+
+
+
+
Loading...
+
Searching...
+
No Matches
+
+
+
+
+ + +
+
+
modulo_core::concepts::PrimitiveDataT Concept Reference
+
+
+

Concept definition

+
template<typename T>
+
concept modulo_core::concepts::PrimitiveDataT = std::same_as<T, bool> || std::same_as<T, double> || std::same_as<T, std::vector<double>>
+
|| std::same_as<T, int> || std::same_as<T, std::string>
+ +

Detailed Description

+
+

Definition at line 17 of file concepts.hpp.

+
+ + + + diff --git a/versions/v5.0.1/conceptmodulo__core_1_1concepts_1_1_translated_msg_t.html b/versions/v5.0.1/conceptmodulo__core_1_1concepts_1_1_translated_msg_t.html new file mode 100644 index 00000000..a1e519fa --- /dev/null +++ b/versions/v5.0.1/conceptmodulo__core_1_1concepts_1_1_translated_msg_t.html @@ -0,0 +1,94 @@ + + + + + + + +Modulo: modulo_core::concepts::TranslatedMsgT Concept Reference + + + + + + + + + +
+
+ + + + + + +
+
Modulo 5.0.0 +
+
+
+ + + + + + + + +
+
+ + +
+
+
+
+
+
Loading...
+
Searching...
+
No Matches
+
+
+
+
+ + +
+
+
modulo_core::concepts::TranslatedMsgT Concept Reference
+
+
+

Concept definition

+
template<typename T>
+
concept modulo_core::concepts::TranslatedMsgT = std::same_as<T, std_msgs::msg::Bool> || std::same_as<T, std_msgs::msg::Float64>
+
|| std::same_as<T, std_msgs::msg::Float64MultiArray> || std::same_as<T, std_msgs::msg::Int32>
+
|| std::same_as<T, std_msgs::msg::String> || std::same_as<T, modulo_core::EncodedState>
+ +

Detailed Description

+
+

Definition at line 26 of file concepts.hpp.

+
+ + + + diff --git a/versions/v5.0.1/concepts.html b/versions/v5.0.1/concepts.html new file mode 100644 index 00000000..5e471ce3 --- /dev/null +++ b/versions/v5.0.1/concepts.html @@ -0,0 +1,91 @@ + + + + + + + +Modulo: Concepts + + + + + + + + + +
+
+ + + + + + +
+
Modulo 5.0.0 +
+
+
+ + + + + + + +
+ +
+
+ + +
+
+
+
+
+
Loading...
+
Searching...
+
No Matches
+
+
+
+
+ +
+
Concepts
+
+
+
Here is a list of all documented concepts with brief descriptions:
+
[detail level 123]
+ + + + + + +
 Nmodulo_coreModulo Core
 Nconcepts
 RPrimitiveDataT
 RCoreDataT
 RTranslatedMsgT
 RCustomT
+
+
+ + + + diff --git a/versions/v5.0.1/concepts_8hpp_source.html b/versions/v5.0.1/concepts_8hpp_source.html new file mode 100644 index 00000000..329c2fea --- /dev/null +++ b/versions/v5.0.1/concepts_8hpp_source.html @@ -0,0 +1,127 @@ + + + + + + + +Modulo: /github/workspace/source/modulo_core/include/modulo_core/concepts.hpp Source File + + + + + + + + + +
+
+ + + + + + +
+
Modulo 5.0.0 +
+
+
+ + + + + + + + + +
+
+ + +
+
+
+
+
+
Loading...
+
Searching...
+
No Matches
+
+
+
+
+ + +
+
+
concepts.hpp
+
+
+
1#pragma once
+
2
+
3#include "modulo_core/EncodedState.hpp"
+
4
+
5#include <state_representation/State.hpp>
+
6#include <std_msgs/msg/bool.hpp>
+
7#include <std_msgs/msg/float64.hpp>
+
8#include <std_msgs/msg/float64_multi_array.hpp>
+
9#include <std_msgs/msg/int32.hpp>
+
10#include <std_msgs/msg/string.hpp>
+
11
+
12namespace modulo_core::concepts {
+
13
+
14// Data type concepts
+
15
+
16template<typename T>
+
17concept PrimitiveDataT = std::same_as<T, bool> || std::same_as<T, double> || std::same_as<T, std::vector<double>>
+
18 || std::same_as<T, int> || std::same_as<T, std::string>;
+
19
+
20template<typename T>
+
21concept CoreDataT = std::derived_from<T, state_representation::State> || PrimitiveDataT<T>;
+
22
+
23// Message type concepts
+
24
+
25template<typename T>
+
26concept TranslatedMsgT = std::same_as<T, std_msgs::msg::Bool> || std::same_as<T, std_msgs::msg::Float64>
+
27 || std::same_as<T, std_msgs::msg::Float64MultiArray> || std::same_as<T, std_msgs::msg::Int32>
+
28 || std::same_as<T, std_msgs::msg::String> || std::same_as<T, modulo_core::EncodedState>;
+
29
+
30template<typename T>
+
31concept CustomT = !CoreDataT<T> && !std::same_as<T, modulo_core::EncodedState>;
+
32
+
33}// namespace modulo_core::concepts
+ + + + +
+ + + + diff --git a/versions/v5.0.1/dir_005db6f82a7eca80f4e3827434b589b4.html b/versions/v5.0.1/dir_005db6f82a7eca80f4e3827434b589b4.html new file mode 100644 index 00000000..7e5dae1e --- /dev/null +++ b/versions/v5.0.1/dir_005db6f82a7eca80f4e3827434b589b4.html @@ -0,0 +1,91 @@ + + + + + + + +Modulo: /github/workspace/source/modulo_utils/src/testutils Directory Reference + + + + + + + + + +
+
+ + + + + + +
+
Modulo 5.0.0 +
+
+
+ + + + + + + + +
+
+ + +
+
+
+
+
+
Loading...
+
Searching...
+
No Matches
+
+
+
+
+ + +
+
+
testutils Directory Reference
+
+
+ + + + +

+Files

 PredicatesListener.cpp
 
+
+ + + + diff --git a/versions/v5.0.1/dir_05a91d83eeac941ff7d1774756f408e0.html b/versions/v5.0.1/dir_05a91d83eeac941ff7d1774756f408e0.html new file mode 100644 index 00000000..02f8681b --- /dev/null +++ b/versions/v5.0.1/dir_05a91d83eeac941ff7d1774756f408e0.html @@ -0,0 +1,95 @@ + + + + + + + +Modulo: /github/workspace/source/modulo_components/include/modulo_components Directory Reference + + + + + + + + + +
+
+ + + + + + +
+
Modulo 5.0.0 +
+
+
+ + + + + + + + +
+
+ + +
+
+
+
+
+
Loading...
+
Searching...
+
No Matches
+
+
+
+
+ + +
+
+
modulo_components Directory Reference
+
+
+ + + + + + + + +

+Files

 Component.hpp
 
 ComponentInterface.hpp
 
 LifecycleComponent.hpp
 
+
+ + + + diff --git a/versions/v5.0.1/dir_0e754abea120a9c0c4911cca1dd0951c.html b/versions/v5.0.1/dir_0e754abea120a9c0c4911cca1dd0951c.html new file mode 100644 index 00000000..3ca92231 --- /dev/null +++ b/versions/v5.0.1/dir_0e754abea120a9c0c4911cca1dd0951c.html @@ -0,0 +1,95 @@ + + + + + + + +Modulo: /github/workspace/source/modulo_controllers/src Directory Reference + + + + + + + + + +
+
+ + + + + + +
+
Modulo 5.0.0 +
+
+
+ + + + + + + + +
+
+ + +
+
+
+
+
+
Loading...
+
Searching...
+
No Matches
+
+
+
+
+ + +
+
+
src Directory Reference
+
+
+ + + + + + + + +

+Files

 BaseControllerInterface.cpp
 
 ControllerInterface.cpp
 
 RobotControllerInterface.cpp
 
+
+ + + + diff --git a/versions/v5.0.1/dir_2397dea4246cf971150250488a69dca4.html b/versions/v5.0.1/dir_2397dea4246cf971150250488a69dca4.html new file mode 100644 index 00000000..fab39d8b --- /dev/null +++ b/versions/v5.0.1/dir_2397dea4246cf971150250488a69dca4.html @@ -0,0 +1,104 @@ + + + + + + + +Modulo: /github/workspace/source/modulo_core/include/modulo_core Directory Reference + + + + + + + + + +
+
+ + + + + + +
+
Modulo 5.0.0 +
+
+
+ + + + + + + + +
+
+ + +
+
+
+
+
+
Loading...
+
Searching...
+
No Matches
+
+
+
+
+ + +
+
+
modulo_core Directory Reference
+
+
+ + + + + + +

+Directories

 communication
 
 translators
 
+ + + + + + + + + +

+Files

 concepts.hpp
 
 EncodedState.hpp
 
 exceptions.hpp
 
 Predicate.hpp
 
+
+ + + + diff --git a/versions/v5.0.1/dir_27c37b9b3673e5d3fc7170b21f143cd2.html b/versions/v5.0.1/dir_27c37b9b3673e5d3fc7170b21f143cd2.html new file mode 100644 index 00000000..fbb80ab8 --- /dev/null +++ b/versions/v5.0.1/dir_27c37b9b3673e5d3fc7170b21f143cd2.html @@ -0,0 +1,95 @@ + + + + + + + +Modulo: /github/workspace/source/modulo_controllers/include/modulo_controllers Directory Reference + + + + + + + + + +
+
+ + + + + + +
+
Modulo 5.0.0 +
+
+
+ + + + + + + + +
+
+ + +
+
+
+
+
+
Loading...
+
Searching...
+
No Matches
+
+
+
+
+ + +
+
+
modulo_controllers Directory Reference
+
+
+ + + + + + + + +

+Files

 BaseControllerInterface.hpp
 
 ControllerInterface.hpp
 
 RobotControllerInterface.hpp
 
+
+ + + + diff --git a/versions/v5.0.1/dir_30c9960b1e12cf048409514a1d0c5545.html b/versions/v5.0.1/dir_30c9960b1e12cf048409514a1d0c5545.html new file mode 100644 index 00000000..9ed537dd --- /dev/null +++ b/versions/v5.0.1/dir_30c9960b1e12cf048409514a1d0c5545.html @@ -0,0 +1,91 @@ + + + + + + + +Modulo: /github/workspace/source/modulo_core/include Directory Reference + + + + + + + + + +
+
+ + + + + + +
+
Modulo 5.0.0 +
+
+
+ + + + + + + + +
+
+ + +
+
+
+
+
+
Loading...
+
Searching...
+
No Matches
+
+
+
+
+ + +
+
+
include Directory Reference
+
+
+ + + + +

+Directories

 modulo_core
 
+
+ + + + diff --git a/versions/v5.0.1/dir_349657725b3f4f657efe86018f81caee.html b/versions/v5.0.1/dir_349657725b3f4f657efe86018f81caee.html new file mode 100644 index 00000000..ceb506c6 --- /dev/null +++ b/versions/v5.0.1/dir_349657725b3f4f657efe86018f81caee.html @@ -0,0 +1,95 @@ + + + + + + + +Modulo: /github/workspace/source/modulo_core/src/translators Directory Reference + + + + + + + + + +
+
+ + + + + + +
+
Modulo 5.0.0 +
+
+
+ + + + + + + + +
+
+ + +
+
+
+
+
+
Loading...
+
Searching...
+
No Matches
+
+
+
+
+ + +
+
+
translators Directory Reference
+
+
+ + + + + + + + +

+Files

 message_readers.cpp
 
 message_writers.cpp
 
 parameter_translators.cpp
 
+
+ + + + diff --git a/versions/v5.0.1/dir_3e8f83d5963dbe4a7be4947f2eff491b.html b/versions/v5.0.1/dir_3e8f83d5963dbe4a7be4947f2eff491b.html new file mode 100644 index 00000000..44409c58 --- /dev/null +++ b/versions/v5.0.1/dir_3e8f83d5963dbe4a7be4947f2eff491b.html @@ -0,0 +1,91 @@ + + + + + + + +Modulo: /github/workspace/source/modulo_utils/include Directory Reference + + + + + + + + + +
+
+ + + + + + +
+
Modulo 5.0.0 +
+
+
+ + + + + + + + +
+
+ + +
+
+
+
+
+
Loading...
+
Searching...
+
No Matches
+
+
+
+
+ + +
+
+
include Directory Reference
+
+
+ + + + +

+Directories

 modulo_utils
 
+
+ + + + diff --git a/versions/v5.0.1/dir_5442966453c41df6861b650ae85469b6.html b/versions/v5.0.1/dir_5442966453c41df6861b650ae85469b6.html new file mode 100644 index 00000000..a170b86a --- /dev/null +++ b/versions/v5.0.1/dir_5442966453c41df6861b650ae85469b6.html @@ -0,0 +1,95 @@ + + + + + + + +Modulo: /github/workspace/source/modulo_core/include/modulo_core/translators Directory Reference + + + + + + + + + +
+
+ + + + + + +
+
Modulo 5.0.0 +
+
+
+ + + + + + + + +
+
+ + +
+
+
+
+
+
Loading...
+
Searching...
+
No Matches
+
+
+
+
+ + +
+
+
translators Directory Reference
+
+
+ + + + + + + + +

+Files

 message_readers.hpp
 
 message_writers.hpp
 
 parameter_translators.hpp
 
+
+ + + + diff --git a/versions/v5.0.1/dir_5b0a4e6091157a5e3a1c0d77b65afe7a.html b/versions/v5.0.1/dir_5b0a4e6091157a5e3a1c0d77b65afe7a.html new file mode 100644 index 00000000..f59f5dd6 --- /dev/null +++ b/versions/v5.0.1/dir_5b0a4e6091157a5e3a1c0d77b65afe7a.html @@ -0,0 +1,99 @@ + + + + + + + +Modulo: /github/workspace/source/modulo_core/src/communication Directory Reference + + + + + + + + + +
+
+ + + + + + +
+
Modulo 5.0.0 +
+
+
+ + + + + + + + +
+
+ + +
+
+
+
+
+
Loading...
+
Searching...
+
No Matches
+
+
+
+
+ + +
+
+
communication Directory Reference
+
+
+ + + + + + + + + + + + +

+Files

 MessagePair.cpp
 
 MessagePairInterface.cpp
 
 PublisherInterface.cpp
 
 SubscriptionHandler.cpp
 
 SubscriptionInterface.cpp
 
+
+ + + + diff --git a/versions/v5.0.1/dir_727f33ea6496bb66c2db4f7101f40bd7.html b/versions/v5.0.1/dir_727f33ea6496bb66c2db4f7101f40bd7.html new file mode 100644 index 00000000..ac9b472e --- /dev/null +++ b/versions/v5.0.1/dir_727f33ea6496bb66c2db4f7101f40bd7.html @@ -0,0 +1,85 @@ + + + + + + + +Modulo: /github/workspace/source/modulo_core Directory Reference + + + + + + + + + +
+
+ + + + + + +
+
Modulo 5.0.0 +
+
+
+ + + + + + + + +
+
+ + +
+
+
+
+
+
Loading...
+
Searching...
+
No Matches
+
+
+
+
+ + +
+
+
modulo_core Directory Reference
+
+
+
+ + + + diff --git a/versions/v5.0.1/dir_880c3100161de164f55db9e5265190dd.html b/versions/v5.0.1/dir_880c3100161de164f55db9e5265190dd.html new file mode 100644 index 00000000..aabfd477 --- /dev/null +++ b/versions/v5.0.1/dir_880c3100161de164f55db9e5265190dd.html @@ -0,0 +1,91 @@ + + + + + + + +Modulo: /github/workspace/source/modulo_controllers/include Directory Reference + + + + + + + + + +
+
+ + + + + + +
+
Modulo 5.0.0 +
+
+
+ + + + + + + + +
+
+ + +
+
+
+
+
+
Loading...
+
Searching...
+
No Matches
+
+
+
+
+ + +
+
+
include Directory Reference
+
+
+ + + + +

+Directories

 modulo_controllers
 
+
+ + + + diff --git a/versions/v5.0.1/dir_97c9a08c8a0ff5d05b217f6e73862a8f.html b/versions/v5.0.1/dir_97c9a08c8a0ff5d05b217f6e73862a8f.html new file mode 100644 index 00000000..ace51b7b --- /dev/null +++ b/versions/v5.0.1/dir_97c9a08c8a0ff5d05b217f6e73862a8f.html @@ -0,0 +1,93 @@ + + + + + + + +Modulo: /github/workspace/source/modulo_utils/include/modulo_utils/testutils Directory Reference + + + + + + + + + +
+
+ + + + + + +
+
Modulo 5.0.0 +
+
+
+ + + + + + + + +
+
+ + +
+
+
+
+
+
Loading...
+
Searching...
+
No Matches
+
+
+
+
+ + +
+
+
testutils Directory Reference
+
+
+ + + + + + +

+Files

 PredicatesListener.hpp
 
 ServiceClient.hpp
 
+
+ + + + diff --git a/versions/v5.0.1/dir_a02cdc010ded81c7c2ac77993f10de2b.html b/versions/v5.0.1/dir_a02cdc010ded81c7c2ac77993f10de2b.html new file mode 100644 index 00000000..d318f2d5 --- /dev/null +++ b/versions/v5.0.1/dir_a02cdc010ded81c7c2ac77993f10de2b.html @@ -0,0 +1,91 @@ + + + + + + + +Modulo: /github/workspace/source/modulo_components/include Directory Reference + + + + + + + + + +
+
+ + + + + + +
+
Modulo 5.0.0 +
+
+
+ + + + + + + + +
+
+ + +
+
+
+
+
+
Loading...
+
Searching...
+
No Matches
+
+
+
+
+ + +
+
+
include Directory Reference
+
+
+ + + + +

+Directories

 modulo_components
 
+
+ + + + diff --git a/versions/v5.0.1/dir_a6c74a7b9b9addb9dd4654e424e31fd8.html b/versions/v5.0.1/dir_a6c74a7b9b9addb9dd4654e424e31fd8.html new file mode 100644 index 00000000..d282d51d --- /dev/null +++ b/versions/v5.0.1/dir_a6c74a7b9b9addb9dd4654e424e31fd8.html @@ -0,0 +1,93 @@ + + + + + + + +Modulo: /github/workspace/source/modulo_core/src Directory Reference + + + + + + + + + +
+
+ + + + + + +
+
Modulo 5.0.0 +
+
+
+ + + + + + + + +
+
+ + +
+
+
+
+
+
Loading...
+
Searching...
+
No Matches
+
+
+
+
+ + +
+
+
src Directory Reference
+
+
+ + + + + + +

+Directories

 communication
 
 translators
 
+
+ + + + diff --git a/versions/v5.0.1/dir_ad135c18ceef0560346390faedbedc87.html b/versions/v5.0.1/dir_ad135c18ceef0560346390faedbedc87.html new file mode 100644 index 00000000..cf274f75 --- /dev/null +++ b/versions/v5.0.1/dir_ad135c18ceef0560346390faedbedc87.html @@ -0,0 +1,85 @@ + + + + + + + +Modulo: /github/workspace/source/modulo_utils Directory Reference + + + + + + + + + +
+
+ + + + + + +
+
Modulo 5.0.0 +
+
+
+ + + + + + + + +
+
+ + +
+
+
+
+
+
Loading...
+
Searching...
+
No Matches
+
+
+
+
+ + +
+
+
modulo_utils Directory Reference
+
+
+
+ + + + diff --git a/versions/v5.0.1/dir_b0672ca90b2cc70fcfe3af0eed4bd360.html b/versions/v5.0.1/dir_b0672ca90b2cc70fcfe3af0eed4bd360.html new file mode 100644 index 00000000..020c33b9 --- /dev/null +++ b/versions/v5.0.1/dir_b0672ca90b2cc70fcfe3af0eed4bd360.html @@ -0,0 +1,91 @@ + + + + + + + +Modulo: /github/workspace/source/modulo_utils/src Directory Reference + + + + + + + + + +
+
+ + + + + + +
+
Modulo 5.0.0 +
+
+
+ + + + + + + + +
+
+ + +
+
+
+
+
+
Loading...
+
Searching...
+
No Matches
+
+
+
+
+ + +
+
+
src Directory Reference
+
+
+ + + + +

+Directories

 testutils
 
+
+ + + + diff --git a/versions/v5.0.1/dir_b2f33c71d4aa5e7af42a1ca61ff5af1b.html b/versions/v5.0.1/dir_b2f33c71d4aa5e7af42a1ca61ff5af1b.html new file mode 100644 index 00000000..4e9b2899 --- /dev/null +++ b/versions/v5.0.1/dir_b2f33c71d4aa5e7af42a1ca61ff5af1b.html @@ -0,0 +1,85 @@ + + + + + + + +Modulo: /github/workspace/source Directory Reference + + + + + + + + + +
+
+ + + + + + +
+
Modulo 5.0.0 +
+
+
+ + + + + + + + +
+
+ + +
+
+
+
+
+
Loading...
+
Searching...
+
No Matches
+
+
+
+
+ + +
+
+
source Directory Reference
+
+
+
+ + + + diff --git a/versions/v5.0.1/dir_b6467040e22f64a215d0cd51303d2b49.html b/versions/v5.0.1/dir_b6467040e22f64a215d0cd51303d2b49.html new file mode 100644 index 00000000..3cf30c2e --- /dev/null +++ b/versions/v5.0.1/dir_b6467040e22f64a215d0cd51303d2b49.html @@ -0,0 +1,105 @@ + + + + + + + +Modulo: /github/workspace/source/modulo_core/include/modulo_core/communication Directory Reference + + + + + + + + + +
+
+ + + + + + +
+
Modulo 5.0.0 +
+
+
+ + + + + + + + +
+
+ + +
+
+
+
+
+
Loading...
+
Searching...
+
No Matches
+
+
+
+
+ + +
+
+
communication Directory Reference
+
+
+ + + + + + + + + + + + + + + + + + +

+Files

 MessagePair.hpp
 
 MessagePairInterface.hpp
 
 MessageType.hpp
 
 PublisherHandler.hpp
 
 PublisherInterface.hpp
 
 PublisherType.hpp
 
 SubscriptionHandler.hpp
 
 SubscriptionInterface.hpp
 
+
+ + + + diff --git a/versions/v5.0.1/dir_bc830b16dafc1f86e0bebd2067294caf.html b/versions/v5.0.1/dir_bc830b16dafc1f86e0bebd2067294caf.html new file mode 100644 index 00000000..fe7f05e2 --- /dev/null +++ b/versions/v5.0.1/dir_bc830b16dafc1f86e0bebd2067294caf.html @@ -0,0 +1,95 @@ + + + + + + + +Modulo: /github/workspace/source/modulo_components/src Directory Reference + + + + + + + + + +
+
+ + + + + + +
+
Modulo 5.0.0 +
+
+
+ + + + + + + + +
+
+ + +
+
+
+
+
+
Loading...
+
Searching...
+
No Matches
+
+
+
+
+ + +
+
+
src Directory Reference
+
+
+ + + + + + + + +

+Files

 Component.cpp
 
 ComponentInterface.cpp
 
 LifecycleComponent.cpp
 
+
+ + + + diff --git a/versions/v5.0.1/dir_d3939449d8b726061fb0cfc517c3fd5f.html b/versions/v5.0.1/dir_d3939449d8b726061fb0cfc517c3fd5f.html new file mode 100644 index 00000000..13bc7995 --- /dev/null +++ b/versions/v5.0.1/dir_d3939449d8b726061fb0cfc517c3fd5f.html @@ -0,0 +1,91 @@ + + + + + + + +Modulo: /github/workspace/source/modulo_controllers Directory Reference + + + + + + + + + +
+
+ + + + + + +
+
Modulo 5.0.0 +
+
+
+ + + + + + + + +
+
+ + +
+
+
+
+
+
Loading...
+
Searching...
+
No Matches
+
+
+
+
+ + +
+
+
modulo_controllers Directory Reference
+
+
+ + + + +

+Directories

 src
 
+
+ + + + diff --git a/versions/v5.0.1/dir_f43720a52722f25f1201bb3ff6bb7f0f.html b/versions/v5.0.1/dir_f43720a52722f25f1201bb3ff6bb7f0f.html new file mode 100644 index 00000000..7f2c3ace --- /dev/null +++ b/versions/v5.0.1/dir_f43720a52722f25f1201bb3ff6bb7f0f.html @@ -0,0 +1,96 @@ + + + + + + + +Modulo: /github/workspace/source/modulo_utils/include/modulo_utils Directory Reference + + + + + + + + + +
+
+ + + + + + +
+
Modulo 5.0.0 +
+
+
+ + + + + + + + +
+
+ + +
+
+
+
+
+
Loading...
+
Searching...
+
No Matches
+
+
+
+
+ + +
+
+
modulo_utils Directory Reference
+
+
+ + + + +

+Directories

 testutils
 
+ + + +

+Files

 parsing.hpp
 
+
+ + + + diff --git a/versions/v5.0.1/dir_f9a68d619a1bb26c95560bd0519ddde7.html b/versions/v5.0.1/dir_f9a68d619a1bb26c95560bd0519ddde7.html new file mode 100644 index 00000000..51684617 --- /dev/null +++ b/versions/v5.0.1/dir_f9a68d619a1bb26c95560bd0519ddde7.html @@ -0,0 +1,85 @@ + + + + + + + +Modulo: /github/workspace/source/modulo_interfaces Directory Reference + + + + + + + + + +
+
+ + + + + + +
+
Modulo 5.0.0 +
+
+
+ + + + + + + + +
+
+ + +
+
+
+
+
+
Loading...
+
Searching...
+
No Matches
+
+
+
+
+ + +
+
+
modulo_interfaces Directory Reference
+
+
+
+ + + + diff --git a/versions/v5.0.1/dir_fe0b512c3e8d43ae6faf41ba22286ee8.html b/versions/v5.0.1/dir_fe0b512c3e8d43ae6faf41ba22286ee8.html new file mode 100644 index 00000000..1494a633 --- /dev/null +++ b/versions/v5.0.1/dir_fe0b512c3e8d43ae6faf41ba22286ee8.html @@ -0,0 +1,91 @@ + + + + + + + +Modulo: /github/workspace/source/modulo_components Directory Reference + + + + + + + + + +
+
+ + + + + + +
+
Modulo 5.0.0 +
+
+
+ + + + + + + + +
+
+ + +
+
+
+
+
+
Loading...
+
Searching...
+
No Matches
+
+
+
+
+ + +
+
+
modulo_components Directory Reference
+
+
+ + + + +

+Directories

 src
 
+
+ + + + diff --git a/versions/v5.0.1/doc.svg b/versions/v5.0.1/doc.svg new file mode 100644 index 00000000..0b928a53 --- /dev/null +++ b/versions/v5.0.1/doc.svg @@ -0,0 +1,12 @@ + + + + + + + + + + + diff --git a/versions/v5.0.1/docd.svg b/versions/v5.0.1/docd.svg new file mode 100644 index 00000000..ac18b275 --- /dev/null +++ b/versions/v5.0.1/docd.svg @@ -0,0 +1,12 @@ + + + + + + + + + + + diff --git a/versions/v5.0.1/doxygen.css b/versions/v5.0.1/doxygen.css new file mode 100644 index 00000000..009a9b55 --- /dev/null +++ b/versions/v5.0.1/doxygen.css @@ -0,0 +1,2045 @@ +/* The standard CSS for doxygen 1.9.8*/ + +html { +/* page base colors */ +--page-background-color: white; +--page-foreground-color: black; +--page-link-color: #3D578C; +--page-visited-link-color: #4665A2; + +/* index */ +--index-odd-item-bg-color: #F8F9FC; +--index-even-item-bg-color: white; +--index-header-color: black; +--index-separator-color: #A0A0A0; + +/* header */ +--header-background-color: #F9FAFC; +--header-separator-color: #C4CFE5; +--header-gradient-image: url('nav_h.png'); +--group-header-separator-color: #879ECB; +--group-header-color: #354C7B; +--inherit-header-color: gray; + +--footer-foreground-color: #2A3D61; +--footer-logo-width: 104px; +--citation-label-color: #334975; +--glow-color: cyan; + +--title-background-color: white; +--title-separator-color: #5373B4; +--directory-separator-color: #9CAFD4; +--separator-color: #4A6AAA; + +--blockquote-background-color: #F7F8FB; +--blockquote-border-color: #9CAFD4; + +--scrollbar-thumb-color: #9CAFD4; +--scrollbar-background-color: #F9FAFC; + +--icon-background-color: #728DC1; +--icon-foreground-color: white; +--icon-doc-image: url('doc.svg'); +--icon-folder-open-image: url('folderopen.svg'); +--icon-folder-closed-image: url('folderclosed.svg'); + +/* brief member declaration list */ +--memdecl-background-color: #F9FAFC; +--memdecl-separator-color: #DEE4F0; +--memdecl-foreground-color: #555; +--memdecl-template-color: #4665A2; + +/* detailed member list */ +--memdef-border-color: #A8B8D9; +--memdef-title-background-color: #E2E8F2; +--memdef-title-gradient-image: url('nav_f.png'); +--memdef-proto-background-color: #DFE5F1; +--memdef-proto-text-color: #253555; +--memdef-proto-text-shadow: 0px 1px 1px rgba(255, 255, 255, 0.9); +--memdef-doc-background-color: white; +--memdef-param-name-color: #602020; +--memdef-template-color: #4665A2; + +/* tables */ +--table-cell-border-color: #2D4068; +--table-header-background-color: #374F7F; +--table-header-foreground-color: #FFFFFF; + +/* labels */ +--label-background-color: #728DC1; +--label-left-top-border-color: #5373B4; +--label-right-bottom-border-color: #C4CFE5; +--label-foreground-color: white; + +/** navigation bar/tree/menu */ +--nav-background-color: #F9FAFC; +--nav-foreground-color: #364D7C; +--nav-gradient-image: url('tab_b.png'); +--nav-gradient-hover-image: url('tab_h.png'); +--nav-gradient-active-image: url('tab_a.png'); +--nav-gradient-active-image-parent: url("../tab_a.png"); +--nav-separator-image: url('tab_s.png'); +--nav-breadcrumb-image: url('bc_s.png'); +--nav-breadcrumb-border-color: #C2CDE4; +--nav-splitbar-image: url('splitbar.png'); +--nav-font-size-level1: 13px; +--nav-font-size-level2: 10px; +--nav-font-size-level3: 9px; +--nav-text-normal-color: #283A5D; +--nav-text-hover-color: white; +--nav-text-active-color: white; +--nav-text-normal-shadow: 0px 1px 1px rgba(255, 255, 255, 0.9); +--nav-text-hover-shadow: 0px 1px 1px rgba(0, 0, 0, 1.0); +--nav-text-active-shadow: 0px 1px 1px rgba(0, 0, 0, 1.0); +--nav-menu-button-color: #364D7C; +--nav-menu-background-color: white; +--nav-menu-foreground-color: #555555; +--nav-menu-toggle-color: rgba(255, 255, 255, 0.5); +--nav-arrow-color: #9CAFD4; +--nav-arrow-selected-color: #9CAFD4; + +/* table of contents */ +--toc-background-color: #F4F6FA; +--toc-border-color: #D8DFEE; +--toc-header-color: #4665A2; +--toc-down-arrow-image: url("data:image/svg+xml;utf8,&%238595;"); + +/** search field */ +--search-background-color: white; +--search-foreground-color: #909090; +--search-magnification-image: url('mag.svg'); +--search-magnification-select-image: url('mag_sel.svg'); +--search-active-color: black; +--search-filter-background-color: #F9FAFC; +--search-filter-foreground-color: black; +--search-filter-border-color: #90A5CE; +--search-filter-highlight-text-color: white; +--search-filter-highlight-bg-color: #3D578C; +--search-results-foreground-color: #425E97; +--search-results-background-color: #EEF1F7; +--search-results-border-color: black; +--search-box-shadow: inset 0.5px 0.5px 3px 0px #555; + +/** code fragments */ +--code-keyword-color: #008000; +--code-type-keyword-color: #604020; +--code-flow-keyword-color: #E08000; +--code-comment-color: #800000; +--code-preprocessor-color: #806020; +--code-string-literal-color: #002080; +--code-char-literal-color: #008080; +--code-xml-cdata-color: black; +--code-vhdl-digit-color: #FF00FF; +--code-vhdl-char-color: #000000; +--code-vhdl-keyword-color: #700070; +--code-vhdl-logic-color: #FF0000; +--code-link-color: #4665A2; +--code-external-link-color: #4665A2; +--fragment-foreground-color: black; +--fragment-background-color: #FBFCFD; +--fragment-border-color: #C4CFE5; +--fragment-lineno-border-color: #00FF00; +--fragment-lineno-background-color: #E8E8E8; +--fragment-lineno-foreground-color: black; +--fragment-lineno-link-fg-color: #4665A2; +--fragment-lineno-link-bg-color: #D8D8D8; +--fragment-lineno-link-hover-fg-color: #4665A2; +--fragment-lineno-link-hover-bg-color: #C8C8C8; +--tooltip-foreground-color: black; +--tooltip-background-color: white; +--tooltip-border-color: gray; +--tooltip-doc-color: grey; +--tooltip-declaration-color: #006318; +--tooltip-link-color: #4665A2; +--tooltip-shadow: 1px 1px 7px gray; +--fold-line-color: #808080; +--fold-minus-image: url('minus.svg'); +--fold-plus-image: url('plus.svg'); +--fold-minus-image-relpath: url('../../minus.svg'); +--fold-plus-image-relpath: url('../../plus.svg'); + +/** font-family */ +--font-family-normal: Roboto,sans-serif; +--font-family-monospace: 'JetBrains Mono',Consolas,Monaco,'Andale Mono','Ubuntu Mono',monospace,fixed; +--font-family-nav: 'Lucida Grande',Geneva,Helvetica,Arial,sans-serif; +--font-family-title: Tahoma,Arial,sans-serif; +--font-family-toc: Verdana,'DejaVu Sans',Geneva,sans-serif; +--font-family-search: Arial,Verdana,sans-serif; +--font-family-icon: Arial,Helvetica; +--font-family-tooltip: Roboto,sans-serif; + +} + +@media (prefers-color-scheme: dark) { + html:not(.dark-mode) { + color-scheme: dark; + +/* page base colors */ +--page-background-color: black; +--page-foreground-color: #C9D1D9; +--page-link-color: #90A5CE; +--page-visited-link-color: #A3B4D7; + +/* index */ +--index-odd-item-bg-color: #0B101A; +--index-even-item-bg-color: black; +--index-header-color: #C4CFE5; +--index-separator-color: #334975; + +/* header */ +--header-background-color: #070B11; +--header-separator-color: #141C2E; +--header-gradient-image: url('nav_hd.png'); +--group-header-separator-color: #283A5D; +--group-header-color: #90A5CE; +--inherit-header-color: #A0A0A0; + +--footer-foreground-color: #5B7AB7; +--footer-logo-width: 60px; +--citation-label-color: #90A5CE; +--glow-color: cyan; + +--title-background-color: #090D16; +--title-separator-color: #354C79; +--directory-separator-color: #283A5D; +--separator-color: #283A5D; + +--blockquote-background-color: #101826; +--blockquote-border-color: #283A5D; + +--scrollbar-thumb-color: #283A5D; +--scrollbar-background-color: #070B11; + +--icon-background-color: #334975; +--icon-foreground-color: #C4CFE5; +--icon-doc-image: url('docd.svg'); +--icon-folder-open-image: url('folderopend.svg'); +--icon-folder-closed-image: url('folderclosedd.svg'); + +/* brief member declaration list */ +--memdecl-background-color: #0B101A; +--memdecl-separator-color: #2C3F65; +--memdecl-foreground-color: #BBB; +--memdecl-template-color: #7C95C6; + +/* detailed member list */ +--memdef-border-color: #233250; +--memdef-title-background-color: #1B2840; +--memdef-title-gradient-image: url('nav_fd.png'); +--memdef-proto-background-color: #19243A; +--memdef-proto-text-color: #9DB0D4; +--memdef-proto-text-shadow: 0px 1px 1px rgba(0, 0, 0, 0.9); +--memdef-doc-background-color: black; +--memdef-param-name-color: #D28757; +--memdef-template-color: #7C95C6; + +/* tables */ +--table-cell-border-color: #283A5D; +--table-header-background-color: #283A5D; +--table-header-foreground-color: #C4CFE5; + +/* labels */ +--label-background-color: #354C7B; +--label-left-top-border-color: #4665A2; +--label-right-bottom-border-color: #283A5D; +--label-foreground-color: #CCCCCC; + +/** navigation bar/tree/menu */ +--nav-background-color: #101826; +--nav-foreground-color: #364D7C; +--nav-gradient-image: url('tab_bd.png'); +--nav-gradient-hover-image: url('tab_hd.png'); +--nav-gradient-active-image: url('tab_ad.png'); +--nav-gradient-active-image-parent: url("../tab_ad.png"); +--nav-separator-image: url('tab_sd.png'); +--nav-breadcrumb-image: url('bc_sd.png'); +--nav-breadcrumb-border-color: #2A3D61; +--nav-splitbar-image: url('splitbard.png'); +--nav-font-size-level1: 13px; +--nav-font-size-level2: 10px; +--nav-font-size-level3: 9px; +--nav-text-normal-color: #B6C4DF; +--nav-text-hover-color: #DCE2EF; +--nav-text-active-color: #DCE2EF; +--nav-text-normal-shadow: 0px 1px 1px black; +--nav-text-hover-shadow: 0px 1px 1px rgba(0, 0, 0, 1.0); +--nav-text-active-shadow: 0px 1px 1px rgba(0, 0, 0, 1.0); +--nav-menu-button-color: #B6C4DF; +--nav-menu-background-color: #05070C; +--nav-menu-foreground-color: #BBBBBB; +--nav-menu-toggle-color: rgba(255, 255, 255, 0.2); +--nav-arrow-color: #334975; +--nav-arrow-selected-color: #90A5CE; + +/* table of contents */ +--toc-background-color: #151E30; +--toc-border-color: #202E4A; +--toc-header-color: #A3B4D7; +--toc-down-arrow-image: url("data:image/svg+xml;utf8,&%238595;"); + +/** search field */ +--search-background-color: black; +--search-foreground-color: #C5C5C5; +--search-magnification-image: url('mag_d.svg'); +--search-magnification-select-image: url('mag_seld.svg'); +--search-active-color: #C5C5C5; +--search-filter-background-color: #101826; +--search-filter-foreground-color: #90A5CE; +--search-filter-border-color: #7C95C6; +--search-filter-highlight-text-color: #BCC9E2; +--search-filter-highlight-bg-color: #283A5D; +--search-results-background-color: #101826; +--search-results-foreground-color: #90A5CE; +--search-results-border-color: #7C95C6; +--search-box-shadow: inset 0.5px 0.5px 3px 0px #2F436C; + +/** code fragments */ +--code-keyword-color: #CC99CD; +--code-type-keyword-color: #AB99CD; +--code-flow-keyword-color: #E08000; +--code-comment-color: #717790; +--code-preprocessor-color: #65CABE; +--code-string-literal-color: #7EC699; +--code-char-literal-color: #00E0F0; +--code-xml-cdata-color: #C9D1D9; +--code-vhdl-digit-color: #FF00FF; +--code-vhdl-char-color: #C0C0C0; +--code-vhdl-keyword-color: #CF53C9; +--code-vhdl-logic-color: #FF0000; +--code-link-color: #79C0FF; +--code-external-link-color: #79C0FF; +--fragment-foreground-color: #C9D1D9; +--fragment-background-color: black; +--fragment-border-color: #30363D; +--fragment-lineno-border-color: #30363D; +--fragment-lineno-background-color: black; +--fragment-lineno-foreground-color: #6E7681; +--fragment-lineno-link-fg-color: #6E7681; +--fragment-lineno-link-bg-color: #303030; +--fragment-lineno-link-hover-fg-color: #8E96A1; +--fragment-lineno-link-hover-bg-color: #505050; +--tooltip-foreground-color: #C9D1D9; +--tooltip-background-color: #202020; +--tooltip-border-color: #C9D1D9; +--tooltip-doc-color: #D9E1E9; +--tooltip-declaration-color: #20C348; +--tooltip-link-color: #79C0FF; +--tooltip-shadow: none; +--fold-line-color: #808080; +--fold-minus-image: url('minusd.svg'); +--fold-plus-image: url('plusd.svg'); +--fold-minus-image-relpath: url('../../minusd.svg'); +--fold-plus-image-relpath: url('../../plusd.svg'); + +/** font-family */ +--font-family-normal: Roboto,sans-serif; +--font-family-monospace: 'JetBrains Mono',Consolas,Monaco,'Andale Mono','Ubuntu Mono',monospace,fixed; +--font-family-nav: 'Lucida Grande',Geneva,Helvetica,Arial,sans-serif; +--font-family-title: Tahoma,Arial,sans-serif; +--font-family-toc: Verdana,'DejaVu Sans',Geneva,sans-serif; +--font-family-search: Arial,Verdana,sans-serif; +--font-family-icon: Arial,Helvetica; +--font-family-tooltip: Roboto,sans-serif; + +}} +body { + background-color: var(--page-background-color); + color: var(--page-foreground-color); +} + +body, table, div, p, dl { + font-weight: 400; + font-size: 14px; + font-family: var(--font-family-normal); + line-height: 22px; +} + +/* @group Heading Levels */ + +.title { + font-weight: 400; + font-size: 14px; + font-family: var(--font-family-normal); + line-height: 28px; + font-size: 150%; + font-weight: bold; + margin: 10px 2px; +} + +h1.groupheader { + font-size: 150%; +} + +h2.groupheader { + border-bottom: 1px solid var(--group-header-separator-color); + color: var(--group-header-color); + font-size: 150%; + font-weight: normal; + margin-top: 1.75em; + padding-top: 8px; + padding-bottom: 4px; + width: 100%; +} + +h3.groupheader { + font-size: 100%; +} + +h1, h2, h3, h4, h5, h6 { + -webkit-transition: text-shadow 0.5s linear; + -moz-transition: text-shadow 0.5s linear; + -ms-transition: text-shadow 0.5s linear; + -o-transition: text-shadow 0.5s linear; + transition: text-shadow 0.5s linear; + margin-right: 15px; +} + +h1.glow, h2.glow, h3.glow, h4.glow, h5.glow, h6.glow { + text-shadow: 0 0 15px var(--glow-color); +} + +dt { + font-weight: bold; +} + +p.startli, p.startdd { + margin-top: 2px; +} + +th p.starttd, th p.intertd, th p.endtd { + font-size: 100%; + font-weight: 700; +} + +p.starttd { + margin-top: 0px; +} + +p.endli { + margin-bottom: 0px; +} + +p.enddd { + margin-bottom: 4px; +} + +p.endtd { + margin-bottom: 2px; +} + +p.interli { +} + +p.interdd { +} + +p.intertd { +} + +/* @end */ + +caption { + font-weight: bold; +} + +span.legend { + font-size: 70%; + text-align: center; +} + +h3.version { + font-size: 90%; + text-align: center; +} + +div.navtab { + padding-right: 15px; + text-align: right; + line-height: 110%; +} + +div.navtab table { + border-spacing: 0; +} + +td.navtab { + padding-right: 6px; + padding-left: 6px; +} + +td.navtabHL { + background-image: var(--nav-gradient-active-image); + background-repeat:repeat-x; + padding-right: 6px; + padding-left: 6px; +} + +td.navtabHL a, td.navtabHL a:visited { + color: var(--nav-text-hover-color); + text-shadow: var(--nav-text-hover-shadow); +} + +a.navtab { + font-weight: bold; +} + +div.qindex{ + text-align: center; + width: 100%; + line-height: 140%; + font-size: 130%; + color: var(--index-separator-color); +} + +#main-menu a:focus { + outline: auto; + z-index: 10; + position: relative; +} + +dt.alphachar{ + font-size: 180%; + font-weight: bold; +} + +.alphachar a{ + color: var(--index-header-color); +} + +.alphachar a:hover, .alphachar a:visited{ + text-decoration: none; +} + +.classindex dl { + padding: 25px; + column-count:1 +} + +.classindex dd { + display:inline-block; + margin-left: 50px; + width: 90%; + line-height: 1.15em; +} + +.classindex dl.even { + background-color: var(--index-even-item-bg-color); +} + +.classindex dl.odd { + background-color: var(--index-odd-item-bg-color); +} + +@media(min-width: 1120px) { + .classindex dl { + column-count:2 + } +} + +@media(min-width: 1320px) { + .classindex dl { + column-count:3 + } +} + + +/* @group Link Styling */ + +a { + color: var(--page-link-color); + font-weight: normal; + text-decoration: none; +} + +.contents a:visited { + color: var(--page-visited-link-color); +} + +a:hover { + text-decoration: underline; +} + +a.el { + font-weight: bold; +} + +a.elRef { +} + +a.code, a.code:visited, a.line, a.line:visited { + color: var(--code-link-color); +} + +a.codeRef, a.codeRef:visited, a.lineRef, a.lineRef:visited { + color: var(--code-external-link-color); +} + +a.code.hl_class { /* style for links to class names in code snippets */ } +a.code.hl_struct { /* style for links to struct names in code snippets */ } +a.code.hl_union { /* style for links to union names in code snippets */ } +a.code.hl_interface { /* style for links to interface names in code snippets */ } +a.code.hl_protocol { /* style for links to protocol names in code snippets */ } +a.code.hl_category { /* style for links to category names in code snippets */ } +a.code.hl_exception { /* style for links to exception names in code snippets */ } +a.code.hl_service { /* style for links to service names in code snippets */ } +a.code.hl_singleton { /* style for links to singleton names in code snippets */ } +a.code.hl_concept { /* style for links to concept names in code snippets */ } +a.code.hl_namespace { /* style for links to namespace names in code snippets */ } +a.code.hl_package { /* style for links to package names in code snippets */ } +a.code.hl_define { /* style for links to macro names in code snippets */ } +a.code.hl_function { /* style for links to function names in code snippets */ } +a.code.hl_variable { /* style for links to variable names in code snippets */ } +a.code.hl_typedef { /* style for links to typedef names in code snippets */ } +a.code.hl_enumvalue { /* style for links to enum value names in code snippets */ } +a.code.hl_enumeration { /* style for links to enumeration names in code snippets */ } +a.code.hl_signal { /* style for links to Qt signal names in code snippets */ } +a.code.hl_slot { /* style for links to Qt slot names in code snippets */ } +a.code.hl_friend { /* style for links to friend names in code snippets */ } +a.code.hl_dcop { /* style for links to KDE3 DCOP names in code snippets */ } +a.code.hl_property { /* style for links to property names in code snippets */ } +a.code.hl_event { /* style for links to event names in code snippets */ } +a.code.hl_sequence { /* style for links to sequence names in code snippets */ } +a.code.hl_dictionary { /* style for links to dictionary names in code snippets */ } + +/* @end */ + +dl.el { + margin-left: -1cm; +} + +ul { + overflow: visible; +} + +ul.multicol { + -moz-column-gap: 1em; + -webkit-column-gap: 1em; + column-gap: 1em; + -moz-column-count: 3; + -webkit-column-count: 3; + column-count: 3; + list-style-type: none; +} + +#side-nav ul { + overflow: visible; /* reset ul rule for scroll bar in GENERATE_TREEVIEW window */ +} + +#main-nav ul { + overflow: visible; /* reset ul rule for the navigation bar drop down lists */ +} + +.fragment { + text-align: left; + direction: ltr; + overflow-x: auto; /*Fixed: fragment lines overlap floating elements*/ + overflow-y: hidden; +} + +pre.fragment { + border: 1px solid var(--fragment-border-color); + background-color: var(--fragment-background-color); + color: var(--fragment-foreground-color); + padding: 4px 6px; + margin: 4px 8px 4px 2px; + overflow: auto; + word-wrap: break-word; + font-size: 9pt; + line-height: 125%; + font-family: var(--font-family-monospace); + font-size: 105%; +} + +div.fragment { + padding: 0 0 1px 0; /*Fixed: last line underline overlap border*/ + margin: 4px 8px 4px 2px; + color: var(--fragment-foreground-color); + background-color: var(--fragment-background-color); + border: 1px solid var(--fragment-border-color); +} + +div.line { + font-family: var(--font-family-monospace); + font-size: 13px; + min-height: 13px; + line-height: 1.2; + text-wrap: unrestricted; + white-space: -moz-pre-wrap; /* Moz */ + white-space: -pre-wrap; /* Opera 4-6 */ + white-space: -o-pre-wrap; /* Opera 7 */ + white-space: pre-wrap; /* CSS3 */ + word-wrap: break-word; /* IE 5.5+ */ + text-indent: -53px; + padding-left: 53px; + padding-bottom: 0px; + margin: 0px; + -webkit-transition-property: background-color, box-shadow; + -webkit-transition-duration: 0.5s; + -moz-transition-property: background-color, box-shadow; + -moz-transition-duration: 0.5s; + -ms-transition-property: background-color, box-shadow; + -ms-transition-duration: 0.5s; + -o-transition-property: background-color, box-shadow; + -o-transition-duration: 0.5s; + transition-property: background-color, box-shadow; + transition-duration: 0.5s; +} + +div.line:after { + content:"\000A"; + white-space: pre; +} + +div.line.glow { + background-color: var(--glow-color); + box-shadow: 0 0 10px var(--glow-color); +} + +span.fold { + margin-left: 5px; + margin-right: 1px; + margin-top: 0px; + margin-bottom: 0px; + padding: 0px; + display: inline-block; + width: 12px; + height: 12px; + background-repeat:no-repeat; + background-position:center; +} + +span.lineno { + padding-right: 4px; + margin-right: 9px; + text-align: right; + border-right: 2px solid var(--fragment-lineno-border-color); + color: var(--fragment-lineno-foreground-color); + background-color: var(--fragment-lineno-background-color); + white-space: pre; +} +span.lineno a, span.lineno a:visited { + color: var(--fragment-lineno-link-fg-color); + background-color: var(--fragment-lineno-link-bg-color); +} + +span.lineno a:hover { + color: var(--fragment-lineno-link-hover-fg-color); + background-color: var(--fragment-lineno-link-hover-bg-color); +} + +.lineno { + -webkit-touch-callout: none; + -webkit-user-select: none; + -khtml-user-select: none; + -moz-user-select: none; + -ms-user-select: none; + user-select: none; +} + +div.classindex ul { + list-style: none; + padding-left: 0; +} + +div.classindex span.ai { + display: inline-block; +} + +div.groupHeader { + margin-left: 16px; + margin-top: 12px; + font-weight: bold; +} + +div.groupText { + margin-left: 16px; + font-style: italic; +} + +body { + color: var(--page-foreground-color); + margin: 0; +} + +div.contents { + margin-top: 10px; + margin-left: 12px; + margin-right: 8px; +} + +p.formulaDsp { + text-align: center; +} + +img.dark-mode-visible { + display: none; +} +img.light-mode-visible { + display: none; +} + +img.formulaDsp { + +} + +img.formulaInl, img.inline { + vertical-align: middle; +} + +div.center { + text-align: center; + margin-top: 0px; + margin-bottom: 0px; + padding: 0px; +} + +div.center img { + border: 0px; +} + +address.footer { + text-align: right; + padding-right: 12px; +} + +img.footer { + border: 0px; + vertical-align: middle; + width: var(--footer-logo-width); +} + +.compoundTemplParams { + color: var(--memdecl-template-color); + font-size: 80%; + line-height: 120%; +} + +/* @group Code Colorization */ + +span.keyword { + color: var(--code-keyword-color); +} + +span.keywordtype { + color: var(--code-type-keyword-color); +} + +span.keywordflow { + color: var(--code-flow-keyword-color); +} + +span.comment { + color: var(--code-comment-color); +} + +span.preprocessor { + color: var(--code-preprocessor-color); +} + +span.stringliteral { + color: var(--code-string-literal-color); +} + +span.charliteral { + color: var(--code-char-literal-color); +} + +span.xmlcdata { + color: var(--code-xml-cdata-color); +} + +span.vhdldigit { + color: var(--code-vhdl-digit-color); +} + +span.vhdlchar { + color: var(--code-vhdl-char-color); +} + +span.vhdlkeyword { + color: var(--code-vhdl-keyword-color); +} + +span.vhdllogic { + color: var(--code-vhdl-logic-color); +} + +blockquote { + background-color: var(--blockquote-background-color); + border-left: 2px solid var(--blockquote-border-color); + margin: 0 24px 0 4px; + padding: 0 12px 0 16px; +} + +/* @end */ + +td.tiny { + font-size: 75%; +} + +.dirtab { + padding: 4px; + border-collapse: collapse; + border: 1px solid var(--table-cell-border-color); +} + +th.dirtab { + background-color: var(--table-header-background-color); + color: var(--table-header-foreground-color); + font-weight: bold; +} + +hr { + height: 0px; + border: none; + border-top: 1px solid var(--separator-color); +} + +hr.footer { + height: 1px; +} + +/* @group Member Descriptions */ + +table.memberdecls { + border-spacing: 0px; + padding: 0px; +} + +.memberdecls td, .fieldtable tr { + -webkit-transition-property: background-color, box-shadow; + -webkit-transition-duration: 0.5s; + -moz-transition-property: background-color, box-shadow; + -moz-transition-duration: 0.5s; + -ms-transition-property: background-color, box-shadow; + -ms-transition-duration: 0.5s; + -o-transition-property: background-color, box-shadow; + -o-transition-duration: 0.5s; + transition-property: background-color, box-shadow; + transition-duration: 0.5s; +} + +.memberdecls td.glow, .fieldtable tr.glow { + background-color: var(--glow-color); + box-shadow: 0 0 15px var(--glow-color); +} + +.mdescLeft, .mdescRight, +.memItemLeft, .memItemRight, +.memTemplItemLeft, .memTemplItemRight, .memTemplParams { + background-color: var(--memdecl-background-color); + border: none; + margin: 4px; + padding: 1px 0 0 8px; +} + +.mdescLeft, .mdescRight { + padding: 0px 8px 4px 8px; + color: var(--memdecl-foreground-color); +} + +.memSeparator { + border-bottom: 1px solid var(--memdecl-separator-color); + line-height: 1px; + margin: 0px; + padding: 0px; +} + +.memItemLeft, .memTemplItemLeft { + white-space: nowrap; +} + +.memItemRight, .memTemplItemRight { + width: 100%; +} + +.memTemplParams { + color: var(--memdecl-template-color); + white-space: nowrap; + font-size: 80%; +} + +/* @end */ + +/* @group Member Details */ + +/* Styles for detailed member documentation */ + +.memtitle { + padding: 8px; + border-top: 1px solid var(--memdef-border-color); + border-left: 1px solid var(--memdef-border-color); + border-right: 1px solid var(--memdef-border-color); + border-top-right-radius: 4px; + border-top-left-radius: 4px; + margin-bottom: -1px; + background-image: var(--memdef-title-gradient-image); + background-repeat: repeat-x; + background-color: var(--memdef-title-background-color); + line-height: 1.25; + font-weight: 300; + float:left; +} + +.permalink +{ + font-size: 65%; + display: inline-block; + vertical-align: middle; +} + +.memtemplate { + font-size: 80%; + color: var(--memdef-template-color); + font-weight: normal; + margin-left: 9px; +} + +.mempage { + width: 100%; +} + +.memitem { + padding: 0; + margin-bottom: 10px; + margin-right: 5px; + -webkit-transition: box-shadow 0.5s linear; + -moz-transition: box-shadow 0.5s linear; + -ms-transition: box-shadow 0.5s linear; + -o-transition: box-shadow 0.5s linear; + transition: box-shadow 0.5s linear; + display: table !important; + width: 100%; +} + +.memitem.glow { + box-shadow: 0 0 15px var(--glow-color); +} + +.memname { + font-weight: 400; + margin-left: 6px; +} + +.memname td { + vertical-align: bottom; +} + +.memproto, dl.reflist dt { + border-top: 1px solid var(--memdef-border-color); + border-left: 1px solid var(--memdef-border-color); + border-right: 1px solid var(--memdef-border-color); + padding: 6px 0px 6px 0px; + color: var(--memdef-proto-text-color); + font-weight: bold; + text-shadow: var(--memdef-proto-text-shadow); + background-color: var(--memdef-proto-background-color); + box-shadow: 5px 5px 5px rgba(0, 0, 0, 0.15); + border-top-right-radius: 4px; +} + +.overload { + font-family: var(--font-family-monospace); + font-size: 65%; +} + +.memdoc, dl.reflist dd { + border-bottom: 1px solid var(--memdef-border-color); + border-left: 1px solid var(--memdef-border-color); + border-right: 1px solid var(--memdef-border-color); + padding: 6px 10px 2px 10px; + border-top-width: 0; + background-image:url('nav_g.png'); + background-repeat:repeat-x; + background-color: var(--memdef-doc-background-color); + /* opera specific markup */ + border-bottom-left-radius: 4px; + border-bottom-right-radius: 4px; + box-shadow: 5px 5px 5px rgba(0, 0, 0, 0.15); + /* firefox specific markup */ + -moz-border-radius-bottomleft: 4px; + -moz-border-radius-bottomright: 4px; + -moz-box-shadow: rgba(0, 0, 0, 0.15) 5px 5px 5px; + /* webkit specific markup */ + -webkit-border-bottom-left-radius: 4px; + -webkit-border-bottom-right-radius: 4px; + -webkit-box-shadow: 5px 5px 5px rgba(0, 0, 0, 0.15); +} + +dl.reflist dt { + padding: 5px; +} + +dl.reflist dd { + margin: 0px 0px 10px 0px; + padding: 5px; +} + +.paramkey { + text-align: right; +} + +.paramtype { + white-space: nowrap; +} + +.paramname { + color: var(--memdef-param-name-color); + white-space: nowrap; +} +.paramname em { + font-style: normal; +} +.paramname code { + line-height: 14px; +} + +.params, .retval, .exception, .tparams { + margin-left: 0px; + padding-left: 0px; +} + +.params .paramname, .retval .paramname, .tparams .paramname, .exception .paramname { + font-weight: bold; + vertical-align: top; +} + +.params .paramtype, .tparams .paramtype { + font-style: italic; + vertical-align: top; +} + +.params .paramdir, .tparams .paramdir { + font-family: var(--font-family-monospace); + vertical-align: top; +} + +table.mlabels { + border-spacing: 0px; +} + +td.mlabels-left { + width: 100%; + padding: 0px; +} + +td.mlabels-right { + vertical-align: bottom; + padding: 0px; + white-space: nowrap; +} + +span.mlabels { + margin-left: 8px; +} + +span.mlabel { + background-color: var(--label-background-color); + border-top:1px solid var(--label-left-top-border-color); + border-left:1px solid var(--label-left-top-border-color); + border-right:1px solid var(--label-right-bottom-border-color); + border-bottom:1px solid var(--label-right-bottom-border-color); + text-shadow: none; + color: var(--label-foreground-color); + margin-right: 4px; + padding: 2px 3px; + border-radius: 3px; + font-size: 7pt; + white-space: nowrap; + vertical-align: middle; +} + + + +/* @end */ + +/* these are for tree view inside a (index) page */ + +div.directory { + margin: 10px 0px; + border-top: 1px solid var(--directory-separator-color); + border-bottom: 1px solid var(--directory-separator-color); + width: 100%; +} + +.directory table { + border-collapse:collapse; +} + +.directory td { + margin: 0px; + padding: 0px; + vertical-align: top; +} + +.directory td.entry { + white-space: nowrap; + padding-right: 6px; + padding-top: 3px; +} + +.directory td.entry a { + outline:none; +} + +.directory td.entry a img { + border: none; +} + +.directory td.desc { + width: 100%; + padding-left: 6px; + padding-right: 6px; + padding-top: 3px; + border-left: 1px solid rgba(0,0,0,0.05); +} + +.directory tr.odd { + padding-left: 6px; + background-color: var(--index-odd-item-bg-color); +} + +.directory tr.even { + padding-left: 6px; + background-color: var(--index-even-item-bg-color); +} + +.directory img { + vertical-align: -30%; +} + +.directory .levels { + white-space: nowrap; + width: 100%; + text-align: right; + font-size: 9pt; +} + +.directory .levels span { + cursor: pointer; + padding-left: 2px; + padding-right: 2px; + color: var(--page-link-color); +} + +.arrow { + color: var(--nav-arrow-color); + -webkit-user-select: none; + -khtml-user-select: none; + -moz-user-select: none; + -ms-user-select: none; + user-select: none; + cursor: pointer; + font-size: 80%; + display: inline-block; + width: 16px; + height: 22px; +} + +.icon { + font-family: var(--font-family-icon); + line-height: normal; + font-weight: bold; + font-size: 12px; + height: 14px; + width: 16px; + display: inline-block; + background-color: var(--icon-background-color); + color: var(--icon-foreground-color); + text-align: center; + border-radius: 4px; + margin-left: 2px; + margin-right: 2px; +} + +.icona { + width: 24px; + height: 22px; + display: inline-block; +} + +.iconfopen { + width: 24px; + height: 18px; + margin-bottom: 4px; + background-image:var(--icon-folder-open-image); + background-repeat: repeat-y; + vertical-align:top; + display: inline-block; +} + +.iconfclosed { + width: 24px; + height: 18px; + margin-bottom: 4px; + background-image:var(--icon-folder-closed-image); + background-repeat: repeat-y; + vertical-align:top; + display: inline-block; +} + +.icondoc { + width: 24px; + height: 18px; + margin-bottom: 4px; + background-image:var(--icon-doc-image); + background-position: 0px -4px; + background-repeat: repeat-y; + vertical-align:top; + display: inline-block; +} + +/* @end */ + +div.dynheader { + margin-top: 8px; + -webkit-touch-callout: none; + -webkit-user-select: none; + -khtml-user-select: none; + -moz-user-select: none; + -ms-user-select: none; + user-select: none; +} + +address { + font-style: normal; + color: var(--footer-foreground-color); +} + +table.doxtable caption { + caption-side: top; +} + +table.doxtable { + border-collapse:collapse; + margin-top: 4px; + margin-bottom: 4px; +} + +table.doxtable td, table.doxtable th { + border: 1px solid var(--table-cell-border-color); + padding: 3px 7px 2px; +} + +table.doxtable th { + background-color: var(--table-header-background-color); + color: var(--table-header-foreground-color); + font-size: 110%; + padding-bottom: 4px; + padding-top: 5px; +} + +table.fieldtable { + margin-bottom: 10px; + border: 1px solid var(--memdef-border-color); + border-spacing: 0px; + border-radius: 4px; + box-shadow: 2px 2px 2px rgba(0, 0, 0, 0.15); +} + +.fieldtable td, .fieldtable th { + padding: 3px 7px 2px; +} + +.fieldtable td.fieldtype, .fieldtable td.fieldname { + white-space: nowrap; + border-right: 1px solid var(--memdef-border-color); + border-bottom: 1px solid var(--memdef-border-color); + vertical-align: top; +} + +.fieldtable td.fieldname { + padding-top: 3px; +} + +.fieldtable td.fielddoc { + border-bottom: 1px solid var(--memdef-border-color); +} + +.fieldtable td.fielddoc p:first-child { + margin-top: 0px; +} + +.fieldtable td.fielddoc p:last-child { + margin-bottom: 2px; +} + +.fieldtable tr:last-child td { + border-bottom: none; +} + +.fieldtable th { + background-image: var(--memdef-title-gradient-image); + background-repeat:repeat-x; + background-color: var(--memdef-title-background-color); + font-size: 90%; + color: var(--memdef-proto-text-color); + padding-bottom: 4px; + padding-top: 5px; + text-align:left; + font-weight: 400; + border-top-left-radius: 4px; + border-top-right-radius: 4px; + border-bottom: 1px solid var(--memdef-border-color); +} + + +.tabsearch { + top: 0px; + left: 10px; + height: 36px; + background-image: var(--nav-gradient-image); + z-index: 101; + overflow: hidden; + font-size: 13px; +} + +.navpath ul +{ + font-size: 11px; + background-image: var(--nav-gradient-image); + background-repeat:repeat-x; + background-position: 0 -5px; + height:30px; + line-height:30px; + color:var(--nav-text-normal-color); + border:solid 1px var(--nav-breadcrumb-border-color); + overflow:hidden; + margin:0px; + padding:0px; +} + +.navpath li +{ + list-style-type:none; + float:left; + padding-left:10px; + padding-right:15px; + background-image:var(--nav-breadcrumb-image); + background-repeat:no-repeat; + background-position:right; + color: var(--nav-foreground-color); +} + +.navpath li.navelem a +{ + height:32px; + display:block; + text-decoration: none; + outline: none; + color: var(--nav-text-normal-color); + font-family: var(--font-family-nav); + text-shadow: var(--nav-text-normal-shadow); + text-decoration: none; +} + +.navpath li.navelem a:hover +{ + color: var(--nav-text-hover-color); + text-shadow: var(--nav-text-hover-shadow); +} + +.navpath li.footer +{ + list-style-type:none; + float:right; + padding-left:10px; + padding-right:15px; + background-image:none; + background-repeat:no-repeat; + background-position:right; + color: var(--footer-foreground-color); + font-size: 8pt; +} + + +div.summary +{ + float: right; + font-size: 8pt; + padding-right: 5px; + width: 50%; + text-align: right; +} + +div.summary a +{ + white-space: nowrap; +} + +table.classindex +{ + margin: 10px; + white-space: nowrap; + margin-left: 3%; + margin-right: 3%; + width: 94%; + border: 0; + border-spacing: 0; + padding: 0; +} + +div.ingroups +{ + font-size: 8pt; + width: 50%; + text-align: left; +} + +div.ingroups a +{ + white-space: nowrap; +} + +div.header +{ + background-image: var(--header-gradient-image); + background-repeat:repeat-x; + background-color: var(--header-background-color); + margin: 0px; + border-bottom: 1px solid var(--header-separator-color); +} + +div.headertitle +{ + padding: 5px 5px 5px 10px; +} + +.PageDocRTL-title div.headertitle { + text-align: right; + direction: rtl; +} + +dl { + padding: 0 0 0 0; +} + +/* dl.note, dl.warning, dl.attention, dl.pre, dl.post, dl.invariant, dl.deprecated, dl.todo, dl.test, dl.bug, dl.examples */ +dl.section { + margin-left: 0px; + padding-left: 0px; +} + +dl.note { + margin-left: -7px; + padding-left: 3px; + border-left: 4px solid; + border-color: #D0C000; +} + +dl.warning, dl.attention { + margin-left: -7px; + padding-left: 3px; + border-left: 4px solid; + border-color: #FF0000; +} + +dl.pre, dl.post, dl.invariant { + margin-left: -7px; + padding-left: 3px; + border-left: 4px solid; + border-color: #00D000; +} + +dl.deprecated { + margin-left: -7px; + padding-left: 3px; + border-left: 4px solid; + border-color: #505050; +} + +dl.todo { + margin-left: -7px; + padding-left: 3px; + border-left: 4px solid; + border-color: #00C0E0; +} + +dl.test { + margin-left: -7px; + padding-left: 3px; + border-left: 4px solid; + border-color: #3030E0; +} + +dl.bug { + margin-left: -7px; + padding-left: 3px; + border-left: 4px solid; + border-color: #C08050; +} + +dl.section dd { + margin-bottom: 6px; +} + + +#projectrow +{ + height: 56px; +} + +#projectlogo +{ + text-align: center; + vertical-align: bottom; + border-collapse: separate; +} + +#projectlogo img +{ + border: 0px none; +} + +#projectalign +{ + vertical-align: middle; + padding-left: 0.5em; +} + +#projectname +{ + font-size: 200%; + font-family: var(--font-family-title); + margin: 0px; + padding: 2px 0px; +} + +#projectbrief +{ + font-size: 90%; + font-family: var(--font-family-title); + margin: 0px; + padding: 0px; +} + +#projectnumber +{ + font-size: 50%; + font-family: 50% var(--font-family-title); + margin: 0px; + padding: 0px; +} + +#titlearea +{ + padding: 0px; + margin: 0px; + width: 100%; + border-bottom: 1px solid var(--title-separator-color); + background-color: var(--title-background-color); +} + +.image +{ + text-align: center; +} + +.dotgraph +{ + text-align: center; +} + +.mscgraph +{ + text-align: center; +} + +.plantumlgraph +{ + text-align: center; +} + +.diagraph +{ + text-align: center; +} + +.caption +{ + font-weight: bold; +} + +dl.citelist { + margin-bottom:50px; +} + +dl.citelist dt { + color:var(--citation-label-color); + float:left; + font-weight:bold; + margin-right:10px; + padding:5px; + text-align:right; + width:52px; +} + +dl.citelist dd { + margin:2px 0 2px 72px; + padding:5px 0; +} + +div.toc { + padding: 14px 25px; + background-color: var(--toc-background-color); + border: 1px solid var(--toc-border-color); + border-radius: 7px 7px 7px 7px; + float: right; + height: auto; + margin: 0 8px 10px 10px; + width: 200px; +} + +div.toc li { + background: var(--toc-down-arrow-image) no-repeat scroll 0 5px transparent; + font: 10px/1.2 var(--font-family-toc); + margin-top: 5px; + padding-left: 10px; + padding-top: 2px; +} + +div.toc h3 { + font: bold 12px/1.2 var(--font-family-toc); + color: var(--toc-header-color); + border-bottom: 0 none; + margin: 0; +} + +div.toc ul { + list-style: none outside none; + border: medium none; + padding: 0px; +} + +div.toc li.level1 { + margin-left: 0px; +} + +div.toc li.level2 { + margin-left: 15px; +} + +div.toc li.level3 { + margin-left: 15px; +} + +div.toc li.level4 { + margin-left: 15px; +} + +span.emoji { + /* font family used at the site: https://unicode.org/emoji/charts/full-emoji-list.html + * font-family: "Noto Color Emoji", "Apple Color Emoji", "Segoe UI Emoji", Times, Symbola, Aegyptus, Code2000, Code2001, Code2002, Musica, serif, LastResort; + */ +} + +span.obfuscator { + display: none; +} + +.inherit_header { + font-weight: bold; + color: var(--inherit-header-color); + cursor: pointer; + -webkit-touch-callout: none; + -webkit-user-select: none; + -khtml-user-select: none; + -moz-user-select: none; + -ms-user-select: none; + user-select: none; +} + +.inherit_header td { + padding: 6px 0px 2px 5px; +} + +.inherit { + display: none; +} + +tr.heading h2 { + margin-top: 12px; + margin-bottom: 4px; +} + +/* tooltip related style info */ + +.ttc { + position: absolute; + display: none; +} + +#powerTip { + cursor: default; + /*white-space: nowrap;*/ + color: var(--tooltip-foreground-color); + background-color: var(--tooltip-background-color); + border: 1px solid var(--tooltip-border-color); + border-radius: 4px 4px 4px 4px; + box-shadow: var(--tooltip-shadow); + display: none; + font-size: smaller; + max-width: 80%; + opacity: 0.9; + padding: 1ex 1em 1em; + position: absolute; + z-index: 2147483647; +} + +#powerTip div.ttdoc { + color: var(--tooltip-doc-color); + font-style: italic; +} + +#powerTip div.ttname a { + font-weight: bold; +} + +#powerTip a { + color: var(--tooltip-link-color); +} + +#powerTip div.ttname { + font-weight: bold; +} + +#powerTip div.ttdeci { + color: var(--tooltip-declaration-color); +} + +#powerTip div { + margin: 0px; + padding: 0px; + font-size: 12px; + font-family: var(--font-family-tooltip); + line-height: 16px; +} + +#powerTip:before, #powerTip:after { + content: ""; + position: absolute; + margin: 0px; +} + +#powerTip.n:after, #powerTip.n:before, +#powerTip.s:after, #powerTip.s:before, +#powerTip.w:after, #powerTip.w:before, +#powerTip.e:after, #powerTip.e:before, +#powerTip.ne:after, #powerTip.ne:before, +#powerTip.se:after, #powerTip.se:before, +#powerTip.nw:after, #powerTip.nw:before, +#powerTip.sw:after, #powerTip.sw:before { + border: solid transparent; + content: " "; + height: 0; + width: 0; + position: absolute; +} + +#powerTip.n:after, #powerTip.s:after, +#powerTip.w:after, #powerTip.e:after, +#powerTip.nw:after, #powerTip.ne:after, +#powerTip.sw:after, #powerTip.se:after { + border-color: rgba(255, 255, 255, 0); +} + +#powerTip.n:before, #powerTip.s:before, +#powerTip.w:before, #powerTip.e:before, +#powerTip.nw:before, #powerTip.ne:before, +#powerTip.sw:before, #powerTip.se:before { + border-color: rgba(128, 128, 128, 0); +} + +#powerTip.n:after, #powerTip.n:before, +#powerTip.ne:after, #powerTip.ne:before, +#powerTip.nw:after, #powerTip.nw:before { + top: 100%; +} + +#powerTip.n:after, #powerTip.ne:after, #powerTip.nw:after { + border-top-color: var(--tooltip-background-color); + border-width: 10px; + margin: 0px -10px; +} +#powerTip.n:before, #powerTip.ne:before, #powerTip.nw:before { + border-top-color: var(--tooltip-border-color); + border-width: 11px; + margin: 0px -11px; +} +#powerTip.n:after, #powerTip.n:before { + left: 50%; +} + +#powerTip.nw:after, #powerTip.nw:before { + right: 14px; +} + +#powerTip.ne:after, #powerTip.ne:before { + left: 14px; +} + +#powerTip.s:after, #powerTip.s:before, +#powerTip.se:after, #powerTip.se:before, +#powerTip.sw:after, #powerTip.sw:before { + bottom: 100%; +} + +#powerTip.s:after, #powerTip.se:after, #powerTip.sw:after { + border-bottom-color: var(--tooltip-background-color); + border-width: 10px; + margin: 0px -10px; +} + +#powerTip.s:before, #powerTip.se:before, #powerTip.sw:before { + border-bottom-color: var(--tooltip-border-color); + border-width: 11px; + margin: 0px -11px; +} + +#powerTip.s:after, #powerTip.s:before { + left: 50%; +} + +#powerTip.sw:after, #powerTip.sw:before { + right: 14px; +} + +#powerTip.se:after, #powerTip.se:before { + left: 14px; +} + +#powerTip.e:after, #powerTip.e:before { + left: 100%; +} +#powerTip.e:after { + border-left-color: var(--tooltip-border-color); + border-width: 10px; + top: 50%; + margin-top: -10px; +} +#powerTip.e:before { + border-left-color: var(--tooltip-border-color); + border-width: 11px; + top: 50%; + margin-top: -11px; +} + +#powerTip.w:after, #powerTip.w:before { + right: 100%; +} +#powerTip.w:after { + border-right-color: var(--tooltip-border-color); + border-width: 10px; + top: 50%; + margin-top: -10px; +} +#powerTip.w:before { + border-right-color: var(--tooltip-border-color); + border-width: 11px; + top: 50%; + margin-top: -11px; +} + +@media print +{ + #top { display: none; } + #side-nav { display: none; } + #nav-path { display: none; } + body { overflow:visible; } + h1, h2, h3, h4, h5, h6 { page-break-after: avoid; } + .summary { display: none; } + .memitem { page-break-inside: avoid; } + #doc-content + { + margin-left:0 !important; + height:auto !important; + width:auto !important; + overflow:inherit; + display:inline; + } +} + +/* @group Markdown */ + +table.markdownTable { + border-collapse:collapse; + margin-top: 4px; + margin-bottom: 4px; +} + +table.markdownTable td, table.markdownTable th { + border: 1px solid var(--table-cell-border-color); + padding: 3px 7px 2px; +} + +table.markdownTable tr { +} + +th.markdownTableHeadLeft, th.markdownTableHeadRight, th.markdownTableHeadCenter, th.markdownTableHeadNone { + background-color: var(--table-header-background-color); + color: var(--table-header-foreground-color); + font-size: 110%; + padding-bottom: 4px; + padding-top: 5px; +} + +th.markdownTableHeadLeft, td.markdownTableBodyLeft { + text-align: left +} + +th.markdownTableHeadRight, td.markdownTableBodyRight { + text-align: right +} + +th.markdownTableHeadCenter, td.markdownTableBodyCenter { + text-align: center +} + +tt, code, kbd, samp +{ + display: inline-block; +} +/* @end */ + +u { + text-decoration: underline; +} + +details>summary { + list-style-type: none; +} + +details > summary::-webkit-details-marker { + display: none; +} + +details>summary::before { + content: "\25ba"; + padding-right:4px; + font-size: 80%; +} + +details[open]>summary::before { + content: "\25bc"; + padding-right:4px; + font-size: 80%; +} + +body { + scrollbar-color: var(--scrollbar-thumb-color) var(--scrollbar-background-color); +} + +::-webkit-scrollbar { + background-color: var(--scrollbar-background-color); + height: 12px; + width: 12px; +} +::-webkit-scrollbar-thumb { + border-radius: 6px; + box-shadow: inset 0 0 12px 12px var(--scrollbar-thumb-color); + border: solid 2px transparent; +} +::-webkit-scrollbar-corner { + background-color: var(--scrollbar-background-color); +} + diff --git a/versions/v5.0.1/doxygen.svg b/versions/v5.0.1/doxygen.svg new file mode 100644 index 00000000..79a76354 --- /dev/null +++ b/versions/v5.0.1/doxygen.svg @@ -0,0 +1,28 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/versions/v5.0.1/dynsections.js b/versions/v5.0.1/dynsections.js new file mode 100644 index 00000000..9b281563 --- /dev/null +++ b/versions/v5.0.1/dynsections.js @@ -0,0 +1,199 @@ +/* + @licstart The following is the entire license notice for the JavaScript code in this file. + + The MIT License (MIT) + + Copyright (C) 1997-2020 by Dimitri van Heesch + + Permission is hereby granted, free of charge, to any person obtaining a copy of this software + and associated documentation files (the "Software"), to deal in the Software without restriction, + including without limitation the rights to use, copy, modify, merge, publish, distribute, + sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is + furnished to do so, subject to the following conditions: + + The above copyright notice and this permission notice shall be included in all copies or + substantial portions of the Software. + + THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING + BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND + NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, + DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, + OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. + + @licend The above is the entire license notice for the JavaScript code in this file + */ +function toggleVisibility(linkObj) +{ + var base = $(linkObj).attr('id'); + var summary = $('#'+base+'-summary'); + var content = $('#'+base+'-content'); + var trigger = $('#'+base+'-trigger'); + var src=$(trigger).attr('src'); + if (content.is(':visible')===true) { + content.hide(); + summary.show(); + $(linkObj).addClass('closed').removeClass('opened'); + $(trigger).attr('src',src.substring(0,src.length-8)+'closed.png'); + } else { + content.show(); + summary.hide(); + $(linkObj).removeClass('closed').addClass('opened'); + $(trigger).attr('src',src.substring(0,src.length-10)+'open.png'); + } + return false; +} + +function updateStripes() +{ + $('table.directory tr'). + removeClass('even').filter(':visible:even').addClass('even'); + $('table.directory tr'). + removeClass('odd').filter(':visible:odd').addClass('odd'); +} + +function toggleLevel(level) +{ + $('table.directory tr').each(function() { + var l = this.id.split('_').length-1; + var i = $('#img'+this.id.substring(3)); + var a = $('#arr'+this.id.substring(3)); + if (l'); + // add vertical lines to other rows + $('span[class=lineno]').not(':eq(0)').append(''); + // add toggle controls to lines with fold divs + $('div[class=foldopen]').each(function() { + // extract specific id to use + var id = $(this).attr('id').replace('foldopen',''); + // extract start and end foldable fragment attributes + var start = $(this).attr('data-start'); + var end = $(this).attr('data-end'); + // replace normal fold span with controls for the first line of a foldable fragment + $(this).find('span[class=fold]:first').replaceWith(''); + // append div for folded (closed) representation + $(this).after(''); + // extract the first line from the "open" section to represent closed content + var line = $(this).children().first().clone(); + // remove any glow that might still be active on the original line + $(line).removeClass('glow'); + if (start) { + // if line already ends with a start marker (e.g. trailing {), remove it + $(line).html($(line).html().replace(new RegExp('\\s*'+start+'\\s*$','g'),'')); + } + // replace minus with plus symbol + $(line).find('span[class=fold]').css('background-image',plusImg[relPath]); + // append ellipsis + $(line).append(' '+start+''+end); + // insert constructed line into closed div + $('#foldclosed'+id).html(line); + }); +} + +/* @license-end */ +$(document).ready(function() { + $('.code,.codeRef').each(function() { + $(this).data('powertip',$('#a'+$(this).attr('href').replace(/.*\//,'').replace(/[^a-z_A-Z0-9]/g,'_')).html()); + $.fn.powerTip.smartPlacementLists.s = [ 's', 'n', 'ne', 'se' ]; + $(this).powerTip({ placement: 's', smartPlacement: true, mouseOnToPopup: true }); + }); +}); diff --git a/versions/v5.0.1/exceptions_8hpp_source.html b/versions/v5.0.1/exceptions_8hpp_source.html new file mode 100644 index 00000000..70307baf --- /dev/null +++ b/versions/v5.0.1/exceptions_8hpp_source.html @@ -0,0 +1,182 @@ + + + + + + + +Modulo: /github/workspace/source/modulo_core/include/modulo_core/exceptions.hpp Source File + + + + + + + + + +
+
+ + + + + + +
+
Modulo 5.0.0 +
+
+
+ + + + + + + + + +
+
+ + +
+
+
+
+
+
Loading...
+
Searching...
+
No Matches
+
+
+
+
+ + +
+
+
exceptions.hpp
+
+
+
1#pragma once
+
2
+
3#include <stdexcept>
+
4#include <string>
+
5
+ +
11
+
+
17class CoreException : public std::runtime_error {
+
18public:
+
19 explicit CoreException(const std::string& msg) : CoreException("CoreException", msg){};
+
20
+
21protected:
+
22 CoreException(const std::string& prefix, const std::string& msg) : std::runtime_error(prefix + ": " + msg) {}
+
23};
+
+
24
+
+ +
31public:
+
32 explicit AddServiceException(const std::string& msg) : CoreException("AddServiceException", msg) {}
+
33};
+
+
34
+
+ +
41public:
+
42 explicit AddSignalException(const std::string& msg) : CoreException("AddSignalException", msg) {}
+
43};
+
+
44
+
+ +
51public:
+
52 explicit InvalidPointerCastException(const std::string& msg) : CoreException("InvalidPointerCastException", msg) {}
+
53};
+
+
54
+
+ +
61public:
+
62 explicit InvalidPointerException(const std::string& msg) : CoreException("InvalidPointerException", msg) {}
+
63};
+
+
64
+
+ +
72public:
+
73 explicit LookupTransformException(const std::string& msg) : CoreException("LookupTransformException", msg) {}
+
74};
+
+
75
+
+ +
81public:
+
82 explicit MessageTranslationException(const std::string& msg) : CoreException("MessageTranslationException", msg) {}
+
83};
+
+
84
+
+ +
91public:
+
92 explicit NullPointerException(const std::string& msg) : CoreException("NullPointerException", msg) {}
+
93};
+
+
94
+
+ +
102public:
+
103 explicit ParameterException(const std::string& msg) : CoreException("ParameterException", msg) {}
+
104};
+
+
105
+
+ +
113public:
+
114 explicit ParameterTranslationException(const std::string& msg)
+
115 : CoreException("ParameterTranslationException", msg) {}
+
116};
+
+
117}// namespace modulo_core::exceptions
+
An exception class to notify errors when adding a service.
+
An exception class to notify errors when adding a signal.
+
A base class for all core exceptions.
+
An exception class to notify if the result of getting an instance of a derived class through dynamic ...
+
An exception class to notify if an object has no reference count (if the object is not owned by any p...
+
An exception class to notify an error while looking up TF transforms.
+
An exception class to notify that the translation of a ROS message failed.
+
An exception class to notify that a certain pointer is null.
+
An exception class to notify errors with parameters in modulo classes.
+
An exception class to notify incompatibility when translating parameters from different sources.
+
Modulo Core exceptions module for defining exception classes.
+
+ + + + diff --git a/versions/v5.0.1/files.html b/versions/v5.0.1/files.html new file mode 100644 index 00000000..68a80517 --- /dev/null +++ b/versions/v5.0.1/files.html @@ -0,0 +1,147 @@ + + + + + + + +Modulo: File List + + + + + + + + + +
+
+ + + + + + +
+
Modulo 5.0.0 +
+
+
+ + + + + + + +
+ +
+
+ + +
+
+
+
+
+
Loading...
+
Searching...
+
No Matches
+
+
+
+
+ +
+
File List
+
+
+
Here is a list of all documented files with brief descriptions:
+
[detail level 123456]
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
  source
  modulo_components
  include
  modulo_components
 Component.hpp
 ComponentInterface.hpp
 LifecycleComponent.hpp
  src
 Component.cpp
 ComponentInterface.cpp
 LifecycleComponent.cpp
  modulo_controllers
  include
  modulo_controllers
 BaseControllerInterface.hpp
 ControllerInterface.hpp
 RobotControllerInterface.hpp
  src
 BaseControllerInterface.cpp
 ControllerInterface.cpp
 RobotControllerInterface.cpp
  modulo_core
  include
  modulo_core
  communication
 MessagePair.hpp
 MessagePairInterface.hpp
 MessageType.hpp
 PublisherHandler.hpp
 PublisherInterface.hpp
 PublisherType.hpp
 SubscriptionHandler.hpp
 SubscriptionInterface.hpp
  translators
 message_readers.hpp
 message_writers.hpp
 parameter_translators.hpp
 concepts.hpp
 EncodedState.hpp
 exceptions.hpp
 Predicate.hpp
  src
  communication
 MessagePair.cpp
 MessagePairInterface.cpp
 PublisherInterface.cpp
 SubscriptionHandler.cpp
 SubscriptionInterface.cpp
  translators
 message_readers.cpp
 message_writers.cpp
 parameter_translators.cpp
  modulo_utils
  include
  modulo_utils
  testutils
 PredicatesListener.hpp
 ServiceClient.hpp
 parsing.hpp
  src
  testutils
 PredicatesListener.cpp
+
+
+ + + + diff --git a/versions/v5.0.1/folderclosed.svg b/versions/v5.0.1/folderclosed.svg new file mode 100644 index 00000000..b04bed2e --- /dev/null +++ b/versions/v5.0.1/folderclosed.svg @@ -0,0 +1,11 @@ + + + + + + + + + + diff --git a/versions/v5.0.1/folderclosedd.svg b/versions/v5.0.1/folderclosedd.svg new file mode 100644 index 00000000..52f0166a --- /dev/null +++ b/versions/v5.0.1/folderclosedd.svg @@ -0,0 +1,11 @@ + + + + + + + + + + diff --git a/versions/v5.0.1/folderopen.svg b/versions/v5.0.1/folderopen.svg new file mode 100644 index 00000000..f6896dd2 --- /dev/null +++ b/versions/v5.0.1/folderopen.svg @@ -0,0 +1,17 @@ + + + + + + + + + + diff --git a/versions/v5.0.1/folderopend.svg b/versions/v5.0.1/folderopend.svg new file mode 100644 index 00000000..2d1f06e7 --- /dev/null +++ b/versions/v5.0.1/folderopend.svg @@ -0,0 +1,12 @@ + + + + + + + + + + + diff --git a/versions/v5.0.1/functions.html b/versions/v5.0.1/functions.html new file mode 100644 index 00000000..4e32ea60 --- /dev/null +++ b/versions/v5.0.1/functions.html @@ -0,0 +1,277 @@ + + + + + + + +Modulo: Class Members + + + + + + + + + +
+
+ + + + + + +
+
Modulo 5.0.0 +
+
+
+ + + + + + + +
+ +
+
+ + +
+
+
+
+
+
Loading...
+
Searching...
+
No Matches
+
+
+
+
+ +
+
Here is a list of all documented class members with links to the class documentation for each member:
+ +

- a -

+ + +

- b -

+ + +

- c -

+ + +

- d -

+ + +

- e -

+ + +

- f -

+ + +

- g -

+ + +

- h -

+ + +

- i -

+ + +

- l -

+ + +

- m -

+ + +

- o -

+ + +

- p -

+ + +

- r -

+ + +

- s -

+ + +

- t -

+ + +

- u -

+ + +

- w -

+ + +

- ~ -

+
+ + + + diff --git a/versions/v5.0.1/functions_func.html b/versions/v5.0.1/functions_func.html new file mode 100644 index 00000000..529da8dc --- /dev/null +++ b/versions/v5.0.1/functions_func.html @@ -0,0 +1,264 @@ + + + + + + + +Modulo: Class Members - Functions + + + + + + + + + +
+
+ + + + + + +
+
Modulo 5.0.0 +
+
+
+ + + + + + + +
+ +
+
+ + +
+
+
+
+
+
Loading...
+
Searching...
+
No Matches
+
+
+
+
+ +
+
Here is a list of all documented functions with links to the class documentation for each member:
+ +

- a -

+ + +

- b -

+ + +

- c -

+ + +

- d -

+ + +

- e -

+ + +

- f -

+ + +

- g -

+ + +

- i -

+ + +

- l -

+ + +

- m -

+ + +

- o -

+ + +

- p -

+ + +

- r -

+ + +

- s -

+ + +

- t -

+ + +

- u -

+ + +

- w -

+ + +

- ~ -

+
+ + + + diff --git a/versions/v5.0.1/functions_vars.html b/versions/v5.0.1/functions_vars.html new file mode 100644 index 00000000..04483657 --- /dev/null +++ b/versions/v5.0.1/functions_vars.html @@ -0,0 +1,89 @@ + + + + + + + +Modulo: Class Members - Variables + + + + + + + + + +
+
+ + + + + + +
+
Modulo 5.0.0 +
+
+
+ + + + + + + +
+ +
+
+ + +
+
+
+
+
+
Loading...
+
Searching...
+
No Matches
+
+
+
+
+ +
+
Here is a list of all documented variables with links to the class documentation for each member:
+
+ + + + diff --git a/versions/v5.0.1/hierarchy.html b/versions/v5.0.1/hierarchy.html new file mode 100644 index 00000000..774d7f3d --- /dev/null +++ b/versions/v5.0.1/hierarchy.html @@ -0,0 +1,121 @@ + + + + + + + +Modulo: Class Hierarchy + + + + + + + + + +
+
+ + + + + + +
+
Modulo 5.0.0 +
+
+
+ + + + + + + +
+ +
+
+ + +
+
+
+
+
+
Loading...
+
Searching...
+
No Matches
+
+
+
+
+ +
+
Class Hierarchy
+
+
+
This inheritance list is sorted roughly, but not completely, alphabetically:
+
[detail level 1234]
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
 Cmodulo_components::ComponentInterfaceBase interface class for modulo components to wrap a ROS Node with custom behaviour
 Cmodulo_components::ComponentA wrapper for rclcpp::Node to simplify application composition through unified component interfaces
 Cmodulo_components::LifecycleComponentA wrapper for rclcpp_lifecycle::LifecycleNode to simplify application composition through unified component interfaces while supporting lifecycle states and transitions
 CComponentInterfacePublicInterfaceFriend class to the ComponentInterface to allow test fixtures to access protected and private members
 Cmodulo_components::ComponentServiceResponseResponse structure to be returned by component services
 Cmodulo_controllers::ControllerInputInput structure to save topic data in a realtime buffer and timestamps in one object
 Ccontroller_interface::ControllerInterface
 Cmodulo_controllers::BaseControllerInterfaceBase controller class to combine ros2_control, control libraries and modulo
 Cmodulo_controllers::ControllerInterface
 Cmodulo_controllers::RobotControllerInterfaceBase controller class that automatically associates joints with a JointState object
 Cmodulo_controllers::ControllerServiceResponseResponse structure to be returned by controller services
 Cstd::enable_shared_from_this
 Cmodulo_core::communication::MessagePairInterfaceInterface class to enable non-templated writing and reading ROS messages from derived MessagePair instances through dynamic down-casting
 Cmodulo_core::communication::MessagePair< MsgT, DataT >The MessagePair stores a pointer to a variable and translates the value of this pointer back and forth between the corresponding ROS messages
 Cmodulo_core::communication::PublisherInterfaceInterface class to enable non-templated activating/deactivating/publishing of ROS publishers from derived PublisherHandler instances through dynamic down-casting
 Cmodulo_core::communication::PublisherHandler< PubT, MsgT >The PublisherHandler handles different types of ROS publishers to activate, deactivate and publish data with those publishers
 Cmodulo_core::communication::SubscriptionInterfaceInterface class to enable non-templated subscriptions with ROS subscriptions from derived SubscriptionHandler instances through dynamic down-casting
 Cmodulo_core::communication::SubscriptionHandler< MsgT >The SubscriptionHandler handles different types of ROS subscriptions to receive data from those subscriptions
 Crclcpp_lifecycle::LifecycleNode
 Cmodulo_components::LifecycleComponentA wrapper for rclcpp_lifecycle::LifecycleNode to simplify application composition through unified component interfaces while supporting lifecycle states and transitions
 Crclcpp::Node
 Cmodulo_components::ComponentA wrapper for rclcpp::Node to simplify application composition through unified component interfaces
 Cmodulo_utils::testutils::PredicatesListener
 Cmodulo_utils::testutils::ServiceClient< SrvT >
 Cmodulo_core::Predicate
 Cstd::runtime_error
 Cmodulo_core::exceptions::CoreExceptionA base class for all core exceptions
 Cmodulo_core::exceptions::AddServiceExceptionAn exception class to notify errors when adding a service
 Cmodulo_core::exceptions::AddSignalExceptionAn exception class to notify errors when adding a signal
 Cmodulo_core::exceptions::InvalidPointerCastExceptionAn exception class to notify if the result of getting an instance of a derived class through dynamic down-casting of an object of the base class is not a correctly typed instance of the derived class
 Cmodulo_core::exceptions::InvalidPointerExceptionAn exception class to notify if an object has no reference count (if the object is not owned by any pointer) when attempting to get a derived instance through dynamic down-casting
 Cmodulo_core::exceptions::LookupTransformExceptionAn exception class to notify an error while looking up TF transforms
 Cmodulo_core::exceptions::MessageTranslationExceptionAn exception class to notify that the translation of a ROS message failed
 Cmodulo_core::exceptions::NullPointerExceptionAn exception class to notify that a certain pointer is null
 Cmodulo_core::exceptions::ParameterExceptionAn exception class to notify errors with parameters in modulo classes
 Cmodulo_core::exceptions::ParameterTranslationExceptionAn exception class to notify incompatibility when translating parameters from different sources
+
+
+ + + + diff --git a/versions/v5.0.1/index.html b/versions/v5.0.1/index.html new file mode 100644 index 00000000..7f6e70b9 --- /dev/null +++ b/versions/v5.0.1/index.html @@ -0,0 +1,119 @@ + + + + + + + +Modulo: Modulo + + + + + + + + + +
+
+ + + + + + +
+
Modulo 5.0.0 +
+
+
+ + + + + + + +
+ +
+
+ + +
+
+
+
+
+
Loading...
+
Searching...
+
No Matches
+
+
+
+
+ +
+
Modulo
+
+
+

Modulo is part of the AICA robotics framework.

+

It is an extension layer to ROS 2 that adds interoperability support for aica-technology/control-libraries and provides a modular framework for application composition through custom component classes in both C++ and Python.

+

Modulo API documentation is available at aica-technology.github.io/modulo.

+

To start developing custom components and controllers with modulo, refer to the aica-technology/component-template repository and corresponding documentation at https://docs.aica.tech/docs/category/custom-components.

+

Modulo Core

+

The core package implements interoperability between ROS 2 and state_representation data types, allowing state data and parameters to be directly translated and handled as messages on the ROS 2 interface layer.

+

Modulo Components

+

Modulo components are wrappers for ROS 2 Nodes which abstract low-level ROS methods for greater user convenience and consistency between components.

+

While ROS 2 Nodes provide a highly flexible and customizable interface, there is often a significant amount of boilerplate code that is duplicated with each new Node. In addition, the interoperability of multiple nodes in an application depends on them using compatible message types and behaving in a generally consistent manner.

+

The component classes are intended to simplify the development of compatible application modules. They provide more concise methods for adding parameters, services, transforms, topic subscriptions and publications. They also introduce new concepts such as predicate broadcasting, error handling and the direct binding of data attributes to their corresponding interface.

+

The package provides two variant classes: modulo_components::Component and modulo_components::LifecycleComponent. See the package documentation for more information.

+

Modulo Component Interfaces

+

This package defines custom standard interfaces for modulo components.

+

Modulo Utils

+

This package contains shared test fixtures.

+
+

Additional resources

+

Interfacing with ROS 1

+

It is possible to use a bridge service to interface ROS 2 with ROS 1 in order to publish/subscribe to topics from ROS 1.

+

ROS provides a docker image with this service. Run the following lines to pull the bridge image, launch an interactive shell, and subsequently start the bridge topic.

+
# run the bridge image interactively
+
docker run --rm -it --net=host ros:galactic-ros1-bridge
+
# start the bridge service in the container
+
root@docker-desktop:/# ros2 run ros1_bridge dynamic_bridge --bridge-all-topics
+

Further reading

+ +

Authors and maintainers

+ +
+
+ + + + diff --git a/versions/v5.0.1/jquery.js b/versions/v5.0.1/jquery.js new file mode 100644 index 00000000..1dffb65b --- /dev/null +++ b/versions/v5.0.1/jquery.js @@ -0,0 +1,34 @@ +/*! jQuery v3.6.0 | (c) OpenJS Foundation and other contributors | jquery.org/license */ +!function(e,t){"use strict";"object"==typeof module&&"object"==typeof module.exports?module.exports=e.document?t(e,!0):function(e){if(!e.document)throw new Error("jQuery requires a window with a document");return t(e)}:t(e)}("undefined"!=typeof window?window:this,function(C,e){"use strict";var t=[],r=Object.getPrototypeOf,s=t.slice,g=t.flat?function(e){return t.flat.call(e)}:function(e){return t.concat.apply([],e)},u=t.push,i=t.indexOf,n={},o=n.toString,v=n.hasOwnProperty,a=v.toString,l=a.call(Object),y={},m=function(e){return"function"==typeof e&&"number"!=typeof e.nodeType&&"function"!=typeof e.item},x=function(e){return null!=e&&e===e.window},E=C.document,c={type:!0,src:!0,nonce:!0,noModule:!0};function b(e,t,n){var r,i,o=(n=n||E).createElement("script");if(o.text=e,t)for(r in c)(i=t[r]||t.getAttribute&&t.getAttribute(r))&&o.setAttribute(r,i);n.head.appendChild(o).parentNode.removeChild(o)}function w(e){return null==e?e+"":"object"==typeof e||"function"==typeof e?n[o.call(e)]||"object":typeof e}var f="3.6.0",S=function(e,t){return new S.fn.init(e,t)};function p(e){var t=!!e&&"length"in e&&e.length,n=w(e);return!m(e)&&!x(e)&&("array"===n||0===t||"number"==typeof t&&0+~]|"+M+")"+M+"*"),U=new RegExp(M+"|>"),X=new RegExp(F),V=new RegExp("^"+I+"$"),G={ID:new RegExp("^#("+I+")"),CLASS:new RegExp("^\\.("+I+")"),TAG:new RegExp("^("+I+"|[*])"),ATTR:new RegExp("^"+W),PSEUDO:new RegExp("^"+F),CHILD:new RegExp("^:(only|first|last|nth|nth-last)-(child|of-type)(?:\\("+M+"*(even|odd|(([+-]|)(\\d*)n|)"+M+"*(?:([+-]|)"+M+"*(\\d+)|))"+M+"*\\)|)","i"),bool:new RegExp("^(?:"+R+")$","i"),needsContext:new RegExp("^"+M+"*[>+~]|:(even|odd|eq|gt|lt|nth|first|last)(?:\\("+M+"*((?:-\\d)?\\d*)"+M+"*\\)|)(?=[^-]|$)","i")},Y=/HTML$/i,Q=/^(?:input|select|textarea|button)$/i,J=/^h\d$/i,K=/^[^{]+\{\s*\[native \w/,Z=/^(?:#([\w-]+)|(\w+)|\.([\w-]+))$/,ee=/[+~]/,te=new RegExp("\\\\[\\da-fA-F]{1,6}"+M+"?|\\\\([^\\r\\n\\f])","g"),ne=function(e,t){var n="0x"+e.slice(1)-65536;return t||(n<0?String.fromCharCode(n+65536):String.fromCharCode(n>>10|55296,1023&n|56320))},re=/([\0-\x1f\x7f]|^-?\d)|^-$|[^\0-\x1f\x7f-\uFFFF\w-]/g,ie=function(e,t){return t?"\0"===e?"\ufffd":e.slice(0,-1)+"\\"+e.charCodeAt(e.length-1).toString(16)+" ":"\\"+e},oe=function(){T()},ae=be(function(e){return!0===e.disabled&&"fieldset"===e.nodeName.toLowerCase()},{dir:"parentNode",next:"legend"});try{H.apply(t=O.call(p.childNodes),p.childNodes),t[p.childNodes.length].nodeType}catch(e){H={apply:t.length?function(e,t){L.apply(e,O.call(t))}:function(e,t){var n=e.length,r=0;while(e[n++]=t[r++]);e.length=n-1}}}function se(t,e,n,r){var i,o,a,s,u,l,c,f=e&&e.ownerDocument,p=e?e.nodeType:9;if(n=n||[],"string"!=typeof t||!t||1!==p&&9!==p&&11!==p)return n;if(!r&&(T(e),e=e||C,E)){if(11!==p&&(u=Z.exec(t)))if(i=u[1]){if(9===p){if(!(a=e.getElementById(i)))return n;if(a.id===i)return n.push(a),n}else if(f&&(a=f.getElementById(i))&&y(e,a)&&a.id===i)return n.push(a),n}else{if(u[2])return H.apply(n,e.getElementsByTagName(t)),n;if((i=u[3])&&d.getElementsByClassName&&e.getElementsByClassName)return H.apply(n,e.getElementsByClassName(i)),n}if(d.qsa&&!N[t+" "]&&(!v||!v.test(t))&&(1!==p||"object"!==e.nodeName.toLowerCase())){if(c=t,f=e,1===p&&(U.test(t)||z.test(t))){(f=ee.test(t)&&ye(e.parentNode)||e)===e&&d.scope||((s=e.getAttribute("id"))?s=s.replace(re,ie):e.setAttribute("id",s=S)),o=(l=h(t)).length;while(o--)l[o]=(s?"#"+s:":scope")+" "+xe(l[o]);c=l.join(",")}try{return H.apply(n,f.querySelectorAll(c)),n}catch(e){N(t,!0)}finally{s===S&&e.removeAttribute("id")}}}return g(t.replace($,"$1"),e,n,r)}function ue(){var r=[];return function e(t,n){return r.push(t+" ")>b.cacheLength&&delete e[r.shift()],e[t+" "]=n}}function le(e){return e[S]=!0,e}function ce(e){var t=C.createElement("fieldset");try{return!!e(t)}catch(e){return!1}finally{t.parentNode&&t.parentNode.removeChild(t),t=null}}function fe(e,t){var n=e.split("|"),r=n.length;while(r--)b.attrHandle[n[r]]=t}function pe(e,t){var n=t&&e,r=n&&1===e.nodeType&&1===t.nodeType&&e.sourceIndex-t.sourceIndex;if(r)return r;if(n)while(n=n.nextSibling)if(n===t)return-1;return e?1:-1}function de(t){return function(e){return"input"===e.nodeName.toLowerCase()&&e.type===t}}function he(n){return function(e){var t=e.nodeName.toLowerCase();return("input"===t||"button"===t)&&e.type===n}}function ge(t){return function(e){return"form"in e?e.parentNode&&!1===e.disabled?"label"in e?"label"in e.parentNode?e.parentNode.disabled===t:e.disabled===t:e.isDisabled===t||e.isDisabled!==!t&&ae(e)===t:e.disabled===t:"label"in e&&e.disabled===t}}function ve(a){return le(function(o){return o=+o,le(function(e,t){var n,r=a([],e.length,o),i=r.length;while(i--)e[n=r[i]]&&(e[n]=!(t[n]=e[n]))})})}function ye(e){return e&&"undefined"!=typeof e.getElementsByTagName&&e}for(e in d=se.support={},i=se.isXML=function(e){var t=e&&e.namespaceURI,n=e&&(e.ownerDocument||e).documentElement;return!Y.test(t||n&&n.nodeName||"HTML")},T=se.setDocument=function(e){var t,n,r=e?e.ownerDocument||e:p;return r!=C&&9===r.nodeType&&r.documentElement&&(a=(C=r).documentElement,E=!i(C),p!=C&&(n=C.defaultView)&&n.top!==n&&(n.addEventListener?n.addEventListener("unload",oe,!1):n.attachEvent&&n.attachEvent("onunload",oe)),d.scope=ce(function(e){return a.appendChild(e).appendChild(C.createElement("div")),"undefined"!=typeof e.querySelectorAll&&!e.querySelectorAll(":scope fieldset div").length}),d.attributes=ce(function(e){return e.className="i",!e.getAttribute("className")}),d.getElementsByTagName=ce(function(e){return e.appendChild(C.createComment("")),!e.getElementsByTagName("*").length}),d.getElementsByClassName=K.test(C.getElementsByClassName),d.getById=ce(function(e){return a.appendChild(e).id=S,!C.getElementsByName||!C.getElementsByName(S).length}),d.getById?(b.filter.ID=function(e){var t=e.replace(te,ne);return function(e){return e.getAttribute("id")===t}},b.find.ID=function(e,t){if("undefined"!=typeof t.getElementById&&E){var n=t.getElementById(e);return n?[n]:[]}}):(b.filter.ID=function(e){var n=e.replace(te,ne);return function(e){var t="undefined"!=typeof e.getAttributeNode&&e.getAttributeNode("id");return t&&t.value===n}},b.find.ID=function(e,t){if("undefined"!=typeof t.getElementById&&E){var n,r,i,o=t.getElementById(e);if(o){if((n=o.getAttributeNode("id"))&&n.value===e)return[o];i=t.getElementsByName(e),r=0;while(o=i[r++])if((n=o.getAttributeNode("id"))&&n.value===e)return[o]}return[]}}),b.find.TAG=d.getElementsByTagName?function(e,t){return"undefined"!=typeof t.getElementsByTagName?t.getElementsByTagName(e):d.qsa?t.querySelectorAll(e):void 0}:function(e,t){var n,r=[],i=0,o=t.getElementsByTagName(e);if("*"===e){while(n=o[i++])1===n.nodeType&&r.push(n);return r}return o},b.find.CLASS=d.getElementsByClassName&&function(e,t){if("undefined"!=typeof t.getElementsByClassName&&E)return t.getElementsByClassName(e)},s=[],v=[],(d.qsa=K.test(C.querySelectorAll))&&(ce(function(e){var t;a.appendChild(e).innerHTML="",e.querySelectorAll("[msallowcapture^='']").length&&v.push("[*^$]="+M+"*(?:''|\"\")"),e.querySelectorAll("[selected]").length||v.push("\\["+M+"*(?:value|"+R+")"),e.querySelectorAll("[id~="+S+"-]").length||v.push("~="),(t=C.createElement("input")).setAttribute("name",""),e.appendChild(t),e.querySelectorAll("[name='']").length||v.push("\\["+M+"*name"+M+"*="+M+"*(?:''|\"\")"),e.querySelectorAll(":checked").length||v.push(":checked"),e.querySelectorAll("a#"+S+"+*").length||v.push(".#.+[+~]"),e.querySelectorAll("\\\f"),v.push("[\\r\\n\\f]")}),ce(function(e){e.innerHTML="";var t=C.createElement("input");t.setAttribute("type","hidden"),e.appendChild(t).setAttribute("name","D"),e.querySelectorAll("[name=d]").length&&v.push("name"+M+"*[*^$|!~]?="),2!==e.querySelectorAll(":enabled").length&&v.push(":enabled",":disabled"),a.appendChild(e).disabled=!0,2!==e.querySelectorAll(":disabled").length&&v.push(":enabled",":disabled"),e.querySelectorAll("*,:x"),v.push(",.*:")})),(d.matchesSelector=K.test(c=a.matches||a.webkitMatchesSelector||a.mozMatchesSelector||a.oMatchesSelector||a.msMatchesSelector))&&ce(function(e){d.disconnectedMatch=c.call(e,"*"),c.call(e,"[s!='']:x"),s.push("!=",F)}),v=v.length&&new RegExp(v.join("|")),s=s.length&&new RegExp(s.join("|")),t=K.test(a.compareDocumentPosition),y=t||K.test(a.contains)?function(e,t){var n=9===e.nodeType?e.documentElement:e,r=t&&t.parentNode;return e===r||!(!r||1!==r.nodeType||!(n.contains?n.contains(r):e.compareDocumentPosition&&16&e.compareDocumentPosition(r)))}:function(e,t){if(t)while(t=t.parentNode)if(t===e)return!0;return!1},j=t?function(e,t){if(e===t)return l=!0,0;var n=!e.compareDocumentPosition-!t.compareDocumentPosition;return n||(1&(n=(e.ownerDocument||e)==(t.ownerDocument||t)?e.compareDocumentPosition(t):1)||!d.sortDetached&&t.compareDocumentPosition(e)===n?e==C||e.ownerDocument==p&&y(p,e)?-1:t==C||t.ownerDocument==p&&y(p,t)?1:u?P(u,e)-P(u,t):0:4&n?-1:1)}:function(e,t){if(e===t)return l=!0,0;var n,r=0,i=e.parentNode,o=t.parentNode,a=[e],s=[t];if(!i||!o)return e==C?-1:t==C?1:i?-1:o?1:u?P(u,e)-P(u,t):0;if(i===o)return pe(e,t);n=e;while(n=n.parentNode)a.unshift(n);n=t;while(n=n.parentNode)s.unshift(n);while(a[r]===s[r])r++;return r?pe(a[r],s[r]):a[r]==p?-1:s[r]==p?1:0}),C},se.matches=function(e,t){return se(e,null,null,t)},se.matchesSelector=function(e,t){if(T(e),d.matchesSelector&&E&&!N[t+" "]&&(!s||!s.test(t))&&(!v||!v.test(t)))try{var n=c.call(e,t);if(n||d.disconnectedMatch||e.document&&11!==e.document.nodeType)return n}catch(e){N(t,!0)}return 0":{dir:"parentNode",first:!0}," ":{dir:"parentNode"},"+":{dir:"previousSibling",first:!0},"~":{dir:"previousSibling"}},preFilter:{ATTR:function(e){return e[1]=e[1].replace(te,ne),e[3]=(e[3]||e[4]||e[5]||"").replace(te,ne),"~="===e[2]&&(e[3]=" "+e[3]+" "),e.slice(0,4)},CHILD:function(e){return e[1]=e[1].toLowerCase(),"nth"===e[1].slice(0,3)?(e[3]||se.error(e[0]),e[4]=+(e[4]?e[5]+(e[6]||1):2*("even"===e[3]||"odd"===e[3])),e[5]=+(e[7]+e[8]||"odd"===e[3])):e[3]&&se.error(e[0]),e},PSEUDO:function(e){var t,n=!e[6]&&e[2];return G.CHILD.test(e[0])?null:(e[3]?e[2]=e[4]||e[5]||"":n&&X.test(n)&&(t=h(n,!0))&&(t=n.indexOf(")",n.length-t)-n.length)&&(e[0]=e[0].slice(0,t),e[2]=n.slice(0,t)),e.slice(0,3))}},filter:{TAG:function(e){var t=e.replace(te,ne).toLowerCase();return"*"===e?function(){return!0}:function(e){return e.nodeName&&e.nodeName.toLowerCase()===t}},CLASS:function(e){var t=m[e+" "];return t||(t=new RegExp("(^|"+M+")"+e+"("+M+"|$)"))&&m(e,function(e){return t.test("string"==typeof e.className&&e.className||"undefined"!=typeof e.getAttribute&&e.getAttribute("class")||"")})},ATTR:function(n,r,i){return function(e){var t=se.attr(e,n);return null==t?"!="===r:!r||(t+="","="===r?t===i:"!="===r?t!==i:"^="===r?i&&0===t.indexOf(i):"*="===r?i&&-1:\x20\t\r\n\f]*)[\x20\t\r\n\f]*\/?>(?:<\/\1>|)$/i;function j(e,n,r){return m(n)?S.grep(e,function(e,t){return!!n.call(e,t,e)!==r}):n.nodeType?S.grep(e,function(e){return e===n!==r}):"string"!=typeof n?S.grep(e,function(e){return-1)[^>]*|#([\w-]+))$/;(S.fn.init=function(e,t,n){var r,i;if(!e)return this;if(n=n||D,"string"==typeof e){if(!(r="<"===e[0]&&">"===e[e.length-1]&&3<=e.length?[null,e,null]:q.exec(e))||!r[1]&&t)return!t||t.jquery?(t||n).find(e):this.constructor(t).find(e);if(r[1]){if(t=t instanceof S?t[0]:t,S.merge(this,S.parseHTML(r[1],t&&t.nodeType?t.ownerDocument||t:E,!0)),N.test(r[1])&&S.isPlainObject(t))for(r in t)m(this[r])?this[r](t[r]):this.attr(r,t[r]);return this}return(i=E.getElementById(r[2]))&&(this[0]=i,this.length=1),this}return e.nodeType?(this[0]=e,this.length=1,this):m(e)?void 0!==n.ready?n.ready(e):e(S):S.makeArray(e,this)}).prototype=S.fn,D=S(E);var L=/^(?:parents|prev(?:Until|All))/,H={children:!0,contents:!0,next:!0,prev:!0};function O(e,t){while((e=e[t])&&1!==e.nodeType);return e}S.fn.extend({has:function(e){var t=S(e,this),n=t.length;return this.filter(function(){for(var e=0;e\x20\t\r\n\f]*)/i,he=/^$|^module$|\/(?:java|ecma)script/i;ce=E.createDocumentFragment().appendChild(E.createElement("div")),(fe=E.createElement("input")).setAttribute("type","radio"),fe.setAttribute("checked","checked"),fe.setAttribute("name","t"),ce.appendChild(fe),y.checkClone=ce.cloneNode(!0).cloneNode(!0).lastChild.checked,ce.innerHTML="",y.noCloneChecked=!!ce.cloneNode(!0).lastChild.defaultValue,ce.innerHTML="",y.option=!!ce.lastChild;var ge={thead:[1,"","
"],col:[2,"","
"],tr:[2,"","
"],td:[3,"","
"],_default:[0,"",""]};function ve(e,t){var n;return n="undefined"!=typeof e.getElementsByTagName?e.getElementsByTagName(t||"*"):"undefined"!=typeof e.querySelectorAll?e.querySelectorAll(t||"*"):[],void 0===t||t&&A(e,t)?S.merge([e],n):n}function ye(e,t){for(var n=0,r=e.length;n",""]);var me=/<|&#?\w+;/;function xe(e,t,n,r,i){for(var o,a,s,u,l,c,f=t.createDocumentFragment(),p=[],d=0,h=e.length;d\s*$/g;function je(e,t){return A(e,"table")&&A(11!==t.nodeType?t:t.firstChild,"tr")&&S(e).children("tbody")[0]||e}function De(e){return e.type=(null!==e.getAttribute("type"))+"/"+e.type,e}function qe(e){return"true/"===(e.type||"").slice(0,5)?e.type=e.type.slice(5):e.removeAttribute("type"),e}function Le(e,t){var n,r,i,o,a,s;if(1===t.nodeType){if(Y.hasData(e)&&(s=Y.get(e).events))for(i in Y.remove(t,"handle events"),s)for(n=0,r=s[i].length;n").attr(n.scriptAttrs||{}).prop({charset:n.scriptCharset,src:n.url}).on("load error",i=function(e){r.remove(),i=null,e&&t("error"===e.type?404:200,e.type)}),E.head.appendChild(r[0])},abort:function(){i&&i()}}});var _t,zt=[],Ut=/(=)\?(?=&|$)|\?\?/;S.ajaxSetup({jsonp:"callback",jsonpCallback:function(){var e=zt.pop()||S.expando+"_"+wt.guid++;return this[e]=!0,e}}),S.ajaxPrefilter("json jsonp",function(e,t,n){var r,i,o,a=!1!==e.jsonp&&(Ut.test(e.url)?"url":"string"==typeof e.data&&0===(e.contentType||"").indexOf("application/x-www-form-urlencoded")&&Ut.test(e.data)&&"data");if(a||"jsonp"===e.dataTypes[0])return r=e.jsonpCallback=m(e.jsonpCallback)?e.jsonpCallback():e.jsonpCallback,a?e[a]=e[a].replace(Ut,"$1"+r):!1!==e.jsonp&&(e.url+=(Tt.test(e.url)?"&":"?")+e.jsonp+"="+r),e.converters["script json"]=function(){return o||S.error(r+" was not called"),o[0]},e.dataTypes[0]="json",i=C[r],C[r]=function(){o=arguments},n.always(function(){void 0===i?S(C).removeProp(r):C[r]=i,e[r]&&(e.jsonpCallback=t.jsonpCallback,zt.push(r)),o&&m(i)&&i(o[0]),o=i=void 0}),"script"}),y.createHTMLDocument=((_t=E.implementation.createHTMLDocument("").body).innerHTML="
",2===_t.childNodes.length),S.parseHTML=function(e,t,n){return"string"!=typeof e?[]:("boolean"==typeof t&&(n=t,t=!1),t||(y.createHTMLDocument?((r=(t=E.implementation.createHTMLDocument("")).createElement("base")).href=E.location.href,t.head.appendChild(r)):t=E),o=!n&&[],(i=N.exec(e))?[t.createElement(i[1])]:(i=xe([e],t,o),o&&o.length&&S(o).remove(),S.merge([],i.childNodes)));var r,i,o},S.fn.load=function(e,t,n){var r,i,o,a=this,s=e.indexOf(" ");return-1").append(S.parseHTML(e)).find(r):e)}).always(n&&function(e,t){a.each(function(){n.apply(this,o||[e.responseText,t,e])})}),this},S.expr.pseudos.animated=function(t){return S.grep(S.timers,function(e){return t===e.elem}).length},S.offset={setOffset:function(e,t,n){var r,i,o,a,s,u,l=S.css(e,"position"),c=S(e),f={};"static"===l&&(e.style.position="relative"),s=c.offset(),o=S.css(e,"top"),u=S.css(e,"left"),("absolute"===l||"fixed"===l)&&-1<(o+u).indexOf("auto")?(a=(r=c.position()).top,i=r.left):(a=parseFloat(o)||0,i=parseFloat(u)||0),m(t)&&(t=t.call(e,n,S.extend({},s))),null!=t.top&&(f.top=t.top-s.top+a),null!=t.left&&(f.left=t.left-s.left+i),"using"in t?t.using.call(e,f):c.css(f)}},S.fn.extend({offset:function(t){if(arguments.length)return void 0===t?this:this.each(function(e){S.offset.setOffset(this,t,e)});var e,n,r=this[0];return r?r.getClientRects().length?(e=r.getBoundingClientRect(),n=r.ownerDocument.defaultView,{top:e.top+n.pageYOffset,left:e.left+n.pageXOffset}):{top:0,left:0}:void 0},position:function(){if(this[0]){var e,t,n,r=this[0],i={top:0,left:0};if("fixed"===S.css(r,"position"))t=r.getBoundingClientRect();else{t=this.offset(),n=r.ownerDocument,e=r.offsetParent||n.documentElement;while(e&&(e===n.body||e===n.documentElement)&&"static"===S.css(e,"position"))e=e.parentNode;e&&e!==r&&1===e.nodeType&&((i=S(e).offset()).top+=S.css(e,"borderTopWidth",!0),i.left+=S.css(e,"borderLeftWidth",!0))}return{top:t.top-i.top-S.css(r,"marginTop",!0),left:t.left-i.left-S.css(r,"marginLeft",!0)}}},offsetParent:function(){return this.map(function(){var e=this.offsetParent;while(e&&"static"===S.css(e,"position"))e=e.offsetParent;return e||re})}}),S.each({scrollLeft:"pageXOffset",scrollTop:"pageYOffset"},function(t,i){var o="pageYOffset"===i;S.fn[t]=function(e){return $(this,function(e,t,n){var r;if(x(e)?r=e:9===e.nodeType&&(r=e.defaultView),void 0===n)return r?r[i]:e[t];r?r.scrollTo(o?r.pageXOffset:n,o?n:r.pageYOffset):e[t]=n},t,e,arguments.length)}}),S.each(["top","left"],function(e,n){S.cssHooks[n]=Fe(y.pixelPosition,function(e,t){if(t)return t=We(e,n),Pe.test(t)?S(e).position()[n]+"px":t})}),S.each({Height:"height",Width:"width"},function(a,s){S.each({padding:"inner"+a,content:s,"":"outer"+a},function(r,o){S.fn[o]=function(e,t){var n=arguments.length&&(r||"boolean"!=typeof e),i=r||(!0===e||!0===t?"margin":"border");return $(this,function(e,t,n){var r;return x(e)?0===o.indexOf("outer")?e["inner"+a]:e.document.documentElement["client"+a]:9===e.nodeType?(r=e.documentElement,Math.max(e.body["scroll"+a],r["scroll"+a],e.body["offset"+a],r["offset"+a],r["client"+a])):void 0===n?S.css(e,t,i):S.style(e,t,n,i)},s,n?e:void 0,n)}})}),S.each(["ajaxStart","ajaxStop","ajaxComplete","ajaxError","ajaxSuccess","ajaxSend"],function(e,t){S.fn[t]=function(e){return this.on(t,e)}}),S.fn.extend({bind:function(e,t,n){return this.on(e,null,t,n)},unbind:function(e,t){return this.off(e,null,t)},delegate:function(e,t,n,r){return this.on(t,e,n,r)},undelegate:function(e,t,n){return 1===arguments.length?this.off(e,"**"):this.off(t,e||"**",n)},hover:function(e,t){return this.mouseenter(e).mouseleave(t||e)}}),S.each("blur focus focusin focusout resize scroll click dblclick mousedown mouseup mousemove mouseover mouseout mouseenter mouseleave change select submit keydown keypress keyup contextmenu".split(" "),function(e,n){S.fn[n]=function(e,t){return 0",options:{classes:{},disabled:!1,create:null},_createWidget:function(t,e){e=y(e||this.defaultElement||this)[0],this.element=y(e),this.uuid=i++,this.eventNamespace="."+this.widgetName+this.uuid,this.bindings=y(),this.hoverable=y(),this.focusable=y(),this.classesElementLookup={},e!==this&&(y.data(e,this.widgetFullName,this),this._on(!0,this.element,{remove:function(t){t.target===e&&this.destroy()}}),this.document=y(e.style?e.ownerDocument:e.document||e),this.window=y(this.document[0].defaultView||this.document[0].parentWindow)),this.options=y.widget.extend({},this.options,this._getCreateOptions(),t),this._create(),this.options.disabled&&this._setOptionDisabled(this.options.disabled),this._trigger("create",null,this._getCreateEventData()),this._init()},_getCreateOptions:function(){return{}},_getCreateEventData:y.noop,_create:y.noop,_init:y.noop,destroy:function(){var i=this;this._destroy(),y.each(this.classesElementLookup,function(t,e){i._removeClass(e,t)}),this.element.off(this.eventNamespace).removeData(this.widgetFullName),this.widget().off(this.eventNamespace).removeAttr("aria-disabled"),this.bindings.off(this.eventNamespace)},_destroy:y.noop,widget:function(){return this.element},option:function(t,e){var i,s,n,o=t;if(0===arguments.length)return y.widget.extend({},this.options);if("string"==typeof t)if(o={},t=(i=t.split(".")).shift(),i.length){for(s=o[t]=y.widget.extend({},this.options[t]),n=0;n
"),i=e.children()[0];return y("body").append(e),t=i.offsetWidth,e.css("overflow","scroll"),t===(i=i.offsetWidth)&&(i=e[0].clientWidth),e.remove(),s=t-i},getScrollInfo:function(t){var e=t.isWindow||t.isDocument?"":t.element.css("overflow-x"),i=t.isWindow||t.isDocument?"":t.element.css("overflow-y"),e="scroll"===e||"auto"===e&&t.widthx(D(s),D(n))?o.important="horizontal":o.important="vertical",p.using.call(this,t,o)}),h.offset(y.extend(l,{using:t}))})},y.ui.position={fit:{left:function(t,e){var i=e.within,s=i.isWindow?i.scrollLeft:i.offset.left,n=i.width,o=t.left-e.collisionPosition.marginLeft,h=s-o,a=o+e.collisionWidth-n-s;e.collisionWidth>n?0n?0=this.options.distance},_mouseDelayMet:function(){return this.mouseDelayMet},_mouseStart:function(){},_mouseDrag:function(){},_mouseStop:function(){},_mouseCapture:function(){return!0}}),y.ui.plugin={add:function(t,e,i){var s,n=y.ui[t].prototype;for(s in i)n.plugins[s]=n.plugins[s]||[],n.plugins[s].push([e,i[s]])},call:function(t,e,i,s){var n,o=t.plugins[e];if(o&&(s||t.element[0].parentNode&&11!==t.element[0].parentNode.nodeType))for(n=0;n").css({overflow:"hidden",position:this.element.css("position"),width:this.element.outerWidth(),height:this.element.outerHeight(),top:this.element.css("top"),left:this.element.css("left")})),this.element=this.element.parent().data("ui-resizable",this.element.resizable("instance")),this.elementIsWrapper=!0,t={marginTop:this.originalElement.css("marginTop"),marginRight:this.originalElement.css("marginRight"),marginBottom:this.originalElement.css("marginBottom"),marginLeft:this.originalElement.css("marginLeft")},this.element.css(t),this.originalElement.css("margin",0),this.originalResizeStyle=this.originalElement.css("resize"),this.originalElement.css("resize","none"),this._proportionallyResizeElements.push(this.originalElement.css({position:"static",zoom:1,display:"block"})),this.originalElement.css(t),this._proportionallyResize()),this._setupHandles(),e.autoHide&&y(this.element).on("mouseenter",function(){e.disabled||(i._removeClass("ui-resizable-autohide"),i._handles.show())}).on("mouseleave",function(){e.disabled||i.resizing||(i._addClass("ui-resizable-autohide"),i._handles.hide())}),this._mouseInit()},_destroy:function(){this._mouseDestroy(),this._addedHandles.remove();function t(t){y(t).removeData("resizable").removeData("ui-resizable").off(".resizable")}var e;return this.elementIsWrapper&&(t(this.element),e=this.element,this.originalElement.css({position:e.css("position"),width:e.outerWidth(),height:e.outerHeight(),top:e.css("top"),left:e.css("left")}).insertAfter(e),e.remove()),this.originalElement.css("resize",this.originalResizeStyle),t(this.originalElement),this},_setOption:function(t,e){switch(this._super(t,e),t){case"handles":this._removeHandles(),this._setupHandles();break;case"aspectRatio":this._aspectRatio=!!e}},_setupHandles:function(){var t,e,i,s,n,o=this.options,h=this;if(this.handles=o.handles||(y(".ui-resizable-handle",this.element).length?{n:".ui-resizable-n",e:".ui-resizable-e",s:".ui-resizable-s",w:".ui-resizable-w",se:".ui-resizable-se",sw:".ui-resizable-sw",ne:".ui-resizable-ne",nw:".ui-resizable-nw"}:"e,s,se"),this._handles=y(),this._addedHandles=y(),this.handles.constructor===String)for("all"===this.handles&&(this.handles="n,e,s,w,se,sw,ne,nw"),i=this.handles.split(","),this.handles={},e=0;e"),this._addClass(n,"ui-resizable-handle "+s),n.css({zIndex:o.zIndex}),this.handles[t]=".ui-resizable-"+t,this.element.children(this.handles[t]).length||(this.element.append(n),this._addedHandles=this._addedHandles.add(n));this._renderAxis=function(t){var e,i,s;for(e in t=t||this.element,this.handles)this.handles[e].constructor===String?this.handles[e]=this.element.children(this.handles[e]).first().show():(this.handles[e].jquery||this.handles[e].nodeType)&&(this.handles[e]=y(this.handles[e]),this._on(this.handles[e],{mousedown:h._mouseDown})),this.elementIsWrapper&&this.originalElement[0].nodeName.match(/^(textarea|input|select|button)$/i)&&(i=y(this.handles[e],this.element),s=/sw|ne|nw|se|n|s/.test(e)?i.outerHeight():i.outerWidth(),i=["padding",/ne|nw|n/.test(e)?"Top":/se|sw|s/.test(e)?"Bottom":/^e$/.test(e)?"Right":"Left"].join(""),t.css(i,s),this._proportionallyResize()),this._handles=this._handles.add(this.handles[e])},this._renderAxis(this.element),this._handles=this._handles.add(this.element.find(".ui-resizable-handle")),this._handles.disableSelection(),this._handles.on("mouseover",function(){h.resizing||(this.className&&(n=this.className.match(/ui-resizable-(se|sw|ne|nw|n|e|s|w)/i)),h.axis=n&&n[1]?n[1]:"se")}),o.autoHide&&(this._handles.hide(),this._addClass("ui-resizable-autohide"))},_removeHandles:function(){this._addedHandles.remove()},_mouseCapture:function(t){var e,i,s=!1;for(e in this.handles)(i=y(this.handles[e])[0])!==t.target&&!y.contains(i,t.target)||(s=!0);return!this.options.disabled&&s},_mouseStart:function(t){var e,i,s=this.options,n=this.element;return this.resizing=!0,this._renderProxy(),e=this._num(this.helper.css("left")),i=this._num(this.helper.css("top")),s.containment&&(e+=y(s.containment).scrollLeft()||0,i+=y(s.containment).scrollTop()||0),this.offset=this.helper.offset(),this.position={left:e,top:i},this.size=this._helper?{width:this.helper.width(),height:this.helper.height()}:{width:n.width(),height:n.height()},this.originalSize=this._helper?{width:n.outerWidth(),height:n.outerHeight()}:{width:n.width(),height:n.height()},this.sizeDiff={width:n.outerWidth()-n.width(),height:n.outerHeight()-n.height()},this.originalPosition={left:e,top:i},this.originalMousePosition={left:t.pageX,top:t.pageY},this.aspectRatio="number"==typeof s.aspectRatio?s.aspectRatio:this.originalSize.width/this.originalSize.height||1,s=y(".ui-resizable-"+this.axis).css("cursor"),y("body").css("cursor","auto"===s?this.axis+"-resize":s),this._addClass("ui-resizable-resizing"),this._propagate("start",t),!0},_mouseDrag:function(t){var e=this.originalMousePosition,i=this.axis,s=t.pageX-e.left||0,e=t.pageY-e.top||0,i=this._change[i];return this._updatePrevProperties(),i&&(e=i.apply(this,[t,s,e]),this._updateVirtualBoundaries(t.shiftKey),(this._aspectRatio||t.shiftKey)&&(e=this._updateRatio(e,t)),e=this._respectSize(e,t),this._updateCache(e),this._propagate("resize",t),e=this._applyChanges(),!this._helper&&this._proportionallyResizeElements.length&&this._proportionallyResize(),y.isEmptyObject(e)||(this._updatePrevProperties(),this._trigger("resize",t,this.ui()),this._applyChanges())),!1},_mouseStop:function(t){this.resizing=!1;var e,i,s,n=this.options,o=this;return this._helper&&(s=(e=(i=this._proportionallyResizeElements).length&&/textarea/i.test(i[0].nodeName))&&this._hasScroll(i[0],"left")?0:o.sizeDiff.height,i=e?0:o.sizeDiff.width,e={width:o.helper.width()-i,height:o.helper.height()-s},i=parseFloat(o.element.css("left"))+(o.position.left-o.originalPosition.left)||null,s=parseFloat(o.element.css("top"))+(o.position.top-o.originalPosition.top)||null,n.animate||this.element.css(y.extend(e,{top:s,left:i})),o.helper.height(o.size.height),o.helper.width(o.size.width),this._helper&&!n.animate&&this._proportionallyResize()),y("body").css("cursor","auto"),this._removeClass("ui-resizable-resizing"),this._propagate("stop",t),this._helper&&this.helper.remove(),!1},_updatePrevProperties:function(){this.prevPosition={top:this.position.top,left:this.position.left},this.prevSize={width:this.size.width,height:this.size.height}},_applyChanges:function(){var t={};return this.position.top!==this.prevPosition.top&&(t.top=this.position.top+"px"),this.position.left!==this.prevPosition.left&&(t.left=this.position.left+"px"),this.size.width!==this.prevSize.width&&(t.width=this.size.width+"px"),this.size.height!==this.prevSize.height&&(t.height=this.size.height+"px"),this.helper.css(t),t},_updateVirtualBoundaries:function(t){var e,i,s=this.options,n={minWidth:this._isNumber(s.minWidth)?s.minWidth:0,maxWidth:this._isNumber(s.maxWidth)?s.maxWidth:1/0,minHeight:this._isNumber(s.minHeight)?s.minHeight:0,maxHeight:this._isNumber(s.maxHeight)?s.maxHeight:1/0};(this._aspectRatio||t)&&(e=n.minHeight*this.aspectRatio,i=n.minWidth/this.aspectRatio,s=n.maxHeight*this.aspectRatio,t=n.maxWidth/this.aspectRatio,e>n.minWidth&&(n.minWidth=e),i>n.minHeight&&(n.minHeight=i),st.width,h=this._isNumber(t.height)&&e.minHeight&&e.minHeight>t.height,a=this.originalPosition.left+this.originalSize.width,r=this.originalPosition.top+this.originalSize.height,l=/sw|nw|w/.test(i),i=/nw|ne|n/.test(i);return o&&(t.width=e.minWidth),h&&(t.height=e.minHeight),s&&(t.width=e.maxWidth),n&&(t.height=e.maxHeight),o&&l&&(t.left=a-e.minWidth),s&&l&&(t.left=a-e.maxWidth),h&&i&&(t.top=r-e.minHeight),n&&i&&(t.top=r-e.maxHeight),t.width||t.height||t.left||!t.top?t.width||t.height||t.top||!t.left||(t.left=null):t.top=null,t},_getPaddingPlusBorderDimensions:function(t){for(var e=0,i=[],s=[t.css("borderTopWidth"),t.css("borderRightWidth"),t.css("borderBottomWidth"),t.css("borderLeftWidth")],n=[t.css("paddingTop"),t.css("paddingRight"),t.css("paddingBottom"),t.css("paddingLeft")];e<4;e++)i[e]=parseFloat(s[e])||0,i[e]+=parseFloat(n[e])||0;return{height:i[0]+i[2],width:i[1]+i[3]}},_proportionallyResize:function(){if(this._proportionallyResizeElements.length)for(var t,e=0,i=this.helper||this.element;e").css({overflow:"hidden"}),this._addClass(this.helper,this._helper),this.helper.css({width:this.element.outerWidth(),height:this.element.outerHeight(),position:"absolute",left:this.elementOffset.left+"px",top:this.elementOffset.top+"px",zIndex:++e.zIndex}),this.helper.appendTo("body").disableSelection()):this.helper=this.element},_change:{e:function(t,e){return{width:this.originalSize.width+e}},w:function(t,e){var i=this.originalSize;return{left:this.originalPosition.left+e,width:i.width-e}},n:function(t,e,i){var s=this.originalSize;return{top:this.originalPosition.top+i,height:s.height-i}},s:function(t,e,i){return{height:this.originalSize.height+i}},se:function(t,e,i){return y.extend(this._change.s.apply(this,arguments),this._change.e.apply(this,[t,e,i]))},sw:function(t,e,i){return y.extend(this._change.s.apply(this,arguments),this._change.w.apply(this,[t,e,i]))},ne:function(t,e,i){return y.extend(this._change.n.apply(this,arguments),this._change.e.apply(this,[t,e,i]))},nw:function(t,e,i){return y.extend(this._change.n.apply(this,arguments),this._change.w.apply(this,[t,e,i]))}},_propagate:function(t,e){y.ui.plugin.call(this,t,[e,this.ui()]),"resize"!==t&&this._trigger(t,e,this.ui())},plugins:{},ui:function(){return{originalElement:this.originalElement,element:this.element,helper:this.helper,position:this.position,size:this.size,originalSize:this.originalSize,originalPosition:this.originalPosition}}}),y.ui.plugin.add("resizable","animate",{stop:function(e){var i=y(this).resizable("instance"),t=i.options,s=i._proportionallyResizeElements,n=s.length&&/textarea/i.test(s[0].nodeName),o=n&&i._hasScroll(s[0],"left")?0:i.sizeDiff.height,h=n?0:i.sizeDiff.width,n={width:i.size.width-h,height:i.size.height-o},h=parseFloat(i.element.css("left"))+(i.position.left-i.originalPosition.left)||null,o=parseFloat(i.element.css("top"))+(i.position.top-i.originalPosition.top)||null;i.element.animate(y.extend(n,o&&h?{top:o,left:h}:{}),{duration:t.animateDuration,easing:t.animateEasing,step:function(){var t={width:parseFloat(i.element.css("width")),height:parseFloat(i.element.css("height")),top:parseFloat(i.element.css("top")),left:parseFloat(i.element.css("left"))};s&&s.length&&y(s[0]).css({width:t.width,height:t.height}),i._updateCache(t),i._propagate("resize",e)}})}}),y.ui.plugin.add("resizable","containment",{start:function(){var i,s,n=y(this).resizable("instance"),t=n.options,e=n.element,o=t.containment,h=o instanceof y?o.get(0):/parent/.test(o)?e.parent().get(0):o;h&&(n.containerElement=y(h),/document/.test(o)||o===document?(n.containerOffset={left:0,top:0},n.containerPosition={left:0,top:0},n.parentData={element:y(document),left:0,top:0,width:y(document).width(),height:y(document).height()||document.body.parentNode.scrollHeight}):(i=y(h),s=[],y(["Top","Right","Left","Bottom"]).each(function(t,e){s[t]=n._num(i.css("padding"+e))}),n.containerOffset=i.offset(),n.containerPosition=i.position(),n.containerSize={height:i.innerHeight()-s[3],width:i.innerWidth()-s[1]},t=n.containerOffset,e=n.containerSize.height,o=n.containerSize.width,o=n._hasScroll(h,"left")?h.scrollWidth:o,e=n._hasScroll(h)?h.scrollHeight:e,n.parentData={element:h,left:t.left,top:t.top,width:o,height:e}))},resize:function(t){var e=y(this).resizable("instance"),i=e.options,s=e.containerOffset,n=e.position,o=e._aspectRatio||t.shiftKey,h={top:0,left:0},a=e.containerElement,t=!0;a[0]!==document&&/static/.test(a.css("position"))&&(h=s),n.left<(e._helper?s.left:0)&&(e.size.width=e.size.width+(e._helper?e.position.left-s.left:e.position.left-h.left),o&&(e.size.height=e.size.width/e.aspectRatio,t=!1),e.position.left=i.helper?s.left:0),n.top<(e._helper?s.top:0)&&(e.size.height=e.size.height+(e._helper?e.position.top-s.top:e.position.top),o&&(e.size.width=e.size.height*e.aspectRatio,t=!1),e.position.top=e._helper?s.top:0),i=e.containerElement.get(0)===e.element.parent().get(0),n=/relative|absolute/.test(e.containerElement.css("position")),i&&n?(e.offset.left=e.parentData.left+e.position.left,e.offset.top=e.parentData.top+e.position.top):(e.offset.left=e.element.offset().left,e.offset.top=e.element.offset().top),n=Math.abs(e.sizeDiff.width+(e._helper?e.offset.left-h.left:e.offset.left-s.left)),s=Math.abs(e.sizeDiff.height+(e._helper?e.offset.top-h.top:e.offset.top-s.top)),n+e.size.width>=e.parentData.width&&(e.size.width=e.parentData.width-n,o&&(e.size.height=e.size.width/e.aspectRatio,t=!1)),s+e.size.height>=e.parentData.height&&(e.size.height=e.parentData.height-s,o&&(e.size.width=e.size.height*e.aspectRatio,t=!1)),t||(e.position.left=e.prevPosition.left,e.position.top=e.prevPosition.top,e.size.width=e.prevSize.width,e.size.height=e.prevSize.height)},stop:function(){var t=y(this).resizable("instance"),e=t.options,i=t.containerOffset,s=t.containerPosition,n=t.containerElement,o=y(t.helper),h=o.offset(),a=o.outerWidth()-t.sizeDiff.width,o=o.outerHeight()-t.sizeDiff.height;t._helper&&!e.animate&&/relative/.test(n.css("position"))&&y(this).css({left:h.left-s.left-i.left,width:a,height:o}),t._helper&&!e.animate&&/static/.test(n.css("position"))&&y(this).css({left:h.left-s.left-i.left,width:a,height:o})}}),y.ui.plugin.add("resizable","alsoResize",{start:function(){var t=y(this).resizable("instance").options;y(t.alsoResize).each(function(){var t=y(this);t.data("ui-resizable-alsoresize",{width:parseFloat(t.width()),height:parseFloat(t.height()),left:parseFloat(t.css("left")),top:parseFloat(t.css("top"))})})},resize:function(t,i){var e=y(this).resizable("instance"),s=e.options,n=e.originalSize,o=e.originalPosition,h={height:e.size.height-n.height||0,width:e.size.width-n.width||0,top:e.position.top-o.top||0,left:e.position.left-o.left||0};y(s.alsoResize).each(function(){var t=y(this),s=y(this).data("ui-resizable-alsoresize"),n={},e=t.parents(i.originalElement[0]).length?["width","height"]:["width","height","top","left"];y.each(e,function(t,e){var i=(s[e]||0)+(h[e]||0);i&&0<=i&&(n[e]=i||null)}),t.css(n)})},stop:function(){y(this).removeData("ui-resizable-alsoresize")}}),y.ui.plugin.add("resizable","ghost",{start:function(){var t=y(this).resizable("instance"),e=t.size;t.ghost=t.originalElement.clone(),t.ghost.css({opacity:.25,display:"block",position:"relative",height:e.height,width:e.width,margin:0,left:0,top:0}),t._addClass(t.ghost,"ui-resizable-ghost"),!1!==y.uiBackCompat&&"string"==typeof t.options.ghost&&t.ghost.addClass(this.options.ghost),t.ghost.appendTo(t.helper)},resize:function(){var t=y(this).resizable("instance");t.ghost&&t.ghost.css({position:"relative",height:t.size.height,width:t.size.width})},stop:function(){var t=y(this).resizable("instance");t.ghost&&t.helper&&t.helper.get(0).removeChild(t.ghost.get(0))}}),y.ui.plugin.add("resizable","grid",{resize:function(){var t,e=y(this).resizable("instance"),i=e.options,s=e.size,n=e.originalSize,o=e.originalPosition,h=e.axis,a="number"==typeof i.grid?[i.grid,i.grid]:i.grid,r=a[0]||1,l=a[1]||1,u=Math.round((s.width-n.width)/r)*r,p=Math.round((s.height-n.height)/l)*l,d=n.width+u,c=n.height+p,f=i.maxWidth&&i.maxWidthd,s=i.minHeight&&i.minHeight>c;i.grid=a,m&&(d+=r),s&&(c+=l),f&&(d-=r),g&&(c-=l),/^(se|s|e)$/.test(h)?(e.size.width=d,e.size.height=c):/^(ne)$/.test(h)?(e.size.width=d,e.size.height=c,e.position.top=o.top-p):/^(sw)$/.test(h)?(e.size.width=d,e.size.height=c,e.position.left=o.left-u):((c-l<=0||d-r<=0)&&(t=e._getPaddingPlusBorderDimensions(this)),0=f[g]?0:Math.min(f[g],n));!a&&1-1){targetElements.on(evt+EVENT_NAMESPACE,function elementToggle(event){$.powerTip.toggle(this,event)})}else{targetElements.on(evt+EVENT_NAMESPACE,function elementOpen(event){$.powerTip.show(this,event)})}});$.each(options.closeEvents,function(idx,evt){if($.inArray(evt,options.openEvents)<0){targetElements.on(evt+EVENT_NAMESPACE,function elementClose(event){$.powerTip.hide(this,!isMouseEvent(event))})}});targetElements.on("keydown"+EVENT_NAMESPACE,function elementKeyDown(event){if(event.keyCode===27){$.powerTip.hide(this,true)}})}return targetElements};$.fn.powerTip.defaults={fadeInTime:200,fadeOutTime:100,followMouse:false,popupId:"powerTip",popupClass:null,intentSensitivity:7,intentPollInterval:100,closeDelay:100,placement:"n",smartPlacement:false,offset:10,mouseOnToPopup:false,manual:false,openEvents:["mouseenter","focus"],closeEvents:["mouseleave","blur"]};$.fn.powerTip.smartPlacementLists={n:["n","ne","nw","s"],e:["e","ne","se","w","nw","sw","n","s","e"],s:["s","se","sw","n"],w:["w","nw","sw","e","ne","se","n","s","w"],nw:["nw","w","sw","n","s","se","nw"],ne:["ne","e","se","n","s","sw","ne"],sw:["sw","w","nw","s","n","ne","sw"],se:["se","e","ne","s","n","nw","se"],"nw-alt":["nw-alt","n","ne-alt","sw-alt","s","se-alt","w","e"],"ne-alt":["ne-alt","n","nw-alt","se-alt","s","sw-alt","e","w"],"sw-alt":["sw-alt","s","se-alt","nw-alt","n","ne-alt","w","e"],"se-alt":["se-alt","s","sw-alt","ne-alt","n","nw-alt","e","w"]};$.powerTip={show:function apiShowTip(element,event){if(isMouseEvent(event)){trackMouse(event);session.previousX=event.pageX;session.previousY=event.pageY;$(element).data(DATA_DISPLAYCONTROLLER).show()}else{$(element).first().data(DATA_DISPLAYCONTROLLER).show(true,true)}return element},reposition:function apiResetPosition(element){$(element).first().data(DATA_DISPLAYCONTROLLER).resetPosition();return element},hide:function apiCloseTip(element,immediate){var displayController;immediate=element?immediate:true;if(element){displayController=$(element).first().data(DATA_DISPLAYCONTROLLER)}else if(session.activeHover){displayController=session.activeHover.data(DATA_DISPLAYCONTROLLER)}if(displayController){displayController.hide(immediate)}return element},toggle:function apiToggle(element,event){if(session.activeHover&&session.activeHover.is(element)){$.powerTip.hide(element,!isMouseEvent(event))}else{$.powerTip.show(element,event)}return element}};$.powerTip.showTip=$.powerTip.show;$.powerTip.closeTip=$.powerTip.hide;function CSSCoordinates(){var me=this;me.top="auto";me.left="auto";me.right="auto";me.bottom="auto";me.set=function(property,value){if($.isNumeric(value)){me[property]=Math.round(value)}}}function DisplayController(element,options,tipController){var hoverTimer=null,myCloseDelay=null;function openTooltip(immediate,forceOpen){cancelTimer();if(!element.data(DATA_HASACTIVEHOVER)){if(!immediate){session.tipOpenImminent=true;hoverTimer=setTimeout(function intentDelay(){hoverTimer=null;checkForIntent()},options.intentPollInterval)}else{if(forceOpen){element.data(DATA_FORCEDOPEN,true)}closeAnyDelayed();tipController.showTip(element)}}else{cancelClose()}}function closeTooltip(disableDelay){if(myCloseDelay){myCloseDelay=session.closeDelayTimeout=clearTimeout(myCloseDelay);session.delayInProgress=false}cancelTimer();session.tipOpenImminent=false;if(element.data(DATA_HASACTIVEHOVER)){element.data(DATA_FORCEDOPEN,false);if(!disableDelay){session.delayInProgress=true;session.closeDelayTimeout=setTimeout(function closeDelay(){session.closeDelayTimeout=null;tipController.hideTip(element);session.delayInProgress=false;myCloseDelay=null},options.closeDelay);myCloseDelay=session.closeDelayTimeout}else{tipController.hideTip(element)}}}function checkForIntent(){var xDifference=Math.abs(session.previousX-session.currentX),yDifference=Math.abs(session.previousY-session.currentY),totalDifference=xDifference+yDifference;if(totalDifference",{id:options.popupId});if($body.length===0){$body=$("body")}$body.append(tipElement);session.tooltips=session.tooltips?session.tooltips.add(tipElement):tipElement}if(options.followMouse){if(!tipElement.data(DATA_HASMOUSEMOVE)){$document.on("mousemove"+EVENT_NAMESPACE,positionTipOnCursor);$window.on("scroll"+EVENT_NAMESPACE,positionTipOnCursor);tipElement.data(DATA_HASMOUSEMOVE,true)}}function beginShowTip(element){element.data(DATA_HASACTIVEHOVER,true);tipElement.queue(function queueTipInit(next){showTip(element);next()})}function showTip(element){var tipContent;if(!element.data(DATA_HASACTIVEHOVER)){return}if(session.isTipOpen){if(!session.isClosing){hideTip(session.activeHover)}tipElement.delay(100).queue(function queueTipAgain(next){showTip(element);next()});return}element.trigger("powerTipPreRender");tipContent=getTooltipContent(element);if(tipContent){tipElement.empty().append(tipContent)}else{return}element.trigger("powerTipRender");session.activeHover=element;session.isTipOpen=true;tipElement.data(DATA_MOUSEONTOTIP,options.mouseOnToPopup);tipElement.addClass(options.popupClass);if(!options.followMouse||element.data(DATA_FORCEDOPEN)){positionTipOnElement(element);session.isFixedTipOpen=true}else{positionTipOnCursor()}if(!element.data(DATA_FORCEDOPEN)&&!options.followMouse){$document.on("click"+EVENT_NAMESPACE,function documentClick(event){var target=event.target;if(target!==element[0]){if(options.mouseOnToPopup){if(target!==tipElement[0]&&!$.contains(tipElement[0],target)){$.powerTip.hide()}}else{$.powerTip.hide()}}})}if(options.mouseOnToPopup&&!options.manual){tipElement.on("mouseenter"+EVENT_NAMESPACE,function tipMouseEnter(){if(session.activeHover){session.activeHover.data(DATA_DISPLAYCONTROLLER).cancel()}});tipElement.on("mouseleave"+EVENT_NAMESPACE,function tipMouseLeave(){if(session.activeHover){session.activeHover.data(DATA_DISPLAYCONTROLLER).hide()}})}tipElement.fadeIn(options.fadeInTime,function fadeInCallback(){if(!session.desyncTimeout){session.desyncTimeout=setInterval(closeDesyncedTip,500)}element.trigger("powerTipOpen")})}function hideTip(element){session.isClosing=true;session.isTipOpen=false;session.desyncTimeout=clearInterval(session.desyncTimeout);element.data(DATA_HASACTIVEHOVER,false);element.data(DATA_FORCEDOPEN,false);$document.off("click"+EVENT_NAMESPACE);tipElement.off(EVENT_NAMESPACE);tipElement.fadeOut(options.fadeOutTime,function fadeOutCallback(){var coords=new CSSCoordinates;session.activeHover=null;session.isClosing=false;session.isFixedTipOpen=false;tipElement.removeClass();coords.set("top",session.currentY+options.offset);coords.set("left",session.currentX+options.offset);tipElement.css(coords);element.trigger("powerTipClose")})}function positionTipOnCursor(){var tipWidth,tipHeight,coords,collisions,collisionCount;if(!session.isFixedTipOpen&&(session.isTipOpen||session.tipOpenImminent&&tipElement.data(DATA_HASMOUSEMOVE))){tipWidth=tipElement.outerWidth();tipHeight=tipElement.outerHeight();coords=new CSSCoordinates;coords.set("top",session.currentY+options.offset);coords.set("left",session.currentX+options.offset);collisions=getViewportCollisions(coords,tipWidth,tipHeight);if(collisions!==Collision.none){collisionCount=countFlags(collisions);if(collisionCount===1){if(collisions===Collision.right){coords.set("left",session.scrollLeft+session.windowWidth-tipWidth)}else if(collisions===Collision.bottom){coords.set("top",session.scrollTop+session.windowHeight-tipHeight)}}else{coords.set("left",session.currentX-tipWidth-options.offset);coords.set("top",session.currentY-tipHeight-options.offset)}}tipElement.css(coords)}}function positionTipOnElement(element){var priorityList,finalPlacement;if(options.smartPlacement||options.followMouse&&element.data(DATA_FORCEDOPEN)){priorityList=$.fn.powerTip.smartPlacementLists[options.placement];$.each(priorityList,function(idx,pos){var collisions=getViewportCollisions(placeTooltip(element,pos),tipElement.outerWidth(),tipElement.outerHeight());finalPlacement=pos;return collisions!==Collision.none})}else{placeTooltip(element,options.placement);finalPlacement=options.placement}tipElement.removeClass("w nw sw e ne se n s w se-alt sw-alt ne-alt nw-alt");tipElement.addClass(finalPlacement)}function placeTooltip(element,placement){var iterationCount=0,tipWidth,tipHeight,coords=new CSSCoordinates;coords.set("top",0);coords.set("left",0);tipElement.css(coords);do{tipWidth=tipElement.outerWidth();tipHeight=tipElement.outerHeight();coords=placementCalculator.compute(element,placement,tipWidth,tipHeight,options.offset);tipElement.css(coords)}while(++iterationCount<=5&&(tipWidth!==tipElement.outerWidth()||tipHeight!==tipElement.outerHeight()));return coords}function closeDesyncedTip(){var isDesynced=false,hasDesyncableCloseEvent=$.grep(["mouseleave","mouseout","blur","focusout"],function(eventType){return $.inArray(eventType,options.closeEvents)!==-1}).length>0;if(session.isTipOpen&&!session.isClosing&&!session.delayInProgress&&hasDesyncableCloseEvent){if(session.activeHover.data(DATA_HASACTIVEHOVER)===false||session.activeHover.is(":disabled")){isDesynced=true}else if(!isMouseOver(session.activeHover)&&!session.activeHover.is(":focus")&&!session.activeHover.data(DATA_FORCEDOPEN)){if(tipElement.data(DATA_MOUSEONTOTIP)){if(!isMouseOver(tipElement)){isDesynced=true}}else{isDesynced=true}}if(isDesynced){hideTip(session.activeHover)}}}this.showTip=beginShowTip;this.hideTip=hideTip;this.resetPosition=positionTipOnElement}function isSvgElement(element){return Boolean(window.SVGElement&&element[0]instanceof SVGElement)}function isMouseEvent(event){return Boolean(event&&$.inArray(event.type,MOUSE_EVENTS)>-1&&typeof event.pageX==="number")}function initTracking(){if(!session.mouseTrackingActive){session.mouseTrackingActive=true;getViewportDimensions();$(getViewportDimensions);$document.on("mousemove"+EVENT_NAMESPACE,trackMouse);$window.on("resize"+EVENT_NAMESPACE,trackResize);$window.on("scroll"+EVENT_NAMESPACE,trackScroll)}}function getViewportDimensions(){session.scrollLeft=$window.scrollLeft();session.scrollTop=$window.scrollTop();session.windowWidth=$window.width();session.windowHeight=$window.height()}function trackResize(){session.windowWidth=$window.width();session.windowHeight=$window.height()}function trackScroll(){var x=$window.scrollLeft(),y=$window.scrollTop();if(x!==session.scrollLeft){session.currentX+=x-session.scrollLeft;session.scrollLeft=x}if(y!==session.scrollTop){session.currentY+=y-session.scrollTop;session.scrollTop=y}}function trackMouse(event){session.currentX=event.pageX;session.currentY=event.pageY}function isMouseOver(element){var elementPosition=element.offset(),elementBox=element[0].getBoundingClientRect(),elementWidth=elementBox.right-elementBox.left,elementHeight=elementBox.bottom-elementBox.top;return session.currentX>=elementPosition.left&&session.currentX<=elementPosition.left+elementWidth&&session.currentY>=elementPosition.top&&session.currentY<=elementPosition.top+elementHeight}function getTooltipContent(element){var tipText=element.data(DATA_POWERTIP),tipObject=element.data(DATA_POWERTIPJQ),tipTarget=element.data(DATA_POWERTIPTARGET),targetElement,content;if(tipText){if($.isFunction(tipText)){tipText=tipText.call(element[0])}content=tipText}else if(tipObject){if($.isFunction(tipObject)){tipObject=tipObject.call(element[0])}if(tipObject.length>0){content=tipObject.clone(true,true)}}else if(tipTarget){targetElement=$("#"+tipTarget);if(targetElement.length>0){content=targetElement.html()}}return content}function getViewportCollisions(coords,elementWidth,elementHeight){var viewportTop=session.scrollTop,viewportLeft=session.scrollLeft,viewportBottom=viewportTop+session.windowHeight,viewportRight=viewportLeft+session.windowWidth,collisions=Collision.none;if(coords.topviewportBottom||Math.abs(coords.bottom-session.windowHeight)>viewportBottom){collisions|=Collision.bottom}if(coords.leftviewportRight){collisions|=Collision.left}if(coords.left+elementWidth>viewportRight||coords.right1)){a.preventDefault();var c=a.originalEvent.changedTouches[0],d=document.createEvent("MouseEvents");d.initMouseEvent(b,!0,!0,window,1,c.screenX,c.screenY,c.clientX,c.clientY,!1,!1,!1,!1,0,null),a.target.dispatchEvent(d)}}if(a.support.touch="ontouchend"in document,a.support.touch){var e,b=a.ui.mouse.prototype,c=b._mouseInit,d=b._mouseDestroy;b._touchStart=function(a){var b=this;!e&&b._mouseCapture(a.originalEvent.changedTouches[0])&&(e=!0,b._touchMoved=!1,f(a,"mouseover"),f(a,"mousemove"),f(a,"mousedown"))},b._touchMove=function(a){e&&(this._touchMoved=!0,f(a,"mousemove"))},b._touchEnd=function(a){e&&(f(a,"mouseup"),f(a,"mouseout"),this._touchMoved||f(a,"click"),e=!1)},b._mouseInit=function(){var b=this;b.element.bind({touchstart:a.proxy(b,"_touchStart"),touchmove:a.proxy(b,"_touchMove"),touchend:a.proxy(b,"_touchEnd")}),c.call(b)},b._mouseDestroy=function(){var b=this;b.element.unbind({touchstart:a.proxy(b,"_touchStart"),touchmove:a.proxy(b,"_touchMove"),touchend:a.proxy(b,"_touchEnd")}),d.call(b)}}}(jQuery);/*! SmartMenus jQuery Plugin - v1.1.0 - September 17, 2017 + * http://www.smartmenus.org/ + * Copyright Vasil Dinkov, Vadikom Web Ltd. http://vadikom.com; Licensed MIT */(function(t){"function"==typeof define&&define.amd?define(["jquery"],t):"object"==typeof module&&"object"==typeof module.exports?module.exports=t(require("jquery")):t(jQuery)})(function($){function initMouseDetection(t){var e=".smartmenus_mouse";if(mouseDetectionEnabled||t)mouseDetectionEnabled&&t&&($(document).off(e),mouseDetectionEnabled=!1);else{var i=!0,s=null,o={mousemove:function(t){var e={x:t.pageX,y:t.pageY,timeStamp:(new Date).getTime()};if(s){var o=Math.abs(s.x-e.x),a=Math.abs(s.y-e.y);if((o>0||a>0)&&2>=o&&2>=a&&300>=e.timeStamp-s.timeStamp&&(mouse=!0,i)){var n=$(t.target).closest("a");n.is("a")&&$.each(menuTrees,function(){return $.contains(this.$root[0],n[0])?(this.itemEnter({currentTarget:n[0]}),!1):void 0}),i=!1}}s=e}};o[touchEvents?"touchstart":"pointerover pointermove pointerout MSPointerOver MSPointerMove MSPointerOut"]=function(t){isTouchEvent(t.originalEvent)&&(mouse=!1)},$(document).on(getEventsNS(o,e)),mouseDetectionEnabled=!0}}function isTouchEvent(t){return!/^(4|mouse)$/.test(t.pointerType)}function getEventsNS(t,e){e||(e="");var i={};for(var s in t)i[s.split(" ").join(e+" ")+e]=t[s];return i}var menuTrees=[],mouse=!1,touchEvents="ontouchstart"in window,mouseDetectionEnabled=!1,requestAnimationFrame=window.requestAnimationFrame||function(t){return setTimeout(t,1e3/60)},cancelAnimationFrame=window.cancelAnimationFrame||function(t){clearTimeout(t)},canAnimate=!!$.fn.animate;return $.SmartMenus=function(t,e){this.$root=$(t),this.opts=e,this.rootId="",this.accessIdPrefix="",this.$subArrow=null,this.activatedItems=[],this.visibleSubMenus=[],this.showTimeout=0,this.hideTimeout=0,this.scrollTimeout=0,this.clickActivated=!1,this.focusActivated=!1,this.zIndexInc=0,this.idInc=0,this.$firstLink=null,this.$firstSub=null,this.disabled=!1,this.$disableOverlay=null,this.$touchScrollingSub=null,this.cssTransforms3d="perspective"in t.style||"webkitPerspective"in t.style,this.wasCollapsible=!1,this.init()},$.extend($.SmartMenus,{hideAll:function(){$.each(menuTrees,function(){this.menuHideAll()})},destroy:function(){for(;menuTrees.length;)menuTrees[0].destroy();initMouseDetection(!0)},prototype:{init:function(t){var e=this;if(!t){menuTrees.push(this),this.rootId=((new Date).getTime()+Math.random()+"").replace(/\D/g,""),this.accessIdPrefix="sm-"+this.rootId+"-",this.$root.hasClass("sm-rtl")&&(this.opts.rightToLeftSubMenus=!0);var i=".smartmenus";this.$root.data("smartmenus",this).attr("data-smartmenus-id",this.rootId).dataSM("level",1).on(getEventsNS({"mouseover focusin":$.proxy(this.rootOver,this),"mouseout focusout":$.proxy(this.rootOut,this),keydown:$.proxy(this.rootKeyDown,this)},i)).on(getEventsNS({mouseenter:$.proxy(this.itemEnter,this),mouseleave:$.proxy(this.itemLeave,this),mousedown:$.proxy(this.itemDown,this),focus:$.proxy(this.itemFocus,this),blur:$.proxy(this.itemBlur,this),click:$.proxy(this.itemClick,this)},i),"a"),i+=this.rootId,this.opts.hideOnClick&&$(document).on(getEventsNS({touchstart:$.proxy(this.docTouchStart,this),touchmove:$.proxy(this.docTouchMove,this),touchend:$.proxy(this.docTouchEnd,this),click:$.proxy(this.docClick,this)},i)),$(window).on(getEventsNS({"resize orientationchange":$.proxy(this.winResize,this)},i)),this.opts.subIndicators&&(this.$subArrow=$("").addClass("sub-arrow"),this.opts.subIndicatorsText&&this.$subArrow.html(this.opts.subIndicatorsText)),initMouseDetection()}if(this.$firstSub=this.$root.find("ul").each(function(){e.menuInit($(this))}).eq(0),this.$firstLink=this.$root.find("a").eq(0),this.opts.markCurrentItem){var s=/(index|default)\.[^#\?\/]*/i,o=/#.*/,a=window.location.href.replace(s,""),n=a.replace(o,"");this.$root.find("a").each(function(){var t=this.href.replace(s,""),i=$(this);(t==a||t==n)&&(i.addClass("current"),e.opts.markCurrentTree&&i.parentsUntil("[data-smartmenus-id]","ul").each(function(){$(this).dataSM("parent-a").addClass("current")}))})}this.wasCollapsible=this.isCollapsible()},destroy:function(t){if(!t){var e=".smartmenus";this.$root.removeData("smartmenus").removeAttr("data-smartmenus-id").removeDataSM("level").off(e),e+=this.rootId,$(document).off(e),$(window).off(e),this.opts.subIndicators&&(this.$subArrow=null)}this.menuHideAll();var i=this;this.$root.find("ul").each(function(){var t=$(this);t.dataSM("scroll-arrows")&&t.dataSM("scroll-arrows").remove(),t.dataSM("shown-before")&&((i.opts.subMenusMinWidth||i.opts.subMenusMaxWidth)&&t.css({width:"",minWidth:"",maxWidth:""}).removeClass("sm-nowrap"),t.dataSM("scroll-arrows")&&t.dataSM("scroll-arrows").remove(),t.css({zIndex:"",top:"",left:"",marginLeft:"",marginTop:"",display:""})),0==(t.attr("id")||"").indexOf(i.accessIdPrefix)&&t.removeAttr("id")}).removeDataSM("in-mega").removeDataSM("shown-before").removeDataSM("scroll-arrows").removeDataSM("parent-a").removeDataSM("level").removeDataSM("beforefirstshowfired").removeAttr("role").removeAttr("aria-hidden").removeAttr("aria-labelledby").removeAttr("aria-expanded"),this.$root.find("a.has-submenu").each(function(){var t=$(this);0==t.attr("id").indexOf(i.accessIdPrefix)&&t.removeAttr("id")}).removeClass("has-submenu").removeDataSM("sub").removeAttr("aria-haspopup").removeAttr("aria-controls").removeAttr("aria-expanded").closest("li").removeDataSM("sub"),this.opts.subIndicators&&this.$root.find("span.sub-arrow").remove(),this.opts.markCurrentItem&&this.$root.find("a.current").removeClass("current"),t||(this.$root=null,this.$firstLink=null,this.$firstSub=null,this.$disableOverlay&&(this.$disableOverlay.remove(),this.$disableOverlay=null),menuTrees.splice($.inArray(this,menuTrees),1))},disable:function(t){if(!this.disabled){if(this.menuHideAll(),!t&&!this.opts.isPopup&&this.$root.is(":visible")){var e=this.$root.offset();this.$disableOverlay=$('
').css({position:"absolute",top:e.top,left:e.left,width:this.$root.outerWidth(),height:this.$root.outerHeight(),zIndex:this.getStartZIndex(!0),opacity:0}).appendTo(document.body)}this.disabled=!0}},docClick:function(t){return this.$touchScrollingSub?(this.$touchScrollingSub=null,void 0):((this.visibleSubMenus.length&&!$.contains(this.$root[0],t.target)||$(t.target).closest("a").length)&&this.menuHideAll(),void 0)},docTouchEnd:function(){if(this.lastTouch){if(!(!this.visibleSubMenus.length||void 0!==this.lastTouch.x2&&this.lastTouch.x1!=this.lastTouch.x2||void 0!==this.lastTouch.y2&&this.lastTouch.y1!=this.lastTouch.y2||this.lastTouch.target&&$.contains(this.$root[0],this.lastTouch.target))){this.hideTimeout&&(clearTimeout(this.hideTimeout),this.hideTimeout=0);var t=this;this.hideTimeout=setTimeout(function(){t.menuHideAll()},350)}this.lastTouch=null}},docTouchMove:function(t){if(this.lastTouch){var e=t.originalEvent.touches[0];this.lastTouch.x2=e.pageX,this.lastTouch.y2=e.pageY}},docTouchStart:function(t){var e=t.originalEvent.touches[0];this.lastTouch={x1:e.pageX,y1:e.pageY,target:e.target}},enable:function(){this.disabled&&(this.$disableOverlay&&(this.$disableOverlay.remove(),this.$disableOverlay=null),this.disabled=!1)},getClosestMenu:function(t){for(var e=$(t).closest("ul");e.dataSM("in-mega");)e=e.parent().closest("ul");return e[0]||null},getHeight:function(t){return this.getOffset(t,!0)},getOffset:function(t,e){var i;"none"==t.css("display")&&(i={position:t[0].style.position,visibility:t[0].style.visibility},t.css({position:"absolute",visibility:"hidden"}).show());var s=t[0].getBoundingClientRect&&t[0].getBoundingClientRect(),o=s&&(e?s.height||s.bottom-s.top:s.width||s.right-s.left);return o||0===o||(o=e?t[0].offsetHeight:t[0].offsetWidth),i&&t.hide().css(i),o},getStartZIndex:function(t){var e=parseInt(this[t?"$root":"$firstSub"].css("z-index"));return!t&&isNaN(e)&&(e=parseInt(this.$root.css("z-index"))),isNaN(e)?1:e},getTouchPoint:function(t){return t.touches&&t.touches[0]||t.changedTouches&&t.changedTouches[0]||t},getViewport:function(t){var e=t?"Height":"Width",i=document.documentElement["client"+e],s=window["inner"+e];return s&&(i=Math.min(i,s)),i},getViewportHeight:function(){return this.getViewport(!0)},getViewportWidth:function(){return this.getViewport()},getWidth:function(t){return this.getOffset(t)},handleEvents:function(){return!this.disabled&&this.isCSSOn()},handleItemEvents:function(t){return this.handleEvents()&&!this.isLinkInMegaMenu(t)},isCollapsible:function(){return"static"==this.$firstSub.css("position")},isCSSOn:function(){return"inline"!=this.$firstLink.css("display")},isFixed:function(){var t="fixed"==this.$root.css("position");return t||this.$root.parentsUntil("body").each(function(){return"fixed"==$(this).css("position")?(t=!0,!1):void 0}),t},isLinkInMegaMenu:function(t){return $(this.getClosestMenu(t[0])).hasClass("mega-menu")},isTouchMode:function(){return!mouse||this.opts.noMouseOver||this.isCollapsible()},itemActivate:function(t,e){var i=t.closest("ul"),s=i.dataSM("level");if(s>1&&(!this.activatedItems[s-2]||this.activatedItems[s-2][0]!=i.dataSM("parent-a")[0])){var o=this;$(i.parentsUntil("[data-smartmenus-id]","ul").get().reverse()).add(i).each(function(){o.itemActivate($(this).dataSM("parent-a"))})}if((!this.isCollapsible()||e)&&this.menuHideSubMenus(this.activatedItems[s-1]&&this.activatedItems[s-1][0]==t[0]?s:s-1),this.activatedItems[s-1]=t,this.$root.triggerHandler("activate.smapi",t[0])!==!1){var a=t.dataSM("sub");a&&(this.isTouchMode()||!this.opts.showOnClick||this.clickActivated)&&this.menuShow(a)}},itemBlur:function(t){var e=$(t.currentTarget);this.handleItemEvents(e)&&this.$root.triggerHandler("blur.smapi",e[0])},itemClick:function(t){var e=$(t.currentTarget);if(this.handleItemEvents(e)){if(this.$touchScrollingSub&&this.$touchScrollingSub[0]==e.closest("ul")[0])return this.$touchScrollingSub=null,t.stopPropagation(),!1;if(this.$root.triggerHandler("click.smapi",e[0])===!1)return!1;var i=$(t.target).is(".sub-arrow"),s=e.dataSM("sub"),o=s?2==s.dataSM("level"):!1,a=this.isCollapsible(),n=/toggle$/.test(this.opts.collapsibleBehavior),r=/link$/.test(this.opts.collapsibleBehavior),h=/^accordion/.test(this.opts.collapsibleBehavior);if(s&&!s.is(":visible")){if((!r||!a||i)&&(this.opts.showOnClick&&o&&(this.clickActivated=!0),this.itemActivate(e,h),s.is(":visible")))return this.focusActivated=!0,!1}else if(a&&(n||i))return this.itemActivate(e,h),this.menuHide(s),n&&(this.focusActivated=!1),!1;return this.opts.showOnClick&&o||e.hasClass("disabled")||this.$root.triggerHandler("select.smapi",e[0])===!1?!1:void 0}},itemDown:function(t){var e=$(t.currentTarget);this.handleItemEvents(e)&&e.dataSM("mousedown",!0)},itemEnter:function(t){var e=$(t.currentTarget);if(this.handleItemEvents(e)){if(!this.isTouchMode()){this.showTimeout&&(clearTimeout(this.showTimeout),this.showTimeout=0);var i=this;this.showTimeout=setTimeout(function(){i.itemActivate(e)},this.opts.showOnClick&&1==e.closest("ul").dataSM("level")?1:this.opts.showTimeout)}this.$root.triggerHandler("mouseenter.smapi",e[0])}},itemFocus:function(t){var e=$(t.currentTarget);this.handleItemEvents(e)&&(!this.focusActivated||this.isTouchMode()&&e.dataSM("mousedown")||this.activatedItems.length&&this.activatedItems[this.activatedItems.length-1][0]==e[0]||this.itemActivate(e,!0),this.$root.triggerHandler("focus.smapi",e[0]))},itemLeave:function(t){var e=$(t.currentTarget);this.handleItemEvents(e)&&(this.isTouchMode()||(e[0].blur(),this.showTimeout&&(clearTimeout(this.showTimeout),this.showTimeout=0)),e.removeDataSM("mousedown"),this.$root.triggerHandler("mouseleave.smapi",e[0]))},menuHide:function(t){if(this.$root.triggerHandler("beforehide.smapi",t[0])!==!1&&(canAnimate&&t.stop(!0,!0),"none"!=t.css("display"))){var e=function(){t.css("z-index","")};this.isCollapsible()?canAnimate&&this.opts.collapsibleHideFunction?this.opts.collapsibleHideFunction.call(this,t,e):t.hide(this.opts.collapsibleHideDuration,e):canAnimate&&this.opts.hideFunction?this.opts.hideFunction.call(this,t,e):t.hide(this.opts.hideDuration,e),t.dataSM("scroll")&&(this.menuScrollStop(t),t.css({"touch-action":"","-ms-touch-action":"","-webkit-transform":"",transform:""}).off(".smartmenus_scroll").removeDataSM("scroll").dataSM("scroll-arrows").hide()),t.dataSM("parent-a").removeClass("highlighted").attr("aria-expanded","false"),t.attr({"aria-expanded":"false","aria-hidden":"true"});var i=t.dataSM("level");this.activatedItems.splice(i-1,1),this.visibleSubMenus.splice($.inArray(t,this.visibleSubMenus),1),this.$root.triggerHandler("hide.smapi",t[0])}},menuHideAll:function(){this.showTimeout&&(clearTimeout(this.showTimeout),this.showTimeout=0);for(var t=this.opts.isPopup?1:0,e=this.visibleSubMenus.length-1;e>=t;e--)this.menuHide(this.visibleSubMenus[e]);this.opts.isPopup&&(canAnimate&&this.$root.stop(!0,!0),this.$root.is(":visible")&&(canAnimate&&this.opts.hideFunction?this.opts.hideFunction.call(this,this.$root):this.$root.hide(this.opts.hideDuration))),this.activatedItems=[],this.visibleSubMenus=[],this.clickActivated=!1,this.focusActivated=!1,this.zIndexInc=0,this.$root.triggerHandler("hideAll.smapi")},menuHideSubMenus:function(t){for(var e=this.activatedItems.length-1;e>=t;e--){var i=this.activatedItems[e].dataSM("sub");i&&this.menuHide(i)}},menuInit:function(t){if(!t.dataSM("in-mega")){t.hasClass("mega-menu")&&t.find("ul").dataSM("in-mega",!0);for(var e=2,i=t[0];(i=i.parentNode.parentNode)!=this.$root[0];)e++;var s=t.prevAll("a").eq(-1);s.length||(s=t.prevAll().find("a").eq(-1)),s.addClass("has-submenu").dataSM("sub",t),t.dataSM("parent-a",s).dataSM("level",e).parent().dataSM("sub",t);var o=s.attr("id")||this.accessIdPrefix+ ++this.idInc,a=t.attr("id")||this.accessIdPrefix+ ++this.idInc;s.attr({id:o,"aria-haspopup":"true","aria-controls":a,"aria-expanded":"false"}),t.attr({id:a,role:"group","aria-hidden":"true","aria-labelledby":o,"aria-expanded":"false"}),this.opts.subIndicators&&s[this.opts.subIndicatorsPos](this.$subArrow.clone())}},menuPosition:function(t){var e,i,s=t.dataSM("parent-a"),o=s.closest("li"),a=o.parent(),n=t.dataSM("level"),r=this.getWidth(t),h=this.getHeight(t),u=s.offset(),l=u.left,c=u.top,d=this.getWidth(s),m=this.getHeight(s),p=$(window),f=p.scrollLeft(),v=p.scrollTop(),b=this.getViewportWidth(),S=this.getViewportHeight(),g=a.parent().is("[data-sm-horizontal-sub]")||2==n&&!a.hasClass("sm-vertical"),M=this.opts.rightToLeftSubMenus&&!o.is("[data-sm-reverse]")||!this.opts.rightToLeftSubMenus&&o.is("[data-sm-reverse]"),w=2==n?this.opts.mainMenuSubOffsetX:this.opts.subMenusSubOffsetX,T=2==n?this.opts.mainMenuSubOffsetY:this.opts.subMenusSubOffsetY;if(g?(e=M?d-r-w:w,i=this.opts.bottomToTopSubMenus?-h-T:m+T):(e=M?w-r:d-w,i=this.opts.bottomToTopSubMenus?m-T-h:T),this.opts.keepInViewport){var y=l+e,I=c+i;if(M&&f>y?e=g?f-y+e:d-w:!M&&y+r>f+b&&(e=g?f+b-r-y+e:w-r),g||(S>h&&I+h>v+S?i+=v+S-h-I:(h>=S||v>I)&&(i+=v-I)),g&&(I+h>v+S+.49||v>I)||!g&&h>S+.49){var x=this;t.dataSM("scroll-arrows")||t.dataSM("scroll-arrows",$([$('')[0],$('')[0]]).on({mouseenter:function(){t.dataSM("scroll").up=$(this).hasClass("scroll-up"),x.menuScroll(t)},mouseleave:function(e){x.menuScrollStop(t),x.menuScrollOut(t,e)},"mousewheel DOMMouseScroll":function(t){t.preventDefault()}}).insertAfter(t));var A=".smartmenus_scroll";if(t.dataSM("scroll",{y:this.cssTransforms3d?0:i-m,step:1,itemH:m,subH:h,arrowDownH:this.getHeight(t.dataSM("scroll-arrows").eq(1))}).on(getEventsNS({mouseover:function(e){x.menuScrollOver(t,e)},mouseout:function(e){x.menuScrollOut(t,e)},"mousewheel DOMMouseScroll":function(e){x.menuScrollMousewheel(t,e)}},A)).dataSM("scroll-arrows").css({top:"auto",left:"0",marginLeft:e+(parseInt(t.css("border-left-width"))||0),width:r-(parseInt(t.css("border-left-width"))||0)-(parseInt(t.css("border-right-width"))||0),zIndex:t.css("z-index")}).eq(g&&this.opts.bottomToTopSubMenus?0:1).show(),this.isFixed()){var C={};C[touchEvents?"touchstart touchmove touchend":"pointerdown pointermove pointerup MSPointerDown MSPointerMove MSPointerUp"]=function(e){x.menuScrollTouch(t,e)},t.css({"touch-action":"none","-ms-touch-action":"none"}).on(getEventsNS(C,A))}}}t.css({top:"auto",left:"0",marginLeft:e,marginTop:i-m})},menuScroll:function(t,e,i){var s,o=t.dataSM("scroll"),a=t.dataSM("scroll-arrows"),n=o.up?o.upEnd:o.downEnd;if(!e&&o.momentum){if(o.momentum*=.92,s=o.momentum,.5>s)return this.menuScrollStop(t),void 0}else s=i||(e||!this.opts.scrollAccelerate?this.opts.scrollStep:Math.floor(o.step));var r=t.dataSM("level");if(this.activatedItems[r-1]&&this.activatedItems[r-1].dataSM("sub")&&this.activatedItems[r-1].dataSM("sub").is(":visible")&&this.menuHideSubMenus(r-1),o.y=o.up&&o.y>=n||!o.up&&n>=o.y?o.y:Math.abs(n-o.y)>s?o.y+(o.up?s:-s):n,t.css(this.cssTransforms3d?{"-webkit-transform":"translate3d(0, "+o.y+"px, 0)",transform:"translate3d(0, "+o.y+"px, 0)"}:{marginTop:o.y}),mouse&&(o.up&&o.y>o.downEnd||!o.up&&o.y0;t.dataSM("scroll-arrows").eq(i?0:1).is(":visible")&&(t.dataSM("scroll").up=i,this.menuScroll(t,!0))}e.preventDefault()},menuScrollOut:function(t,e){mouse&&(/^scroll-(up|down)/.test((e.relatedTarget||"").className)||(t[0]==e.relatedTarget||$.contains(t[0],e.relatedTarget))&&this.getClosestMenu(e.relatedTarget)==t[0]||t.dataSM("scroll-arrows").css("visibility","hidden"))},menuScrollOver:function(t,e){if(mouse&&!/^scroll-(up|down)/.test(e.target.className)&&this.getClosestMenu(e.target)==t[0]){this.menuScrollRefreshData(t);var i=t.dataSM("scroll"),s=$(window).scrollTop()-t.dataSM("parent-a").offset().top-i.itemH;t.dataSM("scroll-arrows").eq(0).css("margin-top",s).end().eq(1).css("margin-top",s+this.getViewportHeight()-i.arrowDownH).end().css("visibility","visible")}},menuScrollRefreshData:function(t){var e=t.dataSM("scroll"),i=$(window).scrollTop()-t.dataSM("parent-a").offset().top-e.itemH;this.cssTransforms3d&&(i=-(parseFloat(t.css("margin-top"))-i)),$.extend(e,{upEnd:i,downEnd:i+this.getViewportHeight()-e.subH})},menuScrollStop:function(t){return this.scrollTimeout?(cancelAnimationFrame(this.scrollTimeout),this.scrollTimeout=0,t.dataSM("scroll").step=1,!0):void 0},menuScrollTouch:function(t,e){if(e=e.originalEvent,isTouchEvent(e)){var i=this.getTouchPoint(e);if(this.getClosestMenu(i.target)==t[0]){var s=t.dataSM("scroll");if(/(start|down)$/i.test(e.type))this.menuScrollStop(t)?(e.preventDefault(),this.$touchScrollingSub=t):this.$touchScrollingSub=null,this.menuScrollRefreshData(t),$.extend(s,{touchStartY:i.pageY,touchStartTime:e.timeStamp});else if(/move$/i.test(e.type)){var o=void 0!==s.touchY?s.touchY:s.touchStartY;if(void 0!==o&&o!=i.pageY){this.$touchScrollingSub=t;var a=i.pageY>o;void 0!==s.up&&s.up!=a&&$.extend(s,{touchStartY:i.pageY,touchStartTime:e.timeStamp}),$.extend(s,{up:a,touchY:i.pageY}),this.menuScroll(t,!0,Math.abs(i.pageY-o))}e.preventDefault()}else void 0!==s.touchY&&((s.momentum=15*Math.pow(Math.abs(i.pageY-s.touchStartY)/(e.timeStamp-s.touchStartTime),2))&&(this.menuScrollStop(t),this.menuScroll(t),e.preventDefault()),delete s.touchY)}}},menuShow:function(t){if((t.dataSM("beforefirstshowfired")||(t.dataSM("beforefirstshowfired",!0),this.$root.triggerHandler("beforefirstshow.smapi",t[0])!==!1))&&this.$root.triggerHandler("beforeshow.smapi",t[0])!==!1&&(t.dataSM("shown-before",!0),canAnimate&&t.stop(!0,!0),!t.is(":visible"))){var e=t.dataSM("parent-a"),i=this.isCollapsible();if((this.opts.keepHighlighted||i)&&e.addClass("highlighted"),i)t.removeClass("sm-nowrap").css({zIndex:"",width:"auto",minWidth:"",maxWidth:"",top:"",left:"",marginLeft:"",marginTop:""});else{if(t.css("z-index",this.zIndexInc=(this.zIndexInc||this.getStartZIndex())+1),(this.opts.subMenusMinWidth||this.opts.subMenusMaxWidth)&&(t.css({width:"auto",minWidth:"",maxWidth:""}).addClass("sm-nowrap"),this.opts.subMenusMinWidth&&t.css("min-width",this.opts.subMenusMinWidth),this.opts.subMenusMaxWidth)){var s=this.getWidth(t);t.css("max-width",this.opts.subMenusMaxWidth),s>this.getWidth(t)&&t.removeClass("sm-nowrap").css("width",this.opts.subMenusMaxWidth)}this.menuPosition(t)}var o=function(){t.css("overflow","")};i?canAnimate&&this.opts.collapsibleShowFunction?this.opts.collapsibleShowFunction.call(this,t,o):t.show(this.opts.collapsibleShowDuration,o):canAnimate&&this.opts.showFunction?this.opts.showFunction.call(this,t,o):t.show(this.opts.showDuration,o),e.attr("aria-expanded","true"),t.attr({"aria-expanded":"true","aria-hidden":"false"}),this.visibleSubMenus.push(t),this.$root.triggerHandler("show.smapi",t[0])}},popupHide:function(t){this.hideTimeout&&(clearTimeout(this.hideTimeout),this.hideTimeout=0);var e=this;this.hideTimeout=setTimeout(function(){e.menuHideAll()},t?1:this.opts.hideTimeout)},popupShow:function(t,e){if(!this.opts.isPopup)return alert('SmartMenus jQuery Error:\n\nIf you want to show this menu via the "popupShow" method, set the isPopup:true option.'),void 0;if(this.hideTimeout&&(clearTimeout(this.hideTimeout),this.hideTimeout=0),this.$root.dataSM("shown-before",!0),canAnimate&&this.$root.stop(!0,!0),!this.$root.is(":visible")){this.$root.css({left:t,top:e});var i=this,s=function(){i.$root.css("overflow","")};canAnimate&&this.opts.showFunction?this.opts.showFunction.call(this,this.$root,s):this.$root.show(this.opts.showDuration,s),this.visibleSubMenus[0]=this.$root}},refresh:function(){this.destroy(!0),this.init(!0)},rootKeyDown:function(t){if(this.handleEvents())switch(t.keyCode){case 27:var e=this.activatedItems[0];if(e){this.menuHideAll(),e[0].focus();var i=e.dataSM("sub");i&&this.menuHide(i)}break;case 32:var s=$(t.target);if(s.is("a")&&this.handleItemEvents(s)){var i=s.dataSM("sub");i&&!i.is(":visible")&&(this.itemClick({currentTarget:t.target}),t.preventDefault())}}},rootOut:function(t){if(this.handleEvents()&&!this.isTouchMode()&&t.target!=this.$root[0]&&(this.hideTimeout&&(clearTimeout(this.hideTimeout),this.hideTimeout=0),!this.opts.showOnClick||!this.opts.hideOnClick)){var e=this;this.hideTimeout=setTimeout(function(){e.menuHideAll()},this.opts.hideTimeout)}},rootOver:function(t){this.handleEvents()&&!this.isTouchMode()&&t.target!=this.$root[0]&&this.hideTimeout&&(clearTimeout(this.hideTimeout),this.hideTimeout=0)},winResize:function(t){if(this.handleEvents()){if(!("onorientationchange"in window)||"orientationchange"==t.type){var e=this.isCollapsible();this.wasCollapsible&&e||(this.activatedItems.length&&this.activatedItems[this.activatedItems.length-1][0].blur(),this.menuHideAll()),this.wasCollapsible=e}}else if(this.$disableOverlay){var i=this.$root.offset();this.$disableOverlay.css({top:i.top,left:i.left,width:this.$root.outerWidth(),height:this.$root.outerHeight()})}}}}),$.fn.dataSM=function(t,e){return e?this.data(t+"_smartmenus",e):this.data(t+"_smartmenus")},$.fn.removeDataSM=function(t){return this.removeData(t+"_smartmenus")},$.fn.smartmenus=function(options){if("string"==typeof options){var args=arguments,method=options;return Array.prototype.shift.call(args),this.each(function(){var t=$(this).data("smartmenus");t&&t[method]&&t[method].apply(t,args)})}return this.each(function(){var dataOpts=$(this).data("sm-options")||null;if(dataOpts)try{dataOpts=eval("("+dataOpts+")")}catch(e){dataOpts=null,alert('ERROR\n\nSmartMenus jQuery init:\nInvalid "data-sm-options" attribute value syntax.')}new $.SmartMenus(this,$.extend({},$.fn.smartmenus.defaults,options,dataOpts))})},$.fn.smartmenus.defaults={isPopup:!1,mainMenuSubOffsetX:0,mainMenuSubOffsetY:0,subMenusSubOffsetX:0,subMenusSubOffsetY:0,subMenusMinWidth:"10em",subMenusMaxWidth:"20em",subIndicators:!0,subIndicatorsPos:"append",subIndicatorsText:"",scrollStep:30,scrollAccelerate:!0,showTimeout:250,hideTimeout:500,showDuration:0,showFunction:null,hideDuration:0,hideFunction:function(t,e){t.fadeOut(200,e)},collapsibleShowDuration:0,collapsibleShowFunction:function(t,e){t.slideDown(200,e)},collapsibleHideDuration:0,collapsibleHideFunction:function(t,e){t.slideUp(200,e)},showOnClick:!1,hideOnClick:!0,noMouseOver:!1,keepInViewport:!0,keepHighlighted:!0,markCurrentItem:!1,markCurrentTree:!0,rightToLeftSubMenus:!1,bottomToTopSubMenus:!1,collapsibleBehavior:"default"},$}); \ No newline at end of file diff --git a/versions/v5.0.1/md__2github_2workspace_2source_2modulo__components_2_r_e_a_d_m_e.html b/versions/v5.0.1/md__2github_2workspace_2source_2modulo__components_2_r_e_a_d_m_e.html new file mode 100644 index 00000000..04d3fb84 --- /dev/null +++ b/versions/v5.0.1/md__2github_2workspace_2source_2modulo__components_2_r_e_a_d_m_e.html @@ -0,0 +1,101 @@ + + + + + + + +Modulo: Modulo Components + + + + + + + + + +
+
+ + + + + + +
+
Modulo 5.0.0 +
+
+
+ + + + + + + + +
+
+ + +
+
+
+
+
+
Loading...
+
Searching...
+
No Matches
+
+
+
+
+ +
+
+
Modulo Components
+
+
+

This package provides base component classes as wrappers for ROS2 Nodes for convenience and consistency when developing modules for a dynamically composed application.

+

Component

+

The modulo_components::Component (C++) and modulo_components.Component (Python) classes are wrappers for the standard ROS Node that simplify application composition through unified component interfaces.

+

This class is intended for direct inheritance to implement custom components that perform one-shot or externally triggered operations. Examples of triggered behavior include providing a service, processing signals or publishing outputs on a periodic timer. One-shot behaviors may include interacting with the filesystem or publishing a predefined sequence of outputs.

+

Developers should override on_validate_parameter_callback() if any parameters are added and on_execute_callback() to implement any one-shot behavior. In the latter case, execute() should be invoked at the end of the derived constructor.

+

LifecycleComponent

+

The modulo_components::Component (C++) and modulo_components.Component (Python) classes are state-based alternatives that follow the lifecycle pattern for managed nodes.

+

This class is intended for direct inheritance to implement custom state-based components that perform different behaviors based on their state and on state transitions. An example of state-based behaviour is a signal component that requires configuration steps to determine which inputs to register and subsequently should publish outputs only when the component is activated.

+

Developers should override on_validate_parameter_callback() if any parameters are added. In addition, the following state transition callbacks should be overridden whenever custom transition behavior is needed:

    +
  • on_configure_callback()
  • +
  • on_activate_callback()
  • +
  • on_deactivate_callback()
  • +
  • on_cleanup_callback()
  • +
  • on_shutdown_callback()
  • +
  • on_error_callback()
  • +
  • on_step_callback()
  • +
+

Further reading

+

See the generated C++ documentation for more details. Refer to the AICA Component SDK for usage examples and templates for creating custom components.

+
+
+ + + + diff --git a/versions/v5.0.1/md__2github_2workspace_2source_2modulo__controllers_2_r_e_a_d_m_e.html b/versions/v5.0.1/md__2github_2workspace_2source_2modulo__controllers_2_r_e_a_d_m_e.html new file mode 100644 index 00000000..cd8463f5 --- /dev/null +++ b/versions/v5.0.1/md__2github_2workspace_2source_2modulo__controllers_2_r_e_a_d_m_e.html @@ -0,0 +1,123 @@ + + + + + + + +Modulo: modulo-controllers + + + + + + + + + +
+
+ + + + + + +
+
Modulo 5.0.0 +
+
+
+ + + + + + + + +
+
+ + +
+
+
+
+
+
Loading...
+
Searching...
+
No Matches
+
+
+
+
+ +
+
+
modulo-controllers
+
+
+

ROS 2 control interface classes for controllers in the AICA framework.

+

ControllerInterface

+

This C++ class derives from ros2_control ControllerInterface and incorporates modulo concepts like inputs, outputs, parameters, predicates, and services.

+

It supports the following parameters:

+
    +
  • hardware_name [string]: the name of the hardware interface
  • +
  • robot_description [string]: the string formatted content of the controller's URDF description
  • +
  • joints [string_array]: a vector of joint names that the controller will claim
  • +
  • activation_timeout [double]: the seconds to wait for valid data on state interfaces before activating
  • +
  • input_validity_period [double]: the maximum age of an input state before discarding it as expired
  • +
+

General behavior

+

The controller will claim either all or individually added state interfaces and individually added command interfaces. The class is intended to be used as a base class to implement any kind of controller.

+

The activation_timeout parameter gives the controller plugin and hardware interface additional time to read the initial states to prevent any NaN data from propagating through to the control logic.

+

RobotControllerInterface

+

The RobotControllerInterface is derived from the ControllerInterface. It incorporates JointState and CartesianState classes to leverage the robot_model::Model class for forward and inverse kinematics, and supports force-torque sensor data in CartesianWrench format.

+

Joints and control type

+

On top of any other individually added state interfaces, the controller will claim state interfaces matching the named joints, and read this state data into a JointState object.

+

It will claim individual command interfaces from the hardware interface according to the named joints and the specified control_type given to the class at construction. The hardware_name parameter determines the name of the JointState object.

+

This class is intended to be used as a base class to implement joint and task space controllers. They can set the joint command or access the joint state using the set_joint_command() and get_joint_state() methods, respectively.

+

Robot model and URDF

+

If a controller needs a robot model, a robot_model::Model will be configured from URDF information. To support this, the robot_description must be specified.

+

The robot model is used to calculate the CartesianState of a task frame from the JointState using forward kinematics, which is available to derived classes using the get_cartesian_state() method.

+

The task frame can be specified using the task_space_frame parameter. If left empty, the final link of the robot model will be used.

+

In certain cases, the joints parameter might not be in a physically correct order; for example, they might be sorted alphabetically, which makes the corresponding JointState incompatible with the actual order of joints in a robot system. If set to true, the sort_joints parameter orders the joint names to be physically correct using the robot model data.

+

Derived controllers can also access and leverage the robot model for more advanced behaviors such as inverse kinematics.

+

Force-Torque Sensor

+

If the ft_sensor_name and ft_sensor_reference_frame parameters are set, the controller will look for a matching sensor with the following state interfaces:

+
    +
  • force.x
  • +
  • force.y
  • +
  • force.z
  • +
  • torque.x
  • +
  • torque.y
  • +
  • torque.z
  • +
+

Derived controllers can use get_ft_sensor() to access a CartesianWrench object of the sensor data. If the ft_sensor_reference_frame matches the task_space_frame, the measured wrench will additionally be transformed to the robot base frame and applied to the Cartesian state of the robot that is available through get_cartesian_state().

+

General behavior

+

The command_half_life parameter is used to attenuate any dynamic commands (velocities, accelerations or torques) in case no new commands are received (i.e. if set_joint_command() was not called since the last controller update).

+

At each control step, the last command is scaled by a decay factor to cause an exponential fall-off towards zero. The decay factor is calculated in terms of the desired command half-life based on the control frequency. At the half-life time, the command value will be reduced by half. For example, a controller with a command half-life of 0.1 seconds will have the output command reduced by 50%, 25%, 12.5% and 6.25% at 0.1, 0.2, 0.3 and 0.4 seconds respectively.

+

The command_rate_limit parameter sets an upper bound on how much a command interface value can change at each control step. It is expressed in units per second. For example, a controller with a rate limit of 5.0 commanding the joint velocity interface at 100Hz (a control period of 0.01 seconds) will only allow the joint velocity to change by up to 0.05 radians per second at each control step, or at 5.0 radians per second, per second.

+
+
+ + + + diff --git a/versions/v5.0.1/md__2github_2workspace_2source_2modulo__core_2_r_e_a_d_m_e.html b/versions/v5.0.1/md__2github_2workspace_2source_2modulo__core_2_r_e_a_d_m_e.html new file mode 100644 index 00000000..07185536 --- /dev/null +++ b/versions/v5.0.1/md__2github_2workspace_2source_2modulo__core_2_r_e_a_d_m_e.html @@ -0,0 +1,191 @@ + + + + + + + +Modulo: Modulo Core + + + + + + + + + +
+
+ + + + + + +
+
Modulo 5.0.0 +
+
+
+ + + + + + + + +
+
+ + +
+
+
+
+
+
Loading...
+
Searching...
+
No Matches
+
+
+
+
+ +
+
+
Modulo Core
+
+
+

Modulo Core is an interface package to support the interoperability of the Robot Operating System (ROS) with AICA control libraries by providing communication and translation utilities.

+

This package is specifically designed for ROS2 and was developed on Galactic Geochelone.

+

Communication

+

In ROS, applications communicate through publishers and subscribers. Communication is handled in a particular format (a ROS message), which includes a serialized representation of the data as well as a message header. For example, data of type bool maps to the standard message std_msgs::msg::Bool.

+

If application A wishes to send data to application B, a publisher of A and a subscriber of B must be configured to the same ROS message type. The data is written into the message format and published by A. B receives the message and can read the data back out.

+

MessagePair

+

The communication module simplifies the process of sending and receiving data by binding data types to their respective message types in a MessagePair. MessagePair objects are templated containers holding a pointer to the data. With a MessagePair instance, it is possible to set and get the data or read and write the corresponding message with simple access methods. The conversion between the data and the message when reading or writing is handled by the translators module.

+

MessageType

+

The supported groupings of data types and message types is defined by the MessageType enumeration. See the MessageType header file.

+ + + + + + + + + + + + + + + +
MessageType C++ data type ROS message type
BOOL bool std_msgs::msgs::Bool
INT32 int std_msgs::msgs::Int32
FLOAT64 double std_msgs::msgs::FLOAT64
FLOAT64_MUlTI_ARRAY std::vector<double> std_msgs::msgs::FLOAT64MultiArray
STRING std::string std_msgs::msgs::String
ENCODED_STATE state_representation::State modulo_interfaces::msg::EncodedState
+

Encoded State

+

The ENCODED_STATE type supports all classes in the family of state_representation::State. It uses the clproto serialization library from control_libraries to encode State type messages to and from a binary format.

+

The helper function state_representation::make_shared_state(state_instance) can be used to inject any State-derived instance in a std::shared_ptr<state_representation::State> pointer for the MessagePair.

+

MessagePairInterface

+

As MessagePair instances need to be templated by the data type and message type, they can be somewhat verbose to manage directly. For example, storing multiple MessagePair instances in a container or passing them as function arguments would require additional templating.

+

The MessagePairInterface is the non-templated base class of the MessagePair. By injecting a reference to a MessagePair into a MessagePairInterface pointer, it is possible to manage any MessagePair in a generic, type-agnostic way.

+

The MessageType property of the MessagePairInterface allows introspection of the contained MessagePair type, and, through dynamic down-casting, both the MessagePair instance and contained data may be retrieved.

+

Publisher and Subscription Interfaces

+

To send and receive ROS messages, applications must create publishers and subscribers templated to the corresponding ROS message type. A ROS publisher provides a publish method which takes a ROS message as the argument. A ROS subscription forwards an incoming ROS message to a callback function.

+

By virtue of the MessagePair design pattern, the underlying ROS message types can be fully encapsulated and hidden from the user, allowing applications to simply publish and subscribe to supported data types.

+

Publisher

+

The PublisherHandler is a templated wrapper for a ROS publisher that additionally holds a MessagePair reference. This allows the user to invoke a publish() method without having to pass a ROS message as an argument. Instead, the data referenced by the MessagePair is automatically translated into a ROS message and published.

+

The PublisherHandler supports multiple publisher types, namely for standard or lifecycle publishers.

+

The intended pattern for the developer is shown below. There are a few more setup steps compared to creating a standard ROS publisher. However, once the publisher interface has been established, modifying and publishing the referenced data is greatly simplified.

+
++
+ +
typedef std_msgs::msg::FLOAT64 MsgT;
+
auto node = std::make_shared<rclcpp::Node>("example");
+
+
// hold a pointer reference to some data that should be published
+
auto data = std::make_shared<double>(1.0);
+
+
// make a MessagePair to bind the data pointer to the corresponding ROS message
+
auto message_pair = std::make_shared<MessagePair<MsgT, double>>(data, rclcpp::Clock());
+
+
// create the ROS publisher
+
auto publisher = node->create_publisher<MsgT>("topic", 10);
+
+
// create the PublisherHandler from the ROS publisher
+
auto publisher_handler =
+
std::make_shared<PublisherHandler<rclcpp::Publisher<MsgT>, MsgT>>(PublisherType::PUBLISHER, publisher);
+
+
// encapsulate the PublisherHandler in a PublisherInterface
+
std::shared_ptr<PublisherInterface> publisher_interface(publisher_handler);
+
+
// pass the MessagePair to the PublisherInterface
+
publisher_interface->set_message_pair(message_pair);
+
+
// now, the data can be published, with automatic translation of the data value into a ROS message
+
publisher_interface->publish();
+
+
// because the PublisherInterface holds a reference to the MessagePair, which in turn references the original data,
+
// any changes to the data value will be observed when publishing.
+
*data = 2.0;
+
publisher_interface->publish();
+
Modulo Core communication module for handling messages on publication and subscription interfaces.
+

Subscription

+

The SubscriptionHandler is a templated wrapper for a ROS subscription that additionally holds a MessagePair reference. When the subscription receives a message, the SubscriptionHandler callback automatically translates the ROS message and updates the value of the data referenced by the MessagePair.

+
++
+ +
typedef std_msgs::msg::FLOAT64 MsgT;
+
auto node = std::make_shared<rclcpp::Node>("example");
+
+
// hold a pointer reference to some data that should be published
+
auto data = std::make_shared<double>(1.0);
+
+
// make a MessagePair to bind the data pointer to the corresponding ROS message
+
auto message_pair = std::make_shared<MessagePair<MsgT, double>>(data, rclcpp::Clock());
+
+
// create the SubscriptionHandler
+
auto subscription_handler = std::make_shared<SubscriptionHandler<modulo_core::EncodedState>>(message_pair);
+
+
// create the ROS subscription and associate the SubscriptionHandler callback
+
auto subscription = node->create_subscription<modulo_core::EncodedState>(
+
"topic", 10, subscription_handler->get_callback());
+
+
// encapsulate the SubscriptionHandler in a SubscriptionInterface
+
auto subscription_interface = subscription_handler->create_subscription_interface(subscription);
+
+
// because the SubscriptionInterface holds a reference to the MessagePair, which in turn references the original data,
+
// any received ROS message will be translated to update the referenced data value
+
wait_until_some_subscription_received();
+
assert(*data == 2.0);
+

Translators

+

The translation module provides functions to convert between ROS2 and state_representation data types.

+

Message Translators

+

As described in the Communication section, the ROS framework uses specific message formats to send data between applications. Wrapping and unwrapping the data values to and from the ROS message is handled by the message translators.

+

The message readers set the value of a particular data type from the corresponding ROS message instance.

+

The message writers format the value of a data type into the corresponding ROS message instance.

+

Parameter Translators

+

Conceptually, parameters are a way to label and transfer data with a name-value relationship. A parameter has a name and a data value of a particular data type. On an interface level, this allows parameter values to be retrieved or written by name in order to determine or configure the behaviour of particular elements.

+

The ROS Parameter is a specific implementation of the parameter concept which, together with the ParameterMessage, can be used to read and write named parameters on application nodes through the ROS interface. The ROS Parameter supports only simple types (atomic types, strings and arrays).

+

The control libraries state_representation::Parameter is another implementation that supports more data types, including State-derived objects and matrices.

+

The parameter translator utilities in modulo_core::translators convert between ROS and state_representation parameter formats, so that parameters can be sent on the ROS interface but consumed as state_representation objects locally.

+
+
+ + + + diff --git a/versions/v5.0.1/md__2github_2workspace_2source_2modulo__interfaces_2_r_e_a_d_m_e.html b/versions/v5.0.1/md__2github_2workspace_2source_2modulo__interfaces_2_r_e_a_d_m_e.html new file mode 100644 index 00000000..c60a7814 --- /dev/null +++ b/versions/v5.0.1/md__2github_2workspace_2source_2modulo__interfaces_2_r_e_a_d_m_e.html @@ -0,0 +1,97 @@ + + + + + + + +Modulo: Modulo Interfaces + + + + + + + + + +
+
+ + + + + + +
+
Modulo 5.0.0 +
+
+
+ + + + + + + + +
+
+ + +
+
+
+
+
+
Loading...
+
Searching...
+
No Matches
+
+
+
+
+ +
+
+
Modulo Interfaces
+
+
+

This package defines custom standard interfaces for modulo classes.

+

Messages

+

Modulo classes broadcast predicates to a global channel in a predicate message.

+

EncodedState

+

The encoded state message contains state_representation::State classes as binary format after serialization with clproto.

+

Predicate

+

The predicate message contains the predicate name and the current value (true or false) of the predicate.

+

PredicateCollection

+

The predicate collection message contains a vector of predicate messages as well as the name of the node that emits the predicates.

+

Services

+

Modulo classes provide a simplified method to add services which trigger a pre-defined callback function. Services are either empty (with no request payload) or carry a string request. They return a common modulo_components::ComponentServiceResponse structure with a success flag and status message.

+

EmptyTrigger

+

The EmptyTrigger service request takes no parameters. The response contains a boolean success flag and a string message.

+

StringTrigger

+

The EmptyTrigger service request takes a string payload. The response contains a boolean success flag and a string message. It is the responsibility of the component to define the expected payload format and to document it appropriately.

+
+
+ + + + diff --git a/versions/v5.0.1/md__2github_2workspace_2source_2modulo__utils_2_r_e_a_d_m_e.html b/versions/v5.0.1/md__2github_2workspace_2source_2modulo__utils_2_r_e_a_d_m_e.html new file mode 100644 index 00000000..831a3931 --- /dev/null +++ b/versions/v5.0.1/md__2github_2workspace_2source_2modulo__utils_2_r_e_a_d_m_e.html @@ -0,0 +1,83 @@ + + + + + + + +Modulo: Modulo Utils + + + + + + + + + +
+
+ + + + + + +
+
Modulo 5.0.0 +
+
+
+ + + + + + + + +
+
+ + +
+
+
+
+
+
Loading...
+
Searching...
+
No Matches
+
+
+
+
+ +
+
+
Modulo Utils
+
+
+

Utils package for shared test fixtures

+
+
+ + + + diff --git a/versions/v5.0.1/menu.js b/versions/v5.0.1/menu.js new file mode 100644 index 00000000..b0b26936 --- /dev/null +++ b/versions/v5.0.1/menu.js @@ -0,0 +1,136 @@ +/* + @licstart The following is the entire license notice for the JavaScript code in this file. + + The MIT License (MIT) + + Copyright (C) 1997-2020 by Dimitri van Heesch + + Permission is hereby granted, free of charge, to any person obtaining a copy of this software + and associated documentation files (the "Software"), to deal in the Software without restriction, + including without limitation the rights to use, copy, modify, merge, publish, distribute, + sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is + furnished to do so, subject to the following conditions: + + The above copyright notice and this permission notice shall be included in all copies or + substantial portions of the Software. + + THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING + BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND + NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, + DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, + OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. + + @licend The above is the entire license notice for the JavaScript code in this file + */ +function initMenu(relPath,searchEnabled,serverSide,searchPage,search) { + function makeTree(data,relPath) { + var result=''; + if ('children' in data) { + result+='
    '; + for (var i in data.children) { + var url; + var link; + link = data.children[i].url; + if (link.substring(0,1)=='^') { + url = link.substring(1); + } else { + url = relPath+link; + } + result+='
  • '+ + data.children[i].text+''+ + makeTree(data.children[i],relPath)+'
  • '; + } + result+='
'; + } + return result; + } + var searchBoxHtml; + if (searchEnabled) { + if (serverSide) { + searchBoxHtml='
'+ + '
'+ + '
 '+ + ''+ + '
'+ + '
'+ + '
'+ + '
'; + } else { + searchBoxHtml='
'+ + ''+ + ' '+ + ''+ + ''+ + ''+ + ''+ + ''+ + '
'; + } + } + + $('#main-nav').before('
'+ + ''+ + ''+ + '
'); + $('#main-nav').append(makeTree(menudata,relPath)); + $('#main-nav').children(':first').addClass('sm sm-dox').attr('id','main-menu'); + if (searchBoxHtml) { + $('#main-menu').append('
  • '); + } + var $mainMenuState = $('#main-menu-state'); + var prevWidth = 0; + if ($mainMenuState.length) { + function initResizableIfExists() { + if (typeof initResizable==='function') initResizable(); + } + // animate mobile menu + $mainMenuState.change(function(e) { + var $menu = $('#main-menu'); + var options = { duration: 250, step: initResizableIfExists }; + if (this.checked) { + options['complete'] = function() { $menu.css('display', 'block') }; + $menu.hide().slideDown(options); + } else { + options['complete'] = function() { $menu.css('display', 'none') }; + $menu.show().slideUp(options); + } + }); + // set default menu visibility + function resetState() { + var $menu = $('#main-menu'); + var $mainMenuState = $('#main-menu-state'); + var newWidth = $(window).outerWidth(); + if (newWidth!=prevWidth) { + if ($(window).outerWidth()<768) { + $mainMenuState.prop('checked',false); $menu.hide(); + $('#searchBoxPos1').html(searchBoxHtml); + $('#searchBoxPos2').hide(); + } else { + $menu.show(); + $('#searchBoxPos1').empty(); + $('#searchBoxPos2').html(searchBoxHtml); + $('#searchBoxPos2').show(); + } + if (typeof searchBox!=='undefined') { + searchBox.CloseResultsWindow(); + } + prevWidth = newWidth; + } + } + $(window).ready(function() { resetState(); initResizableIfExists(); }); + $(window).resize(resetState); + } + $('#main-menu').smartmenus(); +} +/* @license-end */ diff --git a/versions/v5.0.1/menudata.js b/versions/v5.0.1/menudata.js new file mode 100644 index 00000000..58a0c2cc --- /dev/null +++ b/versions/v5.0.1/menudata.js @@ -0,0 +1,93 @@ +/* + @licstart The following is the entire license notice for the JavaScript code in this file. + + The MIT License (MIT) + + Copyright (C) 1997-2020 by Dimitri van Heesch + + Permission is hereby granted, free of charge, to any person obtaining a copy of this software + and associated documentation files (the "Software"), to deal in the Software without restriction, + including without limitation the rights to use, copy, modify, merge, publish, distribute, + sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is + furnished to do so, subject to the following conditions: + + The above copyright notice and this permission notice shall be included in all copies or + substantial portions of the Software. + + THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING + BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND + NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, + DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, + OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. + + @licend The above is the entire license notice for the JavaScript code in this file +*/ +var menudata={children:[ +{text:"Main Page",url:"index.html"}, +{text:"Related Pages",url:"pages.html"}, +{text:"Namespaces",url:"namespaces.html",children:[ +{text:"Namespace List",url:"namespaces.html"}, +{text:"Namespace Members",url:"namespacemembers.html",children:[ +{text:"All",url:"namespacemembers.html",children:[ +{text:"c",url:"namespacemembers.html#index_c"}, +{text:"g",url:"namespacemembers.html#index_g"}, +{text:"m",url:"namespacemembers.html#index_m"}, +{text:"p",url:"namespacemembers.html#index_p"}, +{text:"r",url:"namespacemembers.html#index_r"}, +{text:"s",url:"namespacemembers.html#index_s"}, +{text:"w",url:"namespacemembers.html#index_w"}]}, +{text:"Functions",url:"namespacemembers_func.html",children:[ +{text:"c",url:"namespacemembers_func.html#index_c"}, +{text:"g",url:"namespacemembers_func.html#index_g"}, +{text:"r",url:"namespacemembers_func.html#index_r"}, +{text:"s",url:"namespacemembers_func.html#index_s"}, +{text:"w",url:"namespacemembers_func.html#index_w"}]}, +{text:"Enumerations",url:"namespacemembers_enum.html"}]}]}, +{text:"Concepts",url:"concepts.html"}, +{text:"Classes",url:"annotated.html",children:[ +{text:"Class List",url:"annotated.html"}, +{text:"Class Index",url:"classes.html"}, +{text:"Class Hierarchy",url:"hierarchy.html"}, +{text:"Class Members",url:"functions.html",children:[ +{text:"All",url:"functions.html",children:[ +{text:"a",url:"functions.html#index_a"}, +{text:"b",url:"functions.html#index_b"}, +{text:"c",url:"functions.html#index_c"}, +{text:"d",url:"functions.html#index_d"}, +{text:"e",url:"functions.html#index_e"}, +{text:"f",url:"functions.html#index_f"}, +{text:"g",url:"functions.html#index_g"}, +{text:"h",url:"functions.html#index_h"}, +{text:"i",url:"functions.html#index_i"}, +{text:"l",url:"functions.html#index_l"}, +{text:"m",url:"functions.html#index_m"}, +{text:"o",url:"functions.html#index_o"}, +{text:"p",url:"functions.html#index_p"}, +{text:"r",url:"functions.html#index_r"}, +{text:"s",url:"functions.html#index_s"}, +{text:"t",url:"functions.html#index_t"}, +{text:"u",url:"functions.html#index_u"}, +{text:"w",url:"functions.html#index_w"}, +{text:"~",url:"functions.html#index__7E"}]}, +{text:"Functions",url:"functions_func.html",children:[ +{text:"a",url:"functions_func.html#index_a"}, +{text:"b",url:"functions_func.html#index_b"}, +{text:"c",url:"functions_func.html#index_c"}, +{text:"d",url:"functions_func.html#index_d"}, +{text:"e",url:"functions_func.html#index_e"}, +{text:"f",url:"functions_func.html#index_f"}, +{text:"g",url:"functions_func.html#index_g"}, +{text:"i",url:"functions_func.html#index_i"}, +{text:"l",url:"functions_func.html#index_l"}, +{text:"m",url:"functions_func.html#index_m"}, +{text:"o",url:"functions_func.html#index_o"}, +{text:"p",url:"functions_func.html#index_p"}, +{text:"r",url:"functions_func.html#index_r"}, +{text:"s",url:"functions_func.html#index_s"}, +{text:"t",url:"functions_func.html#index_t"}, +{text:"u",url:"functions_func.html#index_u"}, +{text:"w",url:"functions_func.html#index_w"}, +{text:"~",url:"functions_func.html#index__7E"}]}, +{text:"Variables",url:"functions_vars.html"}]}]}, +{text:"Files",url:"files.html",children:[ +{text:"File List",url:"files.html"}]}]} diff --git a/versions/v5.0.1/message__readers_8cpp_source.html b/versions/v5.0.1/message__readers_8cpp_source.html new file mode 100644 index 00000000..1aedb9bc --- /dev/null +++ b/versions/v5.0.1/message__readers_8cpp_source.html @@ -0,0 +1,229 @@ + + + + + + + +Modulo: /github/workspace/source/modulo_core/src/translators/message_readers.cpp Source File + + + + + + + + + +
    +
    + + + + + + +
    +
    Modulo 5.0.0 +
    +
    +
    + + + + + + + + + +
    +
    + + +
    +
    +
    +
    +
    +
    Loading...
    +
    Searching...
    +
    No Matches
    +
    +
    +
    +
    + + +
    +
    +
    message_readers.cpp
    +
    +
    +
    1#include "modulo_core/translators/message_readers.hpp"
    +
    2
    + +
    4
    +
    5static Eigen::Vector3d read_point(const geometry_msgs::msg::Point& message) {
    +
    6 return {message.x, message.y, message.z};
    +
    7}
    +
    8
    +
    9static Eigen::Vector3d read_vector3(const geometry_msgs::msg::Vector3& message) {
    +
    10 return {message.x, message.y, message.z};
    +
    11}
    +
    12
    +
    13static Eigen::Quaterniond read_quaternion(const geometry_msgs::msg::Quaternion& message) {
    +
    14 return {message.w, message.x, message.y, message.z};
    +
    15}
    +
    16
    +
    +
    17void read_message(state_representation::CartesianState& state, const geometry_msgs::msg::Accel& message) {
    +
    18 state.set_linear_acceleration(read_vector3(message.linear));
    +
    19 state.set_angular_acceleration(read_vector3(message.angular));
    +
    20}
    +
    +
    21
    +
    +
    22void read_message(state_representation::CartesianState& state, const geometry_msgs::msg::AccelStamped& message) {
    +
    23 state.set_reference_frame(message.header.frame_id);
    +
    24 read_message(state, message.accel);
    +
    25}
    +
    +
    26
    +
    +
    27void read_message(state_representation::CartesianState& state, const geometry_msgs::msg::Pose& message) {
    +
    28 state.set_position(read_point(message.position));
    +
    29 state.set_orientation(read_quaternion(message.orientation));
    +
    30}
    +
    +
    31
    +
    +
    32void read_message(state_representation::CartesianState& state, const geometry_msgs::msg::PoseStamped& message) {
    +
    33 state.set_reference_frame(message.header.frame_id);
    +
    34 read_message(state, message.pose);
    +
    35}
    +
    +
    36
    +
    +
    37void read_message(state_representation::CartesianState& state, const geometry_msgs::msg::Transform& message) {
    +
    38 state.set_position(read_vector3(message.translation));
    +
    39 state.set_orientation(read_quaternion(message.rotation));
    +
    40}
    +
    +
    41
    +
    +
    42void read_message(state_representation::CartesianState& state, const geometry_msgs::msg::TransformStamped& message) {
    +
    43 state.set_reference_frame(message.header.frame_id);
    +
    44 state.set_name(message.child_frame_id);
    +
    45 read_message(state, message.transform);
    +
    46}
    +
    +
    47
    +
    +
    48void read_message(state_representation::CartesianState& state, const geometry_msgs::msg::Twist& message) {
    +
    49 state.set_linear_velocity(read_vector3(message.linear));
    +
    50 state.set_angular_velocity(read_vector3(message.angular));
    +
    51}
    +
    +
    52
    +
    +
    53void read_message(state_representation::CartesianState& state, const geometry_msgs::msg::TwistStamped& message) {
    +
    54 state.set_reference_frame(message.header.frame_id);
    +
    55 read_message(state, message.twist);
    +
    56}
    +
    +
    57
    +
    +
    58void read_message(state_representation::CartesianState& state, const geometry_msgs::msg::Wrench& message) {
    +
    59 state.set_force(read_vector3(message.force));
    +
    60 state.set_torque(read_vector3(message.torque));
    +
    61}
    +
    +
    62
    +
    +
    63void read_message(state_representation::CartesianState& state, const geometry_msgs::msg::WrenchStamped& message) {
    +
    64 state.set_reference_frame(message.header.frame_id);
    +
    65 read_message(state, message.wrench);
    +
    66}
    +
    +
    67
    +
    +
    68void read_message(state_representation::JointState& state, const sensor_msgs::msg::JointState& message) {
    +
    69 try {
    +
    70 state.set_names(message.name);
    +
    71 if (!message.position.empty()) {
    +
    72 state.set_positions(Eigen::VectorXd::Map(message.position.data(), message.position.size()));
    +
    73 }
    +
    74 if (!message.velocity.empty()) {
    +
    75 state.set_velocities(Eigen::VectorXd::Map(message.velocity.data(), message.velocity.size()));
    +
    76 }
    +
    77 if (!message.effort.empty()) {
    +
    78 state.set_torques(Eigen::VectorXd::Map(message.effort.data(), message.effort.size()));
    +
    79 }
    +
    80 } catch (const std::exception& ex) {
    + +
    82 }
    +
    83}
    +
    +
    84
    +
    +
    85void read_message(bool& state, const std_msgs::msg::Bool& message) {
    +
    86 state = message.data;
    +
    87}
    +
    +
    88
    +
    +
    89void read_message(double& state, const std_msgs::msg::Float64& message) {
    +
    90 state = message.data;
    +
    91}
    +
    +
    92
    +
    +
    93void read_message(std::vector<double>& state, const std_msgs::msg::Float64MultiArray& message) {
    +
    94 state = message.data;
    +
    95}
    +
    +
    96
    +
    +
    97void read_message(int& state, const std_msgs::msg::Int32& message) {
    +
    98 state = message.data;
    +
    99}
    +
    +
    100
    +
    +
    101void read_message(std::string& state, const std_msgs::msg::String& message) {
    +
    102 state = message.data;
    +
    103}
    +
    +
    104}// namespace modulo_core::translators
    +
    An exception class to notify that the translation of a ROS message failed.
    +
    Modulo Core translation module for converting between ROS2 and state_representation data types.
    +
    void read_message(state_representation::CartesianState &state, const geometry_msgs::msg::Accel &message)
    Convert a ROS geometry_msgs::msg::Accel to a CartesianState.
    +
    + + + + diff --git a/versions/v5.0.1/message__readers_8hpp_source.html b/versions/v5.0.1/message__readers_8hpp_source.html new file mode 100644 index 00000000..34e3885e --- /dev/null +++ b/versions/v5.0.1/message__readers_8hpp_source.html @@ -0,0 +1,451 @@ + + + + + + + +Modulo: /github/workspace/source/modulo_core/include/modulo_core/translators/message_readers.hpp Source File + + + + + + + + + +
    +
    + + + + + + +
    +
    Modulo 5.0.0 +
    +
    +
    + + + + + + + + + +
    +
    + + +
    +
    +
    +
    +
    +
    Loading...
    +
    Searching...
    +
    No Matches
    +
    +
    +
    +
    + + +
    +
    +
    message_readers.hpp
    +
    +
    +
    1#pragma once
    +
    2
    +
    3#include <set>
    +
    4
    +
    5#include <geometry_msgs/msg/accel_stamped.hpp>
    +
    6#include <geometry_msgs/msg/pose_stamped.hpp>
    +
    7#include <geometry_msgs/msg/transform_stamped.hpp>
    +
    8#include <geometry_msgs/msg/twist_stamped.hpp>
    +
    9#include <geometry_msgs/msg/wrench_stamped.hpp>
    +
    10#include <sensor_msgs/msg/joint_state.hpp>
    +
    11#include <std_msgs/msg/bool.hpp>
    +
    12#include <std_msgs/msg/float64.hpp>
    +
    13#include <std_msgs/msg/float64_multi_array.hpp>
    +
    14#include <std_msgs/msg/int32.hpp>
    +
    15#include <std_msgs/msg/string.hpp>
    +
    16
    +
    17#include <clproto.hpp>
    +
    18#include <state_representation/AnalogIOState.hpp>
    +
    19#include <state_representation/DigitalIOState.hpp>
    +
    20#include <state_representation/parameters/Parameter.hpp>
    +
    21#include <state_representation/space/Jacobian.hpp>
    +
    22#include <state_representation/space/cartesian/CartesianPose.hpp>
    +
    23#include <state_representation/space/joint/JointPositions.hpp>
    +
    24
    +
    25#include "modulo_core/EncodedState.hpp"
    +
    26#include "modulo_core/exceptions.hpp"
    +
    27
    +
    + +
    29
    +
    35void read_message(state_representation::CartesianState& state, const geometry_msgs::msg::Accel& message);
    +
    36
    +
    42void read_message(state_representation::CartesianState& state, const geometry_msgs::msg::AccelStamped& message);
    +
    43
    +
    49void read_message(state_representation::CartesianState& state, const geometry_msgs::msg::Pose& message);
    +
    50
    +
    56void read_message(state_representation::CartesianState& state, const geometry_msgs::msg::PoseStamped& message);
    +
    57
    +
    63void read_message(state_representation::CartesianState& state, const geometry_msgs::msg::Transform& message);
    +
    64
    +
    70void read_message(state_representation::CartesianState& state, const geometry_msgs::msg::TransformStamped& message);
    +
    71
    +
    77void read_message(state_representation::CartesianState& state, const geometry_msgs::msg::Twist& message);
    +
    78
    +
    84void read_message(state_representation::CartesianState& state, const geometry_msgs::msg::TwistStamped& message);
    +
    85
    +
    91void read_message(state_representation::CartesianState& state, const geometry_msgs::msg::Wrench& message);
    +
    92
    +
    98void read_message(state_representation::CartesianState& state, const geometry_msgs::msg::WrenchStamped& message);
    +
    99
    +
    105void read_message(state_representation::JointState& state, const sensor_msgs::msg::JointState& message);
    +
    106
    +
    114template<typename T, typename U>
    +
    +
    115void read_message(state_representation::Parameter<T>& state, const U& message) {
    +
    116 state.set_value(message.data);
    +
    117}
    +
    +
    118
    +
    124void read_message(bool& state, const std_msgs::msg::Bool& message);
    +
    125
    +
    131void read_message(double& state, const std_msgs::msg::Float64& message);
    +
    132
    +
    138void read_message(std::vector<double>& state, const std_msgs::msg::Float64MultiArray& message);
    +
    139
    +
    145void read_message(int& state, const std_msgs::msg::Int32& message);
    +
    146
    +
    152void read_message(std::string& state, const std_msgs::msg::String& message);
    +
    153
    +
    161template<typename T>
    +
    +
    162inline void read_message(T& state, const EncodedState& message) {
    +
    163 try {
    +
    164 std::string tmp(message.data.begin(), message.data.end());
    +
    165 state = clproto::decode<T>(tmp);
    +
    166 } catch (const std::exception& ex) {
    + +
    168 }
    +
    169}
    +
    +
    170
    +
    181template<typename T>
    +
    +
    182inline std::shared_ptr<T> safe_dynamic_pointer_cast(std::shared_ptr<state_representation::State>& state) {
    +
    183 auto derived_state_ptr = std::dynamic_pointer_cast<T>(state);
    +
    184 if (derived_state_ptr == nullptr) {
    + +
    186 "Dynamic casting of state " + state->get_name() + " failed.");
    +
    187 }
    +
    188 return derived_state_ptr;
    +
    189}
    +
    +
    190
    +
    201template<typename T>
    +
    + +
    203 std::shared_ptr<state_representation::State>& state, std::shared_ptr<state_representation::State>& new_state) {
    +
    204 auto derived_state_ptr = safe_dynamic_pointer_cast<T>(state);
    +
    205 auto received_state_ptr = safe_dynamic_pointer_cast<T>(new_state);
    +
    206 *derived_state_ptr = *received_state_ptr;
    +
    207}
    +
    +
    208
    +
    225template<typename StateT, typename NewStateT>
    +
    + +
    227 std::shared_ptr<state_representation::State>& state, std::shared_ptr<state_representation::State>& new_state,
    +
    228 std::function<void(StateT&, const NewStateT&)> conversion_callback = {}) {
    +
    229 auto derived_state_ptr = safe_dynamic_pointer_cast<StateT>(state);
    +
    230 auto derived_new_state_ptr = safe_dynamic_pointer_cast<NewStateT>(new_state);
    +
    231 StateT tmp_new_state;
    +
    232 tmp_new_state.set_name(derived_new_state_ptr->get_name());
    +
    233 tmp_new_state.set_reference_frame(derived_new_state_ptr->get_reference_frame());
    +
    234 if (!derived_new_state_ptr->is_empty()) {
    +
    235 if (conversion_callback) {
    +
    236 conversion_callback(tmp_new_state, *derived_new_state_ptr);
    +
    237 }
    +
    238 }
    +
    239 *derived_state_ptr = tmp_new_state;
    +
    240}
    +
    +
    241
    +
    258// FIXME(#77): rename this upon modulo 5.0
    +
    259template<typename StateT, typename NewStateT>
    +
    + +
    261 std::shared_ptr<state_representation::State>& state, std::shared_ptr<state_representation::State>& new_state,
    +
    262 std::function<void(StateT&, const NewStateT&)> conversion_callback = {}) {
    +
    263 auto derived_state_ptr = safe_dynamic_pointer_cast<StateT>(state);
    +
    264 auto derived_new_state_ptr = safe_dynamic_pointer_cast<NewStateT>(new_state);
    +
    265 StateT tmp_new_state(derived_new_state_ptr->get_name(), derived_new_state_ptr->get_names());
    +
    266 if (!derived_new_state_ptr->is_empty()) {
    +
    267 if (conversion_callback) {
    +
    268 conversion_callback(tmp_new_state, *derived_new_state_ptr);
    +
    269 }
    +
    270 }
    +
    271 *derived_state_ptr = tmp_new_state;
    +
    272}
    +
    +
    273
    +
    274template<>
    +
    275inline void read_message(std::shared_ptr<state_representation::State>& state, const EncodedState& message) {
    +
    276 using namespace state_representation;
    +
    277 std::string tmp(message.data.begin(), message.data.end());
    +
    278 std::shared_ptr<State> new_state;
    +
    279 try {
    +
    280 new_state = clproto::decode<std::shared_ptr<State>>(tmp);
    +
    281 } catch (const std::exception& ex) {
    +
    282 throw exceptions::MessageTranslationException(ex.what());
    +
    283 }
    +
    284 try {
    +
    285 switch (state->get_type()) {
    +
    286 case StateType::STATE: {
    +
    287 if (new_state->get_type() == StateType::STATE) {
    +
    288 *state = *new_state;
    +
    289 } else {
    +
    290 *state = State(new_state->get_name());
    +
    291 }
    +
    292 break;
    +
    293 }
    +
    294 case StateType::DIGITAL_IO_STATE: {
    +
    295 if (new_state->get_type() == StateType::DIGITAL_IO_STATE) {
    +
    296 safe_state_with_names_conversion<DigitalIOState, DigitalIOState>(
    +
    297 state, new_state, [](DigitalIOState& a, const DigitalIOState& b) { a.set_data(b.data()); });
    +
    298 } else {
    +
    299 safe_dynamic_cast<DigitalIOState>(state, new_state);
    +
    300 }
    +
    301 break;
    +
    302 }
    +
    303 case StateType::ANALOG_IO_STATE: {
    +
    304 if (new_state->get_type() == StateType::ANALOG_IO_STATE) {
    +
    305 safe_state_with_names_conversion<AnalogIOState, AnalogIOState>(
    +
    306 state, new_state, [](AnalogIOState& a, const AnalogIOState& b) { a.set_data(b.data()); });
    +
    307 } else {
    +
    308 safe_dynamic_cast<AnalogIOState>(state, new_state);
    +
    309 }
    +
    310 break;
    +
    311 }
    +
    312 case StateType::SPATIAL_STATE: {
    +
    313 std::set<StateType> spatial_state_types = {StateType::SPATIAL_STATE, StateType::CARTESIAN_STATE,
    +
    314 StateType::CARTESIAN_POSE, StateType::CARTESIAN_TWIST,
    +
    315 StateType::CARTESIAN_ACCELERATION, StateType::CARTESIAN_WRENCH};
    +
    316 if (spatial_state_types.find(new_state->get_type()) != spatial_state_types.cend()) {
    +
    317 safe_spatial_state_conversion<SpatialState, SpatialState>(state, new_state);
    +
    318 } else {
    +
    319 safe_dynamic_cast<SpatialState>(state, new_state);
    +
    320 }
    +
    321 break;
    +
    322 }
    +
    323 case StateType::CARTESIAN_STATE: {
    +
    324 if (new_state->get_type() == StateType::CARTESIAN_POSE) {
    +
    325 safe_spatial_state_conversion<CartesianState, CartesianPose>(
    +
    326 state, new_state, [](CartesianState& a, const CartesianPose& b) { a.set_pose(b.get_pose()); });
    +
    327 } else if (new_state->get_type() == StateType::CARTESIAN_TWIST) {
    +
    328 safe_spatial_state_conversion<CartesianState, CartesianTwist>(
    +
    329 state, new_state, [](CartesianState& a, const CartesianTwist& b) { a.set_twist(b.get_twist()); });
    +
    330 } else if (new_state->get_type() == StateType::CARTESIAN_ACCELERATION) {
    +
    331 safe_spatial_state_conversion<CartesianState, CartesianAcceleration>(
    +
    332 state, new_state,
    +
    333 [](CartesianState& a, const CartesianAcceleration& b) { a.set_acceleration(b.get_acceleration()); });
    +
    334 } else if (new_state->get_type() == StateType::CARTESIAN_WRENCH) {
    +
    335 safe_spatial_state_conversion<CartesianState, CartesianWrench>(
    +
    336 state, new_state, [](CartesianState& a, const CartesianWrench& b) { a.set_wrench(b.get_wrench()); });
    +
    337 } else {
    +
    338 safe_dynamic_cast<CartesianState>(state, new_state);
    +
    339 }
    +
    340 break;
    +
    341 }
    +
    342 case StateType::CARTESIAN_POSE: {
    +
    343 if (new_state->get_type() == StateType::CARTESIAN_STATE) {
    +
    344 safe_spatial_state_conversion<CartesianPose, CartesianState>(
    +
    345 state, new_state, [](CartesianPose& a, const CartesianState& b) { a.set_pose(b.get_pose()); });
    +
    346 } else {
    +
    347 safe_dynamic_cast<CartesianPose>(state, new_state);
    +
    348 }
    +
    349 break;
    +
    350 }
    +
    351 case StateType::CARTESIAN_TWIST: {
    +
    352 if (new_state->get_type() == StateType::CARTESIAN_STATE) {
    +
    353 safe_spatial_state_conversion<CartesianTwist, CartesianState>(
    +
    354 state, new_state, [](CartesianTwist& a, const CartesianState& b) { a.set_twist(b.get_twist()); });
    +
    355 } else {
    +
    356 safe_dynamic_cast<CartesianTwist>(state, new_state);
    +
    357 }
    +
    358 break;
    +
    359 }
    +
    360 case StateType::CARTESIAN_ACCELERATION: {
    +
    361 if (new_state->get_type() == StateType::CARTESIAN_STATE) {
    +
    362 safe_spatial_state_conversion<CartesianAcceleration, CartesianState>(
    +
    363 state, new_state,
    +
    364 [](CartesianAcceleration& a, const CartesianState& b) { a.set_acceleration(b.get_acceleration()); });
    +
    365 } else {
    +
    366 safe_dynamic_cast<CartesianAcceleration>(state, new_state);
    +
    367 }
    +
    368 break;
    +
    369 }
    +
    370 case StateType::CARTESIAN_WRENCH: {
    +
    371 if (new_state->get_type() == StateType::CARTESIAN_STATE) {
    +
    372 safe_spatial_state_conversion<CartesianWrench, CartesianState>(
    +
    373 state, new_state, [](CartesianWrench& a, const CartesianState& b) { a.set_wrench(b.get_wrench()); });
    +
    374 } else {
    +
    375 safe_dynamic_cast<CartesianWrench>(state, new_state);
    +
    376 }
    +
    377 break;
    +
    378 }
    +
    379 case StateType::JOINT_STATE: {
    +
    380 auto derived_state = safe_dynamic_pointer_cast<JointState>(state);
    +
    381 if (new_state->get_type() == StateType::JOINT_POSITIONS) {
    +
    382 safe_state_with_names_conversion<JointState, JointPositions>(
    +
    383 state, new_state, [](JointState& a, const JointPositions& b) { a.set_positions(b.get_positions()); });
    +
    384 } else if (new_state->get_type() == StateType::JOINT_VELOCITIES) {
    +
    385 safe_state_with_names_conversion<JointState, JointVelocities>(
    +
    386 state, new_state, [](JointState& a, const JointVelocities& b) { a.set_velocities(b.get_velocities()); });
    +
    387 } else if (new_state->get_type() == StateType::JOINT_ACCELERATIONS) {
    +
    388 safe_state_with_names_conversion<JointState, JointAccelerations>(
    +
    389 state, new_state,
    +
    390 [](JointState& a, const JointAccelerations& b) { a.set_accelerations(b.get_accelerations()); });
    +
    391 } else if (new_state->get_type() == StateType::JOINT_TORQUES) {
    +
    392 safe_state_with_names_conversion<JointState, JointTorques>(
    +
    393 state, new_state, [](JointState& a, const JointTorques& b) { a.set_torques(b.get_torques()); });
    +
    394 } else {
    +
    395 safe_dynamic_cast<JointState>(state, new_state);
    +
    396 }
    +
    397 break;
    +
    398 }
    +
    399 case StateType::JOINT_POSITIONS: {
    +
    400 if (new_state->get_type() == StateType::JOINT_STATE) {
    +
    401 safe_state_with_names_conversion<JointPositions, JointState>(
    +
    402 state, new_state, [](JointPositions& a, const JointState& b) { a.set_positions(b.get_positions()); });
    +
    403 } else {
    +
    404 safe_dynamic_cast<JointPositions>(state, new_state);
    +
    405 }
    +
    406 break;
    +
    407 }
    +
    408 case StateType::JOINT_VELOCITIES: {
    +
    409 if (new_state->get_type() == StateType::JOINT_STATE) {
    +
    410 safe_state_with_names_conversion<JointVelocities, JointState>(
    +
    411 state, new_state, [](JointVelocities& a, const JointState& b) { a.set_velocities(b.get_velocities()); });
    +
    412 } else {
    +
    413 safe_dynamic_cast<JointVelocities>(state, new_state);
    +
    414 }
    +
    415 break;
    +
    416 }
    +
    417 case StateType::JOINT_ACCELERATIONS: {
    +
    418 if (new_state->get_type() == StateType::JOINT_STATE) {
    +
    419 safe_state_with_names_conversion<JointAccelerations, JointState>(
    +
    420 state, new_state,
    +
    421 [](JointAccelerations& a, const JointState& b) { a.set_accelerations(b.get_accelerations()); });
    +
    422 } else {
    +
    423 safe_dynamic_cast<JointAccelerations>(state, new_state);
    +
    424 }
    +
    425 break;
    +
    426 }
    +
    427 case StateType::JOINT_TORQUES: {
    +
    428 if (new_state->get_type() == StateType::JOINT_STATE) {
    +
    429 safe_state_with_names_conversion<JointTorques, JointState>(
    +
    430 state, new_state, [](JointTorques& a, const JointState& b) { a.set_torques(b.get_torques()); });
    +
    431 } else {
    +
    432 safe_dynamic_cast<JointTorques>(state, new_state);
    +
    433 }
    +
    434 break;
    +
    435 }
    +
    436 case StateType::JACOBIAN:
    +
    437 safe_dynamic_cast<Jacobian>(state, new_state);
    +
    438 break;
    +
    439 case StateType::PARAMETER: {
    +
    440 auto param_ptr = std::dynamic_pointer_cast<ParameterInterface>(state);
    +
    441 switch (param_ptr->get_parameter_type()) {
    +
    442 case ParameterType::BOOL:
    +
    443 safe_dynamic_cast<Parameter<bool>>(state, new_state);
    +
    444 break;
    +
    445 case ParameterType::BOOL_ARRAY:
    +
    446 safe_dynamic_cast<Parameter<std::vector<bool>>>(state, new_state);
    +
    447 break;
    +
    448 case ParameterType::INT:
    +
    449 safe_dynamic_cast<Parameter<int>>(state, new_state);
    +
    450 break;
    +
    451 case ParameterType::INT_ARRAY:
    +
    452 safe_dynamic_cast<Parameter<std::vector<int>>>(state, new_state);
    +
    453 break;
    +
    454 case ParameterType::DOUBLE:
    +
    455 safe_dynamic_cast<Parameter<double>>(state, new_state);
    +
    456 break;
    +
    457 case ParameterType::DOUBLE_ARRAY:
    +
    458 safe_dynamic_cast<Parameter<std::vector<double>>>(state, new_state);
    +
    459 break;
    +
    460 case ParameterType::STRING:
    +
    461 safe_dynamic_cast<Parameter<std::string>>(state, new_state);
    +
    462 break;
    +
    463 case ParameterType::STRING_ARRAY:
    +
    464 safe_dynamic_cast<Parameter<std::vector<std::string>>>(state, new_state);
    +
    465 break;
    +
    466 case ParameterType::VECTOR:
    +
    467 safe_dynamic_cast<Parameter<Eigen::VectorXd>>(state, new_state);
    +
    468 break;
    +
    469 case ParameterType::MATRIX:
    +
    470 safe_dynamic_cast<Parameter<Eigen::MatrixXd>>(state, new_state);
    +
    471 break;
    +
    472 default:
    +
    473 throw exceptions::MessageTranslationException(
    +
    474 "The ParameterType contained by parameter " + param_ptr->get_name() + " is unsupported.");
    +
    475 }
    +
    476 break;
    +
    477 }
    +
    478 default:
    +
    479 throw exceptions::MessageTranslationException(
    +
    480 "The StateType contained by state " + new_state->get_name() + " is unsupported.");
    +
    481 }
    +
    482 } catch (const exceptions::MessageTranslationException& ex) {
    +
    483 throw;
    +
    484 }
    +
    485}
    +
    486}// namespace modulo_core::translators
    +
    +
    An exception class to notify that the translation of a ROS message failed.
    +
    Modulo Core translation module for converting between ROS2 and state_representation data types.
    +
    void safe_spatial_state_conversion(std::shared_ptr< state_representation::State > &state, std::shared_ptr< state_representation::State > &new_state, std::function< void(StateT &, const NewStateT &)> conversion_callback={})
    Update the value referenced by a state pointer by dynamically casting and converting the value refere...
    +
    std::shared_ptr< T > safe_dynamic_pointer_cast(std::shared_ptr< state_representation::State > &state)
    Safely downcast a base state pointer to a derived state pointer.
    +
    void safe_dynamic_cast(std::shared_ptr< state_representation::State > &state, std::shared_ptr< state_representation::State > &new_state)
    Update the value referenced by a state pointer from a new_state pointer.
    +
    void safe_state_with_names_conversion(std::shared_ptr< state_representation::State > &state, std::shared_ptr< state_representation::State > &new_state, std::function< void(StateT &, const NewStateT &)> conversion_callback={})
    Update the value referenced by a state pointer by dynamically casting and converting the value refere...
    +
    void read_message(state_representation::CartesianState &state, const geometry_msgs::msg::Accel &message)
    Convert a ROS geometry_msgs::msg::Accel to a CartesianState.
    +
    + + + + diff --git a/versions/v5.0.1/message__writers_8cpp_source.html b/versions/v5.0.1/message__writers_8cpp_source.html new file mode 100644 index 00000000..260651dc --- /dev/null +++ b/versions/v5.0.1/message__writers_8cpp_source.html @@ -0,0 +1,289 @@ + + + + + + + +Modulo: /github/workspace/source/modulo_core/src/translators/message_writers.cpp Source File + + + + + + + + + +
    +
    + + + + + + +
    +
    Modulo 5.0.0 +
    +
    +
    + + + + + + + + + +
    +
    + + +
    +
    +
    +
    +
    +
    Loading...
    +
    Searching...
    +
    No Matches
    +
    +
    +
    +
    + + +
    +
    +
    message_writers.cpp
    +
    +
    +
    1#include "modulo_core/translators/message_writers.hpp"
    +
    2
    +
    3#include <state_representation/space/cartesian/CartesianPose.hpp>
    +
    4
    +
    5using namespace state_representation;
    +
    6
    + +
    8
    +
    9static void write_point(geometry_msgs::msg::Point& message, const Eigen::Vector3d& vector) {
    +
    10 message.x = vector.x();
    +
    11 message.y = vector.y();
    +
    12 message.z = vector.z();
    +
    13}
    +
    14
    +
    15static void write_vector3(geometry_msgs::msg::Vector3& message, const Eigen::Vector3d& vector) {
    +
    16 message.x = vector.x();
    +
    17 message.y = vector.y();
    +
    18 message.z = vector.z();
    +
    19}
    +
    20
    +
    21static void write_quaternion(geometry_msgs::msg::Quaternion& message, const Eigen::Quaterniond& quat) {
    +
    22 message.w = quat.w();
    +
    23 message.x = quat.x();
    +
    24 message.y = quat.y();
    +
    25 message.z = quat.z();
    +
    26}
    +
    27
    +
    28void write_message(geometry_msgs::msg::Accel& message, const CartesianState& state, const rclcpp::Time&) {
    +
    29 if (!state) {
    +
    30 throw exceptions::MessageTranslationException(
    +
    31 state.get_name() + " state is empty while attempting to write it to message");
    +
    32 }
    +
    33 write_vector3(message.linear, state.get_linear_acceleration());
    +
    34 write_vector3(message.angular, state.get_angular_acceleration());
    +
    35}
    +
    36
    +
    37void write_message(geometry_msgs::msg::AccelStamped& message, const CartesianState& state, const rclcpp::Time& time) {
    +
    38 write_message(message.accel, state, time);
    +
    39 message.header.stamp = time;
    +
    40 message.header.frame_id = state.get_reference_frame();
    +
    41}
    +
    42
    +
    43void write_message(geometry_msgs::msg::Pose& message, const CartesianState& state, const rclcpp::Time&) {
    +
    44 if (!state) {
    +
    45 throw exceptions::MessageTranslationException(
    +
    46 state.get_name() + " state is empty while attempting to write it to message");
    +
    47 }
    +
    48 write_point(message.position, state.get_position());
    +
    49 write_quaternion(message.orientation, state.get_orientation());
    +
    50}
    +
    51
    +
    52void write_message(geometry_msgs::msg::PoseStamped& message, const CartesianState& state, const rclcpp::Time& time) {
    +
    53 write_message(message.pose, state, time);
    +
    54 message.header.stamp = time;
    +
    55 message.header.frame_id = state.get_reference_frame();
    +
    56}
    +
    57
    +
    58void write_message(geometry_msgs::msg::Transform& message, const CartesianState& state, const rclcpp::Time&) {
    +
    59 if (!state) {
    +
    60 throw exceptions::MessageTranslationException(
    +
    61 state.get_name() + " state is empty while attempting to write it to message");
    +
    62 }
    +
    63 write_vector3(message.translation, state.get_position());
    +
    64 write_quaternion(message.rotation, state.get_orientation());
    +
    65}
    +
    66
    +
    67void write_message(
    +
    68 geometry_msgs::msg::TransformStamped& message, const CartesianState& state, const rclcpp::Time& time) {
    +
    69 write_message(message.transform, state, time);
    +
    70 message.header.stamp = time;
    +
    71 message.header.frame_id = state.get_reference_frame();
    +
    72 message.child_frame_id = state.get_name();
    +
    73}
    +
    74
    +
    75void write_message(geometry_msgs::msg::Twist& message, const CartesianState& state, const rclcpp::Time&) {
    +
    76 if (!state) {
    +
    77 throw exceptions::MessageTranslationException(
    +
    78 state.get_name() + " state is empty while attempting to write it to message");
    +
    79 }
    +
    80 write_vector3(message.linear, state.get_linear_velocity());
    +
    81 write_vector3(message.angular, state.get_angular_velocity());
    +
    82}
    +
    83
    +
    84void write_message(geometry_msgs::msg::TwistStamped& message, const CartesianState& state, const rclcpp::Time& time) {
    +
    85 write_message(message.twist, state, time);
    +
    86 message.header.stamp = time;
    +
    87 message.header.frame_id = state.get_reference_frame();
    +
    88}
    +
    89
    +
    90void write_message(geometry_msgs::msg::Wrench& message, const CartesianState& state, const rclcpp::Time&) {
    +
    91 if (!state) {
    +
    92 throw exceptions::MessageTranslationException(
    +
    93 state.get_name() + " state is empty while attempting to write it to message");
    +
    94 }
    +
    95 write_vector3(message.force, state.get_force());
    +
    96 write_vector3(message.torque, state.get_torque());
    +
    97}
    +
    98
    +
    99void write_message(geometry_msgs::msg::WrenchStamped& message, const CartesianState& state, const rclcpp::Time& time) {
    +
    100 write_message(message.wrench, state, time);
    +
    101 message.header.stamp = time;
    +
    102 message.header.frame_id = state.get_reference_frame();
    +
    103}
    +
    104
    +
    105void write_message(sensor_msgs::msg::JointState& message, const JointState& state, const rclcpp::Time& time) {
    +
    106 if (!state) {
    +
    107 throw exceptions::MessageTranslationException(
    +
    108 state.get_name() + " state is empty while attempting to write it to message");
    +
    109 }
    +
    110 message.header.stamp = time;
    +
    111 message.name = state.get_names();
    +
    112 message.position =
    +
    113 std::vector<double>(state.get_positions().data(), state.get_positions().data() + state.get_positions().size());
    +
    114 message.velocity =
    +
    115 std::vector<double>(state.get_velocities().data(), state.get_velocities().data() + state.get_velocities().size());
    +
    116 message.effort =
    +
    117 std::vector<double>(state.get_torques().data(), state.get_torques().data() + state.get_torques().size());
    +
    118}
    +
    119
    +
    120void write_message(tf2_msgs::msg::TFMessage& message, const CartesianState& state, const rclcpp::Time& time) {
    +
    121 if (!state) {
    +
    122 throw exceptions::MessageTranslationException(
    +
    123 state.get_name() + " state is empty while attempting to write it to message");
    +
    124 }
    +
    125 geometry_msgs::msg::TransformStamped transform;
    +
    126 write_message(transform, state, time);
    +
    127 message.transforms.push_back(transform);
    +
    128}
    +
    129
    +
    130template<typename U, typename T>
    +
    131void write_message(U& message, const Parameter<T>& state, const rclcpp::Time&) {
    +
    132 if (!state) {
    +
    133 throw exceptions::MessageTranslationException(
    +
    134 state.get_name() + " state is empty while attempting to write it to message");
    +
    135 }
    +
    136 message.data = state.get_value();
    +
    137}
    +
    138
    +
    139template void write_message<std_msgs::msg::Float64, double>(
    +
    140 std_msgs::msg::Float64& message, const Parameter<double>& state, const rclcpp::Time&);
    +
    141
    +
    142template void write_message<std_msgs::msg::Float64MultiArray, std::vector<double>>(
    +
    143 std_msgs::msg::Float64MultiArray& message, const Parameter<std::vector<double>>& state, const rclcpp::Time&);
    +
    144
    +
    145template void write_message<std_msgs::msg::Bool, bool>(
    +
    146 std_msgs::msg::Bool& message, const Parameter<bool>& state, const rclcpp::Time&);
    +
    147
    +
    148template void write_message<std_msgs::msg::String, std::string>(
    +
    149 std_msgs::msg::String& message, const Parameter<std::string>& state, const rclcpp::Time&);
    +
    150
    +
    151template<>
    +
    152void write_message(
    +
    153 geometry_msgs::msg::Transform& message, const Parameter<CartesianPose>& state, const rclcpp::Time& time) {
    +
    154 write_message(message, state.get_value(), time);
    +
    155}
    +
    156
    +
    157template<>
    +
    158void write_message(
    +
    159 geometry_msgs::msg::TransformStamped& message, const Parameter<CartesianPose>& state, const rclcpp::Time& time) {
    +
    160 write_message(message, state.get_value(), time);
    +
    161}
    +
    162
    +
    163template<>
    +
    164void write_message(tf2_msgs::msg::TFMessage& message, const Parameter<CartesianPose>& state, const rclcpp::Time& time) {
    +
    165 write_message(message, state.get_value(), time);
    +
    166}
    +
    167
    +
    +
    168void write_message(std_msgs::msg::Bool& message, const bool& state, const rclcpp::Time&) {
    +
    169 message.data = state;
    +
    170}
    +
    +
    171
    +
    +
    172void write_message(std_msgs::msg::Float64& message, const double& state, const rclcpp::Time&) {
    +
    173 message.data = state;
    +
    174}
    +
    +
    175
    +
    +
    176void write_message(std_msgs::msg::Float64MultiArray& message, const std::vector<double>& state, const rclcpp::Time&) {
    +
    177 message.data = state;
    +
    178}
    +
    +
    179
    +
    +
    180void write_message(std_msgs::msg::Int32& message, const int& state, const rclcpp::Time&) {
    +
    181 message.data = state;
    +
    182}
    +
    +
    183
    +
    +
    184void write_message(std_msgs::msg::String& message, const std::string& state, const rclcpp::Time&) {
    +
    185 message.data = state;
    +
    186}
    +
    +
    187}// namespace modulo_core::translators
    +
    Modulo Core translation module for converting between ROS2 and state_representation data types.
    +
    void write_message(geometry_msgs::msg::Accel &message, const state_representation::CartesianState &state, const rclcpp::Time &time)
    Convert a CartesianState to a ROS geometry_msgs::msg::Accel.
    +
    + + + + diff --git a/versions/v5.0.1/message__writers_8hpp_source.html b/versions/v5.0.1/message__writers_8hpp_source.html new file mode 100644 index 00000000..5ba34915 --- /dev/null +++ b/versions/v5.0.1/message__writers_8hpp_source.html @@ -0,0 +1,187 @@ + + + + + + + +Modulo: /github/workspace/source/modulo_core/include/modulo_core/translators/message_writers.hpp Source File + + + + + + + + + +
    +
    + + + + + + +
    +
    Modulo 5.0.0 +
    +
    +
    + + + + + + + + + +
    +
    + + +
    +
    +
    +
    +
    +
    Loading...
    +
    Searching...
    +
    No Matches
    +
    +
    +
    +
    + + +
    +
    +
    message_writers.hpp
    +
    +
    +
    1#pragma once
    +
    2
    +
    3#include <geometry_msgs/msg/accel_stamped.hpp>
    +
    4#include <geometry_msgs/msg/pose_stamped.hpp>
    +
    5#include <geometry_msgs/msg/transform_stamped.hpp>
    +
    6#include <geometry_msgs/msg/twist_stamped.hpp>
    +
    7#include <geometry_msgs/msg/wrench_stamped.hpp>
    +
    8#include <rclcpp/time.hpp>
    +
    9#include <sensor_msgs/msg/joint_state.hpp>
    +
    10#include <std_msgs/msg/bool.hpp>
    +
    11#include <std_msgs/msg/float64.hpp>
    +
    12#include <std_msgs/msg/float64_multi_array.hpp>
    +
    13#include <std_msgs/msg/int32.hpp>
    +
    14#include <std_msgs/msg/string.hpp>
    +
    15#include <tf2_msgs/msg/tf_message.hpp>
    +
    16
    +
    17#include <clproto.hpp>
    +
    18#include <state_representation/parameters/Parameter.hpp>
    +
    19#include <state_representation/space/cartesian/CartesianState.hpp>
    +
    20#include <state_representation/space/joint/JointState.hpp>
    +
    21
    +
    22#include "modulo_core/EncodedState.hpp"
    +
    23#include "modulo_core/exceptions.hpp"
    +
    24
    + +
    26
    + +
    35 geometry_msgs::msg::Accel& message, const state_representation::CartesianState& state, const rclcpp::Time& time);
    +
    36
    + +
    45 geometry_msgs::msg::AccelStamped& message, const state_representation::CartesianState& state,
    +
    46 const rclcpp::Time& time);
    +
    47
    + +
    56 geometry_msgs::msg::Pose& message, const state_representation::CartesianState& state, const rclcpp::Time& time);
    +
    57
    + +
    66 geometry_msgs::msg::PoseStamped& message, const state_representation::CartesianState& state,
    +
    67 const rclcpp::Time& time);
    +
    68
    + +
    77 geometry_msgs::msg::Transform& message, const state_representation::CartesianState& state,
    +
    78 const rclcpp::Time& time);
    +
    79
    + +
    88 geometry_msgs::msg::TransformStamped& message, const state_representation::CartesianState& state,
    +
    89 const rclcpp::Time& time);
    +
    90
    + +
    99 geometry_msgs::msg::Twist& message, const state_representation::CartesianState& state, const rclcpp::Time& time);
    +
    100
    + +
    109 geometry_msgs::msg::TwistStamped& message, const state_representation::CartesianState& state,
    +
    110 const rclcpp::Time& time);
    +
    111
    + +
    120 geometry_msgs::msg::Wrench& message, const state_representation::CartesianState& state, const rclcpp::Time& time);
    +
    121
    + +
    130 geometry_msgs::msg::WrenchStamped& message, const state_representation::CartesianState& state,
    +
    131 const rclcpp::Time& time);
    +
    132
    + +
    141 sensor_msgs::msg::JointState& message, const state_representation::JointState& state, const rclcpp::Time& time);
    +
    142
    + +
    151 tf2_msgs::msg::TFMessage& message, const state_representation::CartesianState& state, const rclcpp::Time& time);
    +
    152
    +
    162template<typename U, typename T>
    +
    163void write_message(U& message, const state_representation::Parameter<T>& state, const rclcpp::Time&);
    +
    164
    +
    171void write_message(std_msgs::msg::Bool& message, const bool& state, const rclcpp::Time& time);
    +
    172
    +
    179void write_message(std_msgs::msg::Float64& message, const double& state, const rclcpp::Time& time);
    +
    180
    +
    187void write_message(
    +
    188 std_msgs::msg::Float64MultiArray& message, const std::vector<double>& state, const rclcpp::Time& time);
    +
    189
    +
    196void write_message(std_msgs::msg::Int32& message, const int& state, const rclcpp::Time& time);
    +
    197
    +
    204void write_message(std_msgs::msg::String& message, const std::string& state, const rclcpp::Time& time);
    +
    205
    +
    214template<typename T>
    +
    +
    215inline void write_message(EncodedState& message, const T& state, const rclcpp::Time&) {
    +
    216 try {
    +
    217 std::string tmp = clproto::encode<T>(state);
    +
    218 message.data = std::vector<unsigned char>(tmp.begin(), tmp.end());
    +
    219 } catch (const std::exception& ex) {
    + +
    221 }
    +
    222}
    +
    +
    223}// namespace modulo_core::translators
    +
    An exception class to notify that the translation of a ROS message failed.
    +
    Modulo Core translation module for converting between ROS2 and state_representation data types.
    +
    void write_message(geometry_msgs::msg::Accel &message, const state_representation::CartesianState &state, const rclcpp::Time &time)
    Convert a CartesianState to a ROS geometry_msgs::msg::Accel.
    +
    + + + + diff --git a/versions/v5.0.1/minus.svg b/versions/v5.0.1/minus.svg new file mode 100644 index 00000000..f70d0c1a --- /dev/null +++ b/versions/v5.0.1/minus.svg @@ -0,0 +1,8 @@ + + + + + + + + diff --git a/versions/v5.0.1/minusd.svg b/versions/v5.0.1/minusd.svg new file mode 100644 index 00000000..5f8e8796 --- /dev/null +++ b/versions/v5.0.1/minusd.svg @@ -0,0 +1,8 @@ + + + + + + + + diff --git a/versions/v5.0.1/namespacemembers.html b/versions/v5.0.1/namespacemembers.html new file mode 100644 index 00000000..5231aaa7 --- /dev/null +++ b/versions/v5.0.1/namespacemembers.html @@ -0,0 +1,119 @@ + + + + + + + +Modulo: Namespace Members + + + + + + + + + +
    +
    + + + + + + +
    +
    Modulo 5.0.0 +
    +
    +
    + + + + + + + +
    + +
    +
    + + +
    +
    +
    +
    +
    +
    Loading...
    +
    Searching...
    +
    No Matches
    +
    +
    +
    +
    + +
    +
    Here is a list of all documented namespace members with links to the namespaces they belong to:
    + +

    - c -

    + + +

    - g -

    + + +

    - m -

    + + +

    - p -

    + + +

    - r -

    + + +

    - s -

    + + +

    - w -

    +
    + + + + diff --git a/versions/v5.0.1/namespacemembers_enum.html b/versions/v5.0.1/namespacemembers_enum.html new file mode 100644 index 00000000..08de9e9c --- /dev/null +++ b/versions/v5.0.1/namespacemembers_enum.html @@ -0,0 +1,82 @@ + + + + + + + +Modulo: Namespace Members + + + + + + + + + +
    +
    + + + + + + +
    +
    Modulo 5.0.0 +
    +
    +
    + + + + + + + +
    + +
    +
    + + +
    +
    +
    +
    +
    +
    Loading...
    +
    Searching...
    +
    No Matches
    +
    +
    +
    +
    + +
    +
    Here is a list of all documented namespace enums with links to the namespaces they belong to:
    +
    + + + + diff --git a/versions/v5.0.1/namespacemembers_func.html b/versions/v5.0.1/namespacemembers_func.html new file mode 100644 index 00000000..3c235fcb --- /dev/null +++ b/versions/v5.0.1/namespacemembers_func.html @@ -0,0 +1,109 @@ + + + + + + + +Modulo: Namespace Members + + + + + + + + + +
    +
    + + + + + + +
    +
    Modulo 5.0.0 +
    +
    +
    + + + + + + + +
    + +
    +
    + + +
    +
    +
    +
    +
    +
    Loading...
    +
    Searching...
    +
    No Matches
    +
    +
    +
    +
    + +
    +
    Here is a list of all documented namespace functions with links to the namespaces they belong to:
    + +

    - c -

    + + +

    - g -

    + + +

    - r -

    + + +

    - s -

    + + +

    - w -

    +
    + + + + diff --git a/versions/v5.0.1/namespacemodulo__components.html b/versions/v5.0.1/namespacemodulo__components.html new file mode 100644 index 00000000..e0ef4b23 --- /dev/null +++ b/versions/v5.0.1/namespacemodulo__components.html @@ -0,0 +1,104 @@ + + + + + + + +Modulo: modulo_components Namespace Reference + + + + + + + + + +
    +
    + + + + + + +
    +
    Modulo 5.0.0 +
    +
    +
    + + + + + + + + +
    +
    + + +
    +
    +
    +
    +
    +
    Loading...
    +
    Searching...
    +
    No Matches
    +
    +
    +
    +
    + +
    +
    + +
    modulo_components Namespace Reference
    +
    +
    + +

    Modulo components. +More...

    + + + + + + + + + + + + + + +

    +Classes

    class  Component
     A wrapper for rclcpp::Node to simplify application composition through unified component interfaces. More...
     
    class  ComponentInterface
     Base interface class for modulo components to wrap a ROS Node with custom behaviour. More...
     
    struct  ComponentServiceResponse
     Response structure to be returned by component services. More...
     
    class  LifecycleComponent
     A wrapper for rclcpp_lifecycle::LifecycleNode to simplify application composition through unified component interfaces while supporting lifecycle states and transitions. More...
     
    +

    Detailed Description

    +

    Modulo components.

    +
    + + + + diff --git a/versions/v5.0.1/namespacemodulo__core.html b/versions/v5.0.1/namespacemodulo__core.html new file mode 100644 index 00000000..2bdb2aef --- /dev/null +++ b/versions/v5.0.1/namespacemodulo__core.html @@ -0,0 +1,130 @@ + + + + + + + +Modulo: modulo_core Namespace Reference + + + + + + + + + +
    +
    + + + + + + +
    +
    Modulo 5.0.0 +
    +
    +
    + + + + + + + + +
    +
    + + +
    +
    +
    +
    +
    +
    Loading...
    +
    Searching...
    +
    No Matches
    +
    +
    +
    +
    + +
    +
    + +
    modulo_core Namespace Reference
    +
    +
    + +

    Modulo Core. +More...

    + + + + + + + + + + + +

    +Namespaces

    namespace  communication
     Modulo Core communication module for handling messages on publication and subscription interfaces.
     
    namespace  exceptions
     Modulo Core exceptions module for defining exception classes.
     
    namespace  translators
     Modulo Core translation module for converting between ROS2 and state_representation data types.
     
    + + + +

    +Classes

    class  Predicate
     
    + + + +

    +Typedefs

    typedef modulo_interfaces::msg::EncodedState EncodedState
     
    +

    Detailed Description

    +

    Modulo Core.

    +

    Typedef Documentation

    + +

    ◆ EncodedState

    + +
    +
    + + + + +
    modulo_core::EncodedState
    +
    + +

    Definition at line 14 of file EncodedState.hpp.

    + +
    +
    +
    + + + + diff --git a/versions/v5.0.1/namespacemodulo__core_1_1communication.html b/versions/v5.0.1/namespacemodulo__core_1_1communication.html new file mode 100644 index 00000000..5ef2a8ae --- /dev/null +++ b/versions/v5.0.1/namespacemodulo__core_1_1communication.html @@ -0,0 +1,454 @@ + + + + + + + +Modulo: modulo_core::communication Namespace Reference + + + + + + + + + +
    +
    + + + + + + +
    +
    Modulo 5.0.0 +
    +
    +
    + + + + + + + + +
    +
    + + +
    +
    +
    +
    +
    +
    Loading...
    +
    Searching...
    +
    No Matches
    +
    +
    +
    +
    + + +
    +
    + +
    modulo_core::communication Namespace Reference
    +
    +
    + +

    Modulo Core communication module for handling messages on publication and subscription interfaces. +More...

    + + + + + + + + + + + + + + + + + + + + +

    +Classes

    class  MessagePair
     The MessagePair stores a pointer to a variable and translates the value of this pointer back and forth between the corresponding ROS messages. More...
     
    class  MessagePairInterface
     Interface class to enable non-templated writing and reading ROS messages from derived MessagePair instances through dynamic down-casting. More...
     
    class  PublisherHandler
     The PublisherHandler handles different types of ROS publishers to activate, deactivate and publish data with those publishers. More...
     
    class  PublisherInterface
     Interface class to enable non-templated activating/deactivating/publishing of ROS publishers from derived PublisherHandler instances through dynamic down-casting. More...
     
    class  SubscriptionHandler
     The SubscriptionHandler handles different types of ROS subscriptions to receive data from those subscriptions. More...
     
    class  SubscriptionInterface
     Interface class to enable non-templated subscriptions with ROS subscriptions from derived SubscriptionHandler instances through dynamic down-casting. More...
     
    + + + + + + + +

    +Enumerations

    enum class  MessageType {
    +  BOOL +, FLOAT64 +, FLOAT64_MULTI_ARRAY +, INT32 +,
    +  STRING +, ENCODED_STATE +, CUSTOM_MESSAGE +
    + }
     Enum of all supported ROS message types for the MessagePairInterface. More...
     
    enum class  PublisherType { PUBLISHER +, LIFECYCLE_PUBLISHER + }
     Enum of supported ROS publisher types for the PublisherInterface. More...
     
    + + + + + + + + + + + + + + + + + + + +

    +Functions

    template<concepts::CoreDataT DataT>
    std::shared_ptr< MessagePairInterfacemake_shared_message_pair (const std::shared_ptr< DataT > &data, const std::shared_ptr< rclcpp::Clock > &clock)
     
    template<typename DataT = bool>
    std::shared_ptr< MessagePairInterfacemake_shared_message_pair (const std::shared_ptr< bool > &data, const std::shared_ptr< rclcpp::Clock > &clock)
     
    template<typename DataT = double>
    std::shared_ptr< MessagePairInterfacemake_shared_message_pair (const std::shared_ptr< double > &data, const std::shared_ptr< rclcpp::Clock > &clock)
     
    template<typename DataT = std::vector<double>>
    std::shared_ptr< MessagePairInterfacemake_shared_message_pair (const std::shared_ptr< std::vector< double > > &data, const std::shared_ptr< rclcpp::Clock > &clock)
     
    template<typename DataT = int>
    std::shared_ptr< MessagePairInterfacemake_shared_message_pair (const std::shared_ptr< int > &data, const std::shared_ptr< rclcpp::Clock > &clock)
     
    template<typename DataT = std::string>
    std::shared_ptr< MessagePairInterfacemake_shared_message_pair (const std::shared_ptr< std::string > &data, const std::shared_ptr< rclcpp::Clock > &clock)
     
    +

    Detailed Description

    +

    Modulo Core communication module for handling messages on publication and subscription interfaces.

    +

    Enumeration Type Documentation

    + +

    ◆ MessageType

    + +
    +
    + + + + + +
    + + + + +
    enum class modulo_core::communication::MessageType
    +
    +strong
    +
    + +

    Enum of all supported ROS message types for the MessagePairInterface.

    +
    See also
    MessagePairInterface
    + +

    Definition at line 13 of file MessageType.hpp.

    + +
    +
    + +

    ◆ PublisherType

    + +
    +
    + + + + + +
    + + + + +
    enum class modulo_core::communication::PublisherType
    +
    +strong
    +
    + +

    Enum of supported ROS publisher types for the PublisherInterface.

    +
    See also
    PublisherInterface
    + +

    Definition at line 9 of file PublisherType.hpp.

    + +
    +
    +

    Function Documentation

    + +

    ◆ make_shared_message_pair() [1/6]

    + +
    +
    +
    +template<typename DataT = bool>
    + + + + + +
    + + + + + + + + + + + + + + + + + + +
    std::shared_ptr< MessagePairInterface > modulo_core::communication::make_shared_message_pair (const std::shared_ptr< bool > & data,
    const std::shared_ptr< rclcpp::Clock > & clock 
    )
    +
    +inline
    +
    + +

    Definition at line 205 of file MessagePair.hpp.

    + +
    +
    + +

    ◆ make_shared_message_pair() [2/6]

    + +
    +
    +
    +template<concepts::CoreDataT DataT>
    + + + + + +
    + + + + + + + + + + + + + + + + + + +
    std::shared_ptr< MessagePairInterface > modulo_core::communication::make_shared_message_pair (const std::shared_ptr< DataT > & data,
    const std::shared_ptr< rclcpp::Clock > & clock 
    )
    +
    +inline
    +
    + +

    Definition at line 192 of file MessagePair.hpp.

    + +
    +
    + +

    ◆ make_shared_message_pair() [3/6]

    + +
    +
    +
    +template<typename DataT = double>
    + + + + + +
    + + + + + + + + + + + + + + + + + + +
    std::shared_ptr< MessagePairInterface > modulo_core::communication::make_shared_message_pair (const std::shared_ptr< double > & data,
    const std::shared_ptr< rclcpp::Clock > & clock 
    )
    +
    +inline
    +
    + +

    Definition at line 211 of file MessagePair.hpp.

    + +
    +
    + +

    ◆ make_shared_message_pair() [4/6]

    + +
    +
    +
    +template<typename DataT = int>
    + + + + + +
    + + + + + + + + + + + + + + + + + + +
    std::shared_ptr< MessagePairInterface > modulo_core::communication::make_shared_message_pair (const std::shared_ptr< int > & data,
    const std::shared_ptr< rclcpp::Clock > & clock 
    )
    +
    +inline
    +
    + +

    Definition at line 223 of file MessagePair.hpp.

    + +
    +
    + +

    ◆ make_shared_message_pair() [5/6]

    + +
    +
    +
    +template<typename DataT = std::string>
    + + + + + +
    + + + + + + + + + + + + + + + + + + +
    std::shared_ptr< MessagePairInterface > modulo_core::communication::make_shared_message_pair (const std::shared_ptr< std::string > & data,
    const std::shared_ptr< rclcpp::Clock > & clock 
    )
    +
    +inline
    +
    + +

    Definition at line 229 of file MessagePair.hpp.

    + +
    +
    + +

    ◆ make_shared_message_pair() [6/6]

    + +
    +
    +
    +template<typename DataT = std::vector<double>>
    + + + + + +
    + + + + + + + + + + + + + + + + + + +
    std::shared_ptr< MessagePairInterface > modulo_core::communication::make_shared_message_pair (const std::shared_ptr< std::vector< double > > & data,
    const std::shared_ptr< rclcpp::Clock > & clock 
    )
    +
    +inline
    +
    + +

    Definition at line 216 of file MessagePair.hpp.

    + +
    +
    +
    + + + + diff --git a/versions/v5.0.1/namespacemodulo__core_1_1exceptions.html b/versions/v5.0.1/namespacemodulo__core_1_1exceptions.html new file mode 100644 index 00000000..eb10819d --- /dev/null +++ b/versions/v5.0.1/namespacemodulo__core_1_1exceptions.html @@ -0,0 +1,126 @@ + + + + + + + +Modulo: modulo_core::exceptions Namespace Reference + + + + + + + + + +
    +
    + + + + + + +
    +
    Modulo 5.0.0 +
    +
    +
    + + + + + + + + +
    +
    + + +
    +
    +
    +
    +
    +
    Loading...
    +
    Searching...
    +
    No Matches
    +
    +
    +
    +
    + + +
    +
    + +
    modulo_core::exceptions Namespace Reference
    +
    +
    + +

    Modulo Core exceptions module for defining exception classes. +More...

    + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +

    +Classes

    class  AddServiceException
     An exception class to notify errors when adding a service. More...
     
    class  AddSignalException
     An exception class to notify errors when adding a signal. More...
     
    class  CoreException
     A base class for all core exceptions. More...
     
    class  InvalidPointerCastException
     An exception class to notify if the result of getting an instance of a derived class through dynamic down-casting of an object of the base class is not a correctly typed instance of the derived class. More...
     
    class  InvalidPointerException
     An exception class to notify if an object has no reference count (if the object is not owned by any pointer) when attempting to get a derived instance through dynamic down-casting. More...
     
    class  LookupTransformException
     An exception class to notify an error while looking up TF transforms. More...
     
    class  MessageTranslationException
     An exception class to notify that the translation of a ROS message failed. More...
     
    class  NullPointerException
     An exception class to notify that a certain pointer is null. More...
     
    class  ParameterException
     An exception class to notify errors with parameters in modulo classes. More...
     
    class  ParameterTranslationException
     An exception class to notify incompatibility when translating parameters from different sources. More...
     
    +

    Detailed Description

    +

    Modulo Core exceptions module for defining exception classes.

    +
    + + + + diff --git a/versions/v5.0.1/namespacemodulo__core_1_1translators.html b/versions/v5.0.1/namespacemodulo__core_1_1translators.html new file mode 100644 index 00000000..c923f4de --- /dev/null +++ b/versions/v5.0.1/namespacemodulo__core_1_1translators.html @@ -0,0 +1,3214 @@ + + + + + + + +Modulo: modulo_core::translators Namespace Reference + + + + + + + + + +
    +
    + + + + + + +
    +
    Modulo 5.0.0 +
    +
    +
    + + + + + + + + +
    +
    + + +
    +
    +
    +
    +
    +
    Loading...
    +
    Searching...
    +
    No Matches
    +
    +
    +
    +
    + + +
    +
    + +
    modulo_core::translators Namespace Reference
    +
    +
    + +

    Modulo Core translation module for converting between ROS2 and state_representation data types. +More...

    + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +

    +Functions

    void read_message (state_representation::CartesianState &state, const geometry_msgs::msg::Accel &message)
     Convert a ROS geometry_msgs::msg::Accel to a CartesianState.
     
    void read_message (state_representation::CartesianState &state, const geometry_msgs::msg::AccelStamped &message)
     Convert a ROS geometry_msgs::msg::AccelStamped to a CartesianState.
     
    void read_message (state_representation::CartesianState &state, const geometry_msgs::msg::Pose &message)
     Convert a ROS geometry_msgs::msg::Pose to a CartesianState.
     
    void read_message (state_representation::CartesianState &state, const geometry_msgs::msg::PoseStamped &message)
     Convert a ROS geometry_msgs::msg::PoseStamped to a CartesianState.
     
    void read_message (state_representation::CartesianState &state, const geometry_msgs::msg::Transform &message)
     Convert a ROS geometry_msgs::msg::Transform to a CartesianState.
     
    void read_message (state_representation::CartesianState &state, const geometry_msgs::msg::TransformStamped &message)
     Convert a ROS geometry_msgs::msg::TransformStamped to a CartesianState.
     
    void read_message (state_representation::CartesianState &state, const geometry_msgs::msg::Twist &message)
     Convert a ROS geometry_msgs::msg::Twist to a CartesianState.
     
    void read_message (state_representation::CartesianState &state, const geometry_msgs::msg::TwistStamped &message)
     Convert a ROS geometry_msgs::msg::TwistStamped to a CartesianState.
     
    void read_message (state_representation::CartesianState &state, const geometry_msgs::msg::Wrench &message)
     Convert a ROS geometry_msgs::msg::Wrench to a CartesianState.
     
    void read_message (state_representation::CartesianState &state, const geometry_msgs::msg::WrenchStamped &message)
     Convert a ROS geometry_msgs::msg::WrenchStamped to a CartesianState.
     
    void read_message (state_representation::JointState &state, const sensor_msgs::msg::JointState &message)
     Convert a ROS sensor_msgs::msg::JointState to a JointState.
     
    template<typename T , typename U >
    void read_message (state_representation::Parameter< T > &state, const U &message)
     Template function to convert a ROS std_msgs::msg::T to a Parameter<T>
     
    void read_message (bool &state, const std_msgs::msg::Bool &message)
     Convert a ROS std_msgs::msg::Bool to a boolean.
     
    void read_message (double &state, const std_msgs::msg::Float64 &message)
     Convert a ROS std_msgs::msg::Float64 to a double.
     
    void read_message (std::vector< double > &state, const std_msgs::msg::Float64MultiArray &message)
     Convert a ROS std_msgs::msg::Float64MultiArray to a vector of double.
     
    void read_message (int &state, const std_msgs::msg::Int32 &message)
     Convert a ROS std_msgs::msg::Int32 to an integer.
     
    void read_message (std::string &state, const std_msgs::msg::String &message)
     Convert a ROS std_msgs::msg::String to a string.
     
    template<typename T >
    void read_message (T &state, const EncodedState &message)
     Convert a ROS std_msgs::msg::UInt8MultiArray message to a State using protobuf decoding.
     
    template<typename T >
    std::shared_ptr< T > safe_dynamic_pointer_cast (std::shared_ptr< state_representation::State > &state)
     Safely downcast a base state pointer to a derived state pointer.
     
    template<typename T >
    void safe_dynamic_cast (std::shared_ptr< state_representation::State > &state, std::shared_ptr< state_representation::State > &new_state)
     Update the value referenced by a state pointer from a new_state pointer.
     
    template<typename StateT , typename NewStateT >
    void safe_spatial_state_conversion (std::shared_ptr< state_representation::State > &state, std::shared_ptr< state_representation::State > &new_state, std::function< void(StateT &, const NewStateT &)> conversion_callback={})
     Update the value referenced by a state pointer by dynamically casting and converting the value referenced by a new_state pointer.
     
    template<typename StateT , typename NewStateT >
    void safe_state_with_names_conversion (std::shared_ptr< state_representation::State > &state, std::shared_ptr< state_representation::State > &new_state, std::function< void(StateT &, const NewStateT &)> conversion_callback={})
     Update the value referenced by a state pointer by dynamically casting and converting the value referenced by a new_state pointer.
     
    template<>
    void read_message (std::shared_ptr< state_representation::State > &state, const EncodedState &message)
     
    void write_message (geometry_msgs::msg::Accel &message, const state_representation::CartesianState &state, const rclcpp::Time &time)
     Convert a CartesianState to a ROS geometry_msgs::msg::Accel.
     
    void write_message (geometry_msgs::msg::AccelStamped &message, const state_representation::CartesianState &state, const rclcpp::Time &time)
     Convert a CartesianState to a ROS geometry_msgs::msg::AccelStamped.
     
    void write_message (geometry_msgs::msg::Pose &message, const state_representation::CartesianState &state, const rclcpp::Time &time)
     Convert a CartesianState to a ROS geometry_msgs::msg::Pose.
     
    void write_message (geometry_msgs::msg::PoseStamped &message, const state_representation::CartesianState &state, const rclcpp::Time &time)
     Convert a CartesianState to a ROS geometry_msgs::msg::PoseStamped.
     
    void write_message (geometry_msgs::msg::Transform &message, const state_representation::CartesianState &state, const rclcpp::Time &time)
     Convert a CartesianState to a ROS geometry_msgs::msg::Transform.
     
    void write_message (geometry_msgs::msg::TransformStamped &message, const state_representation::CartesianState &state, const rclcpp::Time &time)
     Convert a CartesianState to a ROS geometry_msgs::msg::TransformStamped.
     
    void write_message (geometry_msgs::msg::Twist &message, const state_representation::CartesianState &state, const rclcpp::Time &time)
     Convert a CartesianState to a ROS geometry_msgs::msg::Twist.
     
    void write_message (geometry_msgs::msg::TwistStamped &message, const state_representation::CartesianState &state, const rclcpp::Time &time)
     Convert a CartesianState to a ROS geometry_msgs::msg::TwistStamped.
     
    void write_message (geometry_msgs::msg::Wrench &message, const state_representation::CartesianState &state, const rclcpp::Time &time)
     Convert a CartesianState to a ROS geometry_msgs::msg::Wrench.
     
    void write_message (geometry_msgs::msg::WrenchStamped &message, const state_representation::CartesianState &state, const rclcpp::Time &time)
     Convert a CartesianState to a ROS geometry_msgs::msg::WrenchStamped.
     
    void write_message (sensor_msgs::msg::JointState &message, const state_representation::JointState &state, const rclcpp::Time &time)
     Convert a JointState to a ROS sensor_msgs::msg::JointState.
     
    void write_message (tf2_msgs::msg::TFMessage &message, const state_representation::CartesianState &state, const rclcpp::Time &time)
     Convert a CartesianState to a ROS tf2_msgs::msg::TFMessage.
     
    template<typename U , typename T >
    void write_message (U &message, const state_representation::Parameter< T > &state, const rclcpp::Time &)
     Convert a Parameter<T> to a ROS equivalent representation.
     
    void write_message (std_msgs::msg::Bool &message, const bool &state, const rclcpp::Time &time)
     Convert a boolean to a ROS std_msgs::msg::Bool.
     
    void write_message (std_msgs::msg::Float64 &message, const double &state, const rclcpp::Time &time)
     Convert a double to a ROS std_msgs::msg::Float64.
     
    void write_message (std_msgs::msg::Float64MultiArray &message, const std::vector< double > &state, const rclcpp::Time &time)
     Convert a vector of double to a ROS std_msgs::msg::Float64MultiArray.
     
    void write_message (std_msgs::msg::Int32 &message, const int &state, const rclcpp::Time &time)
     Convert an integer to a ROS std_msgs::msg::Int32.
     
    void write_message (std_msgs::msg::String &message, const std::string &state, const rclcpp::Time &time)
     Convert a string to a ROS std_msgs::msg::String.
     
    template<typename T >
    void write_message (EncodedState &message, const T &state, const rclcpp::Time &)
     Convert a state to an EncodedState (std_msgs::msg::UInt8MultiArray) message using protobuf encoding.
     
    void copy_parameter_value (const std::shared_ptr< const state_representation::ParameterInterface > &source_parameter, const std::shared_ptr< state_representation::ParameterInterface > &parameter)
     Copy the value of one parameter interface into another.
     
    rclcpp::Parameter write_parameter (const std::shared_ptr< state_representation::ParameterInterface > &parameter)
     Write a ROS Parameter from a ParameterInterface pointer.
     
    std::shared_ptr< state_representation::ParameterInterface > read_parameter (const rclcpp::Parameter &ros_parameter)
     Create a new ParameterInterface from a ROS Parameter object.
     
    std::shared_ptr< state_representation::ParameterInterface > read_parameter_const (const rclcpp::Parameter &ros_parameter, const std::shared_ptr< const state_representation::ParameterInterface > &parameter)
     Update the parameter value of a ParameterInterface from a ROS Parameter object only if the two parameters have the same name and the ROS Parameter value can be interpreted as a ParameterInterface value.
     
    void read_parameter (const rclcpp::Parameter &ros_parameter, const std::shared_ptr< state_representation::ParameterInterface > &parameter)
     Update the parameter value of a ParameterInterface from a ROS Parameter object.
     
    rclcpp::ParameterType get_ros_parameter_type (const state_representation::ParameterType &parameter_type)
     Given a state representation parameter type, get the corresponding ROS parameter type.
     
    void write_message (geometry_msgs::msg::Accel &message, const CartesianState &state, const rclcpp::Time &)
     
    void write_message (geometry_msgs::msg::AccelStamped &message, const CartesianState &state, const rclcpp::Time &time)
     
    void write_message (geometry_msgs::msg::Pose &message, const CartesianState &state, const rclcpp::Time &)
     
    void write_message (geometry_msgs::msg::PoseStamped &message, const CartesianState &state, const rclcpp::Time &time)
     
    void write_message (geometry_msgs::msg::Transform &message, const CartesianState &state, const rclcpp::Time &)
     
    void write_message (geometry_msgs::msg::TransformStamped &message, const CartesianState &state, const rclcpp::Time &time)
     
    void write_message (geometry_msgs::msg::Twist &message, const CartesianState &state, const rclcpp::Time &)
     
    void write_message (geometry_msgs::msg::TwistStamped &message, const CartesianState &state, const rclcpp::Time &time)
     
    void write_message (geometry_msgs::msg::Wrench &message, const CartesianState &state, const rclcpp::Time &)
     
    void write_message (geometry_msgs::msg::WrenchStamped &message, const CartesianState &state, const rclcpp::Time &time)
     
    void write_message (sensor_msgs::msg::JointState &message, const JointState &state, const rclcpp::Time &time)
     
    void write_message (tf2_msgs::msg::TFMessage &message, const CartesianState &state, const rclcpp::Time &time)
     
    template<typename U , typename T >
    void write_message (U &message, const Parameter< T > &state, const rclcpp::Time &)
     
    +template void write_message< std_msgs::msg::Float64, double > (std_msgs::msg::Float64 &message, const Parameter< double > &state, const rclcpp::Time &)
     
    +template void write_message< std_msgs::msg::Float64MultiArray, std::vector< double > > (std_msgs::msg::Float64MultiArray &message, const Parameter< std::vector< double > > &state, const rclcpp::Time &)
     
    +template void write_message< std_msgs::msg::Bool, bool > (std_msgs::msg::Bool &message, const Parameter< bool > &state, const rclcpp::Time &)
     
    +template void write_message< std_msgs::msg::String, std::string > (std_msgs::msg::String &message, const Parameter< std::string > &state, const rclcpp::Time &)
     
    template<>
    void write_message (geometry_msgs::msg::Transform &message, const Parameter< CartesianPose > &state, const rclcpp::Time &time)
     
    template<>
    void write_message (geometry_msgs::msg::TransformStamped &message, const Parameter< CartesianPose > &state, const rclcpp::Time &time)
     
    template<>
    void write_message (tf2_msgs::msg::TFMessage &message, const Parameter< CartesianPose > &state, const rclcpp::Time &time)
     
    void copy_parameter_value (const std::shared_ptr< const ParameterInterface > &source_parameter, const std::shared_ptr< ParameterInterface > &parameter)
     
    rclcpp::Parameter write_parameter (const std::shared_ptr< ParameterInterface > &parameter)
     
    std::shared_ptr< ParameterInterface > read_parameter_const (const rclcpp::Parameter &ros_parameter, const std::shared_ptr< const ParameterInterface > &parameter)
     
    void read_parameter (const rclcpp::Parameter &ros_parameter, const std::shared_ptr< ParameterInterface > &parameter)
     
    rclcpp::ParameterType get_ros_parameter_type (const ParameterType &parameter_type)
     
    +

    Detailed Description

    +

    Modulo Core translation module for converting between ROS2 and state_representation data types.

    +

    Function Documentation

    + +

    ◆ copy_parameter_value() [1/2]

    + +
    +
    + + + + + + + + + + + + + + + + + + +
    void modulo_core::translators::copy_parameter_value (const std::shared_ptr< const ParameterInterface > & source_parameter,
    const std::shared_ptr< ParameterInterface > & parameter 
    )
    +
    + +

    Definition at line 15 of file parameter_translators.cpp.

    + +
    +
    + +

    ◆ copy_parameter_value() [2/2]

    + +
    +
    + + + + + + + + + + + + + + + + + + +
    void modulo_core::translators::copy_parameter_value (const std::shared_ptr< const state_representation::ParameterInterface > & source_parameter,
    const std::shared_ptr< state_representation::ParameterInterface > & parameter 
    )
    +
    + +

    Copy the value of one parameter interface into another.

    +

    When referencing a Parameter instance through a ParameterInterface pointer, it is necessary to know the parameter type to get or set the parameter value. Sometimes it is desirable to update the parameter value from another compatible ParameterInterface, while still preserving the reference to the original instance. This helper function calls the getters and setters of the appropriate parameter type to modify the value of the parameter instance while preserving the reference of the original pointer.

    Parameters
    + + + +
    source_parameterThe ParameterInterface with a value to copy
    parameterThe destination ParameterInterface to be updated
    +
    +
    +
    Exceptions
    + + +
    modulo_core::exceptions::ParameterTranslationExceptionif the copying failed
    +
    +
    + +
    +
    + +

    ◆ get_ros_parameter_type() [1/2]

    + +
    +
    + + + + + + + + +
    rclcpp::ParameterType modulo_core::translators::get_ros_parameter_type (const ParameterType & parameter_type)
    +
    + +

    Definition at line 257 of file parameter_translators.cpp.

    + +
    +
    + +

    ◆ get_ros_parameter_type() [2/2]

    + +
    +
    + + + + + + + + +
    rclcpp::ParameterType modulo_core::translators::get_ros_parameter_type (const state_representation::ParameterType & parameter_type)
    +
    + +

    Given a state representation parameter type, get the corresponding ROS parameter type.

    +
    Parameters
    + + +
    parameter_typeThe state representation parameter type
    +
    +
    +
    Returns
    The corresponding ROS parameter type
    + +
    +
    + +

    ◆ read_message() [1/19]

    + +
    +
    + + + + + + + + + + + + + + + + + + +
    void modulo_core::translators::read_message (bool & state,
    const std_msgs::msg::Bool & message 
    )
    +
    + +

    Convert a ROS std_msgs::msg::Bool to a boolean.

    +
    Parameters
    + + + +
    stateThe state to populate
    messageThe ROS message to read from
    +
    +
    + +

    Definition at line 85 of file message_readers.cpp.

    + +
    +
    + +

    ◆ read_message() [2/19]

    + +
    +
    + + + + + + + + + + + + + + + + + + +
    void modulo_core::translators::read_message (double & state,
    const std_msgs::msg::Float64 & message 
    )
    +
    + +

    Convert a ROS std_msgs::msg::Float64 to a double.

    +
    Parameters
    + + + +
    stateThe state to populate
    messageThe ROS message to read from
    +
    +
    + +

    Definition at line 89 of file message_readers.cpp.

    + +
    +
    + +

    ◆ read_message() [3/19]

    + +
    +
    + + + + + + + + + + + + + + + + + + +
    void modulo_core::translators::read_message (int & state,
    const std_msgs::msg::Int32 & message 
    )
    +
    + +

    Convert a ROS std_msgs::msg::Int32 to an integer.

    +
    Parameters
    + + + +
    stateThe state to populate
    messageThe ROS message to read from
    +
    +
    + +

    Definition at line 97 of file message_readers.cpp.

    + +
    +
    + +

    ◆ read_message() [4/19]

    + +
    +
    + + + + + + + + + + + + + + + + + + +
    void modulo_core::translators::read_message (state_representation::CartesianState & state,
    const geometry_msgs::msg::Accel & message 
    )
    +
    + +

    Convert a ROS geometry_msgs::msg::Accel to a CartesianState.

    +
    Parameters
    + + + +
    stateThe CartesianState to populate
    messageThe ROS message to read from
    +
    +
    + +

    Definition at line 17 of file message_readers.cpp.

    + +
    +
    + +

    ◆ read_message() [5/19]

    + +
    +
    + + + + + + + + + + + + + + + + + + +
    void modulo_core::translators::read_message (state_representation::CartesianState & state,
    const geometry_msgs::msg::AccelStamped & message 
    )
    +
    + +

    Convert a ROS geometry_msgs::msg::AccelStamped to a CartesianState.

    +
    Parameters
    + + + +
    stateThe CartesianState to populate
    messageThe ROS message to read from
    +
    +
    + +

    Definition at line 22 of file message_readers.cpp.

    + +
    +
    + +

    ◆ read_message() [6/19]

    + +
    +
    + + + + + + + + + + + + + + + + + + +
    void modulo_core::translators::read_message (state_representation::CartesianState & state,
    const geometry_msgs::msg::Pose & message 
    )
    +
    + +

    Convert a ROS geometry_msgs::msg::Pose to a CartesianState.

    +
    Parameters
    + + + +
    stateThe CartesianState to populate
    messageThe ROS message to read from
    +
    +
    + +

    Definition at line 27 of file message_readers.cpp.

    + +
    +
    + +

    ◆ read_message() [7/19]

    + +
    +
    + + + + + + + + + + + + + + + + + + +
    void modulo_core::translators::read_message (state_representation::CartesianState & state,
    const geometry_msgs::msg::PoseStamped & message 
    )
    +
    + +

    Convert a ROS geometry_msgs::msg::PoseStamped to a CartesianState.

    +
    Parameters
    + + + +
    stateThe CartesianState to populate
    messageThe ROS message to read from
    +
    +
    + +

    Definition at line 32 of file message_readers.cpp.

    + +
    +
    + +

    ◆ read_message() [8/19]

    + +
    +
    + + + + + + + + + + + + + + + + + + +
    void modulo_core::translators::read_message (state_representation::CartesianState & state,
    const geometry_msgs::msg::Transform & message 
    )
    +
    + +

    Convert a ROS geometry_msgs::msg::Transform to a CartesianState.

    +
    Parameters
    + + + +
    stateThe CartesianState to populate
    messageThe ROS message to read from
    +
    +
    + +

    Definition at line 37 of file message_readers.cpp.

    + +
    +
    + +

    ◆ read_message() [9/19]

    + +
    +
    + + + + + + + + + + + + + + + + + + +
    void modulo_core::translators::read_message (state_representation::CartesianState & state,
    const geometry_msgs::msg::TransformStamped & message 
    )
    +
    + +

    Convert a ROS geometry_msgs::msg::TransformStamped to a CartesianState.

    +
    Parameters
    + + + +
    stateThe CartesianState to populate
    messageThe ROS message to read from
    +
    +
    + +

    Definition at line 42 of file message_readers.cpp.

    + +
    +
    + +

    ◆ read_message() [10/19]

    + +
    +
    + + + + + + + + + + + + + + + + + + +
    void modulo_core::translators::read_message (state_representation::CartesianState & state,
    const geometry_msgs::msg::Twist & message 
    )
    +
    + +

    Convert a ROS geometry_msgs::msg::Twist to a CartesianState.

    +
    Parameters
    + + + +
    stateThe CartesianState to populate
    messageThe ROS message to read from
    +
    +
    + +

    Definition at line 48 of file message_readers.cpp.

    + +
    +
    + +

    ◆ read_message() [11/19]

    + +
    +
    + + + + + + + + + + + + + + + + + + +
    void modulo_core::translators::read_message (state_representation::CartesianState & state,
    const geometry_msgs::msg::TwistStamped & message 
    )
    +
    + +

    Convert a ROS geometry_msgs::msg::TwistStamped to a CartesianState.

    +
    Parameters
    + + + +
    stateThe CartesianState to populate
    messageThe ROS message to read from
    +
    +
    + +

    Definition at line 53 of file message_readers.cpp.

    + +
    +
    + +

    ◆ read_message() [12/19]

    + +
    +
    + + + + + + + + + + + + + + + + + + +
    void modulo_core::translators::read_message (state_representation::CartesianState & state,
    const geometry_msgs::msg::Wrench & message 
    )
    +
    + +

    Convert a ROS geometry_msgs::msg::Wrench to a CartesianState.

    +
    Parameters
    + + + +
    stateThe CartesianState to populate
    messageThe ROS message to read from
    +
    +
    + +

    Definition at line 58 of file message_readers.cpp.

    + +
    +
    + +

    ◆ read_message() [13/19]

    + +
    +
    + + + + + + + + + + + + + + + + + + +
    void modulo_core::translators::read_message (state_representation::CartesianState & state,
    const geometry_msgs::msg::WrenchStamped & message 
    )
    +
    + +

    Convert a ROS geometry_msgs::msg::WrenchStamped to a CartesianState.

    +
    Parameters
    + + + +
    stateThe CartesianState to populate
    messageThe ROS message to read from
    +
    +
    + +

    Definition at line 63 of file message_readers.cpp.

    + +
    +
    + +

    ◆ read_message() [14/19]

    + +
    +
    + + + + + + + + + + + + + + + + + + +
    void modulo_core::translators::read_message (state_representation::JointState & state,
    const sensor_msgs::msg::JointState & message 
    )
    +
    + +

    Convert a ROS sensor_msgs::msg::JointState to a JointState.

    +
    Parameters
    + + + +
    stateThe JointState to populate
    messageThe ROS message to read from
    +
    +
    + +

    Definition at line 68 of file message_readers.cpp.

    + +
    +
    + +

    ◆ read_message() [15/19]

    + +
    +
    +
    +template<typename T , typename U >
    + + + + + + + + + + + + + + + + + + +
    void modulo_core::translators::read_message (state_representation::Parameter< T > & state,
    const U & message 
    )
    +
    + +

    Template function to convert a ROS std_msgs::msg::T to a Parameter<T>

    +
    Template Parameters
    + + + +
    TAll types of parameters supported in ROS std messages
    UAll types of parameters supported in ROS std messages
    +
    +
    +
    Parameters
    + + + +
    stateThe Parameter<T> to populate
    messageThe ROS message to read from
    +
    +
    + +

    Definition at line 115 of file message_readers.hpp.

    + +
    +
    + +

    ◆ read_message() [16/19]

    + +
    +
    +
    +template<>
    + + + + + +
    + + + + + + + + + + + + + + + + + + +
    void modulo_core::translators::read_message (std::shared_ptr< state_representation::State > & state,
    const EncodedState & message 
    )
    +
    +inline
    +
    + +

    Definition at line 275 of file message_readers.hpp.

    + +
    +
    + +

    ◆ read_message() [17/19]

    + +
    +
    + + + + + + + + + + + + + + + + + + +
    void modulo_core::translators::read_message (std::string & state,
    const std_msgs::msg::String & message 
    )
    +
    + +

    Convert a ROS std_msgs::msg::String to a string.

    +
    Parameters
    + + + +
    stateThe state to populate
    messageThe ROS message to read from
    +
    +
    + +

    Definition at line 101 of file message_readers.cpp.

    + +
    +
    + +

    ◆ read_message() [18/19]

    + +
    +
    + + + + + + + + + + + + + + + + + + +
    void modulo_core::translators::read_message (std::vector< double > & state,
    const std_msgs::msg::Float64MultiArray & message 
    )
    +
    + +

    Convert a ROS std_msgs::msg::Float64MultiArray to a vector of double.

    +
    Parameters
    + + + +
    stateThe state to populate
    messageThe ROS message to read from
    +
    +
    + +

    Definition at line 93 of file message_readers.cpp.

    + +
    +
    + +

    ◆ read_message() [19/19]

    + +
    +
    +
    +template<typename T >
    + + + + + +
    + + + + + + + + + + + + + + + + + + +
    void modulo_core::translators::read_message (T & state,
    const EncodedState & message 
    )
    +
    +inline
    +
    + +

    Convert a ROS std_msgs::msg::UInt8MultiArray message to a State using protobuf decoding.

    +
    Template Parameters
    + + +
    TA state_representation::State type
    +
    +
    +
    Parameters
    + + + +
    stateThe state to populate
    messageThe ROS message to read from
    +
    +
    +
    Exceptions
    + + +
    modulo_core::exceptions::MessageTranslationExceptionif the translation failed or is not supported.
    +
    +
    + +

    Definition at line 162 of file message_readers.hpp.

    + +
    +
    + +

    ◆ read_parameter() [1/3]

    + +
    +
    + + + + + + + + +
    std::shared_ptr< ParameterInterface > modulo_core::translators::read_parameter (const rclcpp::Parameter & ros_parameter)
    +
    + +

    Create a new ParameterInterface from a ROS Parameter object.

    +
    Parameters
    + + +
    ros_parameterThe ROS parameter object to read
    +
    +
    +
    Exceptions
    + + +
    modulo_core::exceptions::ParameterTranslationExceptionif the ROS parameter could not be read
    +
    +
    +
    Returns
    A new ParameterInterface pointer
    + +

    Definition at line 141 of file parameter_translators.cpp.

    + +
    +
    + +

    ◆ read_parameter() [2/3]

    + +
    +
    + + + + + + + + + + + + + + + + + + +
    void modulo_core::translators::read_parameter (const rclcpp::Parameter & ros_parameter,
    const std::shared_ptr< ParameterInterface > & parameter 
    )
    +
    + +

    Definition at line 252 of file parameter_translators.cpp.

    + +
    +
    + +

    ◆ read_parameter() [3/3]

    + +
    +
    + + + + + + + + + + + + + + + + + + +
    void modulo_core::translators::read_parameter (const rclcpp::Parameter & ros_parameter,
    const std::shared_ptr< state_representation::ParameterInterface > & parameter 
    )
    +
    + +

    Update the parameter value of a ParameterInterface from a ROS Parameter object.

    +

    The destination ParameterInterface must have a compatible parameter name and type.

    Parameters
    + + + +
    ros_parameterThe ROS parameter object to read
    parameterAn existing ParameterInterface pointer
    +
    +
    +
    Exceptions
    + + +
    modulo_core::exceptions::ParameterTranslationExceptionif the ROS parameter could not be read
    +
    +
    + +
    +
    + +

    ◆ read_parameter_const() [1/2]

    + +
    +
    + + + + + + + + + + + + + + + + + + +
    std::shared_ptr< ParameterInterface > modulo_core::translators::read_parameter_const (const rclcpp::Parameter & ros_parameter,
    const std::shared_ptr< const ParameterInterface > & parameter 
    )
    +
    + +

    Definition at line 192 of file parameter_translators.cpp.

    + +
    +
    + +

    ◆ read_parameter_const() [2/2]

    + +
    +
    + + + + + + + + + + + + + + + + + + +
    std::shared_ptr< state_representation::ParameterInterface > modulo_core::translators::read_parameter_const (const rclcpp::Parameter & ros_parameter,
    const std::shared_ptr< const state_representation::ParameterInterface > & parameter 
    )
    +
    + +

    Update the parameter value of a ParameterInterface from a ROS Parameter object only if the two parameters have the same name and the ROS Parameter value can be interpreted as a ParameterInterface value.

    +
    Parameters
    + + + +
    ros_parameterThe ROS parameter object to read
    parameterAn existing ParameterInterface pointer
    +
    +
    +
    Exceptions
    + + +
    modulo_core::exceptions::ParameterTranslationExceptionif the ROS parameter could not be read
    +
    +
    +
    Returns
    A new ParameterInterface pointer with the updated value
    + +
    +
    + +

    ◆ safe_dynamic_cast()

    + +
    +
    +
    +template<typename T >
    + + + + + +
    + + + + + + + + + + + + + + + + + + +
    void modulo_core::translators::safe_dynamic_cast (std::shared_ptr< state_representation::State > & state,
    std::shared_ptr< state_representation::State > & new_state 
    )
    +
    +inline
    +
    + +

    Update the value referenced by a state pointer from a new_state pointer.

    +

    The base state and new_state pointers must reference state-derived instances of type T. This function dynamically downcasts each pointer to a pointer of the derived type and assigns the de-referenced value from the new_state parameter to the address of the state pointer.

    Template Parameters
    + + +
    TThe derived state type
    +
    +
    +
    Parameters
    + + + +
    stateA base state pointer referencing a state-derived instance to be modified
    new_stateA base state pointer referencing a state-derived instance to be copied into the state parameter
    +
    +
    +
    Exceptions
    + + +
    modulo_core::exceptions::MessageTranslationExceptionif either parameter cannot be cast to state type T
    +
    +
    + +

    Definition at line 202 of file message_readers.hpp.

    + +
    +
    + +

    ◆ safe_dynamic_pointer_cast()

    + +
    +
    +
    +template<typename T >
    + + + + + +
    + + + + + + + + +
    std::shared_ptr< T > modulo_core::translators::safe_dynamic_pointer_cast (std::shared_ptr< state_representation::State > & state)
    +
    +inline
    +
    + +

    Safely downcast a base state pointer to a derived state pointer.

    +

    This utility function asserts that result of the dynamic pointer cast is not null, and throws an exception otherwise. This helps to prevent uncaught segmentation faults from a null pointer dynamic cast result being passed to subsequent execution steps.

    Template Parameters
    + + +
    TThe derived state type
    +
    +
    +
    Parameters
    + + +
    stateA base state pointer referencing a state-derived instance
    +
    +
    +
    Exceptions
    + + +
    modulo_core::exceptions::MessageTranslationExceptionif the dynamic cast results in a null pointer
    +
    +
    +
    Returns
    The derived pointer of type T
    + +

    Definition at line 182 of file message_readers.hpp.

    + +
    +
    + +

    ◆ safe_spatial_state_conversion()

    + +
    +
    +
    +template<typename StateT , typename NewStateT >
    + + + + + +
    + + + + + + + + + + + + + + + + + + + + + + + + +
    void modulo_core::translators::safe_spatial_state_conversion (std::shared_ptr< state_representation::State > & state,
    std::shared_ptr< state_representation::State > & new_state,
    std::function< void(StateT &, const NewStateT &)> conversion_callback = {} 
    )
    +
    +inline
    +
    + +

    Update the value referenced by a state pointer by dynamically casting and converting the value referenced by a new_state pointer.

    +

    This utility function is intended to help the conversion between spatial-state-derived instances encapsulated in base state pointers. It sets the name and reference frame of the referenced state instance from the new_state, and then passes the referenced values to a user-defined conversion callback function. For example, if state is referencing a CartesianPose instance A and new_state is referencing a CartesianState instance B, the conversion callback function should invoke A.set_pose(B.get_pose()).

    Template Parameters
    + + + +
    StateTThe derived spatial state type of the destination state
    NewStateTThe derived spatial state type of the new state
    +
    +
    +
    Parameters
    + + + + +
    stateA base state pointer referencing a spatial-state-derived instance to be modified
    new_stateA base state pointer referencing a spatial-state-derived instance to be converted into the state parameter
    conversion_callbackA callback function taking parameters of type StateT and NewStateT, where the referenced StateT instance can be modified as needed from the NewStateT value
    +
    +
    + +

    Definition at line 226 of file message_readers.hpp.

    + +
    +
    + +

    ◆ safe_state_with_names_conversion()

    + +
    +
    +
    +template<typename StateT , typename NewStateT >
    + + + + + +
    + + + + + + + + + + + + + + + + + + + + + + + + +
    void modulo_core::translators::safe_state_with_names_conversion (std::shared_ptr< state_representation::State > & state,
    std::shared_ptr< state_representation::State > & new_state,
    std::function< void(StateT &, const NewStateT &)> conversion_callback = {} 
    )
    +
    +inline
    +
    + +

    Update the value referenced by a state pointer by dynamically casting and converting the value referenced by a new_state pointer.

    +

    This utility function is intended to help the conversion between joint-state-derived instances encapsulated in base state pointers. It sets the name and joint names of the referenced state instance from the new_state, and then passes the referenced values to a user-defined conversion callback function. For example, if state is referencing a JointPositions instance A and new_state is referencing a JointState instance B, the conversion callback function should invoke A.set_positions(B.get_positions()).

    Template Parameters
    + + + +
    StateTThe derived joint state type of the destination state
    NewStateTThe derived joint state type of the new state
    +
    +
    +
    Parameters
    + + + + +
    stateA base state pointer referencing a joint-state-derived instance to be modified
    new_stateA base state pointer referencing a joint-state-derived instance to be converted into the state parameter
    conversion_callbackA callback function taking parameters of type StateT and NewStateT, where the referenced StateT instance can be modified as needed from the NewStateT value
    +
    +
    + +

    Definition at line 260 of file message_readers.hpp.

    + +
    +
    + +

    ◆ write_message() [1/35]

    + +
    +
    +
    +template<typename T >
    + + + + + +
    + + + + + + + + + + + + + + + + + + + + + + + + +
    void modulo_core::translators::write_message (EncodedState & message,
    const T & state,
    const rclcpp::Time &  
    )
    +
    +inline
    +
    + +

    Convert a state to an EncodedState (std_msgs::msg::UInt8MultiArray) message using protobuf encoding.

    +
    Template Parameters
    + + +
    TA state_representation::State type
    +
    +
    +
    Parameters
    + + + + +
    messageThe ROS message to populate
    stateThe state to read from
    timeThe time of the message
    +
    +
    +
    Exceptions
    + + +
    modulo_core::exceptions::MessageTranslationExceptionif the translation failed or is not supported.
    +
    +
    + +

    Definition at line 215 of file message_writers.hpp.

    + +
    +
    + +

    ◆ write_message() [2/35]

    + +
    +
    + + + + + + + + + + + + + + + + + + + + + + + + +
    void modulo_core::translators::write_message (geometry_msgs::msg::Accel & message,
    const CartesianState & state,
    const rclcpp::Time &  
    )
    +
    + +

    Definition at line 28 of file message_writers.cpp.

    + +
    +
    + +

    ◆ write_message() [3/35]

    + +
    +
    + + + + + + + + + + + + + + + + + + + + + + + + +
    void modulo_core::translators::write_message (geometry_msgs::msg::Accel & message,
    const state_representation::CartesianState & state,
    const rclcpp::Time & time 
    )
    +
    + +

    Convert a CartesianState to a ROS geometry_msgs::msg::Accel.

    +
    Parameters
    + + + + +
    messageThe ROS message to populate
    stateThe state to read from
    timeThe time of the message
    +
    +
    +
    Exceptions
    + + +
    modulo_core::exceptions::MessageTranslationExceptionif the provided state is empty.
    +
    +
    + +
    +
    + +

    ◆ write_message() [4/35]

    + +
    +
    + + + + + + + + + + + + + + + + + + + + + + + + +
    void modulo_core::translators::write_message (geometry_msgs::msg::AccelStamped & message,
    const CartesianState & state,
    const rclcpp::Time & time 
    )
    +
    + +

    Definition at line 37 of file message_writers.cpp.

    + +
    +
    + +

    ◆ write_message() [5/35]

    + +
    +
    + + + + + + + + + + + + + + + + + + + + + + + + +
    void modulo_core::translators::write_message (geometry_msgs::msg::AccelStamped & message,
    const state_representation::CartesianState & state,
    const rclcpp::Time & time 
    )
    +
    + +

    Convert a CartesianState to a ROS geometry_msgs::msg::AccelStamped.

    +
    Parameters
    + + + + +
    messageThe ROS message to populate
    stateThe state to read from
    timeThe time of the message
    +
    +
    +
    Exceptions
    + + +
    modulo_core::exceptions::MessageTranslationExceptionif the provided state is empty.
    +
    +
    + +
    +
    + +

    ◆ write_message() [6/35]

    + +
    +
    + + + + + + + + + + + + + + + + + + + + + + + + +
    void modulo_core::translators::write_message (geometry_msgs::msg::Pose & message,
    const CartesianState & state,
    const rclcpp::Time &  
    )
    +
    + +

    Definition at line 43 of file message_writers.cpp.

    + +
    +
    + +

    ◆ write_message() [7/35]

    + +
    +
    + + + + + + + + + + + + + + + + + + + + + + + + +
    void modulo_core::translators::write_message (geometry_msgs::msg::Pose & message,
    const state_representation::CartesianState & state,
    const rclcpp::Time & time 
    )
    +
    + +

    Convert a CartesianState to a ROS geometry_msgs::msg::Pose.

    +
    Parameters
    + + + + +
    messageThe ROS message to populate
    stateThe state to read from
    timeThe time of the message
    +
    +
    +
    Exceptions
    + + +
    modulo_core::exceptions::MessageTranslationExceptionif the provided state is empty.
    +
    +
    + +
    +
    + +

    ◆ write_message() [8/35]

    + +
    +
    + + + + + + + + + + + + + + + + + + + + + + + + +
    void modulo_core::translators::write_message (geometry_msgs::msg::PoseStamped & message,
    const CartesianState & state,
    const rclcpp::Time & time 
    )
    +
    + +

    Definition at line 52 of file message_writers.cpp.

    + +
    +
    + +

    ◆ write_message() [9/35]

    + +
    +
    + + + + + + + + + + + + + + + + + + + + + + + + +
    void modulo_core::translators::write_message (geometry_msgs::msg::PoseStamped & message,
    const state_representation::CartesianState & state,
    const rclcpp::Time & time 
    )
    +
    + +

    Convert a CartesianState to a ROS geometry_msgs::msg::PoseStamped.

    +
    Parameters
    + + + + +
    messageThe ROS message to populate
    stateThe state to read from
    timeThe time of the message
    +
    +
    +
    Exceptions
    + + +
    modulo_core::exceptions::MessageTranslationExceptionif the provided state is empty.
    +
    +
    + +
    +
    + +

    ◆ write_message() [10/35]

    + +
    +
    + + + + + + + + + + + + + + + + + + + + + + + + +
    void modulo_core::translators::write_message (geometry_msgs::msg::Transform & message,
    const CartesianState & state,
    const rclcpp::Time &  
    )
    +
    + +

    Definition at line 58 of file message_writers.cpp.

    + +
    +
    + +

    ◆ write_message() [11/35]

    + +
    +
    +
    +template<>
    + + + + + + + + + + + + + + + + + + + + + + + + +
    void modulo_core::translators::write_message (geometry_msgs::msg::Transform & message,
    const Parameter< CartesianPose > & state,
    const rclcpp::Time & time 
    )
    +
    + +

    Definition at line 152 of file message_writers.cpp.

    + +
    +
    + +

    ◆ write_message() [12/35]

    + +
    +
    + + + + + + + + + + + + + + + + + + + + + + + + +
    void modulo_core::translators::write_message (geometry_msgs::msg::Transform & message,
    const state_representation::CartesianState & state,
    const rclcpp::Time & time 
    )
    +
    + +

    Convert a CartesianState to a ROS geometry_msgs::msg::Transform.

    +
    Parameters
    + + + + +
    messageThe ROS message to populate
    stateThe state to read from
    timeThe time of the message
    +
    +
    +
    Exceptions
    + + +
    modulo_core::exceptions::MessageTranslationExceptionif the provided state is empty.
    +
    +
    + +
    +
    + +

    ◆ write_message() [13/35]

    + +
    +
    + + + + + + + + + + + + + + + + + + + + + + + + +
    void modulo_core::translators::write_message (geometry_msgs::msg::TransformStamped & message,
    const CartesianState & state,
    const rclcpp::Time & time 
    )
    +
    + +

    Definition at line 67 of file message_writers.cpp.

    + +
    +
    + +

    ◆ write_message() [14/35]

    + +
    +
    +
    +template<>
    + + + + + + + + + + + + + + + + + + + + + + + + +
    void modulo_core::translators::write_message (geometry_msgs::msg::TransformStamped & message,
    const Parameter< CartesianPose > & state,
    const rclcpp::Time & time 
    )
    +
    + +

    Definition at line 158 of file message_writers.cpp.

    + +
    +
    + +

    ◆ write_message() [15/35]

    + +
    +
    + + + + + + + + + + + + + + + + + + + + + + + + +
    void modulo_core::translators::write_message (geometry_msgs::msg::TransformStamped & message,
    const state_representation::CartesianState & state,
    const rclcpp::Time & time 
    )
    +
    + +

    Convert a CartesianState to a ROS geometry_msgs::msg::TransformStamped.

    +
    Parameters
    + + + + +
    messageThe ROS message to populate
    stateThe state to read from
    timeThe time of the message
    +
    +
    +
    Exceptions
    + + +
    modulo_core::exceptions::MessageTranslationExceptionif the provided state is empty.
    +
    +
    + +
    +
    + +

    ◆ write_message() [16/35]

    + +
    +
    + + + + + + + + + + + + + + + + + + + + + + + + +
    void modulo_core::translators::write_message (geometry_msgs::msg::Twist & message,
    const CartesianState & state,
    const rclcpp::Time &  
    )
    +
    + +

    Definition at line 75 of file message_writers.cpp.

    + +
    +
    + +

    ◆ write_message() [17/35]

    + +
    +
    + + + + + + + + + + + + + + + + + + + + + + + + +
    void modulo_core::translators::write_message (geometry_msgs::msg::Twist & message,
    const state_representation::CartesianState & state,
    const rclcpp::Time & time 
    )
    +
    + +

    Convert a CartesianState to a ROS geometry_msgs::msg::Twist.

    +
    Parameters
    + + + + +
    messageThe ROS message to populate
    stateThe state to read from
    timeThe time of the message
    +
    +
    +
    Exceptions
    + + +
    modulo_core::exceptions::MessageTranslationExceptionif the provided state is empty.
    +
    +
    + +
    +
    + +

    ◆ write_message() [18/35]

    + +
    +
    + + + + + + + + + + + + + + + + + + + + + + + + +
    void modulo_core::translators::write_message (geometry_msgs::msg::TwistStamped & message,
    const CartesianState & state,
    const rclcpp::Time & time 
    )
    +
    + +

    Definition at line 84 of file message_writers.cpp.

    + +
    +
    + +

    ◆ write_message() [19/35]

    + +
    +
    + + + + + + + + + + + + + + + + + + + + + + + + +
    void modulo_core::translators::write_message (geometry_msgs::msg::TwistStamped & message,
    const state_representation::CartesianState & state,
    const rclcpp::Time & time 
    )
    +
    + +

    Convert a CartesianState to a ROS geometry_msgs::msg::TwistStamped.

    +
    Parameters
    + + + + +
    messageThe ROS message to populate
    stateThe state to read from
    timeThe time of the message
    +
    +
    +
    Exceptions
    + + +
    modulo_core::exceptions::MessageTranslationExceptionif the provided state is empty.
    +
    +
    + +
    +
    + +

    ◆ write_message() [20/35]

    + +
    +
    + + + + + + + + + + + + + + + + + + + + + + + + +
    void modulo_core::translators::write_message (geometry_msgs::msg::Wrench & message,
    const CartesianState & state,
    const rclcpp::Time &  
    )
    +
    + +

    Definition at line 90 of file message_writers.cpp.

    + +
    +
    + +

    ◆ write_message() [21/35]

    + +
    +
    + + + + + + + + + + + + + + + + + + + + + + + + +
    void modulo_core::translators::write_message (geometry_msgs::msg::Wrench & message,
    const state_representation::CartesianState & state,
    const rclcpp::Time & time 
    )
    +
    + +

    Convert a CartesianState to a ROS geometry_msgs::msg::Wrench.

    +
    Parameters
    + + + + +
    messageThe ROS message to populate
    stateThe state to read from
    timeThe time of the message
    +
    +
    +
    Exceptions
    + + +
    modulo_core::exceptions::MessageTranslationExceptionif the provided state is empty.
    +
    +
    + +
    +
    + +

    ◆ write_message() [22/35]

    + +
    +
    + + + + + + + + + + + + + + + + + + + + + + + + +
    void modulo_core::translators::write_message (geometry_msgs::msg::WrenchStamped & message,
    const CartesianState & state,
    const rclcpp::Time & time 
    )
    +
    + +

    Definition at line 99 of file message_writers.cpp.

    + +
    +
    + +

    ◆ write_message() [23/35]

    + +
    +
    + + + + + + + + + + + + + + + + + + + + + + + + +
    void modulo_core::translators::write_message (geometry_msgs::msg::WrenchStamped & message,
    const state_representation::CartesianState & state,
    const rclcpp::Time & time 
    )
    +
    + +

    Convert a CartesianState to a ROS geometry_msgs::msg::WrenchStamped.

    +
    Parameters
    + + + + +
    messageThe ROS message to populate
    stateThe state to read from
    timeThe time of the message
    +
    +
    +
    Exceptions
    + + +
    modulo_core::exceptions::MessageTranslationExceptionif the provided state is empty.
    +
    +
    + +
    +
    + +

    ◆ write_message() [24/35]

    + +
    +
    + + + + + + + + + + + + + + + + + + + + + + + + +
    void modulo_core::translators::write_message (sensor_msgs::msg::JointState & message,
    const JointState & state,
    const rclcpp::Time & time 
    )
    +
    + +

    Definition at line 105 of file message_writers.cpp.

    + +
    +
    + +

    ◆ write_message() [25/35]

    + +
    +
    + + + + + + + + + + + + + + + + + + + + + + + + +
    void modulo_core::translators::write_message (sensor_msgs::msg::JointState & message,
    const state_representation::JointState & state,
    const rclcpp::Time & time 
    )
    +
    + +

    Convert a JointState to a ROS sensor_msgs::msg::JointState.

    +
    Parameters
    + + + + +
    messageThe ROS message to populate
    stateThe state to read from
    timeThe time of the message
    +
    +
    +
    Exceptions
    + + +
    modulo_core::exceptions::MessageTranslationExceptionif the provided state is empty.
    +
    +
    + +
    +
    + +

    ◆ write_message() [26/35]

    + +
    +
    + + + + + + + + + + + + + + + + + + + + + + + + +
    void modulo_core::translators::write_message (std_msgs::msg::Bool & message,
    const bool & state,
    const rclcpp::Time & time 
    )
    +
    + +

    Convert a boolean to a ROS std_msgs::msg::Bool.

    +
    Parameters
    + + + + +
    messageThe ROS message to populate
    stateThe state to read from
    timeThe time of the message
    +
    +
    + +

    Definition at line 168 of file message_writers.cpp.

    + +
    +
    + +

    ◆ write_message() [27/35]

    + +
    +
    + + + + + + + + + + + + + + + + + + + + + + + + +
    void modulo_core::translators::write_message (std_msgs::msg::Float64 & message,
    const double & state,
    const rclcpp::Time & time 
    )
    +
    + +

    Convert a double to a ROS std_msgs::msg::Float64.

    +
    Parameters
    + + + + +
    messageThe ROS message to populate
    stateThe state to read from
    timeThe time of the message
    +
    +
    + +

    Definition at line 172 of file message_writers.cpp.

    + +
    +
    + +

    ◆ write_message() [28/35]

    + +
    +
    + + + + + + + + + + + + + + + + + + + + + + + + +
    void modulo_core::translators::write_message (std_msgs::msg::Float64MultiArray & message,
    const std::vector< double > & state,
    const rclcpp::Time & time 
    )
    +
    + +

    Convert a vector of double to a ROS std_msgs::msg::Float64MultiArray.

    +
    Parameters
    + + + + +
    messageThe ROS message to populate
    stateThe state to read from
    timeThe time of the message
    +
    +
    + +

    Definition at line 176 of file message_writers.cpp.

    + +
    +
    + +

    ◆ write_message() [29/35]

    + +
    +
    + + + + + + + + + + + + + + + + + + + + + + + + +
    void modulo_core::translators::write_message (std_msgs::msg::Int32 & message,
    const int & state,
    const rclcpp::Time & time 
    )
    +
    + +

    Convert an integer to a ROS std_msgs::msg::Int32.

    +
    Parameters
    + + + + +
    messageThe ROS message to populate
    stateThe state to read from
    timeThe time of the message
    +
    +
    + +

    Definition at line 180 of file message_writers.cpp.

    + +
    +
    + +

    ◆ write_message() [30/35]

    + +
    +
    + + + + + + + + + + + + + + + + + + + + + + + + +
    void modulo_core::translators::write_message (std_msgs::msg::String & message,
    const std::string & state,
    const rclcpp::Time & time 
    )
    +
    + +

    Convert a string to a ROS std_msgs::msg::String.

    +
    Parameters
    + + + + +
    messageThe ROS message to populate
    stateThe state to read from
    timeThe time of the message
    +
    +
    + +

    Definition at line 184 of file message_writers.cpp.

    + +
    +
    + +

    ◆ write_message() [31/35]

    + +
    +
    + + + + + + + + + + + + + + + + + + + + + + + + +
    void modulo_core::translators::write_message (tf2_msgs::msg::TFMessage & message,
    const CartesianState & state,
    const rclcpp::Time & time 
    )
    +
    + +

    Definition at line 120 of file message_writers.cpp.

    + +
    +
    + +

    ◆ write_message() [32/35]

    + +
    +
    +
    +template<>
    + + + + + + + + + + + + + + + + + + + + + + + + +
    void modulo_core::translators::write_message (tf2_msgs::msg::TFMessage & message,
    const Parameter< CartesianPose > & state,
    const rclcpp::Time & time 
    )
    +
    + +

    Definition at line 164 of file message_writers.cpp.

    + +
    +
    + +

    ◆ write_message() [33/35]

    + +
    +
    + + + + + + + + + + + + + + + + + + + + + + + + +
    void modulo_core::translators::write_message (tf2_msgs::msg::TFMessage & message,
    const state_representation::CartesianState & state,
    const rclcpp::Time & time 
    )
    +
    + +

    Convert a CartesianState to a ROS tf2_msgs::msg::TFMessage.

    +
    Parameters
    + + + + +
    messageThe ROS message to populate
    stateThe state to read from
    timeThe time of the message
    +
    +
    +
    Exceptions
    + + +
    modulo_core::exceptions::MessageTranslationExceptionif the provided state is empty.
    +
    +
    + +
    +
    + +

    ◆ write_message() [34/35]

    + +
    +
    +
    +template<typename U , typename T >
    + + + + + + + + + + + + + + + + + + + + + + + + +
    void modulo_core::translators::write_message (U & message,
    const Parameter< T > & state,
    const rclcpp::Time &  
    )
    +
    + +

    Definition at line 131 of file message_writers.cpp.

    + +
    +
    + +

    ◆ write_message() [35/35]

    + +
    +
    +
    +template<typename U , typename T >
    + + + + + + + + + + + + + + + + + + + + + + + + +
    void modulo_core::translators::write_message (U & message,
    const state_representation::Parameter< T > & state,
    const rclcpp::Time &  
    )
    +
    + +

    Convert a Parameter<T> to a ROS equivalent representation.

    +
    Template Parameters
    + + + +
    TAll types of parameters supported in ROS std messages
    UAll types of parameters supported in ROS std messages
    +
    +
    +
    Parameters
    + + + + +
    messageThe ROS message to populate
    stateThe state to read from
    timeThe time of the message
    +
    +
    +
    Exceptions
    + + +
    modulo_core::exceptions::MessageTranslationExceptionif the provided state is empty.
    +
    +
    + +
    +
    + +

    ◆ write_parameter() [1/2]

    + +
    +
    + + + + + + + + +
    rclcpp::Parameter modulo_core::translators::write_parameter (const std::shared_ptr< ParameterInterface > & parameter)
    +
    + +

    Definition at line 89 of file parameter_translators.cpp.

    + +
    +
    + +

    ◆ write_parameter() [2/2]

    + +
    +
    + + + + + + + + +
    rclcpp::Parameter modulo_core::translators::write_parameter (const std::shared_ptr< state_representation::ParameterInterface > & parameter)
    +
    + +

    Write a ROS Parameter from a ParameterInterface pointer.

    +
    Parameters
    + + +
    parameterThe ParameterInterface pointer with a name and value
    +
    +
    +
    Exceptions
    + + +
    modulo_core::exceptions::ParameterTranslationExceptionif the ROS parameter could not be written
    +
    +
    +
    Returns
    A new ROS Parameter object
    + +
    +
    +
    + + + + diff --git a/versions/v5.0.1/namespacemodulo__utils_1_1parsing.html b/versions/v5.0.1/namespacemodulo__utils_1_1parsing.html new file mode 100644 index 00000000..629649e0 --- /dev/null +++ b/versions/v5.0.1/namespacemodulo__utils_1_1parsing.html @@ -0,0 +1,90 @@ + + + + + + + +Modulo: modulo_utils::parsing Namespace Reference + + + + + + + + + +
    +
    + + + + + + +
    +
    Modulo 5.0.0 +
    +
    +
    + + + + + + + + +
    +
    + + +
    +
    +
    +
    +
    +
    Loading...
    +
    Searching...
    +
    No Matches
    +
    +
    +
    +
    + + +
    +
    +
    modulo_utils::parsing Namespace Reference
    +
    +
    + +

    Modulo parsing helpers. +More...

    +

    Detailed Description

    +

    Modulo parsing helpers.

    +
    + + + + diff --git a/versions/v5.0.1/namespaces.html b/versions/v5.0.1/namespaces.html new file mode 100644 index 00000000..21370fdf --- /dev/null +++ b/versions/v5.0.1/namespaces.html @@ -0,0 +1,111 @@ + + + + + + + +Modulo: Namespace List + + + + + + + + + +
    +
    + + + + + + +
    +
    Modulo 5.0.0 +
    +
    +
    + + + + + + + +
    + +
    +
    + + +
    +
    +
    +
    +
    +
    Loading...
    +
    Searching...
    +
    No Matches
    +
    +
    +
    +
    + +
    +
    Namespace List
    +
    +
    +
    Here is a list of all documented namespaces with brief descriptions:
    +
    [detail level 123]
    + + + + + + + + + + + + + + + + + + + + + + + + + + +
     Nmodulo_componentsModulo components
     CComponentA wrapper for rclcpp::Node to simplify application composition through unified component interfaces
     CComponentInterfaceBase interface class for modulo components to wrap a ROS Node with custom behaviour
     CComponentServiceResponseResponse structure to be returned by component services
     CLifecycleComponentA wrapper for rclcpp_lifecycle::LifecycleNode to simplify application composition through unified component interfaces while supporting lifecycle states and transitions
     Nmodulo_coreModulo Core
     NcommunicationModulo Core communication module for handling messages on publication and subscription interfaces
     CMessagePairThe MessagePair stores a pointer to a variable and translates the value of this pointer back and forth between the corresponding ROS messages
     CMessagePairInterfaceInterface class to enable non-templated writing and reading ROS messages from derived MessagePair instances through dynamic down-casting
     CPublisherHandlerThe PublisherHandler handles different types of ROS publishers to activate, deactivate and publish data with those publishers
     CPublisherInterfaceInterface class to enable non-templated activating/deactivating/publishing of ROS publishers from derived PublisherHandler instances through dynamic down-casting
     CSubscriptionHandlerThe SubscriptionHandler handles different types of ROS subscriptions to receive data from those subscriptions
     CSubscriptionInterfaceInterface class to enable non-templated subscriptions with ROS subscriptions from derived SubscriptionHandler instances through dynamic down-casting
     NexceptionsModulo Core exceptions module for defining exception classes
     CAddServiceExceptionAn exception class to notify errors when adding a service
     CAddSignalExceptionAn exception class to notify errors when adding a signal
     CCoreExceptionA base class for all core exceptions
     CInvalidPointerCastExceptionAn exception class to notify if the result of getting an instance of a derived class through dynamic down-casting of an object of the base class is not a correctly typed instance of the derived class
     CInvalidPointerExceptionAn exception class to notify if an object has no reference count (if the object is not owned by any pointer) when attempting to get a derived instance through dynamic down-casting
     CLookupTransformExceptionAn exception class to notify an error while looking up TF transforms
     CMessageTranslationExceptionAn exception class to notify that the translation of a ROS message failed
     CNullPointerExceptionAn exception class to notify that a certain pointer is null
     CParameterExceptionAn exception class to notify errors with parameters in modulo classes
     CParameterTranslationExceptionAn exception class to notify incompatibility when translating parameters from different sources
     NtranslatorsModulo Core translation module for converting between ROS2 and state_representation data types
     CPredicate
    +
    +
    + + + + diff --git a/versions/v5.0.1/nav_f.png b/versions/v5.0.1/nav_f.png new file mode 100644 index 00000000..72a58a52 Binary files /dev/null and b/versions/v5.0.1/nav_f.png differ diff --git a/versions/v5.0.1/nav_fd.png b/versions/v5.0.1/nav_fd.png new file mode 100644 index 00000000..032fbdd4 Binary files /dev/null and b/versions/v5.0.1/nav_fd.png differ diff --git a/versions/v5.0.1/nav_g.png b/versions/v5.0.1/nav_g.png new file mode 100644 index 00000000..2093a237 Binary files /dev/null and b/versions/v5.0.1/nav_g.png differ diff --git a/versions/v5.0.1/nav_h.png b/versions/v5.0.1/nav_h.png new file mode 100644 index 00000000..33389b10 Binary files /dev/null and b/versions/v5.0.1/nav_h.png differ diff --git a/versions/v5.0.1/nav_hd.png b/versions/v5.0.1/nav_hd.png new file mode 100644 index 00000000..de80f18a Binary files /dev/null and b/versions/v5.0.1/nav_hd.png differ diff --git a/versions/v5.0.1/open.png b/versions/v5.0.1/open.png new file mode 100644 index 00000000..30f75c7e Binary files /dev/null and b/versions/v5.0.1/open.png differ diff --git a/versions/v5.0.1/pages.html b/versions/v5.0.1/pages.html new file mode 100644 index 00000000..a4159ba9 --- /dev/null +++ b/versions/v5.0.1/pages.html @@ -0,0 +1,90 @@ + + + + + + + +Modulo: Related Pages + + + + + + + + + +
    +
    + + + + + + +
    +
    Modulo 5.0.0 +
    +
    +
    + + + + + + + +
    + +
    +
    + + +
    +
    +
    +
    +
    +
    Loading...
    +
    Searching...
    +
    No Matches
    +
    +
    +
    +
    + +
    +
    Related Pages
    +
    +
    +
    Here is a list of all related documentation pages:
    +
    + + + + diff --git a/versions/v5.0.1/parameter__translators_8cpp_source.html b/versions/v5.0.1/parameter__translators_8cpp_source.html new file mode 100644 index 00000000..224df244 --- /dev/null +++ b/versions/v5.0.1/parameter__translators_8cpp_source.html @@ -0,0 +1,381 @@ + + + + + + + +Modulo: /github/workspace/source/modulo_core/src/translators/parameter_translators.cpp Source File + + + + + + + + + +
    +
    + + + + + + +
    +
    Modulo 5.0.0 +
    +
    +
    + + + + + + + + + +
    +
    + + +
    +
    +
    +
    +
    +
    Loading...
    +
    Searching...
    +
    No Matches
    +
    +
    +
    +
    + + +
    +
    +
    parameter_translators.cpp
    +
    +
    +
    1#include "modulo_core/translators/parameter_translators.hpp"
    +
    2
    +
    3#include <clproto.hpp>
    +
    4#include <state_representation/space/cartesian/CartesianPose.hpp>
    +
    5#include <state_representation/space/cartesian/CartesianState.hpp>
    +
    6#include <state_representation/space/joint/JointPositions.hpp>
    +
    7#include <state_representation/space/joint/JointState.hpp>
    +
    8
    +
    9#include "modulo_core/exceptions.hpp"
    +
    10
    +
    11using namespace state_representation;
    +
    12
    + +
    14
    + +
    16 const std::shared_ptr<const ParameterInterface>& source_parameter,
    +
    17 const std::shared_ptr<ParameterInterface>& parameter) {
    +
    18 if (source_parameter->get_parameter_type() != parameter->get_parameter_type()) {
    +
    19 throw exceptions::ParameterTranslationException(
    +
    20 "Source parameter " + source_parameter->get_name()
    +
    21 + " to be copied does not have the same type as destination parameter " + parameter->get_name() + "("
    +
    22 + get_parameter_type_name(source_parameter->get_parameter_type()) + " vs. "
    +
    23 + get_parameter_type_name(parameter->get_parameter_type()) + ")");
    +
    24 }
    +
    25 switch (source_parameter->get_parameter_type()) {
    +
    26 case ParameterType::BOOL:
    +
    27 parameter->set_parameter_value(source_parameter->get_parameter_value<bool>());
    +
    28 return;
    +
    29 case ParameterType::BOOL_ARRAY:
    +
    30 parameter->set_parameter_value(source_parameter->get_parameter_value<std::vector<bool>>());
    +
    31 return;
    +
    32 case ParameterType::INT:
    +
    33 parameter->set_parameter_value(source_parameter->get_parameter_value<int>());
    +
    34 return;
    +
    35 case ParameterType::INT_ARRAY:
    +
    36 parameter->set_parameter_value(source_parameter->get_parameter_value<std::vector<int>>());
    +
    37 return;
    +
    38 case ParameterType::DOUBLE:
    +
    39 parameter->set_parameter_value(source_parameter->get_parameter_value<double>());
    +
    40 return;
    +
    41 case ParameterType::DOUBLE_ARRAY:
    +
    42 parameter->set_parameter_value(source_parameter->get_parameter_value<std::vector<double>>());
    +
    43 return;
    +
    44 case ParameterType::STRING:
    +
    45 parameter->set_parameter_value(source_parameter->get_parameter_value<std::string>());
    +
    46 return;
    +
    47 case ParameterType::STRING_ARRAY:
    +
    48 parameter->set_parameter_value(source_parameter->get_parameter_value<std::vector<std::string>>());
    +
    49 return;
    +
    50 case ParameterType::VECTOR:
    +
    51 parameter->set_parameter_value(source_parameter->get_parameter_value<Eigen::VectorXd>());
    +
    52 return;
    +
    53 case ParameterType::MATRIX:
    +
    54 parameter->set_parameter_value(source_parameter->get_parameter_value<Eigen::MatrixXd>());
    +
    55 return;
    +
    56 case ParameterType::STATE:
    +
    57 if (source_parameter->get_parameter_state_type() != parameter->get_parameter_state_type()) {
    +
    58 throw exceptions::ParameterTranslationException(
    +
    59 "Source parameter " + source_parameter->get_name()
    +
    60 + " to be copied does not have the same parameter state type as destination parameter "
    +
    61 + parameter->get_name() + "(" + get_state_type_name(source_parameter->get_parameter_state_type()) + " vs. "
    +
    62 + get_state_type_name(parameter->get_parameter_state_type()) + ")");
    +
    63 }
    +
    64 switch (source_parameter->get_parameter_state_type()) {
    +
    65 case StateType::CARTESIAN_STATE:
    +
    66 parameter->set_parameter_value(source_parameter->get_parameter_value<CartesianState>());
    +
    67 return;
    +
    68 case StateType::CARTESIAN_POSE:
    +
    69 parameter->set_parameter_value(source_parameter->get_parameter_value<CartesianPose>());
    +
    70 return;
    +
    71 case StateType::JOINT_STATE:
    +
    72 parameter->set_parameter_value(source_parameter->get_parameter_value<JointState>());
    +
    73 return;
    +
    74 case StateType::JOINT_POSITIONS:
    +
    75 parameter->set_parameter_value(source_parameter->get_parameter_value<JointPositions>());
    +
    76 return;
    +
    77 default:
    +
    78 break;
    +
    79 }
    +
    80 break;
    +
    81 default:
    +
    82 break;
    +
    83 }
    +
    84 throw exceptions::ParameterTranslationException(
    +
    85 "Could not copy the value from source parameter " + source_parameter->get_name() + " into parameter "
    +
    86 + parameter->get_name());
    +
    87}
    +
    88
    +
    89rclcpp::Parameter write_parameter(const std::shared_ptr<ParameterInterface>& parameter) {
    +
    90 if (parameter->is_empty()) {
    +
    91 return rclcpp::Parameter(parameter->get_name());
    +
    92 }
    +
    93 switch (parameter->get_parameter_type()) {
    +
    94 case ParameterType::BOOL:
    +
    95 return {parameter->get_name(), parameter->get_parameter_value<bool>()};
    +
    96 case ParameterType::BOOL_ARRAY:
    +
    97 return {parameter->get_name(), parameter->get_parameter_value<std::vector<bool>>()};
    +
    98 case ParameterType::INT:
    +
    99 return {parameter->get_name(), parameter->get_parameter_value<int>()};
    +
    100 case ParameterType::INT_ARRAY:
    +
    101 return {parameter->get_name(), parameter->get_parameter_value<std::vector<int>>()};
    +
    102 case ParameterType::DOUBLE:
    +
    103 return {parameter->get_name(), parameter->get_parameter_value<double>()};
    +
    104 case ParameterType::DOUBLE_ARRAY:
    +
    105 return {parameter->get_name(), parameter->get_parameter_value<std::vector<double>>()};
    +
    106 case ParameterType::STRING:
    +
    107 return {parameter->get_name(), parameter->get_parameter_value<std::string>()};
    +
    108 case ParameterType::STRING_ARRAY:
    +
    109 return {parameter->get_name(), parameter->get_parameter_value<std::vector<std::string>>()};
    +
    110 case ParameterType::STATE: {
    +
    111 switch (parameter->get_parameter_state_type()) {
    +
    112 case StateType::CARTESIAN_STATE:
    +
    113 return {parameter->get_name(), clproto::to_json(parameter->get_parameter_value<CartesianState>())};
    +
    114 case StateType::CARTESIAN_POSE:
    +
    115 return {parameter->get_name(), clproto::to_json(parameter->get_parameter_value<CartesianPose>())};
    +
    116 case StateType::JOINT_STATE:
    +
    117 return {parameter->get_name(), clproto::to_json(parameter->get_parameter_value<JointState>())};
    +
    118 case StateType::JOINT_POSITIONS:
    +
    119 return {parameter->get_name(), clproto::to_json(parameter->get_parameter_value<JointPositions>())};
    +
    120 default:
    +
    121 break;
    +
    122 }
    +
    123 break;
    +
    124 }
    +
    125 case ParameterType::VECTOR: {
    +
    126 auto eigen_vector = parameter->get_parameter_value<Eigen::VectorXd>();
    +
    127 std::vector<double> vec(eigen_vector.data(), eigen_vector.data() + eigen_vector.size());
    +
    128 return {parameter->get_name(), vec};
    +
    129 }
    +
    130 case ParameterType::MATRIX: {
    +
    131 auto eigen_matrix = parameter->get_parameter_value<Eigen::MatrixXd>();
    +
    132 std::vector<double> vec(eigen_matrix.data(), eigen_matrix.data() + eigen_matrix.size());
    +
    133 return {parameter->get_name(), vec};
    +
    134 }
    +
    135 default:
    +
    136 break;
    +
    137 }
    +
    138 throw exceptions::ParameterTranslationException("Parameter " + parameter->get_name() + " could not be written!");
    +
    139}
    +
    140
    +
    +
    141std::shared_ptr<ParameterInterface> read_parameter(const rclcpp::Parameter& parameter) {
    +
    142 switch (parameter.get_type()) {
    +
    143 case rclcpp::PARAMETER_BOOL:
    +
    144 return make_shared_parameter(parameter.get_name(), parameter.as_bool());
    +
    145 case rclcpp::PARAMETER_BOOL_ARRAY:
    +
    146 return make_shared_parameter(parameter.get_name(), parameter.as_bool_array());
    +
    147 case rclcpp::PARAMETER_INTEGER:
    +
    148 return make_shared_parameter(parameter.get_name(), static_cast<int>(parameter.as_int()));
    +
    149 case rclcpp::PARAMETER_INTEGER_ARRAY: {
    +
    150 auto array = parameter.as_integer_array();
    +
    151 std::vector<int> int_array(array.begin(), array.end());
    +
    152 return make_shared_parameter(parameter.get_name(), int_array);
    +
    153 }
    +
    154 case rclcpp::PARAMETER_DOUBLE:
    +
    155 return make_shared_parameter(parameter.get_name(), parameter.as_double());
    +
    156 case rclcpp::PARAMETER_DOUBLE_ARRAY:
    +
    157 return make_shared_parameter(parameter.get_name(), parameter.as_double_array());
    +
    158 case rclcpp::PARAMETER_STRING_ARRAY:
    +
    159 return make_shared_parameter<std::vector<std::string>>(parameter.get_name(), parameter.as_string_array());
    +
    160 case rclcpp::PARAMETER_STRING: {
    +
    161 // TODO: consider dedicated clproto::decode<std::shared_ptr<ParameterInterface>>(msg) specialization in library
    +
    162 std::string encoding;
    +
    163 try {
    +
    164 encoding = clproto::from_json(parameter.as_string());
    +
    165 } catch (const clproto::JsonParsingException&) {}
    +
    166 if (!clproto::is_valid(encoding)) {
    +
    167 return make_shared_parameter<std::string>(parameter.get_name(), parameter.as_string());
    +
    168 }
    +
    169 switch (clproto::check_message_type(encoding)) {
    +
    170 case clproto::CARTESIAN_STATE_MESSAGE:
    +
    171 return make_shared_parameter<CartesianState>(parameter.get_name(), clproto::decode<CartesianState>(encoding));
    +
    172 case clproto::CARTESIAN_POSE_MESSAGE:
    +
    173 return make_shared_parameter<CartesianPose>(parameter.get_name(), clproto::decode<CartesianPose>(encoding));
    +
    174 case clproto::JOINT_STATE_MESSAGE:
    +
    175 return make_shared_parameter<JointState>(parameter.get_name(), clproto::decode<JointState>(encoding));
    +
    176 case clproto::JOINT_POSITIONS_MESSAGE:
    +
    177 return make_shared_parameter<JointPositions>(parameter.get_name(), clproto::decode<JointPositions>(encoding));
    +
    178 default:
    + +
    180 "Parameter " + parameter.get_name() + " has an unsupported encoded message type");
    +
    181 }
    +
    182 }
    +
    183 case rclcpp::PARAMETER_BYTE_ARRAY:
    +
    184 // TODO: try clproto decode, re-use logic from above
    +
    185 throw exceptions::ParameterTranslationException("Parameter byte arrays are not currently supported.");
    +
    186 default:
    +
    187 break;
    +
    188 }
    +
    189 throw exceptions::ParameterTranslationException("Parameter " + parameter.get_name() + " could not be read!");
    +
    190}
    +
    +
    191
    +
    192std::shared_ptr<ParameterInterface> read_parameter_const(
    +
    193 const rclcpp::Parameter& ros_parameter, const std::shared_ptr<const ParameterInterface>& parameter) {
    +
    194 if (ros_parameter.get_name() != parameter->get_name()) {
    + +
    196 "The ROS parameter " + ros_parameter.get_name()
    +
    197 + " to be read does not have the same name as the reference parameter " + parameter->get_name());
    +
    198 }
    +
    199 if (ros_parameter.get_type() == rclcpp::PARAMETER_NOT_SET) {
    +
    200 return make_shared_parameter_interface(
    +
    201 parameter->get_name(), parameter->get_parameter_type(), parameter->get_parameter_state_type());
    +
    202 }
    +
    203 auto new_parameter = read_parameter(ros_parameter);
    +
    204 if (new_parameter->get_parameter_type() == parameter->get_parameter_type()) {
    +
    205 if (new_parameter->get_parameter_state_type() != parameter->get_parameter_state_type()) {
    +
    206 throw exceptions::ParameterTranslationException(
    +
    207 "The received state parameter " + ros_parameter.get_name()
    +
    208 + "does not have the same state type as the reference parameter ("
    +
    209 + get_state_type_name(new_parameter->get_parameter_state_type()) + " vs. "
    +
    210 + get_state_type_name(parameter->get_parameter_state_type()) + ")");
    +
    211 }
    +
    212 return new_parameter;
    +
    213 }
    +
    214 switch (new_parameter->get_parameter_type()) {
    +
    215 case ParameterType::DOUBLE_ARRAY: {
    +
    216 auto value = new_parameter->get_parameter_value<std::vector<double>>();
    +
    217 switch (parameter->get_parameter_type()) {
    +
    218 case ParameterType::VECTOR: {
    +
    219 Eigen::VectorXd vector = Eigen::Map<Eigen::VectorXd>(value.data(), static_cast<Eigen::Index>(value.size()));
    +
    220 new_parameter = make_shared_parameter(parameter->get_name(), vector);
    +
    221 break;
    +
    222 }
    +
    223 case ParameterType::MATRIX: {
    +
    224 auto matrix = parameter->get_parameter_value<Eigen::MatrixXd>();
    +
    225 if (static_cast<std::size_t>(matrix.size()) != value.size()) {
    +
    226 throw exceptions::ParameterTranslationException(
    +
    227 "The ROS parameter " + ros_parameter.get_name() + " with type double array has size "
    +
    228 + std::to_string(value.size()) + " while the reference parameter matrix " + parameter->get_name()
    +
    229 + " has size " + std::to_string(matrix.size()));
    +
    230 }
    +
    231 matrix = Eigen::Map<Eigen::MatrixXd>(value.data(), matrix.rows(), matrix.cols());
    +
    232 new_parameter = make_shared_parameter(parameter->get_name(), matrix);
    +
    233 break;
    +
    234 }
    +
    235 default:
    +
    236 throw exceptions::ParameterTranslationException(
    +
    237 "The ROS parameter " + ros_parameter.get_name()
    +
    238 + " with type double array cannot be interpreted by reference parameter " + parameter->get_name() + " ("
    +
    239 + get_parameter_type_name(parameter->get_parameter_type()) + ")");
    +
    240 }
    +
    241 break;
    +
    242 }
    +
    243 default:
    +
    244 throw exceptions::ParameterTranslationException(
    +
    245 "Incompatible parameter type (" + get_parameter_type_name(new_parameter->get_parameter_type())
    +
    246 + ") encountered while reading parameter " + parameter->get_name() + " ("
    +
    247 + get_parameter_type_name(parameter->get_parameter_type()) + ")");
    +
    248 }
    +
    249 return new_parameter;
    +
    250}
    +
    251
    +
    252void read_parameter(const rclcpp::Parameter& ros_parameter, const std::shared_ptr<ParameterInterface>& parameter) {
    +
    253 auto new_parameter = read_parameter_const(ros_parameter, parameter);
    +
    254 copy_parameter_value(new_parameter, parameter);
    +
    255}
    +
    256
    +
    257rclcpp::ParameterType get_ros_parameter_type(const ParameterType& parameter_type) {
    +
    258 switch (parameter_type) {
    +
    259 case ParameterType::BOOL:
    +
    260 return rclcpp::ParameterType::PARAMETER_BOOL;
    +
    261 case ParameterType::BOOL_ARRAY:
    +
    262 return rclcpp::ParameterType::PARAMETER_BOOL_ARRAY;
    +
    263 case ParameterType::INT:
    +
    264 return rclcpp::ParameterType::PARAMETER_INTEGER;
    +
    265 case ParameterType::INT_ARRAY:
    +
    266 return rclcpp::ParameterType::PARAMETER_INTEGER_ARRAY;
    +
    267 case ParameterType::DOUBLE:
    +
    268 return rclcpp::ParameterType::PARAMETER_DOUBLE;
    +
    269 case ParameterType::DOUBLE_ARRAY:
    +
    270 case ParameterType::VECTOR:
    +
    271 case ParameterType::MATRIX:
    +
    272 return rclcpp::ParameterType::PARAMETER_DOUBLE_ARRAY;
    +
    273 case ParameterType::STRING:
    +
    274 return rclcpp::ParameterType::PARAMETER_STRING;
    +
    275 case ParameterType::STRING_ARRAY:
    +
    276 case ParameterType::STATE:
    +
    277 return rclcpp::ParameterType::PARAMETER_STRING_ARRAY;
    +
    278 default:
    +
    279 return rclcpp::ParameterType::PARAMETER_NOT_SET;
    +
    280 }
    +
    281}
    +
    282}// namespace modulo_core::translators
    +
    An exception class to notify incompatibility when translating parameters from different sources.
    +
    Modulo Core translation module for converting between ROS2 and state_representation data types.
    +
    std::shared_ptr< state_representation::ParameterInterface > read_parameter(const rclcpp::Parameter &ros_parameter)
    Create a new ParameterInterface from a ROS Parameter object.
    +
    rclcpp::Parameter write_parameter(const std::shared_ptr< state_representation::ParameterInterface > &parameter)
    Write a ROS Parameter from a ParameterInterface pointer.
    +
    rclcpp::ParameterType get_ros_parameter_type(const state_representation::ParameterType &parameter_type)
    Given a state representation parameter type, get the corresponding ROS parameter type.
    +
    void copy_parameter_value(const std::shared_ptr< const state_representation::ParameterInterface > &source_parameter, const std::shared_ptr< state_representation::ParameterInterface > &parameter)
    Copy the value of one parameter interface into another.
    +
    std::shared_ptr< state_representation::ParameterInterface > read_parameter_const(const rclcpp::Parameter &ros_parameter, const std::shared_ptr< const state_representation::ParameterInterface > &parameter)
    Update the parameter value of a ParameterInterface from a ROS Parameter object only if the two parame...
    +
    + + + + diff --git a/versions/v5.0.1/parameter__translators_8hpp_source.html b/versions/v5.0.1/parameter__translators_8hpp_source.html new file mode 100644 index 00000000..e725a7b9 --- /dev/null +++ b/versions/v5.0.1/parameter__translators_8hpp_source.html @@ -0,0 +1,121 @@ + + + + + + + +Modulo: /github/workspace/source/modulo_core/include/modulo_core/translators/parameter_translators.hpp Source File + + + + + + + + + +
    +
    + + + + + + +
    +
    Modulo 5.0.0 +
    +
    +
    + + + + + + + + + +
    +
    + + +
    +
    +
    +
    +
    +
    Loading...
    +
    Searching...
    +
    No Matches
    +
    +
    +
    +
    + + +
    +
    +
    parameter_translators.hpp
    +
    +
    +
    1#pragma once
    +
    2
    +
    3#include <rclcpp/parameter.hpp>
    +
    4#include <state_representation/parameters/Parameter.hpp>
    +
    5
    + +
    11
    + +
    24 const std::shared_ptr<const state_representation::ParameterInterface>& source_parameter,
    +
    25 const std::shared_ptr<state_representation::ParameterInterface>& parameter);
    +
    26
    +
    33rclcpp::Parameter write_parameter(const std::shared_ptr<state_representation::ParameterInterface>& parameter);
    +
    34
    +
    41std::shared_ptr<state_representation::ParameterInterface> read_parameter(const rclcpp::Parameter& ros_parameter);
    +
    42
    +
    51std::shared_ptr<state_representation::ParameterInterface> read_parameter_const(
    +
    52 const rclcpp::Parameter& ros_parameter,
    +
    53 const std::shared_ptr<const state_representation::ParameterInterface>& parameter);
    +
    54
    + +
    63 const rclcpp::Parameter& ros_parameter, const std::shared_ptr<state_representation::ParameterInterface>& parameter);
    +
    64
    +
    70rclcpp::ParameterType get_ros_parameter_type(const state_representation::ParameterType& parameter_type);
    +
    71
    +
    72}// namespace modulo_core::translators
    +
    Modulo Core translation module for converting between ROS2 and state_representation data types.
    +
    std::shared_ptr< state_representation::ParameterInterface > read_parameter(const rclcpp::Parameter &ros_parameter)
    Create a new ParameterInterface from a ROS Parameter object.
    +
    rclcpp::Parameter write_parameter(const std::shared_ptr< state_representation::ParameterInterface > &parameter)
    Write a ROS Parameter from a ParameterInterface pointer.
    +
    rclcpp::ParameterType get_ros_parameter_type(const state_representation::ParameterType &parameter_type)
    Given a state representation parameter type, get the corresponding ROS parameter type.
    +
    void copy_parameter_value(const std::shared_ptr< const state_representation::ParameterInterface > &source_parameter, const std::shared_ptr< state_representation::ParameterInterface > &parameter)
    Copy the value of one parameter interface into another.
    +
    std::shared_ptr< state_representation::ParameterInterface > read_parameter_const(const rclcpp::Parameter &ros_parameter, const std::shared_ptr< const state_representation::ParameterInterface > &parameter)
    Update the parameter value of a ParameterInterface from a ROS Parameter object only if the two parame...
    +
    + + + + diff --git a/versions/v5.0.1/parsing_8hpp_source.html b/versions/v5.0.1/parsing_8hpp_source.html new file mode 100644 index 00000000..3eac618b --- /dev/null +++ b/versions/v5.0.1/parsing_8hpp_source.html @@ -0,0 +1,132 @@ + + + + + + + +Modulo: /github/workspace/source/modulo_utils/include/modulo_utils/parsing.hpp Source File + + + + + + + + + +
    +
    + + + + + + +
    +
    Modulo 5.0.0 +
    +
    +
    + + + + + + + + + +
    +
    + + +
    +
    +
    +
    +
    +
    Loading...
    +
    Searching...
    +
    No Matches
    +
    +
    +
    +
    + + +
    +
    +
    parsing.hpp
    +
    +
    +
    1#pragma once
    +
    2
    +
    3#include <string>
    +
    4
    +
    5#include <rclcpp/rclcpp.hpp>
    +
    6
    +
    11namespace modulo_utils::parsing {
    +
    12
    +
    20[[maybe_unused]] static const std::string topic_validation_warning(const std::string& name, const std::string& type) {
    +
    21 return "The parsed signal name for " + type + " '" + name
    +
    22 + "' is empty. Provide a string with valid characters for the signal name ([a-z0-9_]).";
    +
    23}
    +
    24
    +
    31[[maybe_unused]] static std::string
    +
    32parse_node_name(const rclcpp::NodeOptions& options, const std::string& fallback = "") {
    +
    33 std::string node_name = fallback;
    +
    34 const std::string pattern("__node:=");
    +
    35 for (const auto& arg : options.arguments()) {
    +
    36 std::string::size_type index = arg.find(pattern);
    +
    37 if (index != std::string::npos) {
    +
    38 node_name = arg;
    +
    39 node_name.erase(index, pattern.length());
    +
    40 break;
    +
    41 }
    +
    42 }
    +
    43 return node_name;
    +
    44}
    +
    45
    +
    53[[maybe_unused]] static std::string parse_topic_name(const std::string& topic_name) {
    +
    54 std::string output;
    +
    55 for (char c : topic_name) {
    +
    56 if (c >= 'a' && c <= 'z') {
    +
    57 output.insert(output.end(), c);
    +
    58 } else if (!output.empty() && ((c >= '0' && c <= '9') || c == '_')) {
    +
    59 output.insert(output.end(), c);
    +
    60 }
    +
    61 }
    +
    62 return output;
    +
    63}
    +
    64
    +
    65}// namespace modulo_utils::parsing
    +
    Modulo parsing helpers.
    +
    + + + + diff --git a/versions/v5.0.1/plus.svg b/versions/v5.0.1/plus.svg new file mode 100644 index 00000000..07520165 --- /dev/null +++ b/versions/v5.0.1/plus.svg @@ -0,0 +1,9 @@ + + + + + + + + + diff --git a/versions/v5.0.1/plusd.svg b/versions/v5.0.1/plusd.svg new file mode 100644 index 00000000..0c65bfe9 --- /dev/null +++ b/versions/v5.0.1/plusd.svg @@ -0,0 +1,9 @@ + + + + + + + + + diff --git a/versions/v5.0.1/search/all_0.js b/versions/v5.0.1/search/all_0.js new file mode 100644 index 00000000..c4639fb4 --- /dev/null +++ b/versions/v5.0.1/search/all_0.js @@ -0,0 +1,19 @@ +var searchData= +[ + ['activate_0',['activate',['../classmodulo__core_1_1communication_1_1_publisher_handler.html#a151eaad5e41650a21aca947982d959da',1,'modulo_core::communication::PublisherHandler::activate()'],['../classmodulo__core_1_1communication_1_1_publisher_interface.html#ad3cb237464da96e1dd2780b696bce139',1,'modulo_core::communication::PublisherInterface::activate()']]], + ['add_5fcommand_5finterface_1',['add_command_interface',['../classmodulo__controllers_1_1_controller_interface.html#ad7d9aff67e0bba6ef2a557cdb94ab000',1,'modulo_controllers::ControllerInterface']]], + ['add_5finput_2',['add_input',['../classmodulo__components_1_1_component_interface.html#a6d6fd277be46d40ea6d73b547d028055',1,'modulo_components::ComponentInterface::add_input(const std::string &signal_name, const std::shared_ptr< DataT > &data, const std::string &default_topic="", bool fixed_topic=false)'],['../classmodulo__components_1_1_component_interface.html#aed06da445cab193c04702a54d0039603',1,'modulo_components::ComponentInterface::add_input(const std::string &signal_name, const std::shared_ptr< DataT > &data, const std::function< void()> &callback, const std::string &default_topic="", bool fixed_topic=false)'],['../classmodulo__components_1_1_component_interface.html#ab5868c98d10e4f7abfa1a1377da7d81f',1,'modulo_components::ComponentInterface::add_input(const std::string &signal_name, const std::function< void(const std::shared_ptr< MsgT >)> &callback, const std::string &default_topic="", bool fixed_topic=false)'],['../classmodulo__controllers_1_1_base_controller_interface.html#abf32a178b3ac97aad7364508e1929108',1,'modulo_controllers::BaseControllerInterface::add_input()']]], + ['add_5finterfaces_3',['add_interfaces',['../classmodulo__controllers_1_1_controller_interface.html#a019f11368af787d1cb34fc3b6f1c6234',1,'modulo_controllers::ControllerInterface::add_interfaces()'],['../classmodulo__controllers_1_1_robot_controller_interface.html#ac28db5ce4343ba7ba0ab004905f7c774',1,'modulo_controllers::RobotControllerInterface::add_interfaces()']]], + ['add_5foutput_4',['add_output',['../classmodulo__components_1_1_component.html#ab475ee0e8ea1b1f52c6f0720a0546e90',1,'modulo_components::Component::add_output()'],['../classmodulo__components_1_1_lifecycle_component.html#a22d31bd5f8a713b0ce757bea8622cbf3',1,'modulo_components::LifecycleComponent::add_output()'],['../classmodulo__controllers_1_1_base_controller_interface.html#a7709be5a6f1d5e538ecf28d9d0253a8f',1,'modulo_controllers::BaseControllerInterface::add_output(const std::string &name, const std::string &topic_name="")']]], + ['add_5fparameter_5',['add_parameter',['../classmodulo__controllers_1_1_base_controller_interface.html#aaa7e4a206229bf52629bd8ee977b6edd',1,'modulo_controllers::BaseControllerInterface::add_parameter()'],['../classmodulo__components_1_1_component_interface.html#ae833c972a8a140f8bacac3d680154a86',1,'modulo_components::ComponentInterface::add_parameter(const std::string &name, const T &value, const std::string &description, bool read_only=false)'],['../classmodulo__components_1_1_component_interface.html#a518bf9ca1ff6aa9dc16c88c5b06cb5d8',1,'modulo_components::ComponentInterface::add_parameter(const std::shared_ptr< state_representation::ParameterInterface > &parameter, const std::string &description, bool read_only=false)'],['../classmodulo__controllers_1_1_base_controller_interface.html#a6e7805e1592898080a1c65ee28e2700f',1,'modulo_controllers::BaseControllerInterface::add_parameter()']]], + ['add_5fperiodic_5fcallback_6',['add_periodic_callback',['../classmodulo__components_1_1_component_interface.html#ad17ee02a3b29dd632b594af6620a3168',1,'modulo_components::ComponentInterface']]], + ['add_5fpredicate_7',['add_predicate',['../classmodulo__controllers_1_1_base_controller_interface.html#a99ae1b60a443ef198f331f04c985ab84',1,'modulo_controllers::BaseControllerInterface::add_predicate()'],['../classmodulo__components_1_1_component_interface.html#a64726a7779cd0ade615a10d037e8c107',1,'modulo_components::ComponentInterface::add_predicate()'],['../classmodulo__controllers_1_1_base_controller_interface.html#ac7f744f72044655798cead29ea155f22',1,'modulo_controllers::BaseControllerInterface::add_predicate()'],['../classmodulo__components_1_1_component_interface.html#ab245c0fc061c4109961c7339c2bf27a4',1,'modulo_components::ComponentInterface::add_predicate()']]], + ['add_5fservice_8',['add_service',['../classmodulo__controllers_1_1_base_controller_interface.html#a2a969310126e63a475e9305e0d1abb0b',1,'modulo_controllers::BaseControllerInterface::add_service()'],['../classmodulo__components_1_1_component_interface.html#a12724f83b3327d6a35d9ae02046e96fd',1,'modulo_components::ComponentInterface::add_service()'],['../classmodulo__controllers_1_1_base_controller_interface.html#aeb181fef1f7a9a5896a9bec8e30fdcc3',1,'modulo_controllers::BaseControllerInterface::add_service()'],['../classmodulo__components_1_1_component_interface.html#af915cd5317266aa78dc61151e6f1fa6c',1,'modulo_components::ComponentInterface::add_service()']]], + ['add_5fstate_5finterface_9',['add_state_interface',['../classmodulo__controllers_1_1_controller_interface.html#a4f58fa18886d11dcf57a5abcde0e5e09',1,'modulo_controllers::ControllerInterface']]], + ['add_5fstatic_5ftf_5fbroadcaster_10',['add_static_tf_broadcaster',['../classmodulo__components_1_1_component_interface.html#a50d6d32870a7a81a72ab491f0d80f0bb',1,'modulo_components::ComponentInterface']]], + ['add_5ftf_5fbroadcaster_11',['add_tf_broadcaster',['../classmodulo__components_1_1_component_interface.html#ae782ab5b7593c368df9407df79d75c40',1,'modulo_components::ComponentInterface']]], + ['add_5ftf_5flistener_12',['add_tf_listener',['../classmodulo__components_1_1_component_interface.html#adf4b06438efcead7a6d29e3178161296',1,'modulo_components::ComponentInterface']]], + ['add_5ftrigger_13',['add_trigger',['../classmodulo__components_1_1_component_interface.html#abc67aa3f969574fb71b0a8527dad8346',1,'modulo_components::ComponentInterface::add_trigger()'],['../classmodulo__controllers_1_1_base_controller_interface.html#afb8181c45c3301d81c9cd954da4cbec0',1,'modulo_controllers::BaseControllerInterface::add_trigger()']]], + ['addserviceexception_14',['AddServiceException',['../classmodulo__core_1_1exceptions_1_1_add_service_exception.html',1,'modulo_core::exceptions']]], + ['addsignalexception_15',['AddSignalException',['../classmodulo__core_1_1exceptions_1_1_add_signal_exception.html',1,'modulo_core::exceptions']]] +]; diff --git a/versions/v5.0.1/search/all_1.js b/versions/v5.0.1/search/all_1.js new file mode 100644 index 00000000..0e70e95e --- /dev/null +++ b/versions/v5.0.1/search/all_1.js @@ -0,0 +1,4 @@ +var searchData= +[ + ['basecontrollerinterface_0',['basecontrollerinterface',['../classmodulo__controllers_1_1_base_controller_interface.html',1,'modulo_controllers::BaseControllerInterface'],['../classmodulo__controllers_1_1_base_controller_interface.html#ade0d508d65caa265cb489a3c693770a0',1,'modulo_controllers::BaseControllerInterface::BaseControllerInterface()']]] +]; diff --git a/versions/v5.0.1/search/all_10.js b/versions/v5.0.1/search/all_10.js new file mode 100644 index 00000000..a7401235 --- /dev/null +++ b/versions/v5.0.1/search/all_10.js @@ -0,0 +1,5 @@ +var searchData= +[ + ['task_5fspace_5fframe_5f_0',['task_space_frame_',['../classmodulo__controllers_1_1_robot_controller_interface.html#aceb45b495a9ed7b4225b8c619ee6867a',1,'modulo_controllers::RobotControllerInterface']]], + ['trigger_1',['trigger',['../classmodulo__components_1_1_component_interface.html#a6460ddfe54a6cdf5c52edcec86658f3f',1,'modulo_components::ComponentInterface::trigger()'],['../classmodulo__controllers_1_1_base_controller_interface.html#ab4dca6a7f56af5b758ca75f8e36eeb8f',1,'modulo_controllers::BaseControllerInterface::trigger()']]] +]; diff --git a/versions/v5.0.1/search/all_11.js b/versions/v5.0.1/search/all_11.js new file mode 100644 index 00000000..a4030d67 --- /dev/null +++ b/versions/v5.0.1/search/all_11.js @@ -0,0 +1,5 @@ +var searchData= +[ + ['update_0',['update',['../classmodulo__controllers_1_1_controller_interface.html#a8f2ab4824543884e6d4e16a903c9a1bf',1,'modulo_controllers::ControllerInterface']]], + ['utils_1',['Modulo Utils',['../md__2github_2workspace_2source_2modulo__utils_2_r_e_a_d_m_e.html',1,'']]] +]; diff --git a/versions/v5.0.1/search/all_12.js b/versions/v5.0.1/search/all_12.js new file mode 100644 index 00000000..a2784e1c --- /dev/null +++ b/versions/v5.0.1/search/all_12.js @@ -0,0 +1,8 @@ +var searchData= +[ + ['write_0',['write',['../classmodulo__core_1_1communication_1_1_message_pair_interface.html#a5cc486ee93eb7756636a851c07f10f35',1,'modulo_core::communication::MessagePairInterface']]], + ['write_5fcommand_5finterfaces_1',['write_command_interfaces',['../classmodulo__controllers_1_1_controller_interface.html#a1fd252f44e3618162c2cee552a8a7b2f',1,'modulo_controllers::ControllerInterface']]], + ['write_5fmessage_2',['write_message',['../namespacemodulo__core_1_1translators.html#ae887c515823c26c71a1266355577d5e0',1,'modulo_core::translators::write_message(geometry_msgs::msg::Wrench &message, const state_representation::CartesianState &state, const rclcpp::Time &time)'],['../namespacemodulo__core_1_1translators.html#a02fa2614128ce09ee39cc4fd9a5d2314',1,'modulo_core::translators::write_message(EncodedState &message, const T &state, const rclcpp::Time &)'],['../namespacemodulo__core_1_1translators.html#aa77091be4785272fd22cc5215d930ddd',1,'modulo_core::translators::write_message(std_msgs::msg::String &message, const std::string &state, const rclcpp::Time &time)'],['../namespacemodulo__core_1_1translators.html#ab5e6c729316ce06f03deec6fe811b3f5',1,'modulo_core::translators::write_message(std_msgs::msg::Int32 &message, const int &state, const rclcpp::Time &time)'],['../namespacemodulo__core_1_1translators.html#af3b73148b5111ac49d9b65a03c2682f5',1,'modulo_core::translators::write_message(std_msgs::msg::Float64MultiArray &message, const std::vector< double > &state, const rclcpp::Time &time)'],['../namespacemodulo__core_1_1translators.html#a014392d41b245b63d2303fdee9e66db7',1,'modulo_core::translators::write_message(std_msgs::msg::Float64 &message, const double &state, const rclcpp::Time &time)'],['../namespacemodulo__core_1_1translators.html#a2648db7b6384ba6b10186ae5e98bea59',1,'modulo_core::translators::write_message(std_msgs::msg::Bool &message, const bool &state, const rclcpp::Time &time)'],['../namespacemodulo__core_1_1translators.html#a60be80575b8fb3e3d48f37a8bda6d9ed',1,'modulo_core::translators::write_message(U &message, const state_representation::Parameter< T > &state, const rclcpp::Time &)'],['../namespacemodulo__core_1_1translators.html#acdb4e193bb38e69690de512f7b6ea457',1,'modulo_core::translators::write_message(tf2_msgs::msg::TFMessage &message, const state_representation::CartesianState &state, const rclcpp::Time &time)'],['../namespacemodulo__core_1_1translators.html#ae2679cbc4106a9373296b6f00aaea34b',1,'modulo_core::translators::write_message(sensor_msgs::msg::JointState &message, const state_representation::JointState &state, const rclcpp::Time &time)'],['../namespacemodulo__core_1_1translators.html#a1fd40d767a0a9a3c8221eaabb12e8e77',1,'modulo_core::translators::write_message(geometry_msgs::msg::WrenchStamped &message, const state_representation::CartesianState &state, const rclcpp::Time &time)'],['../namespacemodulo__core_1_1translators.html#a6960610fd4bf9bb981827e0146b04d05',1,'modulo_core::translators::write_message(geometry_msgs::msg::TwistStamped &message, const state_representation::CartesianState &state, const rclcpp::Time &time)'],['../namespacemodulo__core_1_1translators.html#a23c4f120bdc010eb6f5b61bfb21abec1',1,'modulo_core::translators::write_message(geometry_msgs::msg::Twist &message, const state_representation::CartesianState &state, const rclcpp::Time &time)'],['../namespacemodulo__core_1_1translators.html#ade9e94aca963133615835e6724ada18b',1,'modulo_core::translators::write_message(geometry_msgs::msg::TransformStamped &message, const state_representation::CartesianState &state, const rclcpp::Time &time)'],['../namespacemodulo__core_1_1translators.html#a038c7d7431427a1b46d12a2eab8b9da7',1,'modulo_core::translators::write_message(geometry_msgs::msg::Transform &message, const state_representation::CartesianState &state, const rclcpp::Time &time)'],['../namespacemodulo__core_1_1translators.html#ade7becbd0c04095260f1aad7dc4d5da0',1,'modulo_core::translators::write_message(geometry_msgs::msg::PoseStamped &message, const state_representation::CartesianState &state, const rclcpp::Time &time)'],['../namespacemodulo__core_1_1translators.html#a2ce2005274aa2509faa07e206f74202f',1,'modulo_core::translators::write_message(geometry_msgs::msg::Pose &message, const state_representation::CartesianState &state, const rclcpp::Time &time)'],['../namespacemodulo__core_1_1translators.html#a0230b5afcd0bfca73a2a676a6e8706c3',1,'modulo_core::translators::write_message(geometry_msgs::msg::AccelStamped &message, const state_representation::CartesianState &state, const rclcpp::Time &time)'],['../namespacemodulo__core_1_1translators.html#a151198c871af003d2205cf0556115260',1,'modulo_core::translators::write_message(geometry_msgs::msg::Accel &message, const state_representation::CartesianState &state, const rclcpp::Time &time)'],['../classmodulo__core_1_1communication_1_1_message_pair.html#aa50124b4eb3e5811562c567da1f03f00',1,'modulo_core::communication::MessagePair::write_message()']]], + ['write_5foutput_3',['write_output',['../classmodulo__controllers_1_1_base_controller_interface.html#ab26b590fd04e676cc352d14817b9bad8',1,'modulo_controllers::BaseControllerInterface']]], + ['write_5fparameter_4',['write_parameter',['../namespacemodulo__core_1_1translators.html#ab0ba0632a12496f0ad34f836c5001689',1,'modulo_core::translators']]] +]; diff --git a/versions/v5.0.1/search/all_13.js b/versions/v5.0.1/search/all_13.js new file mode 100644 index 00000000..31954c31 --- /dev/null +++ b/versions/v5.0.1/search/all_13.js @@ -0,0 +1,11 @@ +var searchData= +[ + ['_7ecomponent_0',['~Component',['../classmodulo__components_1_1_component.html#a38b0fe134b7fc9b802902e009683dc04',1,'modulo_components::Component']]], + ['_7ecomponentinterface_1',['~ComponentInterface',['../classmodulo__components_1_1_component_interface.html#a46c675cd5a9b7e00455d86d949950c2f',1,'modulo_components::ComponentInterface']]], + ['_7elifecyclecomponent_2',['~LifecycleComponent',['../classmodulo__components_1_1_lifecycle_component.html#a534d2620117f9b2420418d4d6ca48a12',1,'modulo_components::LifecycleComponent']]], + ['_7emessagepairinterface_3',['~MessagePairInterface',['../classmodulo__core_1_1communication_1_1_message_pair_interface.html#a1b0177982d2972d701692b3c89705aae',1,'modulo_core::communication::MessagePairInterface']]], + ['_7epublisherhandler_4',['~PublisherHandler',['../classmodulo__core_1_1communication_1_1_publisher_handler.html#a9c2eafb61ee4d8e60a15e0af519be4d3',1,'modulo_core::communication::PublisherHandler']]], + ['_7epublisherinterface_5',['~PublisherInterface',['../classmodulo__core_1_1communication_1_1_publisher_interface.html#a1e670470b065bb1e7b1e5ef88eec5268',1,'modulo_core::communication::PublisherInterface']]], + ['_7esubscriptionhandler_6',['~SubscriptionHandler',['../classmodulo__core_1_1communication_1_1_subscription_handler.html#a3de45dc5da0ca5ae1de4a819851f4979',1,'modulo_core::communication::SubscriptionHandler']]], + ['_7esubscriptioninterface_7',['~SubscriptionInterface',['../classmodulo__core_1_1communication_1_1_subscription_interface.html#afd0d227d6533cafc7731f1fd52cb8d50',1,'modulo_core::communication::SubscriptionInterface']]] +]; diff --git a/versions/v5.0.1/search/all_2.js b/versions/v5.0.1/search/all_2.js new file mode 100644 index 00000000..3eba440d --- /dev/null +++ b/versions/v5.0.1/search/all_2.js @@ -0,0 +1,20 @@ +var searchData= +[ + ['command_5finterface_5fconfiguration_0',['command_interface_configuration',['../classmodulo__controllers_1_1_controller_interface.html#a170ee563e6bbeb4b2cf441600f6a2490',1,'modulo_controllers::ControllerInterface']]], + ['component_1',['component',['../classmodulo__components_1_1_component.html',1,'modulo_components::Component'],['../classmodulo__components_1_1_component.html#ae19b0377e0b7fa7f43efff7adfae143b',1,'modulo_components::Component::Component()']]], + ['componentinterface_2',['componentinterface',['../classmodulo__components_1_1_component_interface.html',1,'modulo_components::ComponentInterface'],['../classmodulo__components_1_1_component_interface.html#a8ce3d7ecf6ff18041c0ec2829de40e22',1,'modulo_components::ComponentInterface::ComponentInterface()']]], + ['componentinterfacepublicinterface_3',['ComponentInterfacePublicInterface',['../class_component_interface_public_interface.html',1,'']]], + ['components_4',['Modulo Components',['../md__2github_2workspace_2source_2modulo__components_2_r_e_a_d_m_e.html',1,'']]], + ['componentserviceresponse_5',['ComponentServiceResponse',['../structmodulo__components_1_1_component_service_response.html',1,'modulo_components']]], + ['compute_5fcartesian_5fstate_6',['compute_cartesian_state',['../classmodulo__controllers_1_1_robot_controller_interface.html#a92904926dd9e22ff7c462a33b9306575',1,'modulo_controllers::RobotControllerInterface']]], + ['controllerinput_7',['ControllerInput',['../structmodulo__controllers_1_1_controller_input.html',1,'modulo_controllers']]], + ['controllerinterface_8',['controllerinterface',['../classmodulo__controllers_1_1_controller_interface.html',1,'modulo_controllers::ControllerInterface'],['../classmodulo__controllers_1_1_controller_interface.html#a45af1adc882e1d005c6ce3a0bf63f061',1,'modulo_controllers::ControllerInterface::ControllerInterface()']]], + ['controllers_9',['modulo-controllers',['../md__2github_2workspace_2source_2modulo__controllers_2_r_e_a_d_m_e.html',1,'']]], + ['controllerserviceresponse_10',['ControllerServiceResponse',['../structmodulo__controllers_1_1_controller_service_response.html',1,'modulo_controllers']]], + ['copy_5fparameter_5fvalue_11',['copy_parameter_value',['../namespacemodulo__core_1_1translators.html#af16d1185354f2f64f06698b0d1b3fc3f',1,'modulo_core::translators']]], + ['core_12',['Modulo Core',['../md__2github_2workspace_2source_2modulo__core_2_r_e_a_d_m_e.html',1,'']]], + ['coreexception_13',['CoreException',['../classmodulo__core_1_1exceptions_1_1_core_exception.html',1,'modulo_core::exceptions']]], + ['create_5foutput_14',['create_output',['../classmodulo__components_1_1_component_interface.html#aa84db667c915dcb03d367b0288ce1174',1,'modulo_components::ComponentInterface']]], + ['create_5fpublisher_5finterface_15',['create_publisher_interface',['../classmodulo__core_1_1communication_1_1_publisher_handler.html#a95f0a5157539b3ffb1a936e4bbd60e23',1,'modulo_core::communication::PublisherHandler']]], + ['create_5fsubscription_5finterface_16',['create_subscription_interface',['../classmodulo__core_1_1communication_1_1_subscription_handler.html#a9adbe98500d927e5e76fb18c9f62e04b',1,'modulo_core::communication::SubscriptionHandler']]] +]; diff --git a/versions/v5.0.1/search/all_3.js b/versions/v5.0.1/search/all_3.js new file mode 100644 index 00000000..7d012dbc --- /dev/null +++ b/versions/v5.0.1/search/all_3.js @@ -0,0 +1,6 @@ +var searchData= +[ + ['deactivate_0',['deactivate',['../classmodulo__core_1_1communication_1_1_publisher_handler.html#ae7add9b1f9bbce45d348551b9bc729fe',1,'modulo_core::communication::PublisherHandler::deactivate()'],['../classmodulo__core_1_1communication_1_1_publisher_interface.html#a2570447d8280ab4f1bc47e8c020082f3',1,'modulo_core::communication::PublisherInterface::deactivate()']]], + ['declare_5finput_1',['declare_input',['../classmodulo__components_1_1_component_interface.html#a0ef86c0ed9502607325d7df042c849d1',1,'modulo_components::ComponentInterface']]], + ['declare_5foutput_2',['declare_output',['../classmodulo__components_1_1_component_interface.html#a103aec4a95d9c136b572534221a1eeec',1,'modulo_components::ComponentInterface']]] +]; diff --git a/versions/v5.0.1/search/all_4.js b/versions/v5.0.1/search/all_4.js new file mode 100644 index 00000000..42471a1f --- /dev/null +++ b/versions/v5.0.1/search/all_4.js @@ -0,0 +1,6 @@ +var searchData= +[ + ['evaluate_0',['evaluate',['../classmodulo__controllers_1_1_controller_interface.html#a258e8cc74be6bf915a2c1aa5f9278fc1',1,'modulo_controllers::ControllerInterface']]], + ['evaluate_5fperiodic_5fcallbacks_1',['evaluate_periodic_callbacks',['../classmodulo__components_1_1_component_interface.html#ae3356bb3938d2df54a5bd43b07c049df',1,'modulo_components::ComponentInterface']]], + ['execute_2',['execute',['../classmodulo__components_1_1_component.html#aeb496916cb46a1e8369412f06c440910',1,'modulo_components::Component']]] +]; diff --git a/versions/v5.0.1/search/all_5.js b/versions/v5.0.1/search/all_5.js new file mode 100644 index 00000000..31416933 --- /dev/null +++ b/versions/v5.0.1/search/all_5.js @@ -0,0 +1,6 @@ +var searchData= +[ + ['finalize_5finterfaces_0',['finalize_interfaces',['../classmodulo__components_1_1_component_interface.html#a405eb37f9691fd567c8854b0a2bfd79e',1,'modulo_components::ComponentInterface']]], + ['ft_5fsensor_5fname_5f_1',['ft_sensor_name_',['../classmodulo__controllers_1_1_robot_controller_interface.html#a0dd8f48ee0160acd099bbf79b5183cfa',1,'modulo_controllers::RobotControllerInterface']]], + ['ft_5fsensor_5freference_5fframe_5f_2',['ft_sensor_reference_frame_',['../classmodulo__controllers_1_1_robot_controller_interface.html#a477eb72d1421e147e96a54ea1b96452f',1,'modulo_controllers::RobotControllerInterface']]] +]; diff --git a/versions/v5.0.1/search/all_6.js b/versions/v5.0.1/search/all_6.js new file mode 100644 index 00000000..c20930a8 --- /dev/null +++ b/versions/v5.0.1/search/all_6.js @@ -0,0 +1,24 @@ +var searchData= +[ + ['get_5fcallback_0',['get_callback',['../classmodulo__core_1_1communication_1_1_subscription_handler.html#a60039333a4c81ea81c66ab2e88b6eaff',1,'modulo_core::communication::SubscriptionHandler::get_callback(const std::function< void()> &user_callback)'],['../classmodulo__core_1_1communication_1_1_subscription_handler.html#a01f697561ba64f5d98ae0522f8c57cc6',1,'modulo_core::communication::SubscriptionHandler::get_callback()']]], + ['get_5fcartesian_5fstate_1',['get_cartesian_state',['../classmodulo__controllers_1_1_robot_controller_interface.html#a1ba472ffaa66f3061a85cd3918bceaa2',1,'modulo_controllers::RobotControllerInterface']]], + ['get_5fcommand_5finterface_2',['get_command_interface',['../classmodulo__controllers_1_1_controller_interface.html#a53a0f9e5243f9e0dca8d470a78e90426',1,'modulo_controllers::ControllerInterface']]], + ['get_5fcommand_5fmutex_3',['get_command_mutex',['../classmodulo__controllers_1_1_base_controller_interface.html#af9b5fd096a49b8e0b2394db0ff30568d',1,'modulo_controllers::BaseControllerInterface']]], + ['get_5fdata_4',['get_data',['../classmodulo__core_1_1communication_1_1_message_pair.html#a951f34fcc216a1afdebefc665c5b80af',1,'modulo_core::communication::MessagePair']]], + ['get_5fft_5fsensor_5',['get_ft_sensor',['../classmodulo__controllers_1_1_robot_controller_interface.html#a54644709a8c725cc8df2ff3fee2adf1c',1,'modulo_controllers::RobotControllerInterface']]], + ['get_5fhandler_6',['get_handler',['../classmodulo__core_1_1communication_1_1_publisher_interface.html#a725e0facd73564ae7ab9c75396e401b0',1,'modulo_core::communication::PublisherInterface::get_handler()'],['../classmodulo__core_1_1communication_1_1_subscription_interface.html#a29ee546de88bc4ddd63ea0aa5eaf2399',1,'modulo_core::communication::SubscriptionInterface::get_handler()']]], + ['get_5fjoint_5fstate_7',['get_joint_state',['../classmodulo__controllers_1_1_robot_controller_interface.html#a40b1b7a5a15a29656d2a3aaa1a1e0a9c',1,'modulo_controllers::RobotControllerInterface']]], + ['get_5flifecycle_5fstate_8',['get_lifecycle_state',['../classmodulo__components_1_1_lifecycle_component.html#ae429b0085cc70ef6e6892747ac1189d2',1,'modulo_components::LifecycleComponent']]], + ['get_5fmessage_5fpair_9',['get_message_pair',['../classmodulo__core_1_1communication_1_1_message_pair_interface.html#a284645c90efb812ecd3abd90125962fa',1,'modulo_core::communication::MessagePairInterface::get_message_pair()'],['../classmodulo__core_1_1communication_1_1_publisher_interface.html#a5c38ad0774ca2a51218fc473320c5b71',1,'modulo_core::communication::PublisherInterface::get_message_pair()'],['../classmodulo__core_1_1communication_1_1_subscription_interface.html#acc3d58b49cd9c3d61f1896aa9dda2acf',1,'modulo_core::communication::SubscriptionInterface::get_message_pair()']]], + ['get_5fparameter_10',['get_parameter',['../classmodulo__components_1_1_lifecycle_component.html#a3e69d60ac7582fdd2306c97e1532f167',1,'modulo_components::LifecycleComponent::get_parameter()'],['../classmodulo__controllers_1_1_base_controller_interface.html#a0856a54cc05b74122f46871db239a5d7',1,'modulo_controllers::BaseControllerInterface::get_parameter()'],['../classmodulo__components_1_1_component_interface.html#a3f4d8fe85525194e2f5393065ee056aa',1,'modulo_components::ComponentInterface::get_parameter()'],['../classmodulo__components_1_1_component.html#a2b02cb1ed0716c4911df78b6735d297e',1,'modulo_components::Component::get_parameter()']]], + ['get_5fparameter_5fvalue_11',['get_parameter_value',['../classmodulo__components_1_1_component_interface.html#a418d23ed978018d9d465b9036db3eb8d',1,'modulo_components::ComponentInterface::get_parameter_value()'],['../classmodulo__controllers_1_1_base_controller_interface.html#a719d0a230e760504dbe96187078c31fd',1,'modulo_controllers::BaseControllerInterface::get_parameter_value()']]], + ['get_5fperiod_12',['get_period',['../classmodulo__components_1_1_component_interface.html#a20c687b575c0c603ae00eb19ad75bed5',1,'modulo_components::ComponentInterface']]], + ['get_5fpredicate_13',['get_predicate',['../classmodulo__components_1_1_component_interface.html#aedbd9d6dc9bbb48c7f7d717aa2518374',1,'modulo_components::ComponentInterface::get_predicate()'],['../classmodulo__controllers_1_1_base_controller_interface.html#aca3c6d5169006637229b6d9b83f509cf',1,'modulo_controllers::BaseControllerInterface::get_predicate()']]], + ['get_5fqos_14',['get_qos',['../classmodulo__components_1_1_component_interface.html#aab0d3f3a481902f01c70edf2349f304e',1,'modulo_components::ComponentInterface::get_qos()'],['../classmodulo__controllers_1_1_base_controller_interface.html#a1e3ea95cb692e6f5cd96175950725e00',1,'modulo_controllers::BaseControllerInterface::get_qos()']]], + ['get_5frate_15',['get_rate',['../classmodulo__components_1_1_component_interface.html#a0286512cb6033a506a1c2ed3ffeef948',1,'modulo_components::ComponentInterface']]], + ['get_5fros_5fparameter_5ftype_16',['get_ros_parameter_type',['../namespacemodulo__core_1_1translators.html#aea1df4ab0bfb038f7b297865993149e2',1,'modulo_core::translators']]], + ['get_5fstate_5finterface_17',['get_state_interface',['../classmodulo__controllers_1_1_controller_interface.html#a880660f18e4f8dac9d41bf39323e9413',1,'modulo_controllers::ControllerInterface']]], + ['get_5fstate_5finterfaces_18',['get_state_interfaces',['../classmodulo__controllers_1_1_controller_interface.html#a2a36125b4ed269f974c8599d7f791e11',1,'modulo_controllers::ControllerInterface']]], + ['get_5fsubscription_19',['get_subscription',['../classmodulo__core_1_1communication_1_1_subscription_handler.html#aa9c9421c48dbbbc87dfd0d370f452b44',1,'modulo_core::communication::SubscriptionHandler']]], + ['get_5ftype_20',['get_type',['../classmodulo__core_1_1communication_1_1_message_pair_interface.html#a578dda86f8b23d5aeb8c3d3854239e77',1,'modulo_core::communication::MessagePairInterface::get_type()'],['../classmodulo__core_1_1communication_1_1_publisher_interface.html#a2f878eb3cd08e69b685b39c6c79c5ed0',1,'modulo_core::communication::PublisherInterface::get_type()']]] +]; diff --git a/versions/v5.0.1/search/all_7.js b/versions/v5.0.1/search/all_7.js new file mode 100644 index 00000000..5146cd60 --- /dev/null +++ b/versions/v5.0.1/search/all_7.js @@ -0,0 +1,4 @@ +var searchData= +[ + ['hardware_5fname_5f_0',['hardware_name_',['../classmodulo__controllers_1_1_controller_interface.html#ac044ce7a57e68d15214dcfb2df172173',1,'modulo_controllers::ControllerInterface']]] +]; diff --git a/versions/v5.0.1/search/all_8.js b/versions/v5.0.1/search/all_8.js new file mode 100644 index 00000000..5026d570 --- /dev/null +++ b/versions/v5.0.1/search/all_8.js @@ -0,0 +1,8 @@ +var searchData= +[ + ['inputs_5f_0',['inputs_',['../classmodulo__components_1_1_component_interface.html#adc740c0c1951cbc9327dc676ef2ef4a9',1,'modulo_components::ComponentInterface']]], + ['interfaces_1',['Modulo Interfaces',['../md__2github_2workspace_2source_2modulo__interfaces_2_r_e_a_d_m_e.html',1,'']]], + ['invalidpointercastexception_2',['InvalidPointerCastException',['../classmodulo__core_1_1exceptions_1_1_invalid_pointer_cast_exception.html',1,'modulo_core::exceptions']]], + ['invalidpointerexception_3',['InvalidPointerException',['../classmodulo__core_1_1exceptions_1_1_invalid_pointer_exception.html',1,'modulo_core::exceptions']]], + ['is_5factive_4',['is_active',['../classmodulo__controllers_1_1_base_controller_interface.html#a4ba640c6f8f7f61269af2cbdbd3ca0c9',1,'modulo_controllers::BaseControllerInterface']]] +]; diff --git a/versions/v5.0.1/search/all_9.js b/versions/v5.0.1/search/all_9.js new file mode 100644 index 00000000..500a4b94 --- /dev/null +++ b/versions/v5.0.1/search/all_9.js @@ -0,0 +1,6 @@ +var searchData= +[ + ['lifecyclecomponent_0',['lifecyclecomponent',['../classmodulo__components_1_1_lifecycle_component.html',1,'modulo_components::LifecycleComponent'],['../classmodulo__components_1_1_lifecycle_component.html#a81908c5428fea4a36262ffd82168dd06',1,'modulo_components::LifecycleComponent::LifecycleComponent()']]], + ['lookup_5ftransform_1',['lookup_transform',['../classmodulo__components_1_1_component_interface.html#a71b7fbc1c56b4cfb0fd2bd800d6c5015',1,'modulo_components::ComponentInterface::lookup_transform(const std::string &frame, const std::string &reference_frame, const tf2::TimePoint &time_point, const tf2::Duration &duration)'],['../classmodulo__components_1_1_component_interface.html#a43c76f10f313827f7a32b88d3289885c',1,'modulo_components::ComponentInterface::lookup_transform(const std::string &frame, const std::string &reference_frame="world", double validity_period=-1.0, const tf2::Duration &duration=tf2::Duration(std::chrono::microseconds(10)))']]], + ['lookuptransformexception_2',['LookupTransformException',['../classmodulo__core_1_1exceptions_1_1_lookup_transform_exception.html',1,'modulo_core::exceptions']]] +]; diff --git a/versions/v5.0.1/search/all_a.js b/versions/v5.0.1/search/all_a.js new file mode 100644 index 00000000..c5ef025c --- /dev/null +++ b/versions/v5.0.1/search/all_a.js @@ -0,0 +1,24 @@ +var searchData= +[ + ['message_5fpair_5f_0',['message_pair_',['../classmodulo__core_1_1communication_1_1_subscription_interface.html#ac6821d03d5979ff849796694a5d802cb',1,'modulo_core::communication::SubscriptionInterface::message_pair_'],['../classmodulo__core_1_1communication_1_1_publisher_interface.html#a68191a20fdb29396066eb453c3e32cac',1,'modulo_core::communication::PublisherInterface::message_pair_']]], + ['messagepair_1',['messagepair',['../classmodulo__core_1_1communication_1_1_message_pair.html',1,'modulo_core::communication::MessagePair< MsgT, DataT >'],['../classmodulo__core_1_1communication_1_1_message_pair.html#a0d79b3b410f5b5c23e53c95f62db492c',1,'modulo_core::communication::MessagePair::MessagePair(std::shared_ptr< DataT > data, std::shared_ptr< rclcpp::Clock > clock)'],['../classmodulo__core_1_1communication_1_1_message_pair.html#adeb7c57318156213f827ebdfc1eb05ff',1,'modulo_core::communication::MessagePair::MessagePair(std::shared_ptr< DataT > data, std::shared_ptr< rclcpp::Clock > clock)']]], + ['messagepairinterface_2',['messagepairinterface',['../classmodulo__core_1_1communication_1_1_message_pair_interface.html',1,'modulo_core::communication::MessagePairInterface'],['../classmodulo__core_1_1communication_1_1_message_pair_interface.html#ac6a7c97767464a21fc8a7b9f10475703',1,'modulo_core::communication::MessagePairInterface::MessagePairInterface(const MessagePairInterface &message_pair)=default'],['../classmodulo__core_1_1communication_1_1_message_pair_interface.html#a42c43740bf2d3e11b0f228d422c570c7',1,'modulo_core::communication::MessagePairInterface::MessagePairInterface(MessageType type)']]], + ['messagetranslationexception_3',['MessageTranslationException',['../classmodulo__core_1_1exceptions_1_1_message_translation_exception.html',1,'modulo_core::exceptions']]], + ['messagetype_4',['MessageType',['../namespacemodulo__core_1_1communication.html#a14a52364ccbc238876007a3f134977ab',1,'modulo_core::communication']]], + ['modulo_5',['Modulo',['../index.html',1,'']]], + ['modulo_20components_6',['Modulo Components',['../md__2github_2workspace_2source_2modulo__components_2_r_e_a_d_m_e.html',1,'']]], + ['modulo_20controllers_7',['modulo-controllers',['../md__2github_2workspace_2source_2modulo__controllers_2_r_e_a_d_m_e.html',1,'']]], + ['modulo_20core_8',['Modulo Core',['../md__2github_2workspace_2source_2modulo__core_2_r_e_a_d_m_e.html',1,'']]], + ['modulo_20interfaces_9',['Modulo Interfaces',['../md__2github_2workspace_2source_2modulo__interfaces_2_r_e_a_d_m_e.html',1,'']]], + ['modulo_20utils_10',['Modulo Utils',['../md__2github_2workspace_2source_2modulo__utils_2_r_e_a_d_m_e.html',1,'']]], + ['modulo_5fcomponents_11',['modulo_components',['../namespacemodulo__components.html',1,'']]], + ['modulo_5fcore_12',['modulo_core',['../namespacemodulo__core.html',1,'']]], + ['modulo_5fcore_3a_3acommunication_13',['communication',['../namespacemodulo__core_1_1communication.html',1,'modulo_core']]], + ['modulo_5fcore_3a_3aconcepts_3a_3acoredatat_14',['CoreDataT',['../conceptmodulo__core_1_1concepts_1_1_core_data_t.html',1,'modulo_core::concepts']]], + ['modulo_5fcore_3a_3aconcepts_3a_3acustomt_15',['CustomT',['../conceptmodulo__core_1_1concepts_1_1_custom_t.html',1,'modulo_core::concepts']]], + ['modulo_5fcore_3a_3aconcepts_3a_3aprimitivedatat_16',['PrimitiveDataT',['../conceptmodulo__core_1_1concepts_1_1_primitive_data_t.html',1,'modulo_core::concepts']]], + ['modulo_5fcore_3a_3aconcepts_3a_3atranslatedmsgt_17',['TranslatedMsgT',['../conceptmodulo__core_1_1concepts_1_1_translated_msg_t.html',1,'modulo_core::concepts']]], + ['modulo_5fcore_3a_3aexceptions_18',['exceptions',['../namespacemodulo__core_1_1exceptions.html',1,'modulo_core']]], + ['modulo_5fcore_3a_3atranslators_19',['translators',['../namespacemodulo__core_1_1translators.html',1,'modulo_core']]], + ['modulo_5futils_3a_3aparsing_20',['parsing',['../namespacemodulo__utils_1_1parsing.html',1,'modulo_utils']]] +]; diff --git a/versions/v5.0.1/search/all_b.js b/versions/v5.0.1/search/all_b.js new file mode 100644 index 00000000..15fa934b --- /dev/null +++ b/versions/v5.0.1/search/all_b.js @@ -0,0 +1,4 @@ +var searchData= +[ + ['nullpointerexception_0',['NullPointerException',['../classmodulo__core_1_1exceptions_1_1_null_pointer_exception.html',1,'modulo_core::exceptions']]] +]; diff --git a/versions/v5.0.1/search/all_c.js b/versions/v5.0.1/search/all_c.js new file mode 100644 index 00000000..8ee8bb30 --- /dev/null +++ b/versions/v5.0.1/search/all_c.js @@ -0,0 +1,17 @@ +var searchData= +[ + ['on_5factivate_0',['on_activate',['../classmodulo__controllers_1_1_controller_interface.html#a5e9758c1b2f19970f5912e65274678b6',1,'modulo_controllers::ControllerInterface::on_activate()'],['../classmodulo__controllers_1_1_robot_controller_interface.html#a27bec46fefa9083c1b0a19e5b8a69172',1,'modulo_controllers::RobotControllerInterface::on_activate()'],['../classmodulo__controllers_1_1_controller_interface.html#a32a771d48d2f199175bbae212cf6cb9a',1,'modulo_controllers::ControllerInterface::on_activate()']]], + ['on_5factivate_5fcallback_1',['on_activate_callback',['../classmodulo__components_1_1_lifecycle_component.html#a45e7a84d2ff32d6538b065e7d5d59db4',1,'modulo_components::LifecycleComponent']]], + ['on_5fcleanup_5fcallback_2',['on_cleanup_callback',['../classmodulo__components_1_1_lifecycle_component.html#a4dba41e6a556184546ae3244077d3eab',1,'modulo_components::LifecycleComponent']]], + ['on_5fconfigure_3',['on_configure',['../classmodulo__controllers_1_1_base_controller_interface.html#a14a5c73e422087ecc701eacf84141579',1,'modulo_controllers::BaseControllerInterface::on_configure()'],['../classmodulo__controllers_1_1_controller_interface.html#a744aead2afb2097f13491c62b205c419',1,'modulo_controllers::ControllerInterface::on_configure(const rclcpp_lifecycle::State &previous_state) final'],['../classmodulo__controllers_1_1_controller_interface.html#a20045ceffec9a44e4666d92632be5400',1,'modulo_controllers::ControllerInterface::on_configure()'],['../classmodulo__controllers_1_1_robot_controller_interface.html#ad7de2bc07230837f28faf0ebb4c1fc65',1,'modulo_controllers::RobotControllerInterface::on_configure()']]], + ['on_5fconfigure_5fcallback_4',['on_configure_callback',['../classmodulo__components_1_1_lifecycle_component.html#ae2750d56c97758b231c5a41c81e94787',1,'modulo_components::LifecycleComponent']]], + ['on_5fdeactivate_5',['on_deactivate',['../classmodulo__controllers_1_1_controller_interface.html#ac9742c368a3bbdbf5ea6603f253ad2a7',1,'modulo_controllers::ControllerInterface::on_deactivate()'],['../classmodulo__controllers_1_1_controller_interface.html#ab5cd6b83dd7486f408a4b95aa211cdff',1,'modulo_controllers::ControllerInterface::on_deactivate(const rclcpp_lifecycle::State &previous_state) final']]], + ['on_5fdeactivate_5fcallback_6',['on_deactivate_callback',['../classmodulo__components_1_1_lifecycle_component.html#a22b81a549cb93798e4c7801541125b70',1,'modulo_components::LifecycleComponent']]], + ['on_5ferror_5fcallback_7',['on_error_callback',['../classmodulo__components_1_1_lifecycle_component.html#aa06d7c56d3cd549f20e550958eeac6c6',1,'modulo_components::LifecycleComponent']]], + ['on_5fexecute_5fcallback_8',['on_execute_callback',['../classmodulo__components_1_1_component.html#aa91321e421f2f71a9c86f694996baeb1',1,'modulo_components::Component']]], + ['on_5finit_9',['on_init',['../classmodulo__controllers_1_1_base_controller_interface.html#a8cdb66f7e21dbcb0633f6bfaa9fb3adc',1,'modulo_controllers::BaseControllerInterface::on_init()'],['../classmodulo__controllers_1_1_controller_interface.html#a3280902d5467912fd07fcc853a9214eb',1,'modulo_controllers::ControllerInterface::on_init()']]], + ['on_5fshutdown_5fcallback_10',['on_shutdown_callback',['../classmodulo__components_1_1_lifecycle_component.html#a05b5dfdf28ebf0d2a9f69cdad9d29eb3',1,'modulo_components::LifecycleComponent']]], + ['on_5fstep_5fcallback_11',['on_step_callback',['../classmodulo__components_1_1_component_interface.html#a7f5fff168fc2a31d5e36b4a103ca46fa',1,'modulo_components::ComponentInterface']]], + ['on_5fvalidate_5fparameter_5fcallback_12',['on_validate_parameter_callback',['../classmodulo__components_1_1_component_interface.html#a09bd587039da047128519ecf59ae544c',1,'modulo_components::ComponentInterface::on_validate_parameter_callback()'],['../classmodulo__controllers_1_1_base_controller_interface.html#ad302e4f9728d36c82177a7cfd52e6aec',1,'modulo_controllers::BaseControllerInterface::on_validate_parameter_callback()'],['../classmodulo__controllers_1_1_robot_controller_interface.html#a3e8115f4baa72f001179efe8295bfe5c',1,'modulo_controllers::RobotControllerInterface::on_validate_parameter_callback()']]], + ['outputs_5f_13',['outputs_',['../classmodulo__components_1_1_component_interface.html#a3e7358644fd89bf60facc34ec5a22646',1,'modulo_components::ComponentInterface']]] +]; diff --git a/versions/v5.0.1/search/all_d.js b/versions/v5.0.1/search/all_d.js new file mode 100644 index 00000000..07ae7982 --- /dev/null +++ b/versions/v5.0.1/search/all_d.js @@ -0,0 +1,15 @@ +var searchData= +[ + ['parameterexception_0',['ParameterException',['../classmodulo__core_1_1exceptions_1_1_parameter_exception.html',1,'modulo_core::exceptions']]], + ['parametertranslationexception_1',['ParameterTranslationException',['../classmodulo__core_1_1exceptions_1_1_parameter_translation_exception.html',1,'modulo_core::exceptions']]], + ['periodic_5foutputs_5f_2',['periodic_outputs_',['../classmodulo__components_1_1_component_interface.html#af132dad4fbddd625ef36d4a8f61538f0',1,'modulo_components::ComponentInterface']]], + ['predicate_3',['Predicate',['../classmodulo__core_1_1_predicate.html',1,'modulo_core']]], + ['predicateslistener_4',['PredicatesListener',['../classmodulo__utils_1_1testutils_1_1_predicates_listener.html',1,'modulo_utils::testutils']]], + ['publish_5',['publish',['../classmodulo__core_1_1communication_1_1_publisher_handler.html#a864c43153af83707343920e33700043d',1,'modulo_core::communication::PublisherHandler::publish()'],['../classmodulo__core_1_1communication_1_1_publisher_interface.html#a3e4d5682dc38835d7e1f02a2e71503ed',1,'modulo_core::communication::PublisherInterface::publish()'],['../classmodulo__core_1_1communication_1_1_publisher_handler.html#a2368473d358309e26088db203c301c81',1,'modulo_core::communication::PublisherHandler::publish()']]], + ['publish_5foutput_6',['publish_output',['../classmodulo__components_1_1_component_interface.html#a98d4767b141939df0c7077c10d5b3aa7',1,'modulo_components::ComponentInterface']]], + ['publish_5foutputs_7',['publish_outputs',['../classmodulo__components_1_1_component_interface.html#a0bdfeacb7b0b13c2adeecb51a80a0fa0',1,'modulo_components::ComponentInterface']]], + ['publish_5fpredicates_8',['publish_predicates',['../classmodulo__components_1_1_component_interface.html#a9f7ba119ecceb0862634ed403306ddf8',1,'modulo_components::ComponentInterface']]], + ['publisherhandler_9',['publisherhandler',['../classmodulo__core_1_1communication_1_1_publisher_handler.html',1,'modulo_core::communication::PublisherHandler< PubT, MsgT >'],['../classmodulo__core_1_1communication_1_1_publisher_handler.html#abeb33dd415f1ab50bc86ca74f1aba9b1',1,'modulo_core::communication::PublisherHandler::PublisherHandler()']]], + ['publisherinterface_10',['publisherinterface',['../classmodulo__core_1_1communication_1_1_publisher_interface.html',1,'modulo_core::communication::PublisherInterface'],['../classmodulo__core_1_1communication_1_1_publisher_interface.html#a8825c1bbfbe13075bfc88213cc2f0feb',1,'modulo_core::communication::PublisherInterface::PublisherInterface(PublisherType type, std::shared_ptr< MessagePairInterface > message_pair=nullptr)'],['../classmodulo__core_1_1communication_1_1_publisher_interface.html#a2881b0902f8b9c22c62c08c2106ea7be',1,'modulo_core::communication::PublisherInterface::PublisherInterface(const PublisherInterface &publisher)=default']]], + ['publishertype_11',['PublisherType',['../namespacemodulo__core_1_1communication.html#a11c26e7082f80b74fb35da3f901f9366',1,'modulo_core::communication']]] +]; diff --git a/versions/v5.0.1/search/all_e.js b/versions/v5.0.1/search/all_e.js new file mode 100644 index 00000000..0c4117d5 --- /dev/null +++ b/versions/v5.0.1/search/all_e.js @@ -0,0 +1,14 @@ +var searchData= +[ + ['raise_5ferror_0',['raise_error',['../classmodulo__components_1_1_component.html#acf7ee62988ef80d58294ed5514885f7e',1,'modulo_components::Component::raise_error()'],['../classmodulo__components_1_1_component_interface.html#a8a1c3bac0aa2141b33682059b3b8f18b',1,'modulo_components::ComponentInterface::raise_error()'],['../classmodulo__components_1_1_lifecycle_component.html#a04b2a80b2611e17027bb390b8845bcab',1,'modulo_components::LifecycleComponent::raise_error()']]], + ['read_1',['read',['../classmodulo__core_1_1communication_1_1_message_pair_interface.html#a8b81ae20f181f80df6d8e127a9719ede',1,'modulo_core::communication::MessagePairInterface']]], + ['read_5finput_2',['read_input',['../classmodulo__controllers_1_1_base_controller_interface.html#a9d35a6d4f02c542eb301068e64ca3a30',1,'modulo_controllers::BaseControllerInterface']]], + ['read_5fmessage_3',['read_message',['../namespacemodulo__core_1_1translators.html#a832274530f0275f7ef5cdfb4ea7fd2d9',1,'modulo_core::translators::read_message(state_representation::CartesianState &state, const geometry_msgs::msg::Twist &message)'],['../namespacemodulo__core_1_1translators.html#ad4836d631d145e89dfd47c4b394d174c',1,'modulo_core::translators::read_message(state_representation::CartesianState &state, const geometry_msgs::msg::Transform &message)'],['../namespacemodulo__core_1_1translators.html#a7f5eaa5ff35c583a37fda7e8b272a870',1,'modulo_core::translators::read_message(state_representation::CartesianState &state, const geometry_msgs::msg::TwistStamped &message)'],['../namespacemodulo__core_1_1translators.html#a9ea65818de625b6fa8ced760bc3c6c7d',1,'modulo_core::translators::read_message(state_representation::CartesianState &state, const geometry_msgs::msg::Wrench &message)'],['../namespacemodulo__core_1_1translators.html#ab0d3919f19f876ecd246045c9d58c2be',1,'modulo_core::translators::read_message(state_representation::CartesianState &state, const geometry_msgs::msg::WrenchStamped &message)'],['../namespacemodulo__core_1_1translators.html#a552fe7a279beb774b39819f60bed127a',1,'modulo_core::translators::read_message(state_representation::JointState &state, const sensor_msgs::msg::JointState &message)'],['../namespacemodulo__core_1_1translators.html#a2c16bbbdfb7e718fc716139399e549ad',1,'modulo_core::translators::read_message(state_representation::Parameter< T > &state, const U &message)'],['../namespacemodulo__core_1_1translators.html#a329c6bf4bcf7e44b283fb8aadc6d7c6f',1,'modulo_core::translators::read_message(bool &state, const std_msgs::msg::Bool &message)'],['../namespacemodulo__core_1_1translators.html#a00a802c20071659785e4e5651af201a6',1,'modulo_core::translators::read_message(double &state, const std_msgs::msg::Float64 &message)'],['../namespacemodulo__core_1_1translators.html#a89f6c759d19c4680f9bd0dc6dfccf287',1,'modulo_core::translators::read_message(std::vector< double > &state, const std_msgs::msg::Float64MultiArray &message)'],['../namespacemodulo__core_1_1translators.html#a61a15e12792070307871484cec3919bd',1,'modulo_core::translators::read_message(int &state, const std_msgs::msg::Int32 &message)'],['../namespacemodulo__core_1_1translators.html#a3eab5bfefb68847b86699826fc206757',1,'modulo_core::translators::read_message(std::string &state, const std_msgs::msg::String &message)'],['../namespacemodulo__core_1_1translators.html#ae3028daafe4e35d4cb3ed83172d8bcb0',1,'modulo_core::translators::read_message(T &state, const EncodedState &message)'],['../namespacemodulo__core_1_1translators.html#a7fb0ede2e2045b55a995ae71a3a1d8ad',1,'modulo_core::translators::read_message(state_representation::CartesianState &state, const geometry_msgs::msg::TransformStamped &message)'],['../namespacemodulo__core_1_1translators.html#a71af5ce246d3c9e1ff252f4c55d3817a',1,'modulo_core::translators::read_message(state_representation::CartesianState &state, const geometry_msgs::msg::PoseStamped &message)'],['../namespacemodulo__core_1_1translators.html#a2aa635da759b460c5aad924c4f1dcedb',1,'modulo_core::translators::read_message(state_representation::CartesianState &state, const geometry_msgs::msg::Pose &message)'],['../namespacemodulo__core_1_1translators.html#afe26976826af1f5c0c381f0b7e428502',1,'modulo_core::translators::read_message(state_representation::CartesianState &state, const geometry_msgs::msg::AccelStamped &message)'],['../namespacemodulo__core_1_1translators.html#af7b0fbec62bd9b885d289a7fb1ddba76',1,'modulo_core::translators::read_message(state_representation::CartesianState &state, const geometry_msgs::msg::Accel &message)'],['../classmodulo__core_1_1communication_1_1_message_pair.html#ac014837301539405388428fe893366b1',1,'modulo_core::communication::MessagePair::read_message()']]], + ['read_5fparameter_4',['read_parameter',['../namespacemodulo__core_1_1translators.html#a1bb1765511842105ebf5ea295b5e9750',1,'modulo_core::translators::read_parameter(const rclcpp::Parameter &ros_parameter)'],['../namespacemodulo__core_1_1translators.html#adcc089559e331a621718f275603b2dec',1,'modulo_core::translators::read_parameter(const rclcpp::Parameter &ros_parameter, const std::shared_ptr< state_representation::ParameterInterface > &parameter)']]], + ['read_5fparameter_5fconst_5',['read_parameter_const',['../namespacemodulo__core_1_1translators.html#afa6da1171b524ca4b63f6119f1774f1b',1,'modulo_core::translators']]], + ['read_5fstate_5finterfaces_6',['read_state_interfaces',['../classmodulo__controllers_1_1_controller_interface.html#a29a43b47e9a1e82b0670f2ff48d70483',1,'modulo_controllers::ControllerInterface']]], + ['remove_5finput_7',['remove_input',['../classmodulo__components_1_1_component_interface.html#a0c6b3ff94509f48df3a75f3ec68b14c4',1,'modulo_components::ComponentInterface']]], + ['remove_5foutput_8',['remove_output',['../classmodulo__components_1_1_component_interface.html#a969725887f31b8a88d0af54d390b7b05',1,'modulo_components::ComponentInterface']]], + ['robot_5f_9',['robot_',['../classmodulo__controllers_1_1_robot_controller_interface.html#a89d589f78643efc950e195ba92c4267d',1,'modulo_controllers::RobotControllerInterface']]], + ['robotcontrollerinterface_10',['robotcontrollerinterface',['../classmodulo__controllers_1_1_robot_controller_interface.html',1,'modulo_controllers::RobotControllerInterface'],['../classmodulo__controllers_1_1_robot_controller_interface.html#a8425df1a3db68bd334bd5e1f2c2a3295',1,'modulo_controllers::RobotControllerInterface::RobotControllerInterface(bool robot_model_required, const std::string &control_type="", bool load_geometries=false)'],['../classmodulo__controllers_1_1_robot_controller_interface.html#a0d36c86c0cf86b377195aa49290aa781',1,'modulo_controllers::RobotControllerInterface::RobotControllerInterface()']]] +]; diff --git a/versions/v5.0.1/search/all_f.js b/versions/v5.0.1/search/all_f.js new file mode 100644 index 00000000..beb627eb --- /dev/null +++ b/versions/v5.0.1/search/all_f.js @@ -0,0 +1,26 @@ +var searchData= +[ + ['safe_5fdynamic_5fcast_0',['safe_dynamic_cast',['../namespacemodulo__core_1_1translators.html#a9b01bebfd4d9e35131e0d04620446c08',1,'modulo_core::translators']]], + ['safe_5fdynamic_5fpointer_5fcast_1',['safe_dynamic_pointer_cast',['../namespacemodulo__core_1_1translators.html#a6ef1c765b829bf82c25a6e4f409c618e',1,'modulo_core::translators']]], + ['safe_5fspatial_5fstate_5fconversion_2',['safe_spatial_state_conversion',['../namespacemodulo__core_1_1translators.html#a04a6f2e996dbc7b5ce4dcda8d9d21548',1,'modulo_core::translators']]], + ['safe_5fstate_5fwith_5fnames_5fconversion_3',['safe_state_with_names_conversion',['../namespacemodulo__core_1_1translators.html#ac51af1c64864f12d38a4a7d4715a25ee',1,'modulo_core::translators']]], + ['send_5fstatic_5ftransform_4',['send_static_transform',['../classmodulo__components_1_1_component_interface.html#ae9fb8bc91a29935a0e4d469e45e62a7b',1,'modulo_components::ComponentInterface']]], + ['send_5fstatic_5ftransforms_5',['send_static_transforms',['../classmodulo__components_1_1_component_interface.html#a39293f62ba806c5f599f70cdf876ccae',1,'modulo_components::ComponentInterface']]], + ['send_5ftransform_6',['send_transform',['../classmodulo__components_1_1_component_interface.html#ab3d9b98663be5983a1c677c32f582d3e',1,'modulo_components::ComponentInterface']]], + ['send_5ftransforms_7',['send_transforms',['../classmodulo__components_1_1_component_interface.html#a07e38f6eb54ae52374056e1ccc595e7f',1,'modulo_components::ComponentInterface']]], + ['serviceclient_8',['ServiceClient',['../classmodulo__utils_1_1testutils_1_1_service_client.html',1,'modulo_utils::testutils']]], + ['set_5fcommand_5finterface_9',['set_command_interface',['../classmodulo__controllers_1_1_controller_interface.html#a9623c4028e3da288789b80a750c96304',1,'modulo_controllers::ControllerInterface']]], + ['set_5fdata_10',['set_data',['../classmodulo__core_1_1communication_1_1_message_pair.html#ae71ad28f6e4270b5a318ddbdbf620585',1,'modulo_core::communication::MessagePair']]], + ['set_5finput_5fvalidity_5fperiod_11',['set_input_validity_period',['../classmodulo__controllers_1_1_base_controller_interface.html#a87e904e6cf917796ea5c415787ddb872',1,'modulo_controllers::BaseControllerInterface']]], + ['set_5fjoint_5fcommand_12',['set_joint_command',['../classmodulo__controllers_1_1_robot_controller_interface.html#ab2c42661fe2c0a665b8b7e6bc0f0bc7f',1,'modulo_controllers::RobotControllerInterface']]], + ['set_5fmessage_5fpair_13',['set_message_pair',['../classmodulo__core_1_1communication_1_1_publisher_interface.html#aa59ed6b199b838811db4c29bb19c5319',1,'modulo_core::communication::PublisherInterface::set_message_pair()'],['../classmodulo__core_1_1communication_1_1_subscription_interface.html#a817997523c09e4c1d912d9a18427f3ef',1,'modulo_core::communication::SubscriptionInterface::set_message_pair()']]], + ['set_5fparameter_5fvalue_14',['set_parameter_value',['../classmodulo__components_1_1_component_interface.html#a28047040106c7a84d7c69ba27a034746',1,'modulo_components::ComponentInterface::set_parameter_value()'],['../classmodulo__controllers_1_1_base_controller_interface.html#a6f813c2a5885a4937daec65bdd02e6a1',1,'modulo_controllers::BaseControllerInterface::set_parameter_value()']]], + ['set_5fpredicate_15',['set_predicate',['../classmodulo__components_1_1_component_interface.html#a8b5da2215ad8971dedddd82881136499',1,'modulo_components::ComponentInterface::set_predicate()'],['../classmodulo__controllers_1_1_base_controller_interface.html#a8468346ccb5cf94e6a0a0c51192c3f23',1,'modulo_controllers::BaseControllerInterface::set_predicate(const std::string &predicate_name, const std::function< bool(void)> &predicate_function)'],['../classmodulo__controllers_1_1_base_controller_interface.html#ac617ea1e8f3635919cc1694dcd1f881d',1,'modulo_controllers::BaseControllerInterface::set_predicate(const std::string &predicate_name, bool predicate_value)'],['../classmodulo__components_1_1_component_interface.html#a8949cef47cf375d195f68e5782f37fbc',1,'modulo_components::ComponentInterface::set_predicate(const std::string &predicate_name, bool predicate_value)']]], + ['set_5fqos_16',['set_qos',['../classmodulo__components_1_1_component_interface.html#aa21a3ebb9bdce8d012558a46b4642fb4',1,'modulo_components::ComponentInterface::set_qos()'],['../classmodulo__controllers_1_1_base_controller_interface.html#abf162367e0fd1771024e5dc8d60a9710',1,'modulo_controllers::BaseControllerInterface::set_qos()']]], + ['set_5fsubscription_17',['set_subscription',['../classmodulo__core_1_1communication_1_1_subscription_handler.html#ad6ce10b7ac797009a7c64ddf52361276',1,'modulo_core::communication::SubscriptionHandler']]], + ['set_5fuser_5fcallback_18',['set_user_callback',['../classmodulo__core_1_1communication_1_1_subscription_handler.html#ae5ce0270138b061c709ce4f1c2f76f14',1,'modulo_core::communication::SubscriptionHandler']]], + ['state_5finterface_5fconfiguration_19',['state_interface_configuration',['../classmodulo__controllers_1_1_controller_interface.html#af2769f953805848c8672421f769517bc',1,'modulo_controllers::ControllerInterface']]], + ['step_20',['step',['../classmodulo__components_1_1_component_interface.html#a9db2bd1155cbe7c4ed921f173e8f5942',1,'modulo_components::ComponentInterface']]], + ['subscriptionhandler_21',['subscriptionhandler',['../classmodulo__core_1_1communication_1_1_subscription_handler.html#a0891ac7a050e1ed49e7e1097487652e1',1,'modulo_core::communication::SubscriptionHandler::SubscriptionHandler()'],['../classmodulo__core_1_1communication_1_1_subscription_handler.html',1,'modulo_core::communication::SubscriptionHandler< MsgT >']]], + ['subscriptioninterface_22',['subscriptioninterface',['../classmodulo__core_1_1communication_1_1_subscription_interface.html#a1d65d122da01edfcd28bdd049d2ad8e8',1,'modulo_core::communication::SubscriptionInterface::SubscriptionInterface(std::shared_ptr< MessagePairInterface > message_pair=nullptr)'],['../classmodulo__core_1_1communication_1_1_subscription_interface.html#a00fca8a8317e59f37051b8a7b411143e',1,'modulo_core::communication::SubscriptionInterface::SubscriptionInterface(const SubscriptionInterface &subscription)=default'],['../classmodulo__core_1_1communication_1_1_subscription_interface.html',1,'modulo_core::communication::SubscriptionInterface']]] +]; diff --git a/versions/v5.0.1/search/classes_0.js b/versions/v5.0.1/search/classes_0.js new file mode 100644 index 00000000..931c0b09 --- /dev/null +++ b/versions/v5.0.1/search/classes_0.js @@ -0,0 +1,5 @@ +var searchData= +[ + ['addserviceexception_0',['AddServiceException',['../classmodulo__core_1_1exceptions_1_1_add_service_exception.html',1,'modulo_core::exceptions']]], + ['addsignalexception_1',['AddSignalException',['../classmodulo__core_1_1exceptions_1_1_add_signal_exception.html',1,'modulo_core::exceptions']]] +]; diff --git a/versions/v5.0.1/search/classes_1.js b/versions/v5.0.1/search/classes_1.js new file mode 100644 index 00000000..f138d951 --- /dev/null +++ b/versions/v5.0.1/search/classes_1.js @@ -0,0 +1,4 @@ +var searchData= +[ + ['basecontrollerinterface_0',['BaseControllerInterface',['../classmodulo__controllers_1_1_base_controller_interface.html',1,'modulo_controllers']]] +]; diff --git a/versions/v5.0.1/search/classes_2.js b/versions/v5.0.1/search/classes_2.js new file mode 100644 index 00000000..cc6faafe --- /dev/null +++ b/versions/v5.0.1/search/classes_2.js @@ -0,0 +1,11 @@ +var searchData= +[ + ['component_0',['Component',['../classmodulo__components_1_1_component.html',1,'modulo_components']]], + ['componentinterface_1',['ComponentInterface',['../classmodulo__components_1_1_component_interface.html',1,'modulo_components']]], + ['componentinterfacepublicinterface_2',['ComponentInterfacePublicInterface',['../class_component_interface_public_interface.html',1,'']]], + ['componentserviceresponse_3',['ComponentServiceResponse',['../structmodulo__components_1_1_component_service_response.html',1,'modulo_components']]], + ['controllerinput_4',['ControllerInput',['../structmodulo__controllers_1_1_controller_input.html',1,'modulo_controllers']]], + ['controllerinterface_5',['ControllerInterface',['../classmodulo__controllers_1_1_controller_interface.html',1,'modulo_controllers']]], + ['controllerserviceresponse_6',['ControllerServiceResponse',['../structmodulo__controllers_1_1_controller_service_response.html',1,'modulo_controllers']]], + ['coreexception_7',['CoreException',['../classmodulo__core_1_1exceptions_1_1_core_exception.html',1,'modulo_core::exceptions']]] +]; diff --git a/versions/v5.0.1/search/classes_3.js b/versions/v5.0.1/search/classes_3.js new file mode 100644 index 00000000..8ad6f673 --- /dev/null +++ b/versions/v5.0.1/search/classes_3.js @@ -0,0 +1,5 @@ +var searchData= +[ + ['invalidpointercastexception_0',['InvalidPointerCastException',['../classmodulo__core_1_1exceptions_1_1_invalid_pointer_cast_exception.html',1,'modulo_core::exceptions']]], + ['invalidpointerexception_1',['InvalidPointerException',['../classmodulo__core_1_1exceptions_1_1_invalid_pointer_exception.html',1,'modulo_core::exceptions']]] +]; diff --git a/versions/v5.0.1/search/classes_4.js b/versions/v5.0.1/search/classes_4.js new file mode 100644 index 00000000..88f31a05 --- /dev/null +++ b/versions/v5.0.1/search/classes_4.js @@ -0,0 +1,5 @@ +var searchData= +[ + ['lifecyclecomponent_0',['LifecycleComponent',['../classmodulo__components_1_1_lifecycle_component.html',1,'modulo_components']]], + ['lookuptransformexception_1',['LookupTransformException',['../classmodulo__core_1_1exceptions_1_1_lookup_transform_exception.html',1,'modulo_core::exceptions']]] +]; diff --git a/versions/v5.0.1/search/classes_5.js b/versions/v5.0.1/search/classes_5.js new file mode 100644 index 00000000..95049afc --- /dev/null +++ b/versions/v5.0.1/search/classes_5.js @@ -0,0 +1,6 @@ +var searchData= +[ + ['messagepair_0',['MessagePair',['../classmodulo__core_1_1communication_1_1_message_pair.html',1,'modulo_core::communication']]], + ['messagepairinterface_1',['MessagePairInterface',['../classmodulo__core_1_1communication_1_1_message_pair_interface.html',1,'modulo_core::communication']]], + ['messagetranslationexception_2',['MessageTranslationException',['../classmodulo__core_1_1exceptions_1_1_message_translation_exception.html',1,'modulo_core::exceptions']]] +]; diff --git a/versions/v5.0.1/search/classes_6.js b/versions/v5.0.1/search/classes_6.js new file mode 100644 index 00000000..15fa934b --- /dev/null +++ b/versions/v5.0.1/search/classes_6.js @@ -0,0 +1,4 @@ +var searchData= +[ + ['nullpointerexception_0',['NullPointerException',['../classmodulo__core_1_1exceptions_1_1_null_pointer_exception.html',1,'modulo_core::exceptions']]] +]; diff --git a/versions/v5.0.1/search/classes_7.js b/versions/v5.0.1/search/classes_7.js new file mode 100644 index 00000000..9c920b60 --- /dev/null +++ b/versions/v5.0.1/search/classes_7.js @@ -0,0 +1,9 @@ +var searchData= +[ + ['parameterexception_0',['ParameterException',['../classmodulo__core_1_1exceptions_1_1_parameter_exception.html',1,'modulo_core::exceptions']]], + ['parametertranslationexception_1',['ParameterTranslationException',['../classmodulo__core_1_1exceptions_1_1_parameter_translation_exception.html',1,'modulo_core::exceptions']]], + ['predicate_2',['Predicate',['../classmodulo__core_1_1_predicate.html',1,'modulo_core']]], + ['predicateslistener_3',['PredicatesListener',['../classmodulo__utils_1_1testutils_1_1_predicates_listener.html',1,'modulo_utils::testutils']]], + ['publisherhandler_4',['PublisherHandler',['../classmodulo__core_1_1communication_1_1_publisher_handler.html',1,'modulo_core::communication']]], + ['publisherinterface_5',['PublisherInterface',['../classmodulo__core_1_1communication_1_1_publisher_interface.html',1,'modulo_core::communication']]] +]; diff --git a/versions/v5.0.1/search/classes_8.js b/versions/v5.0.1/search/classes_8.js new file mode 100644 index 00000000..c3d2fea2 --- /dev/null +++ b/versions/v5.0.1/search/classes_8.js @@ -0,0 +1,4 @@ +var searchData= +[ + ['robotcontrollerinterface_0',['RobotControllerInterface',['../classmodulo__controllers_1_1_robot_controller_interface.html',1,'modulo_controllers']]] +]; diff --git a/versions/v5.0.1/search/classes_9.js b/versions/v5.0.1/search/classes_9.js new file mode 100644 index 00000000..213288c4 --- /dev/null +++ b/versions/v5.0.1/search/classes_9.js @@ -0,0 +1,6 @@ +var searchData= +[ + ['serviceclient_0',['ServiceClient',['../classmodulo__utils_1_1testutils_1_1_service_client.html',1,'modulo_utils::testutils']]], + ['subscriptionhandler_1',['SubscriptionHandler',['../classmodulo__core_1_1communication_1_1_subscription_handler.html',1,'modulo_core::communication']]], + ['subscriptioninterface_2',['SubscriptionInterface',['../classmodulo__core_1_1communication_1_1_subscription_interface.html',1,'modulo_core::communication']]] +]; diff --git a/versions/v5.0.1/search/close.svg b/versions/v5.0.1/search/close.svg new file mode 100644 index 00000000..337d6cc1 --- /dev/null +++ b/versions/v5.0.1/search/close.svg @@ -0,0 +1,18 @@ + + + + + + diff --git a/versions/v5.0.1/search/concepts_0.js b/versions/v5.0.1/search/concepts_0.js new file mode 100644 index 00000000..621e7fca --- /dev/null +++ b/versions/v5.0.1/search/concepts_0.js @@ -0,0 +1,7 @@ +var searchData= +[ + ['modulo_5fcore_3a_3aconcepts_3a_3acoredatat_0',['CoreDataT',['../conceptmodulo__core_1_1concepts_1_1_core_data_t.html',1,'modulo_core::concepts']]], + ['modulo_5fcore_3a_3aconcepts_3a_3acustomt_1',['CustomT',['../conceptmodulo__core_1_1concepts_1_1_custom_t.html',1,'modulo_core::concepts']]], + ['modulo_5fcore_3a_3aconcepts_3a_3aprimitivedatat_2',['PrimitiveDataT',['../conceptmodulo__core_1_1concepts_1_1_primitive_data_t.html',1,'modulo_core::concepts']]], + ['modulo_5fcore_3a_3aconcepts_3a_3atranslatedmsgt_3',['TranslatedMsgT',['../conceptmodulo__core_1_1concepts_1_1_translated_msg_t.html',1,'modulo_core::concepts']]] +]; diff --git a/versions/v5.0.1/search/enums_0.js b/versions/v5.0.1/search/enums_0.js new file mode 100644 index 00000000..b231b782 --- /dev/null +++ b/versions/v5.0.1/search/enums_0.js @@ -0,0 +1,4 @@ +var searchData= +[ + ['messagetype_0',['MessageType',['../namespacemodulo__core_1_1communication.html#a14a52364ccbc238876007a3f134977ab',1,'modulo_core::communication']]] +]; diff --git a/versions/v5.0.1/search/enums_1.js b/versions/v5.0.1/search/enums_1.js new file mode 100644 index 00000000..0238300e --- /dev/null +++ b/versions/v5.0.1/search/enums_1.js @@ -0,0 +1,4 @@ +var searchData= +[ + ['publishertype_0',['PublisherType',['../namespacemodulo__core_1_1communication.html#a11c26e7082f80b74fb35da3f901f9366',1,'modulo_core::communication']]] +]; diff --git a/versions/v5.0.1/search/functions_0.js b/versions/v5.0.1/search/functions_0.js new file mode 100644 index 00000000..de6e3625 --- /dev/null +++ b/versions/v5.0.1/search/functions_0.js @@ -0,0 +1,17 @@ +var searchData= +[ + ['activate_0',['activate',['../classmodulo__core_1_1communication_1_1_publisher_interface.html#ad3cb237464da96e1dd2780b696bce139',1,'modulo_core::communication::PublisherInterface::activate()'],['../classmodulo__core_1_1communication_1_1_publisher_handler.html#a151eaad5e41650a21aca947982d959da',1,'modulo_core::communication::PublisherHandler::activate()']]], + ['add_5fcommand_5finterface_1',['add_command_interface',['../classmodulo__controllers_1_1_controller_interface.html#ad7d9aff67e0bba6ef2a557cdb94ab000',1,'modulo_controllers::ControllerInterface']]], + ['add_5finput_2',['add_input',['../classmodulo__components_1_1_component_interface.html#a6d6fd277be46d40ea6d73b547d028055',1,'modulo_components::ComponentInterface::add_input(const std::string &signal_name, const std::shared_ptr< DataT > &data, const std::string &default_topic="", bool fixed_topic=false)'],['../classmodulo__components_1_1_component_interface.html#aed06da445cab193c04702a54d0039603',1,'modulo_components::ComponentInterface::add_input(const std::string &signal_name, const std::shared_ptr< DataT > &data, const std::function< void()> &callback, const std::string &default_topic="", bool fixed_topic=false)'],['../classmodulo__components_1_1_component_interface.html#ab5868c98d10e4f7abfa1a1377da7d81f',1,'modulo_components::ComponentInterface::add_input(const std::string &signal_name, const std::function< void(const std::shared_ptr< MsgT >)> &callback, const std::string &default_topic="", bool fixed_topic=false)'],['../classmodulo__controllers_1_1_base_controller_interface.html#abf32a178b3ac97aad7364508e1929108',1,'modulo_controllers::BaseControllerInterface::add_input()']]], + ['add_5finterfaces_3',['add_interfaces',['../classmodulo__controllers_1_1_controller_interface.html#a019f11368af787d1cb34fc3b6f1c6234',1,'modulo_controllers::ControllerInterface::add_interfaces()'],['../classmodulo__controllers_1_1_robot_controller_interface.html#ac28db5ce4343ba7ba0ab004905f7c774',1,'modulo_controllers::RobotControllerInterface::add_interfaces()']]], + ['add_5foutput_4',['add_output',['../classmodulo__components_1_1_component.html#ab475ee0e8ea1b1f52c6f0720a0546e90',1,'modulo_components::Component::add_output()'],['../classmodulo__components_1_1_lifecycle_component.html#a22d31bd5f8a713b0ce757bea8622cbf3',1,'modulo_components::LifecycleComponent::add_output()'],['../classmodulo__controllers_1_1_base_controller_interface.html#a7709be5a6f1d5e538ecf28d9d0253a8f',1,'modulo_controllers::BaseControllerInterface::add_output(const std::string &name, const std::string &topic_name="")']]], + ['add_5fparameter_5',['add_parameter',['../classmodulo__controllers_1_1_base_controller_interface.html#a6e7805e1592898080a1c65ee28e2700f',1,'modulo_controllers::BaseControllerInterface::add_parameter(const std::string &name, const T &value, const std::string &description, bool read_only=false)'],['../classmodulo__controllers_1_1_base_controller_interface.html#aaa7e4a206229bf52629bd8ee977b6edd',1,'modulo_controllers::BaseControllerInterface::add_parameter(const std::shared_ptr< state_representation::ParameterInterface > &parameter, const std::string &description, bool read_only=false)'],['../classmodulo__components_1_1_component_interface.html#a518bf9ca1ff6aa9dc16c88c5b06cb5d8',1,'modulo_components::ComponentInterface::add_parameter(const std::shared_ptr< state_representation::ParameterInterface > &parameter, const std::string &description, bool read_only=false)'],['../classmodulo__components_1_1_component_interface.html#ae833c972a8a140f8bacac3d680154a86',1,'modulo_components::ComponentInterface::add_parameter(const std::string &name, const T &value, const std::string &description, bool read_only=false)']]], + ['add_5fperiodic_5fcallback_6',['add_periodic_callback',['../classmodulo__components_1_1_component_interface.html#ad17ee02a3b29dd632b594af6620a3168',1,'modulo_components::ComponentInterface']]], + ['add_5fpredicate_7',['add_predicate',['../classmodulo__components_1_1_component_interface.html#ab245c0fc061c4109961c7339c2bf27a4',1,'modulo_components::ComponentInterface::add_predicate(const std::string &predicate_name, bool predicate_value)'],['../classmodulo__components_1_1_component_interface.html#a64726a7779cd0ade615a10d037e8c107',1,'modulo_components::ComponentInterface::add_predicate(const std::string &predicate_name, const std::function< bool(void)> &predicate_function)'],['../classmodulo__controllers_1_1_base_controller_interface.html#ac7f744f72044655798cead29ea155f22',1,'modulo_controllers::BaseControllerInterface::add_predicate(const std::string &predicate_name, bool predicate_value)'],['../classmodulo__controllers_1_1_base_controller_interface.html#a99ae1b60a443ef198f331f04c985ab84',1,'modulo_controllers::BaseControllerInterface::add_predicate(const std::string &predicate_name, const std::function< bool(void)> &predicate_function)']]], + ['add_5fservice_8',['add_service',['../classmodulo__components_1_1_component_interface.html#a12724f83b3327d6a35d9ae02046e96fd',1,'modulo_components::ComponentInterface::add_service()'],['../classmodulo__controllers_1_1_base_controller_interface.html#a2a969310126e63a475e9305e0d1abb0b',1,'modulo_controllers::BaseControllerInterface::add_service(const std::string &service_name, const std::function< ControllerServiceResponse(const std::string &string)> &callback)'],['../classmodulo__controllers_1_1_base_controller_interface.html#aeb181fef1f7a9a5896a9bec8e30fdcc3',1,'modulo_controllers::BaseControllerInterface::add_service(const std::string &service_name, const std::function< ControllerServiceResponse(void)> &callback)'],['../classmodulo__components_1_1_component_interface.html#af915cd5317266aa78dc61151e6f1fa6c',1,'modulo_components::ComponentInterface::add_service()']]], + ['add_5fstate_5finterface_9',['add_state_interface',['../classmodulo__controllers_1_1_controller_interface.html#a4f58fa18886d11dcf57a5abcde0e5e09',1,'modulo_controllers::ControllerInterface']]], + ['add_5fstatic_5ftf_5fbroadcaster_10',['add_static_tf_broadcaster',['../classmodulo__components_1_1_component_interface.html#a50d6d32870a7a81a72ab491f0d80f0bb',1,'modulo_components::ComponentInterface']]], + ['add_5ftf_5fbroadcaster_11',['add_tf_broadcaster',['../classmodulo__components_1_1_component_interface.html#ae782ab5b7593c368df9407df79d75c40',1,'modulo_components::ComponentInterface']]], + ['add_5ftf_5flistener_12',['add_tf_listener',['../classmodulo__components_1_1_component_interface.html#adf4b06438efcead7a6d29e3178161296',1,'modulo_components::ComponentInterface']]], + ['add_5ftrigger_13',['add_trigger',['../classmodulo__components_1_1_component_interface.html#abc67aa3f969574fb71b0a8527dad8346',1,'modulo_components::ComponentInterface::add_trigger()'],['../classmodulo__controllers_1_1_base_controller_interface.html#afb8181c45c3301d81c9cd954da4cbec0',1,'modulo_controllers::BaseControllerInterface::add_trigger()']]] +]; diff --git a/versions/v5.0.1/search/functions_1.js b/versions/v5.0.1/search/functions_1.js new file mode 100644 index 00000000..fead95c3 --- /dev/null +++ b/versions/v5.0.1/search/functions_1.js @@ -0,0 +1,4 @@ +var searchData= +[ + ['basecontrollerinterface_0',['BaseControllerInterface',['../classmodulo__controllers_1_1_base_controller_interface.html#ade0d508d65caa265cb489a3c693770a0',1,'modulo_controllers::BaseControllerInterface']]] +]; diff --git a/versions/v5.0.1/search/functions_10.js b/versions/v5.0.1/search/functions_10.js new file mode 100644 index 00000000..a2784e1c --- /dev/null +++ b/versions/v5.0.1/search/functions_10.js @@ -0,0 +1,8 @@ +var searchData= +[ + ['write_0',['write',['../classmodulo__core_1_1communication_1_1_message_pair_interface.html#a5cc486ee93eb7756636a851c07f10f35',1,'modulo_core::communication::MessagePairInterface']]], + ['write_5fcommand_5finterfaces_1',['write_command_interfaces',['../classmodulo__controllers_1_1_controller_interface.html#a1fd252f44e3618162c2cee552a8a7b2f',1,'modulo_controllers::ControllerInterface']]], + ['write_5fmessage_2',['write_message',['../namespacemodulo__core_1_1translators.html#ae887c515823c26c71a1266355577d5e0',1,'modulo_core::translators::write_message(geometry_msgs::msg::Wrench &message, const state_representation::CartesianState &state, const rclcpp::Time &time)'],['../namespacemodulo__core_1_1translators.html#a02fa2614128ce09ee39cc4fd9a5d2314',1,'modulo_core::translators::write_message(EncodedState &message, const T &state, const rclcpp::Time &)'],['../namespacemodulo__core_1_1translators.html#aa77091be4785272fd22cc5215d930ddd',1,'modulo_core::translators::write_message(std_msgs::msg::String &message, const std::string &state, const rclcpp::Time &time)'],['../namespacemodulo__core_1_1translators.html#ab5e6c729316ce06f03deec6fe811b3f5',1,'modulo_core::translators::write_message(std_msgs::msg::Int32 &message, const int &state, const rclcpp::Time &time)'],['../namespacemodulo__core_1_1translators.html#af3b73148b5111ac49d9b65a03c2682f5',1,'modulo_core::translators::write_message(std_msgs::msg::Float64MultiArray &message, const std::vector< double > &state, const rclcpp::Time &time)'],['../namespacemodulo__core_1_1translators.html#a014392d41b245b63d2303fdee9e66db7',1,'modulo_core::translators::write_message(std_msgs::msg::Float64 &message, const double &state, const rclcpp::Time &time)'],['../namespacemodulo__core_1_1translators.html#a2648db7b6384ba6b10186ae5e98bea59',1,'modulo_core::translators::write_message(std_msgs::msg::Bool &message, const bool &state, const rclcpp::Time &time)'],['../namespacemodulo__core_1_1translators.html#a60be80575b8fb3e3d48f37a8bda6d9ed',1,'modulo_core::translators::write_message(U &message, const state_representation::Parameter< T > &state, const rclcpp::Time &)'],['../namespacemodulo__core_1_1translators.html#acdb4e193bb38e69690de512f7b6ea457',1,'modulo_core::translators::write_message(tf2_msgs::msg::TFMessage &message, const state_representation::CartesianState &state, const rclcpp::Time &time)'],['../namespacemodulo__core_1_1translators.html#ae2679cbc4106a9373296b6f00aaea34b',1,'modulo_core::translators::write_message(sensor_msgs::msg::JointState &message, const state_representation::JointState &state, const rclcpp::Time &time)'],['../namespacemodulo__core_1_1translators.html#a1fd40d767a0a9a3c8221eaabb12e8e77',1,'modulo_core::translators::write_message(geometry_msgs::msg::WrenchStamped &message, const state_representation::CartesianState &state, const rclcpp::Time &time)'],['../namespacemodulo__core_1_1translators.html#a6960610fd4bf9bb981827e0146b04d05',1,'modulo_core::translators::write_message(geometry_msgs::msg::TwistStamped &message, const state_representation::CartesianState &state, const rclcpp::Time &time)'],['../namespacemodulo__core_1_1translators.html#a23c4f120bdc010eb6f5b61bfb21abec1',1,'modulo_core::translators::write_message(geometry_msgs::msg::Twist &message, const state_representation::CartesianState &state, const rclcpp::Time &time)'],['../namespacemodulo__core_1_1translators.html#ade9e94aca963133615835e6724ada18b',1,'modulo_core::translators::write_message(geometry_msgs::msg::TransformStamped &message, const state_representation::CartesianState &state, const rclcpp::Time &time)'],['../namespacemodulo__core_1_1translators.html#a038c7d7431427a1b46d12a2eab8b9da7',1,'modulo_core::translators::write_message(geometry_msgs::msg::Transform &message, const state_representation::CartesianState &state, const rclcpp::Time &time)'],['../namespacemodulo__core_1_1translators.html#ade7becbd0c04095260f1aad7dc4d5da0',1,'modulo_core::translators::write_message(geometry_msgs::msg::PoseStamped &message, const state_representation::CartesianState &state, const rclcpp::Time &time)'],['../namespacemodulo__core_1_1translators.html#a2ce2005274aa2509faa07e206f74202f',1,'modulo_core::translators::write_message(geometry_msgs::msg::Pose &message, const state_representation::CartesianState &state, const rclcpp::Time &time)'],['../namespacemodulo__core_1_1translators.html#a0230b5afcd0bfca73a2a676a6e8706c3',1,'modulo_core::translators::write_message(geometry_msgs::msg::AccelStamped &message, const state_representation::CartesianState &state, const rclcpp::Time &time)'],['../namespacemodulo__core_1_1translators.html#a151198c871af003d2205cf0556115260',1,'modulo_core::translators::write_message(geometry_msgs::msg::Accel &message, const state_representation::CartesianState &state, const rclcpp::Time &time)'],['../classmodulo__core_1_1communication_1_1_message_pair.html#aa50124b4eb3e5811562c567da1f03f00',1,'modulo_core::communication::MessagePair::write_message()']]], + ['write_5foutput_3',['write_output',['../classmodulo__controllers_1_1_base_controller_interface.html#ab26b590fd04e676cc352d14817b9bad8',1,'modulo_controllers::BaseControllerInterface']]], + ['write_5fparameter_4',['write_parameter',['../namespacemodulo__core_1_1translators.html#ab0ba0632a12496f0ad34f836c5001689',1,'modulo_core::translators']]] +]; diff --git a/versions/v5.0.1/search/functions_11.js b/versions/v5.0.1/search/functions_11.js new file mode 100644 index 00000000..31954c31 --- /dev/null +++ b/versions/v5.0.1/search/functions_11.js @@ -0,0 +1,11 @@ +var searchData= +[ + ['_7ecomponent_0',['~Component',['../classmodulo__components_1_1_component.html#a38b0fe134b7fc9b802902e009683dc04',1,'modulo_components::Component']]], + ['_7ecomponentinterface_1',['~ComponentInterface',['../classmodulo__components_1_1_component_interface.html#a46c675cd5a9b7e00455d86d949950c2f',1,'modulo_components::ComponentInterface']]], + ['_7elifecyclecomponent_2',['~LifecycleComponent',['../classmodulo__components_1_1_lifecycle_component.html#a534d2620117f9b2420418d4d6ca48a12',1,'modulo_components::LifecycleComponent']]], + ['_7emessagepairinterface_3',['~MessagePairInterface',['../classmodulo__core_1_1communication_1_1_message_pair_interface.html#a1b0177982d2972d701692b3c89705aae',1,'modulo_core::communication::MessagePairInterface']]], + ['_7epublisherhandler_4',['~PublisherHandler',['../classmodulo__core_1_1communication_1_1_publisher_handler.html#a9c2eafb61ee4d8e60a15e0af519be4d3',1,'modulo_core::communication::PublisherHandler']]], + ['_7epublisherinterface_5',['~PublisherInterface',['../classmodulo__core_1_1communication_1_1_publisher_interface.html#a1e670470b065bb1e7b1e5ef88eec5268',1,'modulo_core::communication::PublisherInterface']]], + ['_7esubscriptionhandler_6',['~SubscriptionHandler',['../classmodulo__core_1_1communication_1_1_subscription_handler.html#a3de45dc5da0ca5ae1de4a819851f4979',1,'modulo_core::communication::SubscriptionHandler']]], + ['_7esubscriptioninterface_7',['~SubscriptionInterface',['../classmodulo__core_1_1communication_1_1_subscription_interface.html#afd0d227d6533cafc7731f1fd52cb8d50',1,'modulo_core::communication::SubscriptionInterface']]] +]; diff --git a/versions/v5.0.1/search/functions_2.js b/versions/v5.0.1/search/functions_2.js new file mode 100644 index 00000000..a58890e1 --- /dev/null +++ b/versions/v5.0.1/search/functions_2.js @@ -0,0 +1,12 @@ +var searchData= +[ + ['command_5finterface_5fconfiguration_0',['command_interface_configuration',['../classmodulo__controllers_1_1_controller_interface.html#a170ee563e6bbeb4b2cf441600f6a2490',1,'modulo_controllers::ControllerInterface']]], + ['component_1',['Component',['../classmodulo__components_1_1_component.html#ae19b0377e0b7fa7f43efff7adfae143b',1,'modulo_components::Component']]], + ['componentinterface_2',['ComponentInterface',['../classmodulo__components_1_1_component_interface.html#a8ce3d7ecf6ff18041c0ec2829de40e22',1,'modulo_components::ComponentInterface']]], + ['compute_5fcartesian_5fstate_3',['compute_cartesian_state',['../classmodulo__controllers_1_1_robot_controller_interface.html#a92904926dd9e22ff7c462a33b9306575',1,'modulo_controllers::RobotControllerInterface']]], + ['controllerinterface_4',['ControllerInterface',['../classmodulo__controllers_1_1_controller_interface.html#a45af1adc882e1d005c6ce3a0bf63f061',1,'modulo_controllers::ControllerInterface']]], + ['copy_5fparameter_5fvalue_5',['copy_parameter_value',['../namespacemodulo__core_1_1translators.html#af16d1185354f2f64f06698b0d1b3fc3f',1,'modulo_core::translators']]], + ['create_5foutput_6',['create_output',['../classmodulo__components_1_1_component_interface.html#aa84db667c915dcb03d367b0288ce1174',1,'modulo_components::ComponentInterface']]], + ['create_5fpublisher_5finterface_7',['create_publisher_interface',['../classmodulo__core_1_1communication_1_1_publisher_handler.html#a95f0a5157539b3ffb1a936e4bbd60e23',1,'modulo_core::communication::PublisherHandler']]], + ['create_5fsubscription_5finterface_8',['create_subscription_interface',['../classmodulo__core_1_1communication_1_1_subscription_handler.html#a9adbe98500d927e5e76fb18c9f62e04b',1,'modulo_core::communication::SubscriptionHandler']]] +]; diff --git a/versions/v5.0.1/search/functions_3.js b/versions/v5.0.1/search/functions_3.js new file mode 100644 index 00000000..7d012dbc --- /dev/null +++ b/versions/v5.0.1/search/functions_3.js @@ -0,0 +1,6 @@ +var searchData= +[ + ['deactivate_0',['deactivate',['../classmodulo__core_1_1communication_1_1_publisher_handler.html#ae7add9b1f9bbce45d348551b9bc729fe',1,'modulo_core::communication::PublisherHandler::deactivate()'],['../classmodulo__core_1_1communication_1_1_publisher_interface.html#a2570447d8280ab4f1bc47e8c020082f3',1,'modulo_core::communication::PublisherInterface::deactivate()']]], + ['declare_5finput_1',['declare_input',['../classmodulo__components_1_1_component_interface.html#a0ef86c0ed9502607325d7df042c849d1',1,'modulo_components::ComponentInterface']]], + ['declare_5foutput_2',['declare_output',['../classmodulo__components_1_1_component_interface.html#a103aec4a95d9c136b572534221a1eeec',1,'modulo_components::ComponentInterface']]] +]; diff --git a/versions/v5.0.1/search/functions_4.js b/versions/v5.0.1/search/functions_4.js new file mode 100644 index 00000000..42471a1f --- /dev/null +++ b/versions/v5.0.1/search/functions_4.js @@ -0,0 +1,6 @@ +var searchData= +[ + ['evaluate_0',['evaluate',['../classmodulo__controllers_1_1_controller_interface.html#a258e8cc74be6bf915a2c1aa5f9278fc1',1,'modulo_controllers::ControllerInterface']]], + ['evaluate_5fperiodic_5fcallbacks_1',['evaluate_periodic_callbacks',['../classmodulo__components_1_1_component_interface.html#ae3356bb3938d2df54a5bd43b07c049df',1,'modulo_components::ComponentInterface']]], + ['execute_2',['execute',['../classmodulo__components_1_1_component.html#aeb496916cb46a1e8369412f06c440910',1,'modulo_components::Component']]] +]; diff --git a/versions/v5.0.1/search/functions_5.js b/versions/v5.0.1/search/functions_5.js new file mode 100644 index 00000000..bcdbc1c4 --- /dev/null +++ b/versions/v5.0.1/search/functions_5.js @@ -0,0 +1,4 @@ +var searchData= +[ + ['finalize_5finterfaces_0',['finalize_interfaces',['../classmodulo__components_1_1_component_interface.html#a405eb37f9691fd567c8854b0a2bfd79e',1,'modulo_components::ComponentInterface']]] +]; diff --git a/versions/v5.0.1/search/functions_6.js b/versions/v5.0.1/search/functions_6.js new file mode 100644 index 00000000..c20930a8 --- /dev/null +++ b/versions/v5.0.1/search/functions_6.js @@ -0,0 +1,24 @@ +var searchData= +[ + ['get_5fcallback_0',['get_callback',['../classmodulo__core_1_1communication_1_1_subscription_handler.html#a60039333a4c81ea81c66ab2e88b6eaff',1,'modulo_core::communication::SubscriptionHandler::get_callback(const std::function< void()> &user_callback)'],['../classmodulo__core_1_1communication_1_1_subscription_handler.html#a01f697561ba64f5d98ae0522f8c57cc6',1,'modulo_core::communication::SubscriptionHandler::get_callback()']]], + ['get_5fcartesian_5fstate_1',['get_cartesian_state',['../classmodulo__controllers_1_1_robot_controller_interface.html#a1ba472ffaa66f3061a85cd3918bceaa2',1,'modulo_controllers::RobotControllerInterface']]], + ['get_5fcommand_5finterface_2',['get_command_interface',['../classmodulo__controllers_1_1_controller_interface.html#a53a0f9e5243f9e0dca8d470a78e90426',1,'modulo_controllers::ControllerInterface']]], + ['get_5fcommand_5fmutex_3',['get_command_mutex',['../classmodulo__controllers_1_1_base_controller_interface.html#af9b5fd096a49b8e0b2394db0ff30568d',1,'modulo_controllers::BaseControllerInterface']]], + ['get_5fdata_4',['get_data',['../classmodulo__core_1_1communication_1_1_message_pair.html#a951f34fcc216a1afdebefc665c5b80af',1,'modulo_core::communication::MessagePair']]], + ['get_5fft_5fsensor_5',['get_ft_sensor',['../classmodulo__controllers_1_1_robot_controller_interface.html#a54644709a8c725cc8df2ff3fee2adf1c',1,'modulo_controllers::RobotControllerInterface']]], + ['get_5fhandler_6',['get_handler',['../classmodulo__core_1_1communication_1_1_publisher_interface.html#a725e0facd73564ae7ab9c75396e401b0',1,'modulo_core::communication::PublisherInterface::get_handler()'],['../classmodulo__core_1_1communication_1_1_subscription_interface.html#a29ee546de88bc4ddd63ea0aa5eaf2399',1,'modulo_core::communication::SubscriptionInterface::get_handler()']]], + ['get_5fjoint_5fstate_7',['get_joint_state',['../classmodulo__controllers_1_1_robot_controller_interface.html#a40b1b7a5a15a29656d2a3aaa1a1e0a9c',1,'modulo_controllers::RobotControllerInterface']]], + ['get_5flifecycle_5fstate_8',['get_lifecycle_state',['../classmodulo__components_1_1_lifecycle_component.html#ae429b0085cc70ef6e6892747ac1189d2',1,'modulo_components::LifecycleComponent']]], + ['get_5fmessage_5fpair_9',['get_message_pair',['../classmodulo__core_1_1communication_1_1_message_pair_interface.html#a284645c90efb812ecd3abd90125962fa',1,'modulo_core::communication::MessagePairInterface::get_message_pair()'],['../classmodulo__core_1_1communication_1_1_publisher_interface.html#a5c38ad0774ca2a51218fc473320c5b71',1,'modulo_core::communication::PublisherInterface::get_message_pair()'],['../classmodulo__core_1_1communication_1_1_subscription_interface.html#acc3d58b49cd9c3d61f1896aa9dda2acf',1,'modulo_core::communication::SubscriptionInterface::get_message_pair()']]], + ['get_5fparameter_10',['get_parameter',['../classmodulo__components_1_1_lifecycle_component.html#a3e69d60ac7582fdd2306c97e1532f167',1,'modulo_components::LifecycleComponent::get_parameter()'],['../classmodulo__controllers_1_1_base_controller_interface.html#a0856a54cc05b74122f46871db239a5d7',1,'modulo_controllers::BaseControllerInterface::get_parameter()'],['../classmodulo__components_1_1_component_interface.html#a3f4d8fe85525194e2f5393065ee056aa',1,'modulo_components::ComponentInterface::get_parameter()'],['../classmodulo__components_1_1_component.html#a2b02cb1ed0716c4911df78b6735d297e',1,'modulo_components::Component::get_parameter()']]], + ['get_5fparameter_5fvalue_11',['get_parameter_value',['../classmodulo__components_1_1_component_interface.html#a418d23ed978018d9d465b9036db3eb8d',1,'modulo_components::ComponentInterface::get_parameter_value()'],['../classmodulo__controllers_1_1_base_controller_interface.html#a719d0a230e760504dbe96187078c31fd',1,'modulo_controllers::BaseControllerInterface::get_parameter_value()']]], + ['get_5fperiod_12',['get_period',['../classmodulo__components_1_1_component_interface.html#a20c687b575c0c603ae00eb19ad75bed5',1,'modulo_components::ComponentInterface']]], + ['get_5fpredicate_13',['get_predicate',['../classmodulo__components_1_1_component_interface.html#aedbd9d6dc9bbb48c7f7d717aa2518374',1,'modulo_components::ComponentInterface::get_predicate()'],['../classmodulo__controllers_1_1_base_controller_interface.html#aca3c6d5169006637229b6d9b83f509cf',1,'modulo_controllers::BaseControllerInterface::get_predicate()']]], + ['get_5fqos_14',['get_qos',['../classmodulo__components_1_1_component_interface.html#aab0d3f3a481902f01c70edf2349f304e',1,'modulo_components::ComponentInterface::get_qos()'],['../classmodulo__controllers_1_1_base_controller_interface.html#a1e3ea95cb692e6f5cd96175950725e00',1,'modulo_controllers::BaseControllerInterface::get_qos()']]], + ['get_5frate_15',['get_rate',['../classmodulo__components_1_1_component_interface.html#a0286512cb6033a506a1c2ed3ffeef948',1,'modulo_components::ComponentInterface']]], + ['get_5fros_5fparameter_5ftype_16',['get_ros_parameter_type',['../namespacemodulo__core_1_1translators.html#aea1df4ab0bfb038f7b297865993149e2',1,'modulo_core::translators']]], + ['get_5fstate_5finterface_17',['get_state_interface',['../classmodulo__controllers_1_1_controller_interface.html#a880660f18e4f8dac9d41bf39323e9413',1,'modulo_controllers::ControllerInterface']]], + ['get_5fstate_5finterfaces_18',['get_state_interfaces',['../classmodulo__controllers_1_1_controller_interface.html#a2a36125b4ed269f974c8599d7f791e11',1,'modulo_controllers::ControllerInterface']]], + ['get_5fsubscription_19',['get_subscription',['../classmodulo__core_1_1communication_1_1_subscription_handler.html#aa9c9421c48dbbbc87dfd0d370f452b44',1,'modulo_core::communication::SubscriptionHandler']]], + ['get_5ftype_20',['get_type',['../classmodulo__core_1_1communication_1_1_message_pair_interface.html#a578dda86f8b23d5aeb8c3d3854239e77',1,'modulo_core::communication::MessagePairInterface::get_type()'],['../classmodulo__core_1_1communication_1_1_publisher_interface.html#a2f878eb3cd08e69b685b39c6c79c5ed0',1,'modulo_core::communication::PublisherInterface::get_type()']]] +]; diff --git a/versions/v5.0.1/search/functions_7.js b/versions/v5.0.1/search/functions_7.js new file mode 100644 index 00000000..c0c3365e --- /dev/null +++ b/versions/v5.0.1/search/functions_7.js @@ -0,0 +1,4 @@ +var searchData= +[ + ['is_5factive_0',['is_active',['../classmodulo__controllers_1_1_base_controller_interface.html#a4ba640c6f8f7f61269af2cbdbd3ca0c9',1,'modulo_controllers::BaseControllerInterface']]] +]; diff --git a/versions/v5.0.1/search/functions_8.js b/versions/v5.0.1/search/functions_8.js new file mode 100644 index 00000000..3b11c2d0 --- /dev/null +++ b/versions/v5.0.1/search/functions_8.js @@ -0,0 +1,5 @@ +var searchData= +[ + ['lifecyclecomponent_0',['LifecycleComponent',['../classmodulo__components_1_1_lifecycle_component.html#a81908c5428fea4a36262ffd82168dd06',1,'modulo_components::LifecycleComponent']]], + ['lookup_5ftransform_1',['lookup_transform',['../classmodulo__components_1_1_component_interface.html#a71b7fbc1c56b4cfb0fd2bd800d6c5015',1,'modulo_components::ComponentInterface::lookup_transform(const std::string &frame, const std::string &reference_frame, const tf2::TimePoint &time_point, const tf2::Duration &duration)'],['../classmodulo__components_1_1_component_interface.html#a43c76f10f313827f7a32b88d3289885c',1,'modulo_components::ComponentInterface::lookup_transform(const std::string &frame, const std::string &reference_frame="world", double validity_period=-1.0, const tf2::Duration &duration=tf2::Duration(std::chrono::microseconds(10)))']]] +]; diff --git a/versions/v5.0.1/search/functions_9.js b/versions/v5.0.1/search/functions_9.js new file mode 100644 index 00000000..0a15a72a --- /dev/null +++ b/versions/v5.0.1/search/functions_9.js @@ -0,0 +1,5 @@ +var searchData= +[ + ['messagepair_0',['messagepair',['../classmodulo__core_1_1communication_1_1_message_pair.html#adeb7c57318156213f827ebdfc1eb05ff',1,'modulo_core::communication::MessagePair::MessagePair(std::shared_ptr< DataT > data, std::shared_ptr< rclcpp::Clock > clock)'],['../classmodulo__core_1_1communication_1_1_message_pair.html#a0d79b3b410f5b5c23e53c95f62db492c',1,'modulo_core::communication::MessagePair::MessagePair(std::shared_ptr< DataT > data, std::shared_ptr< rclcpp::Clock > clock)']]], + ['messagepairinterface_1',['messagepairinterface',['../classmodulo__core_1_1communication_1_1_message_pair_interface.html#a42c43740bf2d3e11b0f228d422c570c7',1,'modulo_core::communication::MessagePairInterface::MessagePairInterface(MessageType type)'],['../classmodulo__core_1_1communication_1_1_message_pair_interface.html#ac6a7c97767464a21fc8a7b9f10475703',1,'modulo_core::communication::MessagePairInterface::MessagePairInterface(const MessagePairInterface &message_pair)=default']]] +]; diff --git a/versions/v5.0.1/search/functions_a.js b/versions/v5.0.1/search/functions_a.js new file mode 100644 index 00000000..a9e29236 --- /dev/null +++ b/versions/v5.0.1/search/functions_a.js @@ -0,0 +1,16 @@ +var searchData= +[ + ['on_5factivate_0',['on_activate',['../classmodulo__controllers_1_1_controller_interface.html#a5e9758c1b2f19970f5912e65274678b6',1,'modulo_controllers::ControllerInterface::on_activate()'],['../classmodulo__controllers_1_1_robot_controller_interface.html#a27bec46fefa9083c1b0a19e5b8a69172',1,'modulo_controllers::RobotControllerInterface::on_activate()'],['../classmodulo__controllers_1_1_controller_interface.html#a32a771d48d2f199175bbae212cf6cb9a',1,'modulo_controllers::ControllerInterface::on_activate()']]], + ['on_5factivate_5fcallback_1',['on_activate_callback',['../classmodulo__components_1_1_lifecycle_component.html#a45e7a84d2ff32d6538b065e7d5d59db4',1,'modulo_components::LifecycleComponent']]], + ['on_5fcleanup_5fcallback_2',['on_cleanup_callback',['../classmodulo__components_1_1_lifecycle_component.html#a4dba41e6a556184546ae3244077d3eab',1,'modulo_components::LifecycleComponent']]], + ['on_5fconfigure_3',['on_configure',['../classmodulo__controllers_1_1_base_controller_interface.html#a14a5c73e422087ecc701eacf84141579',1,'modulo_controllers::BaseControllerInterface::on_configure()'],['../classmodulo__controllers_1_1_controller_interface.html#a744aead2afb2097f13491c62b205c419',1,'modulo_controllers::ControllerInterface::on_configure(const rclcpp_lifecycle::State &previous_state) final'],['../classmodulo__controllers_1_1_controller_interface.html#a20045ceffec9a44e4666d92632be5400',1,'modulo_controllers::ControllerInterface::on_configure()'],['../classmodulo__controllers_1_1_robot_controller_interface.html#ad7de2bc07230837f28faf0ebb4c1fc65',1,'modulo_controllers::RobotControllerInterface::on_configure()']]], + ['on_5fconfigure_5fcallback_4',['on_configure_callback',['../classmodulo__components_1_1_lifecycle_component.html#ae2750d56c97758b231c5a41c81e94787',1,'modulo_components::LifecycleComponent']]], + ['on_5fdeactivate_5',['on_deactivate',['../classmodulo__controllers_1_1_controller_interface.html#ac9742c368a3bbdbf5ea6603f253ad2a7',1,'modulo_controllers::ControllerInterface::on_deactivate()'],['../classmodulo__controllers_1_1_controller_interface.html#ab5cd6b83dd7486f408a4b95aa211cdff',1,'modulo_controllers::ControllerInterface::on_deactivate(const rclcpp_lifecycle::State &previous_state) final']]], + ['on_5fdeactivate_5fcallback_6',['on_deactivate_callback',['../classmodulo__components_1_1_lifecycle_component.html#a22b81a549cb93798e4c7801541125b70',1,'modulo_components::LifecycleComponent']]], + ['on_5ferror_5fcallback_7',['on_error_callback',['../classmodulo__components_1_1_lifecycle_component.html#aa06d7c56d3cd549f20e550958eeac6c6',1,'modulo_components::LifecycleComponent']]], + ['on_5fexecute_5fcallback_8',['on_execute_callback',['../classmodulo__components_1_1_component.html#aa91321e421f2f71a9c86f694996baeb1',1,'modulo_components::Component']]], + ['on_5finit_9',['on_init',['../classmodulo__controllers_1_1_base_controller_interface.html#a8cdb66f7e21dbcb0633f6bfaa9fb3adc',1,'modulo_controllers::BaseControllerInterface::on_init()'],['../classmodulo__controllers_1_1_controller_interface.html#a3280902d5467912fd07fcc853a9214eb',1,'modulo_controllers::ControllerInterface::on_init()']]], + ['on_5fshutdown_5fcallback_10',['on_shutdown_callback',['../classmodulo__components_1_1_lifecycle_component.html#a05b5dfdf28ebf0d2a9f69cdad9d29eb3',1,'modulo_components::LifecycleComponent']]], + ['on_5fstep_5fcallback_11',['on_step_callback',['../classmodulo__components_1_1_component_interface.html#a7f5fff168fc2a31d5e36b4a103ca46fa',1,'modulo_components::ComponentInterface']]], + ['on_5fvalidate_5fparameter_5fcallback_12',['on_validate_parameter_callback',['../classmodulo__components_1_1_component_interface.html#a09bd587039da047128519ecf59ae544c',1,'modulo_components::ComponentInterface::on_validate_parameter_callback()'],['../classmodulo__controllers_1_1_base_controller_interface.html#ad302e4f9728d36c82177a7cfd52e6aec',1,'modulo_controllers::BaseControllerInterface::on_validate_parameter_callback()'],['../classmodulo__controllers_1_1_robot_controller_interface.html#a3e8115f4baa72f001179efe8295bfe5c',1,'modulo_controllers::RobotControllerInterface::on_validate_parameter_callback()']]] +]; diff --git a/versions/v5.0.1/search/functions_b.js b/versions/v5.0.1/search/functions_b.js new file mode 100644 index 00000000..a207f2c6 --- /dev/null +++ b/versions/v5.0.1/search/functions_b.js @@ -0,0 +1,9 @@ +var searchData= +[ + ['publish_0',['publish',['../classmodulo__core_1_1communication_1_1_publisher_handler.html#a2368473d358309e26088db203c301c81',1,'modulo_core::communication::PublisherHandler::publish() override'],['../classmodulo__core_1_1communication_1_1_publisher_handler.html#a864c43153af83707343920e33700043d',1,'modulo_core::communication::PublisherHandler::publish(const MsgT &message) const'],['../classmodulo__core_1_1communication_1_1_publisher_interface.html#a3e4d5682dc38835d7e1f02a2e71503ed',1,'modulo_core::communication::PublisherInterface::publish()']]], + ['publish_5foutput_1',['publish_output',['../classmodulo__components_1_1_component_interface.html#a98d4767b141939df0c7077c10d5b3aa7',1,'modulo_components::ComponentInterface']]], + ['publish_5foutputs_2',['publish_outputs',['../classmodulo__components_1_1_component_interface.html#a0bdfeacb7b0b13c2adeecb51a80a0fa0',1,'modulo_components::ComponentInterface']]], + ['publish_5fpredicates_3',['publish_predicates',['../classmodulo__components_1_1_component_interface.html#a9f7ba119ecceb0862634ed403306ddf8',1,'modulo_components::ComponentInterface']]], + ['publisherhandler_4',['PublisherHandler',['../classmodulo__core_1_1communication_1_1_publisher_handler.html#abeb33dd415f1ab50bc86ca74f1aba9b1',1,'modulo_core::communication::PublisherHandler']]], + ['publisherinterface_5',['publisherinterface',['../classmodulo__core_1_1communication_1_1_publisher_interface.html#a8825c1bbfbe13075bfc88213cc2f0feb',1,'modulo_core::communication::PublisherInterface::PublisherInterface(PublisherType type, std::shared_ptr< MessagePairInterface > message_pair=nullptr)'],['../classmodulo__core_1_1communication_1_1_publisher_interface.html#a2881b0902f8b9c22c62c08c2106ea7be',1,'modulo_core::communication::PublisherInterface::PublisherInterface(const PublisherInterface &publisher)=default']]] +]; diff --git a/versions/v5.0.1/search/functions_c.js b/versions/v5.0.1/search/functions_c.js new file mode 100644 index 00000000..ab945fc2 --- /dev/null +++ b/versions/v5.0.1/search/functions_c.js @@ -0,0 +1,13 @@ +var searchData= +[ + ['raise_5ferror_0',['raise_error',['../classmodulo__components_1_1_component_interface.html#a8a1c3bac0aa2141b33682059b3b8f18b',1,'modulo_components::ComponentInterface::raise_error()'],['../classmodulo__components_1_1_component.html#acf7ee62988ef80d58294ed5514885f7e',1,'modulo_components::Component::raise_error()'],['../classmodulo__components_1_1_lifecycle_component.html#a04b2a80b2611e17027bb390b8845bcab',1,'modulo_components::LifecycleComponent::raise_error()']]], + ['read_1',['read',['../classmodulo__core_1_1communication_1_1_message_pair_interface.html#a8b81ae20f181f80df6d8e127a9719ede',1,'modulo_core::communication::MessagePairInterface']]], + ['read_5finput_2',['read_input',['../classmodulo__controllers_1_1_base_controller_interface.html#a9d35a6d4f02c542eb301068e64ca3a30',1,'modulo_controllers::BaseControllerInterface']]], + ['read_5fmessage_3',['read_message',['../namespacemodulo__core_1_1translators.html#ae3028daafe4e35d4cb3ed83172d8bcb0',1,'modulo_core::translators::read_message(T &state, const EncodedState &message)'],['../namespacemodulo__core_1_1translators.html#a3eab5bfefb68847b86699826fc206757',1,'modulo_core::translators::read_message(std::string &state, const std_msgs::msg::String &message)'],['../namespacemodulo__core_1_1translators.html#a61a15e12792070307871484cec3919bd',1,'modulo_core::translators::read_message(int &state, const std_msgs::msg::Int32 &message)'],['../namespacemodulo__core_1_1translators.html#a89f6c759d19c4680f9bd0dc6dfccf287',1,'modulo_core::translators::read_message(std::vector< double > &state, const std_msgs::msg::Float64MultiArray &message)'],['../namespacemodulo__core_1_1translators.html#a00a802c20071659785e4e5651af201a6',1,'modulo_core::translators::read_message(double &state, const std_msgs::msg::Float64 &message)'],['../namespacemodulo__core_1_1translators.html#a329c6bf4bcf7e44b283fb8aadc6d7c6f',1,'modulo_core::translators::read_message(bool &state, const std_msgs::msg::Bool &message)'],['../namespacemodulo__core_1_1translators.html#a2c16bbbdfb7e718fc716139399e549ad',1,'modulo_core::translators::read_message(state_representation::Parameter< T > &state, const U &message)'],['../namespacemodulo__core_1_1translators.html#a552fe7a279beb774b39819f60bed127a',1,'modulo_core::translators::read_message(state_representation::JointState &state, const sensor_msgs::msg::JointState &message)'],['../namespacemodulo__core_1_1translators.html#ab0d3919f19f876ecd246045c9d58c2be',1,'modulo_core::translators::read_message(state_representation::CartesianState &state, const geometry_msgs::msg::WrenchStamped &message)'],['../namespacemodulo__core_1_1translators.html#a9ea65818de625b6fa8ced760bc3c6c7d',1,'modulo_core::translators::read_message(state_representation::CartesianState &state, const geometry_msgs::msg::Wrench &message)'],['../namespacemodulo__core_1_1translators.html#a7f5eaa5ff35c583a37fda7e8b272a870',1,'modulo_core::translators::read_message(state_representation::CartesianState &state, const geometry_msgs::msg::TwistStamped &message)'],['../namespacemodulo__core_1_1translators.html#a7fb0ede2e2045b55a995ae71a3a1d8ad',1,'modulo_core::translators::read_message(state_representation::CartesianState &state, const geometry_msgs::msg::TransformStamped &message)'],['../namespacemodulo__core_1_1translators.html#a832274530f0275f7ef5cdfb4ea7fd2d9',1,'modulo_core::translators::read_message(state_representation::CartesianState &state, const geometry_msgs::msg::Twist &message)'],['../namespacemodulo__core_1_1translators.html#ad4836d631d145e89dfd47c4b394d174c',1,'modulo_core::translators::read_message(state_representation::CartesianState &state, const geometry_msgs::msg::Transform &message)'],['../namespacemodulo__core_1_1translators.html#a71af5ce246d3c9e1ff252f4c55d3817a',1,'modulo_core::translators::read_message(state_representation::CartesianState &state, const geometry_msgs::msg::PoseStamped &message)'],['../namespacemodulo__core_1_1translators.html#a2aa635da759b460c5aad924c4f1dcedb',1,'modulo_core::translators::read_message(state_representation::CartesianState &state, const geometry_msgs::msg::Pose &message)'],['../namespacemodulo__core_1_1translators.html#afe26976826af1f5c0c381f0b7e428502',1,'modulo_core::translators::read_message(state_representation::CartesianState &state, const geometry_msgs::msg::AccelStamped &message)'],['../namespacemodulo__core_1_1translators.html#af7b0fbec62bd9b885d289a7fb1ddba76',1,'modulo_core::translators::read_message(state_representation::CartesianState &state, const geometry_msgs::msg::Accel &message)'],['../classmodulo__core_1_1communication_1_1_message_pair.html#ac014837301539405388428fe893366b1',1,'modulo_core::communication::MessagePair::read_message()']]], + ['read_5fparameter_4',['read_parameter',['../namespacemodulo__core_1_1translators.html#a1bb1765511842105ebf5ea295b5e9750',1,'modulo_core::translators::read_parameter(const rclcpp::Parameter &ros_parameter)'],['../namespacemodulo__core_1_1translators.html#adcc089559e331a621718f275603b2dec',1,'modulo_core::translators::read_parameter(const rclcpp::Parameter &ros_parameter, const std::shared_ptr< state_representation::ParameterInterface > &parameter)']]], + ['read_5fparameter_5fconst_5',['read_parameter_const',['../namespacemodulo__core_1_1translators.html#afa6da1171b524ca4b63f6119f1774f1b',1,'modulo_core::translators']]], + ['read_5fstate_5finterfaces_6',['read_state_interfaces',['../classmodulo__controllers_1_1_controller_interface.html#a29a43b47e9a1e82b0670f2ff48d70483',1,'modulo_controllers::ControllerInterface']]], + ['remove_5finput_7',['remove_input',['../classmodulo__components_1_1_component_interface.html#a0c6b3ff94509f48df3a75f3ec68b14c4',1,'modulo_components::ComponentInterface']]], + ['remove_5foutput_8',['remove_output',['../classmodulo__components_1_1_component_interface.html#a969725887f31b8a88d0af54d390b7b05',1,'modulo_components::ComponentInterface']]], + ['robotcontrollerinterface_9',['robotcontrollerinterface',['../classmodulo__controllers_1_1_robot_controller_interface.html#a8425df1a3db68bd334bd5e1f2c2a3295',1,'modulo_controllers::RobotControllerInterface::RobotControllerInterface(bool robot_model_required, const std::string &control_type="", bool load_geometries=false)'],['../classmodulo__controllers_1_1_robot_controller_interface.html#a0d36c86c0cf86b377195aa49290aa781',1,'modulo_controllers::RobotControllerInterface::RobotControllerInterface()']]] +]; diff --git a/versions/v5.0.1/search/functions_d.js b/versions/v5.0.1/search/functions_d.js new file mode 100644 index 00000000..47e92218 --- /dev/null +++ b/versions/v5.0.1/search/functions_d.js @@ -0,0 +1,25 @@ +var searchData= +[ + ['safe_5fdynamic_5fcast_0',['safe_dynamic_cast',['../namespacemodulo__core_1_1translators.html#a9b01bebfd4d9e35131e0d04620446c08',1,'modulo_core::translators']]], + ['safe_5fdynamic_5fpointer_5fcast_1',['safe_dynamic_pointer_cast',['../namespacemodulo__core_1_1translators.html#a6ef1c765b829bf82c25a6e4f409c618e',1,'modulo_core::translators']]], + ['safe_5fspatial_5fstate_5fconversion_2',['safe_spatial_state_conversion',['../namespacemodulo__core_1_1translators.html#a04a6f2e996dbc7b5ce4dcda8d9d21548',1,'modulo_core::translators']]], + ['safe_5fstate_5fwith_5fnames_5fconversion_3',['safe_state_with_names_conversion',['../namespacemodulo__core_1_1translators.html#ac51af1c64864f12d38a4a7d4715a25ee',1,'modulo_core::translators']]], + ['send_5fstatic_5ftransform_4',['send_static_transform',['../classmodulo__components_1_1_component_interface.html#ae9fb8bc91a29935a0e4d469e45e62a7b',1,'modulo_components::ComponentInterface']]], + ['send_5fstatic_5ftransforms_5',['send_static_transforms',['../classmodulo__components_1_1_component_interface.html#a39293f62ba806c5f599f70cdf876ccae',1,'modulo_components::ComponentInterface']]], + ['send_5ftransform_6',['send_transform',['../classmodulo__components_1_1_component_interface.html#ab3d9b98663be5983a1c677c32f582d3e',1,'modulo_components::ComponentInterface']]], + ['send_5ftransforms_7',['send_transforms',['../classmodulo__components_1_1_component_interface.html#a07e38f6eb54ae52374056e1ccc595e7f',1,'modulo_components::ComponentInterface']]], + ['set_5fcommand_5finterface_8',['set_command_interface',['../classmodulo__controllers_1_1_controller_interface.html#a9623c4028e3da288789b80a750c96304',1,'modulo_controllers::ControllerInterface']]], + ['set_5fdata_9',['set_data',['../classmodulo__core_1_1communication_1_1_message_pair.html#ae71ad28f6e4270b5a318ddbdbf620585',1,'modulo_core::communication::MessagePair']]], + ['set_5finput_5fvalidity_5fperiod_10',['set_input_validity_period',['../classmodulo__controllers_1_1_base_controller_interface.html#a87e904e6cf917796ea5c415787ddb872',1,'modulo_controllers::BaseControllerInterface']]], + ['set_5fjoint_5fcommand_11',['set_joint_command',['../classmodulo__controllers_1_1_robot_controller_interface.html#ab2c42661fe2c0a665b8b7e6bc0f0bc7f',1,'modulo_controllers::RobotControllerInterface']]], + ['set_5fmessage_5fpair_12',['set_message_pair',['../classmodulo__core_1_1communication_1_1_publisher_interface.html#aa59ed6b199b838811db4c29bb19c5319',1,'modulo_core::communication::PublisherInterface::set_message_pair()'],['../classmodulo__core_1_1communication_1_1_subscription_interface.html#a817997523c09e4c1d912d9a18427f3ef',1,'modulo_core::communication::SubscriptionInterface::set_message_pair()']]], + ['set_5fparameter_5fvalue_13',['set_parameter_value',['../classmodulo__components_1_1_component_interface.html#a28047040106c7a84d7c69ba27a034746',1,'modulo_components::ComponentInterface::set_parameter_value()'],['../classmodulo__controllers_1_1_base_controller_interface.html#a6f813c2a5885a4937daec65bdd02e6a1',1,'modulo_controllers::BaseControllerInterface::set_parameter_value()']]], + ['set_5fpredicate_14',['set_predicate',['../classmodulo__components_1_1_component_interface.html#a8b5da2215ad8971dedddd82881136499',1,'modulo_components::ComponentInterface::set_predicate()'],['../classmodulo__controllers_1_1_base_controller_interface.html#a8468346ccb5cf94e6a0a0c51192c3f23',1,'modulo_controllers::BaseControllerInterface::set_predicate(const std::string &predicate_name, const std::function< bool(void)> &predicate_function)'],['../classmodulo__controllers_1_1_base_controller_interface.html#ac617ea1e8f3635919cc1694dcd1f881d',1,'modulo_controllers::BaseControllerInterface::set_predicate(const std::string &predicate_name, bool predicate_value)'],['../classmodulo__components_1_1_component_interface.html#a8949cef47cf375d195f68e5782f37fbc',1,'modulo_components::ComponentInterface::set_predicate()']]], + ['set_5fqos_15',['set_qos',['../classmodulo__controllers_1_1_base_controller_interface.html#abf162367e0fd1771024e5dc8d60a9710',1,'modulo_controllers::BaseControllerInterface::set_qos()'],['../classmodulo__components_1_1_component_interface.html#aa21a3ebb9bdce8d012558a46b4642fb4',1,'modulo_components::ComponentInterface::set_qos()']]], + ['set_5fsubscription_16',['set_subscription',['../classmodulo__core_1_1communication_1_1_subscription_handler.html#ad6ce10b7ac797009a7c64ddf52361276',1,'modulo_core::communication::SubscriptionHandler']]], + ['set_5fuser_5fcallback_17',['set_user_callback',['../classmodulo__core_1_1communication_1_1_subscription_handler.html#ae5ce0270138b061c709ce4f1c2f76f14',1,'modulo_core::communication::SubscriptionHandler']]], + ['state_5finterface_5fconfiguration_18',['state_interface_configuration',['../classmodulo__controllers_1_1_controller_interface.html#af2769f953805848c8672421f769517bc',1,'modulo_controllers::ControllerInterface']]], + ['step_19',['step',['../classmodulo__components_1_1_component_interface.html#a9db2bd1155cbe7c4ed921f173e8f5942',1,'modulo_components::ComponentInterface']]], + ['subscriptionhandler_20',['SubscriptionHandler',['../classmodulo__core_1_1communication_1_1_subscription_handler.html#a0891ac7a050e1ed49e7e1097487652e1',1,'modulo_core::communication::SubscriptionHandler']]], + ['subscriptioninterface_21',['subscriptioninterface',['../classmodulo__core_1_1communication_1_1_subscription_interface.html#a1d65d122da01edfcd28bdd049d2ad8e8',1,'modulo_core::communication::SubscriptionInterface::SubscriptionInterface(std::shared_ptr< MessagePairInterface > message_pair=nullptr)'],['../classmodulo__core_1_1communication_1_1_subscription_interface.html#a00fca8a8317e59f37051b8a7b411143e',1,'modulo_core::communication::SubscriptionInterface::SubscriptionInterface(const SubscriptionInterface &subscription)=default']]] +]; diff --git a/versions/v5.0.1/search/functions_e.js b/versions/v5.0.1/search/functions_e.js new file mode 100644 index 00000000..bc1271a5 --- /dev/null +++ b/versions/v5.0.1/search/functions_e.js @@ -0,0 +1,4 @@ +var searchData= +[ + ['trigger_0',['trigger',['../classmodulo__components_1_1_component_interface.html#a6460ddfe54a6cdf5c52edcec86658f3f',1,'modulo_components::ComponentInterface::trigger()'],['../classmodulo__controllers_1_1_base_controller_interface.html#ab4dca6a7f56af5b758ca75f8e36eeb8f',1,'modulo_controllers::BaseControllerInterface::trigger()']]] +]; diff --git a/versions/v5.0.1/search/functions_f.js b/versions/v5.0.1/search/functions_f.js new file mode 100644 index 00000000..55cbcb15 --- /dev/null +++ b/versions/v5.0.1/search/functions_f.js @@ -0,0 +1,4 @@ +var searchData= +[ + ['update_0',['update',['../classmodulo__controllers_1_1_controller_interface.html#a8f2ab4824543884e6d4e16a903c9a1bf',1,'modulo_controllers::ControllerInterface']]] +]; diff --git a/versions/v5.0.1/search/mag.svg b/versions/v5.0.1/search/mag.svg new file mode 100644 index 00000000..ffb6cf0d --- /dev/null +++ b/versions/v5.0.1/search/mag.svg @@ -0,0 +1,24 @@ + + + + + + + diff --git a/versions/v5.0.1/search/mag_d.svg b/versions/v5.0.1/search/mag_d.svg new file mode 100644 index 00000000..4122773f --- /dev/null +++ b/versions/v5.0.1/search/mag_d.svg @@ -0,0 +1,24 @@ + + + + + + + diff --git a/versions/v5.0.1/search/mag_sel.svg b/versions/v5.0.1/search/mag_sel.svg new file mode 100644 index 00000000..553dba87 --- /dev/null +++ b/versions/v5.0.1/search/mag_sel.svg @@ -0,0 +1,31 @@ + + + + + + + + + diff --git a/versions/v5.0.1/search/mag_seld.svg b/versions/v5.0.1/search/mag_seld.svg new file mode 100644 index 00000000..c906f84c --- /dev/null +++ b/versions/v5.0.1/search/mag_seld.svg @@ -0,0 +1,31 @@ + + + + + + + + + diff --git a/versions/v5.0.1/search/namespaces_0.js b/versions/v5.0.1/search/namespaces_0.js new file mode 100644 index 00000000..7a4e61e7 --- /dev/null +++ b/versions/v5.0.1/search/namespaces_0.js @@ -0,0 +1,9 @@ +var searchData= +[ + ['modulo_5fcomponents_0',['modulo_components',['../namespacemodulo__components.html',1,'']]], + ['modulo_5fcore_1',['modulo_core',['../namespacemodulo__core.html',1,'']]], + ['modulo_5fcore_3a_3acommunication_2',['communication',['../namespacemodulo__core_1_1communication.html',1,'modulo_core']]], + ['modulo_5fcore_3a_3aexceptions_3',['exceptions',['../namespacemodulo__core_1_1exceptions.html',1,'modulo_core']]], + ['modulo_5fcore_3a_3atranslators_4',['translators',['../namespacemodulo__core_1_1translators.html',1,'modulo_core']]], + ['modulo_5futils_3a_3aparsing_5',['parsing',['../namespacemodulo__utils_1_1parsing.html',1,'modulo_utils']]] +]; diff --git a/versions/v5.0.1/search/pages_0.js b/versions/v5.0.1/search/pages_0.js new file mode 100644 index 00000000..0518d2cb --- /dev/null +++ b/versions/v5.0.1/search/pages_0.js @@ -0,0 +1,6 @@ +var searchData= +[ + ['components_0',['Modulo Components',['../md__2github_2workspace_2source_2modulo__components_2_r_e_a_d_m_e.html',1,'']]], + ['controllers_1',['modulo-controllers',['../md__2github_2workspace_2source_2modulo__controllers_2_r_e_a_d_m_e.html',1,'']]], + ['core_2',['Modulo Core',['../md__2github_2workspace_2source_2modulo__core_2_r_e_a_d_m_e.html',1,'']]] +]; diff --git a/versions/v5.0.1/search/pages_1.js b/versions/v5.0.1/search/pages_1.js new file mode 100644 index 00000000..b603d3bc --- /dev/null +++ b/versions/v5.0.1/search/pages_1.js @@ -0,0 +1,4 @@ +var searchData= +[ + ['interfaces_0',['Modulo Interfaces',['../md__2github_2workspace_2source_2modulo__interfaces_2_r_e_a_d_m_e.html',1,'']]] +]; diff --git a/versions/v5.0.1/search/pages_2.js b/versions/v5.0.1/search/pages_2.js new file mode 100644 index 00000000..3a93d43b --- /dev/null +++ b/versions/v5.0.1/search/pages_2.js @@ -0,0 +1,9 @@ +var searchData= +[ + ['modulo_0',['Modulo',['../index.html',1,'']]], + ['modulo_20components_1',['Modulo Components',['../md__2github_2workspace_2source_2modulo__components_2_r_e_a_d_m_e.html',1,'']]], + ['modulo_20controllers_2',['modulo-controllers',['../md__2github_2workspace_2source_2modulo__controllers_2_r_e_a_d_m_e.html',1,'']]], + ['modulo_20core_3',['Modulo Core',['../md__2github_2workspace_2source_2modulo__core_2_r_e_a_d_m_e.html',1,'']]], + ['modulo_20interfaces_4',['Modulo Interfaces',['../md__2github_2workspace_2source_2modulo__interfaces_2_r_e_a_d_m_e.html',1,'']]], + ['modulo_20utils_5',['Modulo Utils',['../md__2github_2workspace_2source_2modulo__utils_2_r_e_a_d_m_e.html',1,'']]] +]; diff --git a/versions/v5.0.1/search/pages_3.js b/versions/v5.0.1/search/pages_3.js new file mode 100644 index 00000000..defe0141 --- /dev/null +++ b/versions/v5.0.1/search/pages_3.js @@ -0,0 +1,4 @@ +var searchData= +[ + ['utils_0',['Modulo Utils',['../md__2github_2workspace_2source_2modulo__utils_2_r_e_a_d_m_e.html',1,'']]] +]; diff --git a/versions/v5.0.1/search/search.css b/versions/v5.0.1/search/search.css new file mode 100644 index 00000000..19f76f9d --- /dev/null +++ b/versions/v5.0.1/search/search.css @@ -0,0 +1,291 @@ +/*---------------- Search Box positioning */ + +#main-menu > li:last-child { + /* This
  • object is the parent of the search bar */ + display: flex; + justify-content: center; + align-items: center; + height: 36px; + margin-right: 1em; +} + +/*---------------- Search box styling */ + +.SRPage * { + font-weight: normal; + line-height: normal; +} + +dark-mode-toggle { + margin-left: 5px; + display: flex; + float: right; +} + +#MSearchBox { + display: inline-block; + white-space : nowrap; + background: var(--search-background-color); + border-radius: 0.65em; + box-shadow: var(--search-box-shadow); + z-index: 102; +} + +#MSearchBox .left { + display: inline-block; + vertical-align: middle; + height: 1.4em; +} + +#MSearchSelect { + display: inline-block; + vertical-align: middle; + width: 20px; + height: 19px; + background-image: var(--search-magnification-select-image); + margin: 0 0 0 0.3em; + padding: 0; +} + +#MSearchSelectExt { + display: inline-block; + vertical-align: middle; + width: 10px; + height: 19px; + background-image: var(--search-magnification-image); + margin: 0 0 0 0.5em; + padding: 0; +} + + +#MSearchField { + display: inline-block; + vertical-align: middle; + width: 7.5em; + height: 19px; + margin: 0 0.15em; + padding: 0; + line-height: 1em; + border:none; + color: var(--search-foreground-color); + outline: none; + font-family: var(--font-family-search); + -webkit-border-radius: 0px; + border-radius: 0px; + background: none; +} + +@media(hover: none) { + /* to avoid zooming on iOS */ + #MSearchField { + font-size: 16px; + } +} + +#MSearchBox .right { + display: inline-block; + vertical-align: middle; + width: 1.4em; + height: 1.4em; +} + +#MSearchClose { + display: none; + font-size: inherit; + background : none; + border: none; + margin: 0; + padding: 0; + outline: none; + +} + +#MSearchCloseImg { + padding: 0.3em; + margin: 0; +} + +.MSearchBoxActive #MSearchField { + color: var(--search-active-color); +} + + + +/*---------------- Search filter selection */ + +#MSearchSelectWindow { + display: none; + position: absolute; + left: 0; top: 0; + border: 1px solid var(--search-filter-border-color); + background-color: var(--search-filter-background-color); + z-index: 10001; + padding-top: 4px; + padding-bottom: 4px; + -moz-border-radius: 4px; + -webkit-border-top-left-radius: 4px; + -webkit-border-top-right-radius: 4px; + -webkit-border-bottom-left-radius: 4px; + -webkit-border-bottom-right-radius: 4px; + -webkit-box-shadow: 5px 5px 5px rgba(0, 0, 0, 0.15); +} + +.SelectItem { + font: 8pt var(--font-family-search); + padding-left: 2px; + padding-right: 12px; + border: 0px; +} + +span.SelectionMark { + margin-right: 4px; + font-family: var(--font-family-monospace); + outline-style: none; + text-decoration: none; +} + +a.SelectItem { + display: block; + outline-style: none; + color: var(--search-filter-foreground-color); + text-decoration: none; + padding-left: 6px; + padding-right: 12px; +} + +a.SelectItem:focus, +a.SelectItem:active { + color: var(--search-filter-foreground-color); + outline-style: none; + text-decoration: none; +} + +a.SelectItem:hover { + color: var(--search-filter-highlight-text-color); + background-color: var(--search-filter-highlight-bg-color); + outline-style: none; + text-decoration: none; + cursor: pointer; + display: block; +} + +/*---------------- Search results window */ + +iframe#MSearchResults { + /*width: 60ex;*/ + height: 15em; +} + +#MSearchResultsWindow { + display: none; + position: absolute; + left: 0; top: 0; + border: 1px solid var(--search-results-border-color); + background-color: var(--search-results-background-color); + z-index:10000; + width: 300px; + height: 400px; + overflow: auto; +} + +/* ----------------------------------- */ + + +#SRIndex { + clear:both; +} + +.SREntry { + font-size: 10pt; + padding-left: 1ex; +} + +.SRPage .SREntry { + font-size: 8pt; + padding: 1px 5px; +} + +div.SRPage { + margin: 5px 2px; + background-color: var(--search-results-background-color); +} + +.SRChildren { + padding-left: 3ex; padding-bottom: .5em +} + +.SRPage .SRChildren { + display: none; +} + +.SRSymbol { + font-weight: bold; + color: var(--search-results-foreground-color); + font-family: var(--font-family-search); + text-decoration: none; + outline: none; +} + +a.SRScope { + display: block; + color: var(--search-results-foreground-color); + font-family: var(--font-family-search); + font-size: 8pt; + text-decoration: none; + outline: none; +} + +a.SRSymbol:focus, a.SRSymbol:active, +a.SRScope:focus, a.SRScope:active { + text-decoration: underline; +} + +span.SRScope { + padding-left: 4px; + font-family: var(--font-family-search); +} + +.SRPage .SRStatus { + padding: 2px 5px; + font-size: 8pt; + font-style: italic; + font-family: var(--font-family-search); +} + +.SRResult { + display: none; +} + +div.searchresults { + margin-left: 10px; + margin-right: 10px; +} + +/*---------------- External search page results */ + +.pages b { + color: white; + padding: 5px 5px 3px 5px; + background-image: var(--nav-gradient-active-image-parent); + background-repeat: repeat-x; + text-shadow: 0 1px 1px #000000; +} + +.pages { + line-height: 17px; + margin-left: 4px; + text-decoration: none; +} + +.hl { + font-weight: bold; +} + +#searchresults { + margin-bottom: 20px; +} + +.searchpages { + margin-top: 10px; +} + diff --git a/versions/v5.0.1/search/search.js b/versions/v5.0.1/search/search.js new file mode 100644 index 00000000..6fd40c67 --- /dev/null +++ b/versions/v5.0.1/search/search.js @@ -0,0 +1,840 @@ +/* + @licstart The following is the entire license notice for the JavaScript code in this file. + + The MIT License (MIT) + + Copyright (C) 1997-2020 by Dimitri van Heesch + + Permission is hereby granted, free of charge, to any person obtaining a copy of this software + and associated documentation files (the "Software"), to deal in the Software without restriction, + including without limitation the rights to use, copy, modify, merge, publish, distribute, + sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is + furnished to do so, subject to the following conditions: + + The above copyright notice and this permission notice shall be included in all copies or + substantial portions of the Software. + + THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING + BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND + NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, + DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, + OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. + + @licend The above is the entire license notice for the JavaScript code in this file + */ +function convertToId(search) +{ + var result = ''; + for (i=0;i do a search + { + this.Search(); + } + } + + this.OnSearchSelectKey = function(evt) + { + var e = (evt) ? evt : window.event; // for IE + if (e.keyCode==40 && this.searchIndex0) // Up + { + this.searchIndex--; + this.OnSelectItem(this.searchIndex); + } + else if (e.keyCode==13 || e.keyCode==27) + { + e.stopPropagation(); + this.OnSelectItem(this.searchIndex); + this.CloseSelectionWindow(); + this.DOMSearchField().focus(); + } + return false; + } + + // --------- Actions + + // Closes the results window. + this.CloseResultsWindow = function() + { + this.DOMPopupSearchResultsWindow().style.display = 'none'; + this.DOMSearchClose().style.display = 'none'; + this.Activate(false); + } + + this.CloseSelectionWindow = function() + { + this.DOMSearchSelectWindow().style.display = 'none'; + } + + // Performs a search. + this.Search = function() + { + this.keyTimeout = 0; + + // strip leading whitespace + var searchValue = this.DOMSearchField().value.replace(/^ +/, ""); + + var code = searchValue.toLowerCase().charCodeAt(0); + var idxChar = searchValue.substr(0, 1).toLowerCase(); + if ( 0xD800 <= code && code <= 0xDBFF && searchValue > 1) // surrogate pair + { + idxChar = searchValue.substr(0, 2); + } + + var jsFile; + + var idx = indexSectionsWithContent[this.searchIndex].indexOf(idxChar); + if (idx!=-1) + { + var hexCode=idx.toString(16); + jsFile = this.resultsPath + indexSectionNames[this.searchIndex] + '_' + hexCode + '.js'; + } + + var loadJS = function(url, impl, loc){ + var scriptTag = document.createElement('script'); + scriptTag.src = url; + scriptTag.onload = impl; + scriptTag.onreadystatechange = impl; + loc.appendChild(scriptTag); + } + + var domPopupSearchResultsWindow = this.DOMPopupSearchResultsWindow(); + var domSearchBox = this.DOMSearchBox(); + var domPopupSearchResults = this.DOMPopupSearchResults(); + var domSearchClose = this.DOMSearchClose(); + var resultsPath = this.resultsPath; + + var handleResults = function() { + document.getElementById("Loading").style.display="none"; + if (typeof searchData !== 'undefined') { + createResults(resultsPath); + document.getElementById("NoMatches").style.display="none"; + } + + if (idx!=-1) { + searchResults.Search(searchValue); + } else { // no file with search results => force empty search results + searchResults.Search('===='); + } + + if (domPopupSearchResultsWindow.style.display!='block') + { + domSearchClose.style.display = 'inline-block'; + var left = getXPos(domSearchBox) + 150; + var top = getYPos(domSearchBox) + 20; + domPopupSearchResultsWindow.style.display = 'block'; + left -= domPopupSearchResults.offsetWidth; + var maxWidth = document.body.clientWidth; + var maxHeight = document.body.clientHeight; + var width = 300; + if (left<10) left=10; + if (width+left+8>maxWidth) width=maxWidth-left-8; + var height = 400; + if (height+top+8>maxHeight) height=maxHeight-top-8; + domPopupSearchResultsWindow.style.top = top + 'px'; + domPopupSearchResultsWindow.style.left = left + 'px'; + domPopupSearchResultsWindow.style.width = width + 'px'; + domPopupSearchResultsWindow.style.height = height + 'px'; + } + } + + if (jsFile) { + loadJS(jsFile, handleResults, this.DOMPopupSearchResultsWindow()); + } else { + handleResults(); + } + + this.lastSearchValue = searchValue; + } + + // -------- Activation Functions + + // Activates or deactivates the search panel, resetting things to + // their default values if necessary. + this.Activate = function(isActive) + { + if (isActive || // open it + this.DOMPopupSearchResultsWindow().style.display == 'block' + ) + { + this.DOMSearchBox().className = 'MSearchBoxActive'; + this.searchActive = true; + } + else if (!isActive) // directly remove the panel + { + this.DOMSearchBox().className = 'MSearchBoxInactive'; + this.searchActive = false; + this.lastSearchValue = '' + this.lastResultsPage = ''; + this.DOMSearchField().value = ''; + } + } +} + +// ----------------------------------------------------------------------- + +// The class that handles everything on the search results page. +function SearchResults(name) +{ + // The number of matches from the last run of . + this.lastMatchCount = 0; + this.lastKey = 0; + this.repeatOn = false; + + // Toggles the visibility of the passed element ID. + this.FindChildElement = function(id) + { + var parentElement = document.getElementById(id); + var element = parentElement.firstChild; + + while (element && element!=parentElement) + { + if (element.nodeName.toLowerCase() == 'div' && element.className == 'SRChildren') + { + return element; + } + + if (element.nodeName.toLowerCase() == 'div' && element.hasChildNodes()) + { + element = element.firstChild; + } + else if (element.nextSibling) + { + element = element.nextSibling; + } + else + { + do + { + element = element.parentNode; + } + while (element && element!=parentElement && !element.nextSibling); + + if (element && element!=parentElement) + { + element = element.nextSibling; + } + } + } + } + + this.Toggle = function(id) + { + var element = this.FindChildElement(id); + if (element) + { + if (element.style.display == 'block') + { + element.style.display = 'none'; + } + else + { + element.style.display = 'block'; + } + } + } + + // Searches for the passed string. If there is no parameter, + // it takes it from the URL query. + // + // Always returns true, since other documents may try to call it + // and that may or may not be possible. + this.Search = function(search) + { + if (!search) // get search word from URL + { + search = window.location.search; + search = search.substring(1); // Remove the leading '?' + search = unescape(search); + } + + search = search.replace(/^ +/, ""); // strip leading spaces + search = search.replace(/ +$/, ""); // strip trailing spaces + search = search.toLowerCase(); + search = convertToId(search); + + var resultRows = document.getElementsByTagName("div"); + var matches = 0; + + var i = 0; + while (i < resultRows.length) + { + var row = resultRows.item(i); + if (row.className == "SRResult") + { + var rowMatchName = row.id.toLowerCase(); + rowMatchName = rowMatchName.replace(/^sr\d*_/, ''); // strip 'sr123_' + + if (search.length<=rowMatchName.length && + rowMatchName.substr(0, search.length)==search) + { + row.style.display = 'block'; + matches++; + } + else + { + row.style.display = 'none'; + } + } + i++; + } + document.getElementById("Searching").style.display='none'; + if (matches == 0) // no results + { + document.getElementById("NoMatches").style.display='block'; + } + else // at least one result + { + document.getElementById("NoMatches").style.display='none'; + } + this.lastMatchCount = matches; + return true; + } + + // return the first item with index index or higher that is visible + this.NavNext = function(index) + { + var focusItem; + while (1) + { + var focusName = 'Item'+index; + focusItem = document.getElementById(focusName); + if (focusItem && focusItem.parentNode.parentNode.style.display=='block') + { + break; + } + else if (!focusItem) // last element + { + break; + } + focusItem=null; + index++; + } + return focusItem; + } + + this.NavPrev = function(index) + { + var focusItem; + while (1) + { + var focusName = 'Item'+index; + focusItem = document.getElementById(focusName); + if (focusItem && focusItem.parentNode.parentNode.style.display=='block') + { + break; + } + else if (!focusItem) // last element + { + break; + } + focusItem=null; + index--; + } + return focusItem; + } + + this.ProcessKeys = function(e) + { + if (e.type == "keydown") + { + this.repeatOn = false; + this.lastKey = e.keyCode; + } + else if (e.type == "keypress") + { + if (!this.repeatOn) + { + if (this.lastKey) this.repeatOn = true; + return false; // ignore first keypress after keydown + } + } + else if (e.type == "keyup") + { + this.lastKey = 0; + this.repeatOn = false; + } + return this.lastKey!=0; + } + + this.Nav = function(evt,itemIndex) + { + var e = (evt) ? evt : window.event; // for IE + if (e.keyCode==13) return true; + if (!this.ProcessKeys(e)) return false; + + if (this.lastKey==38) // Up + { + var newIndex = itemIndex-1; + var focusItem = this.NavPrev(newIndex); + if (focusItem) + { + var child = this.FindChildElement(focusItem.parentNode.parentNode.id); + if (child && child.style.display == 'block') // children visible + { + var n=0; + var tmpElem; + while (1) // search for last child + { + tmpElem = document.getElementById('Item'+newIndex+'_c'+n); + if (tmpElem) + { + focusItem = tmpElem; + } + else // found it! + { + break; + } + n++; + } + } + } + if (focusItem) + { + focusItem.focus(); + } + else // return focus to search field + { + document.getElementById("MSearchField").focus(); + } + } + else if (this.lastKey==40) // Down + { + var newIndex = itemIndex+1; + var focusItem; + var item = document.getElementById('Item'+itemIndex); + var elem = this.FindChildElement(item.parentNode.parentNode.id); + if (elem && elem.style.display == 'block') // children visible + { + focusItem = document.getElementById('Item'+itemIndex+'_c0'); + } + if (!focusItem) focusItem = this.NavNext(newIndex); + if (focusItem) focusItem.focus(); + } + else if (this.lastKey==39) // Right + { + var item = document.getElementById('Item'+itemIndex); + var elem = this.FindChildElement(item.parentNode.parentNode.id); + if (elem) elem.style.display = 'block'; + } + else if (this.lastKey==37) // Left + { + var item = document.getElementById('Item'+itemIndex); + var elem = this.FindChildElement(item.parentNode.parentNode.id); + if (elem) elem.style.display = 'none'; + } + else if (this.lastKey==27) // Escape + { + e.stopPropagation(); + searchBox.CloseResultsWindow(); + document.getElementById("MSearchField").focus(); + } + else if (this.lastKey==13) // Enter + { + return true; + } + return false; + } + + this.NavChild = function(evt,itemIndex,childIndex) + { + var e = (evt) ? evt : window.event; // for IE + if (e.keyCode==13) return true; + if (!this.ProcessKeys(e)) return false; + + if (this.lastKey==38) // Up + { + if (childIndex>0) + { + var newIndex = childIndex-1; + document.getElementById('Item'+itemIndex+'_c'+newIndex).focus(); + } + else // already at first child, jump to parent + { + document.getElementById('Item'+itemIndex).focus(); + } + } + else if (this.lastKey==40) // Down + { + var newIndex = childIndex+1; + var elem = document.getElementById('Item'+itemIndex+'_c'+newIndex); + if (!elem) // last child, jump to parent next parent + { + elem = this.NavNext(itemIndex+1); + } + if (elem) + { + elem.focus(); + } + } + else if (this.lastKey==27) // Escape + { + e.stopPropagation(); + searchBox.CloseResultsWindow(); + document.getElementById("MSearchField").focus(); + } + else if (this.lastKey==13) // Enter + { + return true; + } + return false; + } +} + +function setKeyActions(elem,action) +{ + elem.setAttribute('onkeydown',action); + elem.setAttribute('onkeypress',action); + elem.setAttribute('onkeyup',action); +} + +function setClassAttr(elem,attr) +{ + elem.setAttribute('class',attr); + elem.setAttribute('className',attr); +} + +function createResults(resultsPath) +{ + var results = document.getElementById("SRResults"); + results.innerHTML = ''; + for (var e=0; e + + + + + + +Modulo: Member List + + + + + + + + + +
    +
    + + + + + + +
    +
    Modulo 5.0.0 +
    +
    +
    + + + + + + + + +
    +
    + + +
    +
    +
    +
    +
    +
    Loading...
    +
    Searching...
    +
    No Matches
    +
    +
    +
    +
    + + +
    +
    +
    modulo_components::ComponentServiceResponse Member List
    +
    + + + + + diff --git a/versions/v5.0.1/structmodulo__components_1_1_component_service_response.html b/versions/v5.0.1/structmodulo__components_1_1_component_service_response.html new file mode 100644 index 00000000..e570cfb6 --- /dev/null +++ b/versions/v5.0.1/structmodulo__components_1_1_component_service_response.html @@ -0,0 +1,142 @@ + + + + + + + +Modulo: modulo_components::ComponentServiceResponse Struct Reference + + + + + + + + + +
    +
    + + + + + + +
    +
    Modulo 5.0.0 +
    +
    +
    + + + + + + + + +
    +
    + + +
    +
    +
    +
    +
    +
    Loading...
    +
    Searching...
    +
    No Matches
    +
    +
    +
    +
    + + +
    +
    + +
    modulo_components::ComponentServiceResponse Struct Reference
    +
    +
    + +

    Response structure to be returned by component services. + More...

    + +

    #include <ComponentInterface.hpp>

    + + + + + + +

    +Public Attributes

    bool success
     
    std::string message
     
    +

    Detailed Description

    +

    Response structure to be returned by component services.

    +

    The structure contains a bool success field and a string message field. This information is used to provide feedback on the service outcome to the service client.

    + +

    Definition at line 38 of file ComponentInterface.hpp.

    +

    Member Data Documentation

    + +

    ◆ message

    + +
    +
    + + + + +
    std::string modulo_components::ComponentServiceResponse::message
    +
    + +

    Definition at line 40 of file ComponentInterface.hpp.

    + +
    +
    + +

    ◆ success

    + +
    +
    + + + + +
    bool modulo_components::ComponentServiceResponse::success
    +
    + +

    Definition at line 39 of file ComponentInterface.hpp.

    + +
    +
    +
    The documentation for this struct was generated from the following file: +
    + + + + diff --git a/versions/v5.0.1/structmodulo__controllers_1_1_controller_input-members.html b/versions/v5.0.1/structmodulo__controllers_1_1_controller_input-members.html new file mode 100644 index 00000000..56a7b895 --- /dev/null +++ b/versions/v5.0.1/structmodulo__controllers_1_1_controller_input-members.html @@ -0,0 +1,92 @@ + + + + + + + +Modulo: Member List + + + + + + + + + +
    +
    + + + + + + +
    +
    Modulo 5.0.0 +
    +
    +
    + + + + + + + + +
    +
    + + +
    +
    +
    +
    +
    +
    Loading...
    +
    Searching...
    +
    No Matches
    +
    +
    +
    +
    + + +
    +
    +
    modulo_controllers::ControllerInput Member List
    +
    +
    + +

    This is the complete list of members for modulo_controllers::ControllerInput, including all inherited members.

    + + + + + +
    buffer (defined in modulo_controllers::ControllerInput)modulo_controllers::ControllerInput
    ControllerInput()=default (defined in modulo_controllers::ControllerInput)modulo_controllers::ControllerInput
    ControllerInput(BufferVariant buffer_variant) (defined in modulo_controllers::ControllerInput)modulo_controllers::ControllerInputinline
    timestamp (defined in modulo_controllers::ControllerInput)modulo_controllers::ControllerInput
    + + + + diff --git a/versions/v5.0.1/structmodulo__controllers_1_1_controller_input.html b/versions/v5.0.1/structmodulo__controllers_1_1_controller_input.html new file mode 100644 index 00000000..d2445fe9 --- /dev/null +++ b/versions/v5.0.1/structmodulo__controllers_1_1_controller_input.html @@ -0,0 +1,176 @@ + + + + + + + +Modulo: modulo_controllers::ControllerInput Struct Reference + + + + + + + + + +
    +
    + + + + + + +
    +
    Modulo 5.0.0 +
    +
    +
    + + + + + + + + +
    +
    + + +
    +
    +
    +
    +
    +
    Loading...
    +
    Searching...
    +
    No Matches
    +
    +
    +
    +
    + + +
    +
    + +
    modulo_controllers::ControllerInput Struct Reference
    +
    +
    + +

    Input structure to save topic data in a realtime buffer and timestamps in one object. + More...

    + +

    #include <BaseControllerInterface.hpp>

    + + + + +

    +Public Member Functions

     ControllerInput (BufferVariant buffer_variant)
     
    + + + + + +

    +Public Attributes

    BufferVariant buffer
     
    std::chrono::time_point< std::chrono::steady_clock > timestamp
     
    +

    Detailed Description

    +

    Input structure to save topic data in a realtime buffer and timestamps in one object.

    + +

    Definition at line 83 of file BaseControllerInterface.hpp.

    +

    Constructor & Destructor Documentation

    + +

    ◆ ControllerInput()

    + +
    +
    + + + + + +
    + + + + + + + + +
    modulo_controllers::ControllerInput::ControllerInput (BufferVariant buffer_variant)
    +
    +inline
    +
    + +

    Definition at line 85 of file BaseControllerInterface.hpp.

    + +
    +
    +

    Member Data Documentation

    + +

    ◆ buffer

    + +
    +
    + + + + +
    BufferVariant modulo_controllers::ControllerInput::buffer
    +
    + +

    Definition at line 86 of file BaseControllerInterface.hpp.

    + +
    +
    + +

    ◆ timestamp

    + +
    +
    + + + + +
    std::chrono::time_point<std::chrono::steady_clock> modulo_controllers::ControllerInput::timestamp
    +
    + +

    Definition at line 87 of file BaseControllerInterface.hpp.

    + +
    +
    +
    The documentation for this struct was generated from the following file: +
    + + + + diff --git a/versions/v5.0.1/structmodulo__controllers_1_1_controller_service_response-members.html b/versions/v5.0.1/structmodulo__controllers_1_1_controller_service_response-members.html new file mode 100644 index 00000000..c866cb4d --- /dev/null +++ b/versions/v5.0.1/structmodulo__controllers_1_1_controller_service_response-members.html @@ -0,0 +1,90 @@ + + + + + + + +Modulo: Member List + + + + + + + + + +
    +
    + + + + + + +
    +
    Modulo 5.0.0 +
    +
    +
    + + + + + + + + +
    +
    + + +
    +
    +
    +
    +
    +
    Loading...
    +
    Searching...
    +
    No Matches
    +
    +
    +
    +
    + + +
    +
    +
    modulo_controllers::ControllerServiceResponse Member List
    +
    + + + + + diff --git a/versions/v5.0.1/structmodulo__controllers_1_1_controller_service_response.html b/versions/v5.0.1/structmodulo__controllers_1_1_controller_service_response.html new file mode 100644 index 00000000..658fcfc8 --- /dev/null +++ b/versions/v5.0.1/structmodulo__controllers_1_1_controller_service_response.html @@ -0,0 +1,142 @@ + + + + + + + +Modulo: modulo_controllers::ControllerServiceResponse Struct Reference + + + + + + + + + +
    +
    + + + + + + +
    +
    Modulo 5.0.0 +
    +
    +
    + + + + + + + + +
    +
    + + +
    +
    +
    +
    +
    +
    Loading...
    +
    Searching...
    +
    No Matches
    +
    +
    +
    +
    + + +
    +
    + +
    modulo_controllers::ControllerServiceResponse Struct Reference
    +
    +
    + +

    Response structure to be returned by controller services. + More...

    + +

    #include <BaseControllerInterface.hpp>

    + + + + + + +

    +Public Attributes

    bool success
     
    std::string message
     
    +

    Detailed Description

    +

    Response structure to be returned by controller services.

    +

    The structure contains a bool success field and a string message field. This information is used to provide feedback on the service outcome to the service client.

    + +

    Definition at line 96 of file BaseControllerInterface.hpp.

    +

    Member Data Documentation

    + +

    ◆ message

    + +
    +
    + + + + +
    std::string modulo_controllers::ControllerServiceResponse::message
    +
    + +

    Definition at line 98 of file BaseControllerInterface.hpp.

    + +
    +
    + +

    ◆ success

    + +
    +
    + + + + +
    bool modulo_controllers::ControllerServiceResponse::success
    +
    + +

    Definition at line 97 of file BaseControllerInterface.hpp.

    + +
    +
    +
    The documentation for this struct was generated from the following file: +
    + + + + diff --git a/versions/v5.0.1/sync_off.png b/versions/v5.0.1/sync_off.png new file mode 100644 index 00000000..3b443fc6 Binary files /dev/null and b/versions/v5.0.1/sync_off.png differ diff --git a/versions/v5.0.1/sync_on.png b/versions/v5.0.1/sync_on.png new file mode 100644 index 00000000..e08320fb Binary files /dev/null and b/versions/v5.0.1/sync_on.png differ diff --git a/versions/v5.0.1/tab_a.png b/versions/v5.0.1/tab_a.png new file mode 100644 index 00000000..3b725c41 Binary files /dev/null and b/versions/v5.0.1/tab_a.png differ diff --git a/versions/v5.0.1/tab_ad.png b/versions/v5.0.1/tab_ad.png new file mode 100644 index 00000000..e34850ac Binary files /dev/null and b/versions/v5.0.1/tab_ad.png differ diff --git a/versions/v5.0.1/tab_b.png b/versions/v5.0.1/tab_b.png new file mode 100644 index 00000000..e2b4a863 Binary files /dev/null and b/versions/v5.0.1/tab_b.png differ diff --git a/versions/v5.0.1/tab_bd.png b/versions/v5.0.1/tab_bd.png new file mode 100644 index 00000000..91c25249 Binary files /dev/null and b/versions/v5.0.1/tab_bd.png differ diff --git a/versions/v5.0.1/tab_h.png b/versions/v5.0.1/tab_h.png new file mode 100644 index 00000000..fd5cb705 Binary files /dev/null and b/versions/v5.0.1/tab_h.png differ diff --git a/versions/v5.0.1/tab_hd.png b/versions/v5.0.1/tab_hd.png new file mode 100644 index 00000000..2489273d Binary files /dev/null and b/versions/v5.0.1/tab_hd.png differ diff --git a/versions/v5.0.1/tab_s.png b/versions/v5.0.1/tab_s.png new file mode 100644 index 00000000..ab478c95 Binary files /dev/null and b/versions/v5.0.1/tab_s.png differ diff --git a/versions/v5.0.1/tab_sd.png b/versions/v5.0.1/tab_sd.png new file mode 100644 index 00000000..757a565c Binary files /dev/null and b/versions/v5.0.1/tab_sd.png differ diff --git a/versions/v5.0.1/tabs.css b/versions/v5.0.1/tabs.css new file mode 100644 index 00000000..71c8a470 --- /dev/null +++ b/versions/v5.0.1/tabs.css @@ -0,0 +1 @@ +.sm{position:relative;z-index:9999}.sm,.sm ul,.sm li{display:block;list-style:none;margin:0;padding:0;line-height:normal;direction:ltr;text-align:left;-webkit-tap-highlight-color:rgba(0,0,0,0)}.sm-rtl,.sm-rtl ul,.sm-rtl li{direction:rtl;text-align:right}.sm>li>h1,.sm>li>h2,.sm>li>h3,.sm>li>h4,.sm>li>h5,.sm>li>h6{margin:0;padding:0}.sm ul{display:none}.sm li,.sm a{position:relative}.sm a{display:block}.sm a.disabled{cursor:not-allowed}.sm:after{content:"\00a0";display:block;height:0;font:0/0 serif;clear:both;visibility:hidden;overflow:hidden}.sm,.sm *,.sm *:before,.sm *:after{-moz-box-sizing:border-box;-webkit-box-sizing:border-box;box-sizing:border-box}.main-menu-btn{position:relative;display:inline-block;width:36px;height:36px;text-indent:36px;margin-left:8px;white-space:nowrap;overflow:hidden;cursor:pointer;-webkit-tap-highlight-color:rgba(0,0,0,0)}.main-menu-btn-icon,.main-menu-btn-icon:before,.main-menu-btn-icon:after{position:absolute;top:50%;left:2px;height:2px;width:24px;background:var(--nav-menu-button-color);-webkit-transition:all .25s;transition:all .25s}.main-menu-btn-icon:before{content:'';top:-7px;left:0}.main-menu-btn-icon:after{content:'';top:7px;left:0}#main-menu-state:checked ~ .main-menu-btn .main-menu-btn-icon{height:0}#main-menu-state:checked ~ .main-menu-btn .main-menu-btn-icon:before{top:0;-webkit-transform:rotate(-45deg);transform:rotate(-45deg)}#main-menu-state:checked ~ .main-menu-btn .main-menu-btn-icon:after{top:0;-webkit-transform:rotate(45deg);transform:rotate(45deg)}#main-menu-state{position:absolute;width:1px;height:1px;margin:-1px;border:0;padding:0;overflow:hidden;clip:rect(1px,1px,1px,1px)}#main-menu-state:not(:checked) ~ #main-menu{display:none}#main-menu-state:checked ~ #main-menu{display:block}@media(min-width:768px){.main-menu-btn{position:absolute;top:-99999px}#main-menu-state:not(:checked) ~ #main-menu{display:block}}.sm-dox{background-image:var(--nav-gradient-image)}.sm-dox a,.sm-dox a:focus,.sm-dox a:hover,.sm-dox a:active{padding:0 12px;padding-right:43px;font-family:var(--font-family-nav);font-size:13px;font-weight:bold;line-height:36px;text-decoration:none;text-shadow:var(--nav-text-normal-shadow);color:var(--nav-text-normal-color);outline:0}.sm-dox a:hover{background-image:var(--nav-gradient-active-image);background-repeat:repeat-x;color:var(--nav-text-hover-color);text-shadow:var(--nav-text-hover-shadow)}.sm-dox a.current{color:#d23600}.sm-dox a.disabled{color:#bbb}.sm-dox a span.sub-arrow{position:absolute;top:50%;margin-top:-14px;left:auto;right:3px;width:28px;height:28px;overflow:hidden;font:bold 12px/28px monospace !important;text-align:center;text-shadow:none;background:var(--nav-menu-toggle-color);-moz-border-radius:5px;-webkit-border-radius:5px;border-radius:5px}.sm-dox a span.sub-arrow:before{display:block;content:'+'}.sm-dox a.highlighted span.sub-arrow:before{display:block;content:'-'}.sm-dox>li:first-child>a,.sm-dox>li:first-child>:not(ul) a{-moz-border-radius:5px 5px 0 0;-webkit-border-radius:5px;border-radius:5px 5px 0 0}.sm-dox>li:last-child>a,.sm-dox>li:last-child>*:not(ul) a,.sm-dox>li:last-child>ul,.sm-dox>li:last-child>ul>li:last-child>a,.sm-dox>li:last-child>ul>li:last-child>*:not(ul) a,.sm-dox>li:last-child>ul>li:last-child>ul,.sm-dox>li:last-child>ul>li:last-child>ul>li:last-child>a,.sm-dox>li:last-child>ul>li:last-child>ul>li:last-child>*:not(ul) a,.sm-dox>li:last-child>ul>li:last-child>ul>li:last-child>ul,.sm-dox>li:last-child>ul>li:last-child>ul>li:last-child>ul>li:last-child>a,.sm-dox>li:last-child>ul>li:last-child>ul>li:last-child>ul>li:last-child>*:not(ul) a,.sm-dox>li:last-child>ul>li:last-child>ul>li:last-child>ul>li:last-child>ul,.sm-dox>li:last-child>ul>li:last-child>ul>li:last-child>ul>li:last-child>ul>li:last-child>a,.sm-dox>li:last-child>ul>li:last-child>ul>li:last-child>ul>li:last-child>ul>li:last-child>*:not(ul) a,.sm-dox>li:last-child>ul>li:last-child>ul>li:last-child>ul>li:last-child>ul>li:last-child>ul{-moz-border-radius:0 0 5px 5px;-webkit-border-radius:0;border-radius:0 0 5px 5px}.sm-dox>li:last-child>a.highlighted,.sm-dox>li:last-child>*:not(ul) a.highlighted,.sm-dox>li:last-child>ul>li:last-child>a.highlighted,.sm-dox>li:last-child>ul>li:last-child>*:not(ul) a.highlighted,.sm-dox>li:last-child>ul>li:last-child>ul>li:last-child>a.highlighted,.sm-dox>li:last-child>ul>li:last-child>ul>li:last-child>*:not(ul) a.highlighted,.sm-dox>li:last-child>ul>li:last-child>ul>li:last-child>ul>li:last-child>a.highlighted,.sm-dox>li:last-child>ul>li:last-child>ul>li:last-child>ul>li:last-child>*:not(ul) a.highlighted,.sm-dox>li:last-child>ul>li:last-child>ul>li:last-child>ul>li:last-child>ul>li:last-child>a.highlighted,.sm-dox>li:last-child>ul>li:last-child>ul>li:last-child>ul>li:last-child>ul>li:last-child>*:not(ul) a.highlighted{-moz-border-radius:0;-webkit-border-radius:0;border-radius:0}.sm-dox ul{background:var(--nav-menu-background-color)}.sm-dox ul a,.sm-dox ul a:focus,.sm-dox ul a:hover,.sm-dox ul a:active{font-size:12px;border-left:8px solid transparent;line-height:36px;text-shadow:none;background-color:var(--nav-menu-background-color);background-image:none}.sm-dox ul a:hover{background-image:var(--nav-gradient-active-image);background-repeat:repeat-x;color:var(--nav-text-hover-color);text-shadow:0 1px 1px black}.sm-dox ul ul a,.sm-dox ul ul a:hover,.sm-dox ul ul a:focus,.sm-dox ul ul a:active{border-left:16px solid transparent}.sm-dox ul ul ul a,.sm-dox ul ul ul a:hover,.sm-dox ul ul ul a:focus,.sm-dox ul ul ul a:active{border-left:24px solid transparent}.sm-dox ul ul ul ul a,.sm-dox ul ul ul ul a:hover,.sm-dox ul ul ul ul a:focus,.sm-dox ul ul ul ul a:active{border-left:32px solid transparent}.sm-dox ul ul ul ul ul a,.sm-dox ul ul ul ul ul a:hover,.sm-dox ul ul ul ul ul a:focus,.sm-dox ul ul ul ul ul a:active{border-left:40px solid transparent}@media(min-width:768px){.sm-dox ul{position:absolute;width:12em}.sm-dox li{float:left}.sm-dox.sm-rtl li{float:right}.sm-dox ul li,.sm-dox.sm-rtl ul li,.sm-dox.sm-vertical li{float:none}.sm-dox a{white-space:nowrap}.sm-dox ul a,.sm-dox.sm-vertical a{white-space:normal}.sm-dox .sm-nowrap>li>a,.sm-dox .sm-nowrap>li>:not(ul) a{white-space:nowrap}.sm-dox{padding:0 10px;background-image:var(--nav-gradient-image);line-height:36px}.sm-dox a span.sub-arrow{top:50%;margin-top:-2px;right:12px;width:0;height:0;border-width:4px;border-style:solid dashed dashed dashed;border-color:var(--nav-text-normal-color) transparent transparent transparent;background:transparent;-moz-border-radius:0;-webkit-border-radius:0;border-radius:0}.sm-dox a,.sm-dox a:focus,.sm-dox a:active,.sm-dox a:hover,.sm-dox a.highlighted{padding:0 12px;background-image:var(--nav-separator-image);background-repeat:no-repeat;background-position:right;-moz-border-radius:0 !important;-webkit-border-radius:0;border-radius:0 !important}.sm-dox a:hover{background-image:var(--nav-gradient-active-image);background-repeat:repeat-x;color:var(--nav-text-hover-color);text-shadow:var(--nav-text-hover-shadow)}.sm-dox a:hover span.sub-arrow{border-color:var(--nav-text-hover-color) transparent transparent transparent}.sm-dox a.has-submenu{padding-right:24px}.sm-dox li{border-top:0}.sm-dox>li>ul:before,.sm-dox>li>ul:after{content:'';position:absolute;top:-18px;left:30px;width:0;height:0;overflow:hidden;border-width:9px;border-style:dashed dashed solid dashed;border-color:transparent transparent #bbb transparent}.sm-dox>li>ul:after{top:-16px;left:31px;border-width:8px;border-color:transparent transparent var(--nav-menu-background-color) transparent}.sm-dox ul{border:1px solid #bbb;padding:5px 0;background:var(--nav-menu-background-color);-moz-border-radius:5px !important;-webkit-border-radius:5px;border-radius:5px !important;-moz-box-shadow:0 5px 9px rgba(0,0,0,0.2);-webkit-box-shadow:0 5px 9px rgba(0,0,0,0.2);box-shadow:0 5px 9px rgba(0,0,0,0.2)}.sm-dox ul a span.sub-arrow{right:8px;top:50%;margin-top:-5px;border-width:5px;border-color:transparent transparent transparent var(--nav-menu-foreground-color);border-style:dashed dashed dashed solid}.sm-dox ul a,.sm-dox ul a:hover,.sm-dox ul a:focus,.sm-dox ul a:active,.sm-dox ul a.highlighted{color:var(--nav-menu-foreground-color);background-image:none;border:0 !important;color:var(--nav-menu-foreground-color);background-image:none}.sm-dox ul a:hover{background-image:var(--nav-gradient-active-image);background-repeat:repeat-x;color:var(--nav-text-hover-color);text-shadow:var(--nav-text-hover-shadow)}.sm-dox ul a:hover span.sub-arrow{border-color:transparent transparent transparent var(--nav-text-hover-color)}.sm-dox span.scroll-up,.sm-dox span.scroll-down{position:absolute;display:none;visibility:hidden;overflow:hidden;background:var(--nav-menu-background-color);height:36px}.sm-dox span.scroll-up:hover,.sm-dox span.scroll-down:hover{background:#eee}.sm-dox span.scroll-up:hover span.scroll-up-arrow,.sm-dox span.scroll-up:hover span.scroll-down-arrow{border-color:transparent transparent #d23600 transparent}.sm-dox span.scroll-down:hover span.scroll-down-arrow{border-color:#d23600 transparent transparent transparent}.sm-dox span.scroll-up-arrow,.sm-dox span.scroll-down-arrow{position:absolute;top:0;left:50%;margin-left:-6px;width:0;height:0;overflow:hidden;border-width:6px;border-style:dashed dashed solid dashed;border-color:transparent transparent var(--nav-menu-foreground-color) transparent}.sm-dox span.scroll-down-arrow{top:8px;border-style:solid dashed dashed dashed;border-color:var(--nav-menu-foreground-color) transparent transparent transparent}.sm-dox.sm-rtl a.has-submenu{padding-right:12px;padding-left:24px}.sm-dox.sm-rtl a span.sub-arrow{right:auto;left:12px}.sm-dox.sm-rtl.sm-vertical a.has-submenu{padding:10px 20px}.sm-dox.sm-rtl.sm-vertical a span.sub-arrow{right:auto;left:8px;border-style:dashed solid dashed dashed;border-color:transparent #555 transparent transparent}.sm-dox.sm-rtl>li>ul:before{left:auto;right:30px}.sm-dox.sm-rtl>li>ul:after{left:auto;right:31px}.sm-dox.sm-rtl ul a.has-submenu{padding:10px 20px !important}.sm-dox.sm-rtl ul a span.sub-arrow{right:auto;left:8px;border-style:dashed solid dashed dashed;border-color:transparent #555 transparent transparent}.sm-dox.sm-vertical{padding:10px 0;-moz-border-radius:5px;-webkit-border-radius:5px;border-radius:5px}.sm-dox.sm-vertical a{padding:10px 20px}.sm-dox.sm-vertical a:hover,.sm-dox.sm-vertical a:focus,.sm-dox.sm-vertical a:active,.sm-dox.sm-vertical a.highlighted{background:#fff}.sm-dox.sm-vertical a.disabled{background-image:var(--nav-gradient-image)}.sm-dox.sm-vertical a span.sub-arrow{right:8px;top:50%;margin-top:-5px;border-width:5px;border-style:dashed dashed dashed solid;border-color:transparent transparent transparent #555}.sm-dox.sm-vertical>li>ul:before,.sm-dox.sm-vertical>li>ul:after{display:none}.sm-dox.sm-vertical ul a{padding:10px 20px}.sm-dox.sm-vertical ul a:hover,.sm-dox.sm-vertical ul a:focus,.sm-dox.sm-vertical ul a:active,.sm-dox.sm-vertical ul a.highlighted{background:#eee}.sm-dox.sm-vertical ul a.disabled{background:var(--nav-menu-background-color)}} \ No newline at end of file