diff --git a/versions/v4.2.2/_add_service_exception_8hpp_source.html b/versions/v4.2.2/_add_service_exception_8hpp_source.html new file mode 100644 index 000000000..9f4b0a421 --- /dev/null +++ b/versions/v4.2.2/_add_service_exception_8hpp_source.html @@ -0,0 +1,108 @@ + + +
+ + + + +
+ Modulo 4.2.2
+
+ |
+
+ Modulo 4.2.2
+
+ |
+
+ Modulo 4.2.2
+
+ |
+
+ Modulo 4.2.2
+
+ |
+
+ Modulo 4.2.2
+
+ |
+
+ Modulo 4.2.2
+
+ |
+
+ Modulo 4.2.2
+
+ |
+
+ Modulo 4.2.2
+
+ |
+
+ Modulo 4.2.2
+
+ |
+
+ Modulo 4.2.2
+
+ |
+
+ Modulo 4.2.2
+
+ |
+
+ Modulo 4.2.2
+
+ |
+
+ Modulo 4.2.2
+
+ |
+
+ Modulo 4.2.2
+
+ |
+
+ Modulo 4.2.2
+
+ |
+
+ Modulo 4.2.2
+
+ |
+
+ Modulo 4.2.2
+
+ |
+
+ Modulo 4.2.2
+
+ |
+
+ Modulo 4.2.2
+
+ |
+
+ Modulo 4.2.2
+
+ |
+
+ Modulo 4.2.2
+
+ |
+
+ Modulo 4.2.2
+
+ |
+
+ Modulo 4.2.2
+
+ |
+
+ Modulo 4.2.2
+
+ |
+
+ Modulo 4.2.2
+
+ |
+
+ Modulo 4.2.2
+
+ |
+
+ Modulo 4.2.2
+
+ |
+
+ Modulo 4.2.2
+
+ |
+
+ Modulo 4.2.2
+
+ |
+
+ Modulo 4.2.2
+
+ |
+
+ Modulo 4.2.2
+
+ |
+
+ Modulo 4.2.2
+
+ |
+
+ Modulo 4.2.2
+
+ |
+
+ Modulo 4.2.2
+
+ |
+
+ Modulo 4.2.2
+
+ |
+
+ Modulo 4.2.2
+
+ |
+
+ Modulo 4.2.2
+
+ |
+
+ Modulo 4.2.2
+
+ |
+
+ Modulo 4.2.2
+
+ |
+
▼Nmodulo_components | Modulo components |
▼Nexceptions | Modulo component exception classes |
CAddServiceException | An exception class to notify errors when adding a service |
CAddSignalException | An exception class to notify errors when adding a signal |
CComponentException | A base class for all component exceptions |
CComponentParameterException | An exception class to notify errors with component parameters |
CLookupTransformException | An exception class to notify an error while looking up TF transforms |
CComponent | A wrapper for rclcpp::Node to simplify application composition through unified component interfaces |
CComponentInterface | Base interface class for modulo components to wrap a ROS Node with custom behaviour |
CComponentServiceResponse | Response structure to be returned by component services |
CLifecycleComponent | A wrapper for rclcpp_lifecycle::LifecycleNode to simplify application composition through unified component interfaces while supporting lifecycle states and transitions |
▼Nmodulo_controllers | |
CControllerInput | Input structure to save topic data in a realtime buffer and timestamps in one object |
CControllerInterface | Base controller class to combine ros2_control, control libraries and modulo |
CControllerServiceResponse | Response structure to be returned by controller services |
CRobotControllerInterface | Base controller class that automatically associates joints with a JointState object |
▼Nmodulo_core | Modulo Core |
▼Ncommunication | Modulo Core communication module for handling messages on publication and subscription interfaces |
CMessagePair | The MessagePair stores a pointer to a variable and translates the value of this pointer back and forth between the corresponding ROS messages |
CMessagePairInterface | Interface class to enable non-templated writing and reading ROS messages from derived MessagePair instances through dynamic down-casting |
CPublisherHandler | The PublisherHandler handles different types of ROS publishers to activate, deactivate and publish data with those publishers |
CPublisherInterface | Interface class to enable non-templated activating/deactivating/publishing of ROS publishers from derived PublisherHandler instances through dynamic down-casting |
CSubscriptionHandler | The SubscriptionHandler handles different types of ROS subscriptions to receive data from those subscriptions |
CSubscriptionInterface | Interface class to enable non-templated subscriptions with ROS subscriptions from derived SubscriptionHandler instances through dynamic down-casting |
▼Nexceptions | Modulo Core exceptions module for defining exception classes |
CCoreException | A base class for all core exceptions |
CInvalidPointerCastException | 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 |
CInvalidPointerException | 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 |
CMessageTranslationException | An exception class to notify that the translation of a ROS message failed |
CNullPointerException | An exception class to notify that a certain pointer is null |
CParameterTranslationException | An exception class to notify incompatibility when translating parameters from different sources |
▼Nmodulo_utils | |
▼Ntestutils | |
CPredicatesListener | |
CServiceClient | |
CComponentInterfacePublicInterface | Friend class to the ComponentInterface to allow test fixtures to access protected and private members |
+ Modulo 4.2.2
+
+ |
+
Friend class to the ComponentInterface to allow test fixtures to access protected and private members. + More...
+ +#include <ComponentInterface.hpp>
Friend class to the ComponentInterface to allow test fixtures to access protected and private members.
+
+ Modulo 4.2.2
+
+ |
+
+ Modulo 4.2.2
+
+ |
+
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::ComponentInterface | inlineprotected |
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::ComponentInterface | inlineprotected |
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::ComponentInterface | inlineprotected |
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::Component | inlineprotected |
add_parameter(const std::shared_ptr< state_representation::ParameterInterface > ¶meter, const std::string &description, bool read_only=false) | modulo_components::ComponentInterface | protected |
add_parameter(const std::string &name, const T &value, const std::string &description, bool read_only=false) | modulo_components::ComponentInterface | inlineprotected |
add_periodic_callback(const std::string &name, const std::function< void(void)> &callback) | modulo_components::ComponentInterface | protected |
add_predicate(const std::string &predicate_name, bool predicate_value) | modulo_components::ComponentInterface | protected |
add_predicate(const std::string &predicate_name, const std::function< bool(void)> &predicate_function) | modulo_components::ComponentInterface | protected |
add_service(const std::string &service_name, const std::function< ComponentServiceResponse(void)> &callback) | modulo_components::ComponentInterface | protected |
add_service(const std::string &service_name, const std::function< ComponentServiceResponse(const std::string &string)> &callback) | modulo_components::ComponentInterface | protected |
add_static_tf_broadcaster() | modulo_components::ComponentInterface | protected |
add_tf_broadcaster() | modulo_components::ComponentInterface | protected |
add_tf_listener() | modulo_components::ComponentInterface | protected |
add_trigger(const std::string &trigger_name) | modulo_components::ComponentInterface | protected |
Component(const rclcpp::NodeOptions &node_options, const std::string &fallback_name="Component") | modulo_components::Component | explicit |
ComponentInterface(const std::shared_ptr< rclcpp::node_interfaces::NodeInterfaces< ALL_RCLCPP_NODE_INTERFACES > > &interfaces) | modulo_components::ComponentInterface | explicitprotected |
ComponentPublicInterface (defined in modulo_components::Component) | modulo_components::Component | friend |
declare_input(const std::string &signal_name, const std::string &default_topic="", bool fixed_topic=false) | modulo_components::ComponentInterface | protected |
declare_output(const std::string &signal_name, const std::string &default_topic="", bool fixed_topic=false) | modulo_components::ComponentInterface | protected |
execute() | modulo_components::Component | protected |
get_parameter(const std::string &name) const | modulo_components::Component | protected |
get_parameter_value(const std::string &name) const | modulo_components::ComponentInterface | inlineprotected |
get_predicate(const std::string &predicate_name) | modulo_components::ComponentInterface | protected |
get_qos() const | modulo_components::ComponentInterface | protected |
lookup_transform(const std::string &frame, const std::string &reference_frame, const tf2::TimePoint &time_point, const tf2::Duration &duration) | modulo_components::ComponentInterface | protected |
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::ComponentInterface | protected |
on_execute_callback() | modulo_components::Component | protectedvirtual |
on_step_callback() | modulo_components::ComponentInterface | protectedvirtual |
on_validate_parameter_callback(const std::shared_ptr< state_representation::ParameterInterface > ¶meter) | modulo_components::ComponentInterface | protectedvirtual |
publish_output(const std::string &signal_name) | modulo_components::ComponentInterface | protected |
raise_error() | modulo_components::ComponentInterface | protectedvirtual |
remove_input(const std::string &signal_name) | modulo_components::ComponentInterface | protected |
remove_output(const std::string &signal_name) | modulo_components::ComponentInterface | protected |
send_static_transform(const state_representation::CartesianPose &transform) | modulo_components::ComponentInterface | protected |
send_static_transforms(const std::vector< state_representation::CartesianPose > &transforms) | modulo_components::ComponentInterface | protected |
send_transform(const state_representation::CartesianPose &transform) | modulo_components::ComponentInterface | protected |
send_transforms(const std::vector< state_representation::CartesianPose > &transforms) | modulo_components::ComponentInterface | protected |
set_parameter_value(const std::string &name, const T &value) | modulo_components::ComponentInterface | inlineprotected |
set_predicate(const std::string &predicate_name, bool predicate_value) | modulo_components::ComponentInterface | protected |
set_predicate(const std::string &predicate_name, const std::function< bool(void)> &predicate_function) | modulo_components::ComponentInterface | protected |
set_qos(const rclcpp::QoS &qos) | modulo_components::ComponentInterface | protected |
trigger(const std::string &trigger_name) | modulo_components::ComponentInterface | protected |
~Component()=default | modulo_components::Component | virtual |
~ComponentInterface()=default | modulo_components::ComponentInterface | virtual |
+ Modulo 4.2.2
+
+ |
+
A wrapper for rclcpp::Node to simplify application composition through unified component interfaces. + More...
+ +#include <Component.hpp>
+Public Member Functions | |
Component (const rclcpp::NodeOptions &node_options, const std::string &fallback_name="Component") | |
Constructor from node options. | |
+virtual | ~Component ()=default |
Virtual default destructor. | |
Public Member Functions inherited from modulo_components::ComponentInterface | |
+virtual | ~ComponentInterface ()=default |
Virtual default destructor. | |
+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. | |
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. | |
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 > ¶meter, 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 > | |
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 > ¶meter) |
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) |
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 () |
Put the component in error state by setting the 'in_error_state' predicate to true. | |
void | publish_predicate (const std::string &name) |
Helper function to publish a predicate. | |
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. | |
+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, bool > | periodic_outputs_ |
Map of outputs with periodic publishing flag. | |
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.
Definition at line 23 of file Component.hpp.
+
+
|
+ +explicit | +
Constructor from node options.
+node_options | Node options as used in ROS2 Node |
fallback_name | The name of the component if it was not provided through the node options |
Definition at line 8 of file Component.cpp.
+ +
+
|
+ +inlineprotected | +
Add and configure an output signal of the component.
+DataT | Type of the data pointer |
signal_name | Name of the output signal |
data | Data to transmit on the output signal |
default_topic | If set, the default value for the topic name to use |
fixed_topic | If true, the topic name of the output signal is fixed |
publish_on_step | If true, the output is published periodically on step |
Definition at line 100 of file Component.hpp.
+ +
+
|
+ +protected | +
Start the execution thread.
+ +Definition at line 32 of file Component.cpp.
+ +
+
|
+ +protected | +
Get a parameter by name.
+name | The name of the parameter |
modulo_components::exceptions::ComponentParameterException | if the parameter could not be found |
Definition at line 61 of file Component.cpp.
+ +
+
|
+ +protectedvirtual | +
Execute the component logic. To be redefined in derived classes.
+Definition at line 56 of file Component.cpp.
+ +Definition at line 25 of file Component.hpp.
+ +
+ Modulo 4.2.2
+
+ |
+
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::ComponentInterface | inlineprotected |
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::ComponentInterface | inlineprotected |
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::ComponentInterface | inlineprotected |
add_parameter(const std::shared_ptr< state_representation::ParameterInterface > ¶meter, const std::string &description, bool read_only=false) | modulo_components::ComponentInterface | protected |
add_parameter(const std::string &name, const T &value, const std::string &description, bool read_only=false) | modulo_components::ComponentInterface | inlineprotected |
add_periodic_callback(const std::string &name, const std::function< void(void)> &callback) | modulo_components::ComponentInterface | protected |
add_predicate(const std::string &predicate_name, bool predicate_value) | modulo_components::ComponentInterface | protected |
add_predicate(const std::string &predicate_name, const std::function< bool(void)> &predicate_function) | modulo_components::ComponentInterface | protected |
add_service(const std::string &service_name, const std::function< ComponentServiceResponse(void)> &callback) | modulo_components::ComponentInterface | protected |
add_service(const std::string &service_name, const std::function< ComponentServiceResponse(const std::string &string)> &callback) | modulo_components::ComponentInterface | protected |
add_static_tf_broadcaster() | modulo_components::ComponentInterface | protected |
add_tf_broadcaster() | modulo_components::ComponentInterface | protected |
add_tf_listener() | modulo_components::ComponentInterface | protected |
add_trigger(const std::string &trigger_name) | modulo_components::ComponentInterface | protected |
ComponentInterface(const std::shared_ptr< rclcpp::node_interfaces::NodeInterfaces< ALL_RCLCPP_NODE_INTERFACES > > &interfaces) | modulo_components::ComponentInterface | explicitprotected |
ComponentInterfacePublicInterface (defined in modulo_components::ComponentInterface) | modulo_components::ComponentInterface | friend |
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::ComponentInterface | inlineprotected |
declare_input(const std::string &signal_name, const std::string &default_topic="", bool fixed_topic=false) | modulo_components::ComponentInterface | protected |
declare_output(const std::string &signal_name, const std::string &default_topic="", bool fixed_topic=false) | modulo_components::ComponentInterface | protected |
evaluate_periodic_callbacks() | modulo_components::ComponentInterface | protected |
get_parameter(const std::string &name) const | modulo_components::ComponentInterface | protected |
get_parameter_value(const std::string &name) const | modulo_components::ComponentInterface | inlineprotected |
get_predicate(const std::string &predicate_name) | modulo_components::ComponentInterface | protected |
get_qos() const | modulo_components::ComponentInterface | protected |
inputs_ | modulo_components::ComponentInterface | protected |
lookup_transform(const std::string &frame, const std::string &reference_frame, const tf2::TimePoint &time_point, const tf2::Duration &duration) | modulo_components::ComponentInterface | protected |
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::ComponentInterface | protected |
on_step_callback() | modulo_components::ComponentInterface | protectedvirtual |
on_validate_parameter_callback(const std::shared_ptr< state_representation::ParameterInterface > ¶meter) | modulo_components::ComponentInterface | protectedvirtual |
outputs_ | modulo_components::ComponentInterface | protected |
periodic_outputs_ | modulo_components::ComponentInterface | protected |
publish_output(const std::string &signal_name) | modulo_components::ComponentInterface | protected |
publish_outputs() | modulo_components::ComponentInterface | protected |
publish_predicate(const std::string &name) | modulo_components::ComponentInterface | protected |
publish_predicates() | modulo_components::ComponentInterface | protected |
raise_error() | modulo_components::ComponentInterface | protectedvirtual |
remove_input(const std::string &signal_name) | modulo_components::ComponentInterface | protected |
remove_output(const std::string &signal_name) | modulo_components::ComponentInterface | protected |
send_static_transform(const state_representation::CartesianPose &transform) | modulo_components::ComponentInterface | protected |
send_static_transforms(const std::vector< state_representation::CartesianPose > &transforms) | modulo_components::ComponentInterface | protected |
send_transform(const state_representation::CartesianPose &transform) | modulo_components::ComponentInterface | protected |
send_transforms(const std::vector< state_representation::CartesianPose > &transforms) | modulo_components::ComponentInterface | protected |
set_parameter_value(const std::string &name, const T &value) | modulo_components::ComponentInterface | inlineprotected |
set_predicate(const std::string &predicate_name, bool predicate_value) | modulo_components::ComponentInterface | protected |
set_predicate(const std::string &predicate_name, const std::function< bool(void)> &predicate_function) | modulo_components::ComponentInterface | protected |
set_qos(const rclcpp::QoS &qos) | modulo_components::ComponentInterface | protected |
step() | modulo_components::ComponentInterface | protectedvirtual |
trigger(const std::string &trigger_name) | modulo_components::ComponentInterface | protected |
~ComponentInterface()=default | modulo_components::ComponentInterface | virtual |
+ Modulo 4.2.2
+
+ |
+
Base interface class for modulo components to wrap a ROS Node with custom behaviour. + More...
+ +#include <ComponentInterface.hpp>
+Public Member Functions | |
+virtual | ~ComponentInterface ()=default |
Virtual default destructor. | |
+Protected Member Functions | |
ComponentInterface (const std::shared_ptr< rclcpp::node_interfaces::NodeInterfaces< ALL_RCLCPP_NODE_INTERFACES > > &interfaces) | |
Constructor with all node interfaces. | |
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 > ¶meter, 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 > | |
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 > ¶meter) |
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) |
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 () |
Put the component in error state by setting the 'in_error_state' predicate to true. | |
void | publish_predicate (const std::string &name) |
Helper function to publish a predicate. | |
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. | |
+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, bool > | periodic_outputs_ |
Map of outputs with periodic publishing flag. | |
+Friends | |
class | ComponentInterfacePublicInterface |
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.
Definition at line 56 of file ComponentInterface.hpp.
+
+
|
+ +explicitprotected | +
Constructor with all node interfaces.
+interfaces | Shared pointer to all the node interfaces of parent class |
Definition at line 15 of file ComponentInterface.cpp.
+ +
+
|
+ +inlineprotected | +
Add and configure an input signal of the component.
+MsgT | The ROS message type of the subscription |
signal_name | Name of the input signal |
callback | The callback to use for the subscription |
default_topic | If set, the default value for the topic name to use |
fixed_topic | If true, the topic name of the input signal is fixed |
Definition at line 696 of file ComponentInterface.hpp.
+ +
+
|
+ +inlineprotected | +
Add and configure an input signal of the component.
+DataT | Type of the data pointer |
signal_name | Name of the input signal |
data | Data to receive on the input signal |
callback | Callback function to trigger after receiving the input signal |
default_topic | If set, the default value for the topic name to use |
fixed_topic | If true, the topic name of the input signal is fixed |
Definition at line 620 of file ComponentInterface.hpp.
+ +
+
|
+ +inlineprotected | +
Add and configure an input signal of the component.
+DataT | Type of the data pointer |
signal_name | Name of the input signal |
data | Data to receive on the input signal |
default_topic | If set, the default value for the topic name to use |
fixed_topic | If true, the topic name of the input signal is fixed |
Definition at line 612 of file ComponentInterface.hpp.
+ +
+
|
+ +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.
parameter | A ParameterInterface pointer to a Parameter instance |
description | The description of the parameter |
read_only | If true, the value of the parameter cannot be changed after declaration |
ComponentParameterError | if the parameter could not be added |
Definition at line 47 of file ComponentInterface.cpp.
+ +
+
|
+ +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.
T | The type of the parameter |
name | The name of the parameter |
value | The value of the parameter |
description | The description of the parameter |
read_only | If true, the value of the parameter cannot be changed after declaration |
ComponentParameterError | if the parameter could not be added |
Definition at line 574 of file ComponentInterface.hpp.
+ +
+
|
+ +protected | +
Add a periodic callback function.
+The provided function is evaluated periodically at the component step period.
name | The name of the callback |
callback | The callback function that is evaluated periodically |
Definition at line 410 of file ComponentInterface.cpp.
+ +
+
|
+ +protected | +
Add a predicate to the map of predicates.
+predicate_name | the name of the associated predicate |
predicate_value | the boolean value of the predicate |
Definition at line 154 of file ComponentInterface.cpp.
+ +
+
|
+ +protected | +
Add a predicate to the map of predicates based on a function to periodically call.
+predicate_name | the name of the associated predicate |
predicate_function | the function to call that returns the value of the predicate |
Definition at line 158 of file ComponentInterface.cpp.
+ +
+
|
+ +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.
service_name | The name of the service |
callback | A service callback function with a string argument that returns a ComponentServiceResponse |
Definition at line 363 of file ComponentInterface.cpp.
+ +
+
|
+ +protected | +
Add a service to trigger a callback function with no input arguments.
+service_name | The name of the service |
callback | A service callback function with no arguments that returns a ComponentServiceResponse |
Definition at line 336 of file ComponentInterface.cpp.
+ +
+
|
+ +protected | +
Configure a static transform broadcaster.
+ +Definition at line 436 of file ComponentInterface.cpp.
+ +
+
|
+ +protected | +
Configure a transform broadcaster.
+ +Definition at line 425 of file ComponentInterface.cpp.
+ +
+
|
+ +protected | +
Configure a transform buffer and listener.
+ +Definition at line 449 of file ComponentInterface.cpp.
+ +
+
|
+ +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.
+trigger_name | The name of the trigger |
Definition at line 224 of file ComponentInterface.cpp.
+ +
+
|
+ +inlineprotected | +
Helper function to parse the signal name and add an unconfigured PublisherInterface to the map of outputs.
+DataT | Type of the data pointer |
signal_name | Name of the output signal |
data | Data to transmit on the output signal |
default_topic | If set, the default value for the topic name to use |
fixed_topic | If true, the topic name of the output signal is fixed |
publish_on_step | If true, the output is published periodically on step |
modulo_components::exceptions::AddSignalException | if the output could not be created (empty name, already registered) |
Definition at line 719 of file ComponentInterface.hpp.
+ +
+
|
+ +protected | +
Declare an input to create the topic parameter without adding it to the map of inputs yet.
+signal_name | The signal name of the input |
default_topic | If set, the default value for the topic name to use |
fixed_topic | If true, the topic name of the signal is fixed |
modulo_components::exceptions::AddSignalException | if the input could not be declared (empty name or already created) |
Definition at line 254 of file ComponentInterface.cpp.
+ +
+
|
+ +protected | +
Declare an output to create the topic parameter without adding it to the map of outputs yet.
+signal_name | The signal name of the output |
default_topic | If set, the default value for the topic name to use |
fixed_topic | If true, the topic name of the signal is fixed |
modulo_components::exceptions::AddSignalException | if the output could not be declared (empty name or already created) |
Definition at line 260 of file ComponentInterface.cpp.
+ +
+
|
+ +protected | +
Helper function to evaluate all periodic function callbacks.
+ +Definition at line 554 of file ComponentInterface.cpp.
+ +
+
|
+ +protected | +
Get a parameter by name.
+name | The name of the parameter |
modulo_components::exceptions::ComponentParameterException | if the parameter could not be found |
Definition at line 91 of file ComponentInterface.cpp.
+ +
+
|
+ +inlineprotected | +
Get a parameter value by name.
+T | The type of the parameter |
name | The name of the parameter |
modulo_components::exceptions::ComponentParameterException | if the parameter value could not be accessed |
Definition at line 585 of file ComponentInterface.hpp.
+ +
+
|
+ +protected | +
Get the logical value of a predicate.
+If the predicate is not found or the callable function fails, the return value is false.
predicate_name | the name of the predicate to retrieve from the map of predicates |
Definition at line 176 of file ComponentInterface.cpp.
+ +
+
|
+ +protected | +
Getter of the Quality of Service attribute.
+Definition at line 514 of file ComponentInterface.cpp.
+ +
+
|
+ +protected | +
Look up a transform from TF.
+frame | The desired frame of the transform |
reference_frame | The desired reference frame of the transform |
time_point | The time at which the value of the transform is desired |
duration | How long to block the lookup call before failing |
modulo_components::exceptions::LookupTransformException | if TF buffer/listener are unconfigured or if the lookupTransform call failed |
Definition at line 476 of file ComponentInterface.cpp.
+ +
+
|
+ +protected | +
Look up a transform from TF.
+frame | The desired frame of the transform |
reference_frame | The desired reference frame of the transform |
validity_period | The validity period of the latest transform from the time of lookup in seconds |
duration | How long to block the lookup call before failing |
modulo_components::exceptions::LookupTransformException | if TF buffer/listener are unconfigured, if the lookupTransform call failed, or if the transform is too old |
Definition at line 486 of file ComponentInterface.cpp.
+ +
+
|
+ +protectedvirtual | +
Steps to execute periodically. To be redefined by derived Component classes.
+ +Definition at line 45 of file ComponentInterface.cpp.
+ +
+
|
+ +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.
parameter | A ParameterInterface pointer to a Parameter instance |
Definition at line 150 of file ComponentInterface.cpp.
+ +
+
|
+ +protected | +
Trigger the publishing of an output.
+signal_name | The name of the output signal |
ComponentException | if the output is being published periodically or if the signal name could not be found |
Definition at line 300 of file ComponentInterface.cpp.
+ +
+
|
+ +protected | +
Helper function to publish all output signals.
+ +Definition at line 541 of file ComponentInterface.cpp.
+ +
+
|
+ +protected | +
Helper function to publish a predicate.
+name | The name of the predicate to publish |
Definition at line 527 of file ComponentInterface.cpp.
+ +
+
|
+ +protected | +
Helper function to publish all predicates.
+ +Definition at line 535 of file ComponentInterface.cpp.
+ +
+
|
+ +protectedvirtual | +
Put the component in error state by setting the 'in_error_state' predicate to true.
+ +Definition at line 522 of file ComponentInterface.cpp.
+ +
+
|
+ +protected | +
Remove an input from the map of inputs.
+signal_name | The name of the input |
Definition at line 316 of file ComponentInterface.cpp.
+ +
+
|
+ +protected | +
Remove an output from the map of outputs.
+signal_name | The name of the output |
Definition at line 326 of file ComponentInterface.cpp.
+ +
+
|
+ +protected | +
Send a static transform to TF.
+transform | The transform to send |
Definition at line 468 of file ComponentInterface.cpp.
+ +
+
|
+ +protected | +
Send a vector of static transforms to TF.
+transforms | The vector of transforms to send |
Definition at line 472 of file ComponentInterface.cpp.
+ +
+
|
+ +protected | +
Send a transform to TF.
+transform | The transform to send |
Definition at line 460 of file ComponentInterface.cpp.
+ +
+
|
+ +protected | +
Send a vector of transforms to TF.
+transforms | The vector of transforms to send |
Definition at line 464 of file ComponentInterface.cpp.
+ +
+
|
+ +inlineprotected | +
Set the value of a parameter.
+The parameter must have been previously declared. This method preserves the reference to the original Parameter instance
T | The type of the parameter |
name | The name of the parameter |
Definition at line 595 of file ComponentInterface.hpp.
+ +
+
|
+ +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.
predicate_name | the name of the predicate to retrieve from the map of predicates |
predicate_value | the new value of the predicate |
Definition at line 203 of file ComponentInterface.cpp.
+ +
+
|
+ +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.
predicate_name | the name of the predicate to retrieve from the map of predicates |
predicate_function | the function to call that returns the value of the predicate |
Definition at line 207 of file ComponentInterface.cpp.
+ +
+
|
+ +protected | +
Set the Quality of Service for ROS publishers and subscribers.
+qos | The desired Quality of Service |
Definition at line 518 of file ComponentInterface.cpp.
+ +
+
|
+ +protectedvirtual | +
Step function that is called periodically.
+ +Definition at line 43 of file ComponentInterface.cpp.
+ +
+
|
+ +protected | +
Latch the trigger with the provided name.
+trigger_name | The name of the trigger |
Definition at line 244 of file ComponentInterface.cpp.
+ +
+
|
+ +friend | +
Definition at line 58 of file ComponentInterface.hpp.
+ +
+
|
+ +protected | +
Map of inputs.
+ +Definition at line 441 of file ComponentInterface.hpp.
+ +
+
|
+ +protected | +
Map of outputs.
+ +Definition at line 442 of file ComponentInterface.hpp.
+ +
+
|
+ +protected | +
Map of outputs with periodic publishing flag.
+ +Definition at line 443 of file ComponentInterface.hpp.
+ +
+ Modulo 4.2.2
+
+ |
+
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::ComponentInterface | inlineprotected |
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::ComponentInterface | inlineprotected |
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::ComponentInterface | inlineprotected |
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::LifecycleComponent | inlineprotected |
add_parameter(const std::shared_ptr< state_representation::ParameterInterface > ¶meter, const std::string &description, bool read_only=false) | modulo_components::ComponentInterface | protected |
add_parameter(const std::string &name, const T &value, const std::string &description, bool read_only=false) | modulo_components::ComponentInterface | inlineprotected |
add_periodic_callback(const std::string &name, const std::function< void(void)> &callback) | modulo_components::ComponentInterface | protected |
add_predicate(const std::string &predicate_name, bool predicate_value) | modulo_components::ComponentInterface | protected |
add_predicate(const std::string &predicate_name, const std::function< bool(void)> &predicate_function) | modulo_components::ComponentInterface | protected |
add_service(const std::string &service_name, const std::function< ComponentServiceResponse(void)> &callback) | modulo_components::ComponentInterface | protected |
add_service(const std::string &service_name, const std::function< ComponentServiceResponse(const std::string &string)> &callback) | modulo_components::ComponentInterface | protected |
add_static_tf_broadcaster() | modulo_components::ComponentInterface | protected |
add_tf_broadcaster() | modulo_components::ComponentInterface | protected |
add_tf_listener() | modulo_components::ComponentInterface | protected |
add_trigger(const std::string &trigger_name) | modulo_components::ComponentInterface | protected |
ComponentInterface(const std::shared_ptr< rclcpp::node_interfaces::NodeInterfaces< ALL_RCLCPP_NODE_INTERFACES > > &interfaces) | modulo_components::ComponentInterface | explicitprotected |
declare_input(const std::string &signal_name, const std::string &default_topic="", bool fixed_topic=false) | modulo_components::ComponentInterface | protected |
declare_output(const std::string &signal_name, const std::string &default_topic="", bool fixed_topic=false) | modulo_components::ComponentInterface | protected |
get_parameter(const std::string &name) const | modulo_components::LifecycleComponent | protected |
get_parameter_value(const std::string &name) const | modulo_components::ComponentInterface | inlineprotected |
get_predicate(const std::string &predicate_name) | modulo_components::ComponentInterface | protected |
get_qos() const | modulo_components::ComponentInterface | protected |
LifecycleComponent(const rclcpp::NodeOptions &node_options, const std::string &fallback_name="LifecycleComponent") | modulo_components::LifecycleComponent | explicit |
LifecycleComponentPublicInterface (defined in modulo_components::LifecycleComponent) | modulo_components::LifecycleComponent | friend |
lookup_transform(const std::string &frame, const std::string &reference_frame, const tf2::TimePoint &time_point, const tf2::Duration &duration) | modulo_components::ComponentInterface | protected |
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::ComponentInterface | protected |
on_activate_callback() | modulo_components::LifecycleComponent | protectedvirtual |
on_cleanup_callback() | modulo_components::LifecycleComponent | protectedvirtual |
on_configure_callback() | modulo_components::LifecycleComponent | protectedvirtual |
on_deactivate_callback() | modulo_components::LifecycleComponent | protectedvirtual |
on_error_callback() | modulo_components::LifecycleComponent | protectedvirtual |
on_shutdown_callback() | modulo_components::LifecycleComponent | protectedvirtual |
on_step_callback() | modulo_components::ComponentInterface | protectedvirtual |
on_validate_parameter_callback(const std::shared_ptr< state_representation::ParameterInterface > ¶meter) | modulo_components::ComponentInterface | protectedvirtual |
publish_output(const std::string &signal_name) | modulo_components::ComponentInterface | protected |
raise_error() | modulo_components::ComponentInterface | protectedvirtual |
remove_input(const std::string &signal_name) | modulo_components::ComponentInterface | protected |
remove_output(const std::string &signal_name) | modulo_components::ComponentInterface | protected |
send_static_transform(const state_representation::CartesianPose &transform) | modulo_components::ComponentInterface | protected |
send_static_transforms(const std::vector< state_representation::CartesianPose > &transforms) | modulo_components::ComponentInterface | protected |
send_transform(const state_representation::CartesianPose &transform) | modulo_components::ComponentInterface | protected |
send_transforms(const std::vector< state_representation::CartesianPose > &transforms) | modulo_components::ComponentInterface | protected |
set_parameter_value(const std::string &name, const T &value) | modulo_components::ComponentInterface | inlineprotected |
set_predicate(const std::string &predicate_name, bool predicate_value) | modulo_components::ComponentInterface | protected |
set_predicate(const std::string &predicate_name, const std::function< bool(void)> &predicate_function) | modulo_components::ComponentInterface | protected |
set_qos(const rclcpp::QoS &qos) | modulo_components::ComponentInterface | protected |
trigger(const std::string &trigger_name) | modulo_components::ComponentInterface | protected |
~ComponentInterface()=default | modulo_components::ComponentInterface | virtual |
~LifecycleComponent()=default | modulo_components::LifecycleComponent | virtual |
+ Modulo 4.2.2
+
+ |
+
A wrapper for rclcpp_lifecycle::LifecycleNode to simplify application composition through unified component interfaces while supporting lifecycle states and transitions. + More...
+ +#include <LifecycleComponent.hpp>
+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 ()=default |
Virtual default destructor. | |
+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. | |
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. | |
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 > ¶meter, 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 > | |
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 > ¶meter) |
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) |
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 () |
Put the component in error state by setting the 'in_error_state' predicate to true. | |
void | publish_predicate (const std::string &name) |
Helper function to publish a predicate. | |
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. | |
+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, bool > | periodic_outputs_ |
Map of outputs with periodic publishing flag. | |
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.
+
+
|
+ +explicit | +
Constructor from node options.
+node_options | Node options as used in ROS2 LifecycleNode |
fallback_name | The name of the component if it was not provided through the node options |
Definition at line 10 of file LifecycleComponent.cpp.
+ +
+
|
+ +inlineprotected | +
Add an output signal of the component.
+DataT | Type of the data pointer |
signal_name | Name of the output signal |
data | Data to transmit on the output signal |
default_topic | If set, the default value for the topic name to use |
fixed_topic | If true, the topic name of the output signal is fixed |
publish_on_step | If true, the output is published periodically on step |
Definition at line 277 of file LifecycleComponent.hpp.
+ +
+
|
+ +protected | +
Get a parameter by name.
+name | The name of the parameter |
modulo_components::exceptions::ComponentParameterException | if the parameter could not be found |
Definition at line 38 of file LifecycleComponent.cpp.
+ +
+
|
+ +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.
Definition at line 132 of file LifecycleComponent.cpp.
+ +
+
|
+ +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.
Definition at line 103 of file LifecycleComponent.cpp.
+ +
+
|
+ +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.
Definition at line 82 of file LifecycleComponent.cpp.
+ +
+
|
+ +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.
Definition at line 154 of file LifecycleComponent.cpp.
+ +
+
|
+ +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.
Definition at line 225 of file LifecycleComponent.cpp.
+ +
+
|
+ +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.
Definition at line 198 of file LifecycleComponent.cpp.
+ +Definition at line 31 of file LifecycleComponent.hpp.
+ +
+ Modulo 4.2.2
+
+ |
+
This is the complete list of members for modulo_components::exceptions::AddServiceException, including all inherited members.
+AddServiceException(const std::string &msg) (defined in modulo_components::exceptions::AddServiceException) | modulo_components::exceptions::AddServiceException | inlineexplicit |
ComponentException(const std::string &msg) (defined in modulo_components::exceptions::ComponentException) | modulo_components::exceptions::ComponentException | inlineexplicit |
ComponentException(const std::string &prefix, const std::string &msg) (defined in modulo_components::exceptions::ComponentException) | modulo_components::exceptions::ComponentException | inlineprotected |
+ Modulo 4.2.2
+
+ |
+
An exception class to notify errors when adding a service. + More...
+ +#include <AddServiceException.hpp>
+Public Member Functions | |
AddServiceException (const std::string &msg) | |
Public Member Functions inherited from modulo_components::exceptions::ComponentException | |
ComponentException (const std::string &msg) | |
+Additional Inherited Members | |
Protected Member Functions inherited from modulo_components::exceptions::ComponentException | |
ComponentException (const std::string &prefix, const std::string &msg) | |
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 the component.
+ +Definition at line 12 of file AddServiceException.hpp.
+
+
|
+ +inlineexplicit | +
Definition at line 14 of file AddServiceException.hpp.
+ +
+ Modulo 4.2.2
+
+ |
+
This is the complete list of members for modulo_components::exceptions::AddSignalException, including all inherited members.
+AddSignalException(const std::string &msg) (defined in modulo_components::exceptions::AddSignalException) | modulo_components::exceptions::AddSignalException | inlineexplicit |
ComponentException(const std::string &msg) (defined in modulo_components::exceptions::ComponentException) | modulo_components::exceptions::ComponentException | inlineexplicit |
ComponentException(const std::string &prefix, const std::string &msg) (defined in modulo_components::exceptions::ComponentException) | modulo_components::exceptions::ComponentException | inlineprotected |
+ Modulo 4.2.2
+
+ |
+
An exception class to notify errors when adding a signal. + More...
+ +#include <AddSignalException.hpp>
+Public Member Functions | |
AddSignalException (const std::string &msg) | |
Public Member Functions inherited from modulo_components::exceptions::ComponentException | |
ComponentException (const std::string &msg) | |
+Additional Inherited Members | |
Protected Member Functions inherited from modulo_components::exceptions::ComponentException | |
ComponentException (const std::string &prefix, const std::string &msg) | |
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 the component.
+ +Definition at line 12 of file AddSignalException.hpp.
+
+
|
+ +inlineexplicit | +
Definition at line 14 of file AddSignalException.hpp.
+ +
+ Modulo 4.2.2
+
+ |
+
This is the complete list of members for modulo_components::exceptions::ComponentException, including all inherited members.
+ComponentException(const std::string &msg) (defined in modulo_components::exceptions::ComponentException) | modulo_components::exceptions::ComponentException | inlineexplicit |
ComponentException(const std::string &prefix, const std::string &msg) (defined in modulo_components::exceptions::ComponentException) | modulo_components::exceptions::ComponentException | inlineprotected |
+ Modulo 4.2.2
+
+ |
+
A base class for all component exceptions. + More...
+ +#include <ComponentException.hpp>
+Public Member Functions | |
ComponentException (const std::string &msg) | |
+Protected Member Functions | |
ComponentException (const std::string &prefix, const std::string &msg) | |
A base class for all component exceptions.
+This inherits from std::runtime_exception.
+ +Definition at line 17 of file ComponentException.hpp.
+
+
|
+ +inlineexplicit | +
Definition at line 19 of file ComponentException.hpp.
+ +
+
|
+ +inlineprotected | +
Definition at line 21 of file ComponentException.hpp.
+ +
+ Modulo 4.2.2
+
+ |
+
This is the complete list of members for modulo_components::exceptions::ComponentParameterException, including all inherited members.
+ComponentException(const std::string &msg) (defined in modulo_components::exceptions::ComponentException) | modulo_components::exceptions::ComponentException | inlineexplicit |
ComponentException(const std::string &prefix, const std::string &msg) (defined in modulo_components::exceptions::ComponentException) | modulo_components::exceptions::ComponentException | inlineprotected |
ComponentParameterException(const std::string &msg) (defined in modulo_components::exceptions::ComponentParameterException) | modulo_components::exceptions::ComponentParameterException | inlineexplicit |
+ Modulo 4.2.2
+
+ |
+
An exception class to notify errors with component parameters. + More...
+ +#include <ComponentParameterException.hpp>
+Public Member Functions | |
ComponentParameterException (const std::string &msg) | |
Public Member Functions inherited from modulo_components::exceptions::ComponentException | |
ComponentException (const std::string &msg) | |
+Additional Inherited Members | |
Protected Member Functions inherited from modulo_components::exceptions::ComponentException | |
ComponentException (const std::string &prefix, const std::string &msg) | |
An exception class to notify errors with component parameters.
+This is an exception class to be thrown if there is a problem with component parameters (overriding, inconsistent types, undeclared, ...).
+ +Definition at line 13 of file ComponentParameterException.hpp.
+
+
|
+ +inlineexplicit | +
Definition at line 15 of file ComponentParameterException.hpp.
+ +
+ Modulo 4.2.2
+
+ |
+
This is the complete list of members for modulo_components::exceptions::LookupTransformException, including all inherited members.
+ComponentException(const std::string &msg) (defined in modulo_components::exceptions::ComponentException) | modulo_components::exceptions::ComponentException | inlineexplicit |
ComponentException(const std::string &prefix, const std::string &msg) (defined in modulo_components::exceptions::ComponentException) | modulo_components::exceptions::ComponentException | inlineprotected |
LookupTransformException(const std::string &msg) (defined in modulo_components::exceptions::LookupTransformException) | modulo_components::exceptions::LookupTransformException | inlineexplicit |
+ Modulo 4.2.2
+
+ |
+
An exception class to notify an error while looking up TF transforms. + More...
+ +#include <LookupTransformException.hpp>
+Public Member Functions | |
LookupTransformException (const std::string &msg) | |
Public Member Functions inherited from modulo_components::exceptions::ComponentException | |
ComponentException (const std::string &msg) | |
+Additional Inherited Members | |
Protected Member Functions inherited from modulo_components::exceptions::ComponentException | |
ComponentException (const std::string &prefix, const std::string &msg) | |
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 13 of file LookupTransformException.hpp.
+
+
|
+ +inlineexplicit | +
Definition at line 15 of file LookupTransformException.hpp.
+ +
+ Modulo 4.2.2
+
+ |
+
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::ControllerInterface | protected |
add_input(const std::string &name, const std::string &topic_name="") | modulo_controllers::ControllerInterface | inlineprotected |
add_input(const std::string &name, const std::string &topic_name) (defined in modulo_controllers::ControllerInterface) | modulo_controllers::ControllerInterface | inlineprotected |
add_input(const std::string &name, const std::string &topic_name) (defined in modulo_controllers::ControllerInterface) | modulo_controllers::ControllerInterface | inlineprotected |
add_input(const std::string &name, const std::string &topic_name) (defined in modulo_controllers::ControllerInterface) | modulo_controllers::ControllerInterface | inlineprotected |
add_output(const std::string &name, const std::string &topic_name="") | modulo_controllers::ControllerInterface | inlineprotected |
add_output(const std::string &name, const std::string &topic_name) (defined in modulo_controllers::ControllerInterface) | modulo_controllers::ControllerInterface | inlineprotected |
add_output(const std::string &name, const std::string &topic_name) (defined in modulo_controllers::ControllerInterface) | modulo_controllers::ControllerInterface | inlineprotected |
add_output(const std::string &name, const std::string &topic_name) (defined in modulo_controllers::ControllerInterface) | modulo_controllers::ControllerInterface | inlineprotected |
add_parameter(const std::shared_ptr< state_representation::ParameterInterface > ¶meter, const std::string &description, bool read_only=false) | modulo_controllers::ControllerInterface | protected |
add_parameter(const std::string &name, const T &value, const std::string &description, bool read_only=false) | modulo_controllers::ControllerInterface | inlineprotected |
add_predicate(const std::string &predicate_name, bool predicate_value) | modulo_controllers::ControllerInterface | protected |
add_predicate(const std::string &predicate_name, const std::function< bool(void)> &predicate_function) | modulo_controllers::ControllerInterface | protected |
add_service(const std::string &service_name, const std::function< ControllerServiceResponse(void)> &callback) | modulo_controllers::ControllerInterface | protected |
add_service(const std::string &service_name, const std::function< ControllerServiceResponse(const std::string &string)> &callback) | modulo_controllers::ControllerInterface | protected |
add_state_interface(const std::string &name, const std::string &interface) | modulo_controllers::ControllerInterface | protected |
add_trigger(const std::string &trigger_name) | modulo_controllers::ControllerInterface | protected |
command_interface_configuration() const final | modulo_controllers::ControllerInterface | |
ControllerInterface(bool claim_all_state_interfaces=false) | modulo_controllers::ControllerInterface | |
evaluate(const rclcpp::Time &time, const std::chrono::nanoseconds &period)=0 | modulo_controllers::ControllerInterface | protectedpure virtual |
get_command_interface(const std::string &name, const std::string &interface) const | modulo_controllers::ControllerInterface | protected |
get_parameter(const std::string &name) const | modulo_controllers::ControllerInterface | protected |
get_parameter_value(const std::string &name) const | modulo_controllers::ControllerInterface | inlineprotected |
get_predicate(const std::string &predicate_name) const | modulo_controllers::ControllerInterface | protected |
get_qos() const | modulo_controllers::ControllerInterface | protected |
get_state_interface(const std::string &name, const std::string &interface) const | modulo_controllers::ControllerInterface | protected |
get_state_interfaces(const std::string &name) const | modulo_controllers::ControllerInterface | protected |
hardware_name_ | modulo_controllers::ControllerInterface | protected |
is_active() const | modulo_controllers::ControllerInterface | protected |
on_activate(const rclcpp_lifecycle::State &previous_state) final | modulo_controllers::ControllerInterface | |
on_activate() | modulo_controllers::ControllerInterface | protectedvirtual |
on_configure(const rclcpp_lifecycle::State &previous_state) final | modulo_controllers::ControllerInterface | |
on_configure() | modulo_controllers::ControllerInterface | protectedvirtual |
on_deactivate(const rclcpp_lifecycle::State &previous_state) final | modulo_controllers::ControllerInterface | |
on_deactivate() | modulo_controllers::ControllerInterface | protectedvirtual |
on_init() override | modulo_controllers::ControllerInterface | |
on_validate_parameter_callback(const std::shared_ptr< state_representation::ParameterInterface > ¶meter) | modulo_controllers::ControllerInterface | protectedvirtual |
read_input(const std::string &name) | modulo_controllers::ControllerInterface | inlineprotected |
read_input(const std::string &name) (defined in modulo_controllers::ControllerInterface) | modulo_controllers::ControllerInterface | inlineprotected |
read_input(const std::string &name) (defined in modulo_controllers::ControllerInterface) | modulo_controllers::ControllerInterface | inlineprotected |
read_input(const std::string &name) (defined in modulo_controllers::ControllerInterface) | modulo_controllers::ControllerInterface | inlineprotected |
read_state_interfaces() | modulo_controllers::ControllerInterface | protectedvirtual |
set_command_interface(const std::string &name, const std::string &interface, double value) | modulo_controllers::ControllerInterface | protected |
set_parameter_value(const std::string &name, const T &value) | modulo_controllers::ControllerInterface | inlineprotected |
set_predicate(const std::string &predicate_name, bool predicate_value) | modulo_controllers::ControllerInterface | protected |
set_predicate(const std::string &predicate_name, const std::function< bool(void)> &predicate_function) | modulo_controllers::ControllerInterface | protected |
set_qos(const rclcpp::QoS &qos) | modulo_controllers::ControllerInterface | protected |
state_interface_configuration() const final | modulo_controllers::ControllerInterface | |
trigger(const std::string &trigger_name) | modulo_controllers::ControllerInterface | protected |
update(const rclcpp::Time &time, const rclcpp::Duration &period) final | modulo_controllers::ControllerInterface | |
write_command_interfaces(const rclcpp::Duration &period) | modulo_controllers::ControllerInterface | protectedvirtual |
write_output(const std::string &name, const T &data) | modulo_controllers::ControllerInterface | inlineprotected |
write_output(const std::string &name, const bool &data) (defined in modulo_controllers::ControllerInterface) | modulo_controllers::ControllerInterface | inline |
write_output(const std::string &name, const double &data) (defined in modulo_controllers::ControllerInterface) | modulo_controllers::ControllerInterface | inline |
write_output(const std::string &name, const std::vector< double > &data) (defined in modulo_controllers::ControllerInterface) | modulo_controllers::ControllerInterface | inline |
write_output(const std::string &name, const int &data) (defined in modulo_controllers::ControllerInterface) | modulo_controllers::ControllerInterface | inline |
write_output(const std::string &name, const std::string &data) (defined in modulo_controllers::ControllerInterface) | modulo_controllers::ControllerInterface | inline |
+ Modulo 4.2.2
+
+ |
+
Base controller class to combine ros2_control, control libraries and modulo. + More...
+ +#include <ControllerInterface.hpp>
+Public Member Functions | |
ControllerInterface (bool claim_all_state_interfaces=false) | |
Default constructor. | |
CallbackReturn | on_init () override |
Declare parameters and register the on_set_parameters callback. | |
CallbackReturn | on_configure (const rclcpp_lifecycle::State &previous_state) final |
Set class properties from parameters and add signals. | |
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. | |
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 | 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, 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. | |
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. | |
void | add_parameter (const std::shared_ptr< state_representation::ParameterInterface > ¶meter, 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 > ¶meter) |
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 > | |
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. | |
template<typename T > | |
std::optional< T > | read_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. | |
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< bool > | read_input (const std::string &name) |
template<> | |
std::optional< double > | read_input (const std::string &name) |
template<> | |
std::optional< int > | read_input (const std::string &name) |
+Protected Attributes | |
std::string | hardware_name_ |
The hardware name provided by a parameter. | |
Base controller class to combine ros2_control, control libraries and modulo.
+ +Definition at line 98 of file ControllerInterface.hpp.
+modulo_controllers::ControllerInterface::ControllerInterface | +( | +bool | +claim_all_state_interfaces = false | ) | ++ |
Default constructor.
+claim_all_state_interfaces | Flag to indicate if all state interfaces should be claimed |
Definition at line 21 of file ControllerInterface.cpp.
+ +
+
|
+ +protected | +
Add a command interface to the controller by name.
+name | The name of the parent tag, e.g. the name of the joint, sensor or gpio |
interface | The desired command interface |
Definition at line 99 of file ControllerInterface.cpp.
+ +
+
|
+ +inlineprotected | +
Definition at line 666 of file ControllerInterface.hpp.
+ +
+
|
+ +inlineprotected | +
Definition at line 673 of file ControllerInterface.hpp.
+ +
+
|
+ +inlineprotected | +
Definition at line 688 of file ControllerInterface.hpp.
+ +
+
|
+ +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.
T | The type of the input data |
name | The name of the input |
topic_name | The topic name of the input (defaults to ~/name) |
Definition at line 657 of file ControllerInterface.hpp.
+ +
+
|
+ +inlineprotected | +
Definition at line 717 of file ControllerInterface.hpp.
+ +
+
|
+ +inlineprotected | +
Definition at line 722 of file ControllerInterface.hpp.
+ +
+
|
+ +inlineprotected | +
Definition at line 733 of file ControllerInterface.hpp.
+ +
+
|
+ +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.
T | The type of the output data |
name | The name of the output |
topic_name | The topic name of the output (defaults to ~/name) |
Definition at line 711 of file ControllerInterface.hpp.
+ +
+
|
+ +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.
parameter | A ParameterInterface pointer to a Parameter instance |
description | The description of the parameter |
read_only | If true, the value of the parameter cannot be changed after declaration |
+
|
+ +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.
T | The type of the parameter |
name | The name of the parameter |
value | The value of the parameter |
description | The description of the parameter |
read_only | If true, the value of the parameter cannot be changed after declaration |
Definition at line 622 of file ControllerInterface.hpp.
+ +
+
|
+ +protected | +
Add a predicate to the map of predicates.
+predicate_name | the name of the associated predicate |
predicate_value | the boolean value of the predicate |
Definition at line 383 of file ControllerInterface.cpp.
+ +
+
|
+ +protected | +
Add a predicate to the map of predicates based on a function to periodically call.
+predicate_name | the name of the associated predicate |
predicate_function | the function to call that returns the value of the predicate |
Definition at line 387 of file ControllerInterface.cpp.
+ +
+
|
+ +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.
service_name | The name of the service |
callback | A service callback function with a string argument that returns a ControllerServiceResponse |
Definition at line 709 of file ControllerInterface.cpp.
+ +
+
|
+ +protected | +
Add a service to trigger a callback function with no input arguments.
+service_name | The name of the service |
callback | A service callback function with no arguments that returns a ControllerServiceResponse |
Definition at line 676 of file ControllerInterface.cpp.
+ +
+
|
+ +protected | +
Add a state interface to the controller by name.
+name | The name of the parent tag, e.g. the name of the joint, sensor or gpio |
interface | The desired state interface |
Definition at line 95 of file ControllerInterface.cpp.
+ +
+
|
+ +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.
trigger_name | The name of the trigger |
Definition at line 451 of file ControllerInterface.cpp.
+ +
+
|
+ +final | +
Configure the command interfaces.
+Definition at line 121 of file ControllerInterface.cpp.
+ +
+
|
+ +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.
time | The controller clock time |
period | Time elapsed since the last control evaluation |
+
|
+ +protected | +
Get the value of a command interface by name.
+name | The name of the parent tag, e.g. the name of the joint, sensor or gpio |
interface | The desired command interface |
out_of_range | if the desired command interface is not available |
Definition at line 283 of file ControllerInterface.cpp.
+ +
+
|
+ +protected | +
Get a parameter by name.
+name | The name of the parameter |
Definition at line 332 of file ControllerInterface.cpp.
+ +
+
|
+ +inlineprotected | +
Get a parameter value by name.
+T | The type of the parameter |
name | The name of the parameter |
Definition at line 632 of file ControllerInterface.hpp.
+ +
+
|
+ +protected | +
Get the logical value of a predicate.
+If the predicate is not found or the callable function fails, the return value is false.
predicate_name | the name of the predicate to retrieve from the map of predicates |
Definition at line 404 of file ControllerInterface.cpp.
+ +
+
|
+ +protected | +
Getter of the Quality of Service attribute.
+Definition at line 743 of file ControllerInterface.cpp.
+ +
+
|
+ +protected | +
Get the value of a state interface by name.
+name | The name of the parent tag, e.g. the name of the joint, sensor or gpio |
interface | The desired state interface |
out_of_range | if the desired state interface is not available |
Definition at line 279 of file ControllerInterface.cpp.
+ +
+
|
+ +protected | +
Get a map containing the state interfaces by name of the parent tag.
+name | The name of the parent tag, e.g. the name of the joint, sensor or gpio |
out_of_range | if the desired state interface is not available |
Definition at line 275 of file ControllerInterface.cpp.
+ +
+
|
+ +protected | +
Check if the controller is currently in state active or not.
+Definition at line 751 of file ControllerInterface.cpp.
+ +
+
|
+ +protectedvirtual | +
Activate the controller.
+This method should be overridden by derived classes.
Reimplemented in modulo_controllers::RobotControllerInterface.
+ +Definition at line 204 of file ControllerInterface.cpp.
+ +
+
|
+ +final | +
Initialize internal data attributes from configured interfaces and wait for valid states from hardware.
+This functions calls the internal on_activate() method
previous_state | The previous lifecycle state |
Definition at line 156 of file ControllerInterface.cpp.
+ +
+
|
+ +protectedvirtual | +
Configure the controller.
+This method should be overridden by derived classes.
Reimplemented in modulo_controllers::RobotControllerInterface.
+ +Definition at line 91 of file ControllerInterface.cpp.
+ +
+
|
+ +final | +
Set class properties from parameters and add signals.
+This functions calls the internal on_configure() method
previous_state | The previous lifecycle state |
Definition at line 56 of file ControllerInterface.cpp.
+ +
+
|
+ +protectedvirtual | +
Deactivate the controller.
+This method should be overridden by derived classes.
Definition at line 213 of file ControllerInterface.cpp.
+ +
+
|
+ +final | +
Deactivate the controller.
+previous_state | The previous lifecycle state |
Definition at line 209 of file ControllerInterface.cpp.
+ +
+
|
+ +override | +
Declare parameters and register the on_set_parameters callback.
+Definition at line 27 of file ControllerInterface.cpp.
+ +
+
|
+ +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.
parameter | A ParameterInterface pointer to a Parameter instance |
Reimplemented in modulo_controllers::RobotControllerInterface.
+ +Definition at line 379 of file ControllerInterface.cpp.
+ +
+
|
+ +inlineprotected | +
Read the most recent message of an input.
+T | The expected type of the input data |
name | The name of the input |
Definition at line 743 of file ControllerInterface.hpp.
+ +
+
|
+ +inlineprotected | +
Definition at line 743 of file ControllerInterface.hpp.
+ +
+
|
+ +inlineprotected | +
Definition at line 743 of file ControllerInterface.hpp.
+ +
+
|
+ +inlineprotected | +
Definition at line 743 of file ControllerInterface.hpp.
+ +
+
|
+ +protectedvirtual | +
Read the state interfaces.
+Definition at line 258 of file ControllerInterface.cpp.
+ +
+
|
+ +protected | +
Set the value of a command interface by name.
+name | The name of the parent tag, e.g. the name of the sensor or gpio |
interface | The name of the command interface |
value | The new value of the interface |
Definition at line 287 of file ControllerInterface.cpp.
+ +
+
|
+ +inlineprotected | +
Set the value of a parameter.
+The parameter must have been previously declared. This method preserves the reference to the original Parameter instance
T | The type of the parameter |
name | The name of the parameter |
Definition at line 637 of file ControllerInterface.hpp.
+ +
+
|
+ +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.
predicate_name | the name of the predicate to retrieve from the map of predicates |
predicate_value | the new value of the predicate |
Definition at line 431 of file ControllerInterface.cpp.
+ +
+
|
+ +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.
predicate_name | the name of the predicate to retrieve from the map of predicates |
predicate_function | the function to call that returns the value of the predicate |
Definition at line 435 of file ControllerInterface.cpp.
+ +
+
|
+ +protected | +
Set the Quality of Service for ROS publishers and subscribers.
+qos | The desired Quality of Service |
Definition at line 747 of file ControllerInterface.cpp.
+ +
+
|
+ +final | +
Configure the state interfaces.
+Definition at line 138 of file ControllerInterface.cpp.
+ +
+
|
+ +protected | +
Latch the trigger with the provided name.
+trigger_name | The name of the trigger |
Definition at line 470 of file ControllerInterface.cpp.
+ +
+
|
+ +final | +
Read the state interfaces, perform control evaluation and write the command interfaces.
+time | The controller clock time |
period | Time elapsed since the last control evaluation |
Definition at line 218 of file ControllerInterface.cpp.
+ +
+
|
+ +protectedvirtual | +
Write the command interfaces.
+period | Time elapsed since the last control evaluation |
Definition at line 267 of file ControllerInterface.cpp.
+ +
+
|
+ +inline | +
Definition at line 897 of file ControllerInterface.hpp.
+ +
+
|
+ +inline | +
Definition at line 902 of file ControllerInterface.hpp.
+ +
+
|
+ +inline | +
Definition at line 912 of file ControllerInterface.hpp.
+ +
+
|
+ +inline | +
Definition at line 917 of file ControllerInterface.hpp.
+ +
+
|
+ +inline | +
Definition at line 907 of file ControllerInterface.hpp.
+ +
+
|
+ +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.
T | The type of the the object to publish |
name | The name of the output |
state | The object to publish |
Definition at line 831 of file ControllerInterface.hpp.
+ +
+
|
+ +protected | +
The hardware name provided by a parameter.
+ +Definition at line 448 of file ControllerInterface.hpp.
+ +
+ Modulo 4.2.2
+
+ |
+
This is the complete list of members for modulo_controllers::RobotControllerInterface, including all inherited members.
+
+ Modulo 4.2.2
+
+ |
+
Base controller class that automatically associates joints with a JointState object. + More...
+ +#include <RobotControllerInterface.hpp>
+Public Member Functions | |
RobotControllerInterface () | |
Default constructor. | |
RobotControllerInterface (bool robot_model_required, const std::string &control_type="") | |
Constructor with robot model flag and a control type to determine the command interfaces to claim. | |
CallbackReturn | on_init () override |
Declare parameters and register the on_set_parameters callback. | |
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 and register the on_set_parameters callback. | |
CallbackReturn | on_configure (const rclcpp_lifecycle::State &previous_state) final |
Set class properties from parameters and add signals. | |
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. | |
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 > ¶meter) 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, 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. | |
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. | |
void | add_parameter (const std::shared_ptr< state_representation::ParameterInterface > ¶meter, 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 > | |
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. | |
template<typename T > | |
std::optional< T > | read_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. | |
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< bool > | read_input (const std::string &name) |
template<> | |
std::optional< double > | read_input (const std::string &name) |
template<> | |
std::optional< int > | read_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. | |
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.
+modulo_controllers::RobotControllerInterface::RobotControllerInterface | +( | +) | ++ |
Default constructor.
+ +Definition at line 17 of file RobotControllerInterface.cpp.
+ +
+
|
+ +explicit | +
Constructor with robot model flag and a control type to determine the command interfaces to claim.
+robot_model_required | Flag to indicate if a robot model is required for the controller |
control_type | One of [position, velocity, effort or acceleration] |
Definition at line 19 of file RobotControllerInterface.cpp.
+ +
+
|
+ +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.
+ +
+
|
+ +protected | +
Access the Cartesian state object.
+This internally calls compute_cartesian_state()
Definition at line 292 of file RobotControllerInterface.cpp.
+ +
+
|
+ +protected | +
Access the Cartesian wrench object.
+Definition at line 298 of file RobotControllerInterface.cpp.
+ +
+
|
+ +protected | +
Access the joint state object.
+Definition at line 288 of file RobotControllerInterface.cpp.
+ +
+
|
+ +overridevirtual | +
Activate the controller.
+This method should be overridden by derived classes.
Initialize a fore torque sensor if applicable
+ +Reimplemented from modulo_controllers::ControllerInterface.
+ +Definition at line 176 of file RobotControllerInterface.cpp.
+ +
+
|
+ +overridevirtual | +
Configure the controller.
+This method should be overridden by derived classes.
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 66 of file RobotControllerInterface.cpp.
+ +
+
|
+ +override | +
Declare parameters and register the on_set_parameters callback.
+Declare additional parameters.
+ +Definition at line 32 of file RobotControllerInterface.cpp.
+ +
+
|
+ +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.
parameter | A ParameterInterface pointer to a Parameter instance |
Reimplemented from modulo_controllers::ControllerInterface.
+ +Definition at line 356 of file RobotControllerInterface.cpp.
+ +
+
|
+ +protected | +
Set the joint command object.
+joint_command | A JointState command object |
Definition at line 314 of file RobotControllerInterface.cpp.
+ +
+
|
+ +protected | +
The name of a force torque sensor in the hardware description.
+ +Definition at line 98 of file RobotControllerInterface.hpp.
+ +
+
|
+ +protected | +
The sensing reference frame.
+ +Definition at line 99 of file RobotControllerInterface.hpp.
+ +
+
|
+ +protected | +
Robot model object generated from URDF.
+ +Definition at line 95 of file RobotControllerInterface.hpp.
+ +
+
|
+ +protected | +
The frame in task space for forward kinematics calculations, if applicable.
+ +Definition at line 96 of file RobotControllerInterface.hpp.
+ +
+ Modulo 4.2.2
+
+ |
+
This is the complete list of members for modulo_core::communication::MessagePair< MsgT, DataT >, including all inherited members.
+
+ Modulo 4.2.2
+
+ |
+
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>
+Public Member Functions | |
MessagePair (std::shared_ptr< DataT > data, std::shared_ptr< rclcpp::Clock > clock) | |
Constructor of the MessagePair. | |
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. | |
EncodedState | write_message () const |
void | read_message (const EncodedState &message) |
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) | |
The MessagePair stores a pointer to a variable and translates the value of this pointer back and forth between the corresponding ROS messages.
+MsgT | ROS message type of the MessagePair |
DataT | Data type corresponding to the ROS message type |
Definition at line 20 of file MessagePair.hpp.
+modulo_core::communication::MessagePair< MsgT, DataT >::MessagePair | +( | +std::shared_ptr< DataT > | +data, | +
+ | + | std::shared_ptr< rclcpp::Clock > | +clock | +
+ | ) | ++ |
Constructor of the MessagePair.
+data | The pointer referring to the data stored in the MessagePair |
clock | The ROS clock for translating messages |
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.
+ +modulo_core::communication::MessagePair< std_msgs::msg::Float64, double >::MessagePair | +( | +std::shared_ptr< double > | +data, | +
+ | + | std::shared_ptr< rclcpp::Clock > | +clock | +
+ | ) | ++ |
Definition at line 14 of file MessagePair.cpp.
+ +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 20 of file MessagePair.cpp.
+ +modulo_core::communication::MessagePair< std_msgs::msg::Int32, int >::MessagePair | +( | +std::shared_ptr< int > | +data, | +
+ | + | std::shared_ptr< rclcpp::Clock > | +clock | +
+ | ) | ++ |
Definition at line 26 of file MessagePair.cpp.
+ +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 32 of file MessagePair.cpp.
+ +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 38 of file MessagePair.cpp.
+ +
+
|
+ +inline | +
Get the data pointer.
+ +Definition at line 98 of file MessagePair.hpp.
+ +
+
|
+ +inline | +
Definition at line 90 of file MessagePair.hpp.
+ +
+
|
+ +inline | +
Read a ROS message and store the value in the data pointer.
+message | The ROS message to read |
modulo_core::exceptions::NullPointerException | if the data pointer is null |
modulo_core::exceptions::MessageTranslationException | if the message could not be read |
Definition at line 82 of file MessagePair.hpp.
+ +
+
|
+ +inline | +
Set the data pointer.
+modulo_core::exceptions::NullPointerException | if the provided data pointer is null |
Definition at line 103 of file MessagePair.hpp.
+ +
+
|
+ +inline | +
Write the value of the data pointer to a ROS message.
+modulo_core::exceptions::NullPointerException | if the data pointer is null |
modulo_core::exceptions::MessageTranslationException | if the data could not be written to message |
Definition at line 62 of file MessagePair.hpp.
+ +
+
|
+ +inline | +
Definition at line 72 of file MessagePair.hpp.
+ +
+ Modulo 4.2.2
+
+ |
+
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::MessagePairInterface | inline |
get_type() const | modulo_core::communication::MessagePairInterface | |
MessagePairInterface(MessageType type) | modulo_core::communication::MessagePairInterface | explicit |
MessagePairInterface(const MessagePairInterface &message_pair)=default | modulo_core::communication::MessagePairInterface | |
read(const MsgT &message) | modulo_core::communication::MessagePairInterface | inline |
write() | modulo_core::communication::MessagePairInterface | inline |
~MessagePairInterface()=default | modulo_core::communication::MessagePairInterface | virtual |
+ Modulo 4.2.2
+
+ |
+
Interface class to enable non-templated writing and reading ROS messages from derived MessagePair instances through dynamic down-casting. + More...
+ +#include <MessagePairInterface.hpp>
+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. | |
Interface class to enable non-templated writing and reading ROS messages from derived MessagePair instances through dynamic down-casting.
+ +Definition at line 20 of file MessagePairInterface.hpp.
+
+
|
+ +explicit | +
Constructor with the message type.
+type | The message type of the message pair |
Definition at line 5 of file MessagePairInterface.cpp.
+ +
+
|
+ +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.
MsgT | The ROS message type of the MessagePair |
DataT | The data type of the MessagePair |
validate_pointer | If true, throw an exception when down-casting fails |
modulo_core::exceptions::InvalidPointerException | if the base MessagePairInterface object has no reference count and validate_pointer is set to true |
modulo_core::exceptions::InvalidPointerCastException | if the derived object from the dynamic down-casting is not a correctly typed instance of a MessagePair |
Definition at line 94 of file MessagePairInterface.hpp.
+ +MessageType modulo_core::communication::MessagePairInterface::get_type | +( | +) | +const | +
Get the MessageType of the MessagePairInterface.
+Definition at line 7 of file MessagePairInterface.cpp.
+ +
+
|
+ +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.
MsgT | The ROS message type of the MessagePair |
DataT | The data type of the MessagePair |
message | The ROS message to read from |
Definition at line 116 of file MessagePairInterface.hpp.
+ +
+
|
+ +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.
+MsgT | The ROS message type of the MessagePair |
DataT | The data type of the MessagePair |
Definition at line 111 of file MessagePairInterface.hpp.
+ +
+ Modulo 4.2.2
+
+ |
+
This is the complete list of members for modulo_core::communication::PublisherHandler< PubT, MsgT >, including all inherited members.
+
+ Modulo 4.2.2
+
+ |
+
The PublisherHandler handles different types of ROS publishers to activate, deactivate and publish data with those publishers. + More...
+ +#include <PublisherHandler.hpp>
+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. | |
void | on_activate () |
Activate the ROS publisher if applicable. | |
void | on_deactivate () |
Deactivate the ROS publisher if applicable. | |
void | publish (const MsgT &message) const |
Publish the ROS message through the ROS publisher. | |
std::shared_ptr< PublisherInterface > | create_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. | |
void | activate () |
Activate ROS publisher of a derived PublisherHandler instance through the PublisherInterface pointer. | |
void | deactivate () |
Deactivate ROS publisher of a derived PublisherHandler instance through the PublisherInterface pointer. | |
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< MessagePairInterface > | get_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. | |
The PublisherHandler handles different types of ROS publishers to activate, deactivate and publish data with those publishers.
+PubT | The ROS publisher type |
MsgT | The ROS message type of the ROS publisher |
Definition at line 18 of file PublisherHandler.hpp.
+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.
+type | The publisher type |
publisher | The pointer to the ROS publisher |
Definition at line 63 of file PublisherHandler.hpp.
+ +
+
|
+ +override | +
Destructor to explicitly reset the publisher pointer.
+ +Definition at line 67 of file PublisherHandler.hpp.
+ +std::shared_ptr< PublisherInterface > modulo_core::communication::PublisherHandler< PubT, MsgT >::create_publisher_interface | +( | +const std::shared_ptr< MessagePairInterface > & | +message_pair | ) | ++ |
Create a PublisherInterface instance from the current PublisherHandler.
+message_pair | The message pair of the PublisherInterface |
Definition at line 116 of file PublisherHandler.hpp.
+ +void modulo_core::communication::PublisherHandler< PubT, MsgT >::on_activate | +( | +) | ++ |
Activate the ROS publisher if applicable.
+modulo_core::exceptions::NullPointerException | if the publisher pointer is null |
Definition at line 72 of file PublisherHandler.hpp.
+ +void modulo_core::communication::PublisherHandler< PubT, MsgT >::on_deactivate | +( | +) | ++ |
Deactivate the ROS publisher if applicable.
+modulo_core::exceptions::NullPointerException | if the publisher pointer is null |
Definition at line 88 of file PublisherHandler.hpp.
+ +void modulo_core::communication::PublisherHandler< PubT, MsgT >::publish | +( | +const MsgT & | +message | ) | +const | +
Publish the ROS message through the ROS publisher.
+message | The ROS message to publish |
modulo_core::exceptions::NullPointerException | if the publisher pointer is null |
Definition at line 104 of file PublisherHandler.hpp.
+ +
+ Modulo 4.2.2
+
+ |
+
This is the complete list of members for modulo_core::communication::PublisherInterface, including all inherited members.
+activate() | modulo_core::communication::PublisherInterface | |
deactivate() | modulo_core::communication::PublisherInterface | |
get_handler(bool validate_pointer=true) | modulo_core::communication::PublisherInterface | inline |
get_message_pair() const | modulo_core::communication::PublisherInterface | |
get_type() const | modulo_core::communication::PublisherInterface | |
publish() | modulo_core::communication::PublisherInterface | |
PublisherInterface(PublisherType type, std::shared_ptr< MessagePairInterface > message_pair=nullptr) | modulo_core::communication::PublisherInterface | explicit |
PublisherInterface(const PublisherInterface &publisher)=default | modulo_core::communication::PublisherInterface | |
set_message_pair(const std::shared_ptr< MessagePairInterface > &message_pair) | modulo_core::communication::PublisherInterface | |
~PublisherInterface()=default | modulo_core::communication::PublisherInterface | virtual |
+ Modulo 4.2.2
+
+ |
+
Interface class to enable non-templated activating/deactivating/publishing of ROS publishers from derived PublisherHandler instances through dynamic down-casting. + More...
+ +#include <PublisherInterface.hpp>
+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. | |
void | activate () |
Activate ROS publisher of a derived PublisherHandler instance through the PublisherInterface pointer. | |
void | deactivate () |
Deactivate ROS publisher of a derived PublisherHandler instance through the PublisherInterface pointer. | |
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< MessagePairInterface > | get_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. | |
Interface class to enable non-templated activating/deactivating/publishing of ROS publishers from derived PublisherHandler instances through dynamic down-casting.
+ +Definition at line 21 of file PublisherInterface.hpp.
+
+
|
+ +explicit | +
Constructor with the message type and message pair.
+type | The type of the publisher interface |
message_pair | The message pair with the data to be published |
Definition at line 18 of file PublisherInterface.cpp.
+ +void modulo_core::communication::PublisherInterface::activate | +( | +) | ++ |
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.
modulo_core::exceptions::NullPointerException | if the message pair pointer is null |
Definition at line 21 of file PublisherInterface.cpp.
+ +void modulo_core::communication::PublisherInterface::deactivate | +( | +) | ++ |
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.
modulo_core::exceptions::NullPointerException | if the message pair pointer is null |
Definition at line 57 of file PublisherInterface.cpp.
+ +
+
|
+ +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.
PubT | The ROS publisher type |
MsgT | The ROS message type |
modulo_core::exceptions::InvalidPointerException | if the base PublisherInterface object has no reference count and validate_pointer is set to true |
modulo_core::exceptions::InvalidPointerCastException | if the derived object from the dynamic down-casting is not a correctly typed instance of a PublisherHandler |
validate_pointer | If true, throw an exception when down-casting fails |
Definition at line 129 of file PublisherInterface.hpp.
+ +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 139 of file PublisherInterface.cpp.
+ +PublisherType modulo_core::communication::PublisherInterface::get_type | +( | +) | +const | +
Get the type of the publisher interface.
+Definition at line 150 of file PublisherInterface.cpp.
+ +void modulo_core::communication::PublisherInterface::publish | +( | +) | ++ |
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.
modulo_core::exceptions::CoreException | if the publishing failed for some reason (translation, null pointer, pointer cast, ...) |
Definition at line 93 of file PublisherInterface.cpp.
+ +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.
+modulo_core::exceptions::NullPointerException | if the provided message pair pointer is null |
Definition at line 143 of file PublisherInterface.cpp.
+ +
+ Modulo 4.2.2
+
+ |
+
This is the complete list of members for modulo_core::communication::SubscriptionHandler< MsgT >, including all inherited members.
+
+ Modulo 4.2.2
+
+ |
+
The SubscriptionHandler handles different types of ROS subscriptions to receive data from those subscriptions. + More...
+ +#include <SubscriptionHandler.hpp>
+Public Member Functions | |
SubscriptionHandler (std::shared_ptr< MessagePairInterface > message_pair=nullptr) | |
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< 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 ROS subscription. | |
SubscriptionHandler (std::shared_ptr< MessagePairInterface > message_pair) | |
SubscriptionHandler (std::shared_ptr< MessagePairInterface > message_pair) | |
SubscriptionHandler (std::shared_ptr< MessagePairInterface > message_pair) | |
SubscriptionHandler (std::shared_ptr< MessagePairInterface > message_pair) | |
SubscriptionHandler (std::shared_ptr< MessagePairInterface > message_pair) | |
SubscriptionHandler (std::shared_ptr< MessagePairInterface > message_pair) | |
std::function< void(const std::shared_ptr< std_msgs::msg::Bool >)> | get_callback () |
std::function< void(const std::shared_ptr< std_msgs::msg::Float64 >)> | get_callback () |
std::function< void(const std::shared_ptr< std_msgs::msg::Float64MultiArray >)> | get_callback () |
std::function< void(const std::shared_ptr< std_msgs::msg::Int32 >)> | get_callback () |
std::function< void(const std::shared_ptr< std_msgs::msg::String >)> | get_callback () |
std::function< void(const std::shared_ptr< EncodedState >)> | get_callback () |
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< MessagePairInterface > | get_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. | |
The SubscriptionHandler handles different types of ROS subscriptions to receive data from those subscriptions.
+MsgT | The ROS message type of the ROS subscription |
Definition at line 14 of file SubscriptionHandler.hpp.
+
+
|
+ +explicit | +
Constructor with the message pair.
+message_pair | The pointer to the message pair with the data that should be updated through the subscription |
+
|
+ +override | +
Destructor to explicitly reset the subscription pointer.
+ +Definition at line 80 of file SubscriptionHandler.hpp.
+ +modulo_core::communication::SubscriptionHandler< std_msgs::msg::Bool >::SubscriptionHandler | +( | +std::shared_ptr< MessagePairInterface > | +message_pair | ) | ++ |
Definition at line 8 of file SubscriptionHandler.cpp.
+ +modulo_core::communication::SubscriptionHandler< std_msgs::msg::Float64 >::SubscriptionHandler | +( | +std::shared_ptr< MessagePairInterface > | +message_pair | ) | ++ |
Definition at line 12 of file SubscriptionHandler.cpp.
+ +modulo_core::communication::SubscriptionHandler< std_msgs::msg::Float64MultiArray >::SubscriptionHandler | +( | +std::shared_ptr< MessagePairInterface > | +message_pair | ) | ++ |
Definition at line 15 of file SubscriptionHandler.cpp.
+ +modulo_core::communication::SubscriptionHandler< std_msgs::msg::Int32 >::SubscriptionHandler | +( | +std::shared_ptr< MessagePairInterface > | +message_pair | ) | ++ |
Definition at line 21 of file SubscriptionHandler.cpp.
+ +modulo_core::communication::SubscriptionHandler< std_msgs::msg::String >::SubscriptionHandler | +( | +std::shared_ptr< MessagePairInterface > | +message_pair | ) | ++ |
Definition at line 25 of file SubscriptionHandler.cpp.
+ +modulo_core::communication::SubscriptionHandler< EncodedState >::SubscriptionHandler | +( | +std::shared_ptr< MessagePairInterface > | +message_pair | ) | ++ |
Definition at line 29 of file SubscriptionHandler.cpp.
+ +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.
+subscription | The ROS subscription |
Definition at line 110 of file SubscriptionHandler.hpp.
+ +std::function< void(const std::shared_ptr< std_msgs::msg::Bool >)> modulo_core::communication::SubscriptionHandler< std_msgs::msg::Bool >::get_callback | +( | +) | ++ |
Definition at line 34 of file SubscriptionHandler.cpp.
+ +std::function< void(const std::shared_ptr< std_msgs::msg::Float64 >)> modulo_core::communication::SubscriptionHandler< std_msgs::msg::Float64 >::get_callback | +( | +) | ++ |
Definition at line 47 of file SubscriptionHandler.cpp.
+ +std::function< void(const std::shared_ptr< std_msgs::msg::Float64MultiArray >)> modulo_core::communication::SubscriptionHandler< std_msgs::msg::Float64MultiArray >::get_callback | +( | +) | ++ |
Definition at line 60 of file SubscriptionHandler.cpp.
+ +std::function< void(const std::shared_ptr< std_msgs::msg::Int32 >)> modulo_core::communication::SubscriptionHandler< std_msgs::msg::Int32 >::get_callback | +( | +) | ++ |
Definition at line 73 of file SubscriptionHandler.cpp.
+ +std::function< void(const std::shared_ptr< std_msgs::msg::String >)> modulo_core::communication::SubscriptionHandler< std_msgs::msg::String >::get_callback | +( | +) | ++ |
Definition at line 86 of file SubscriptionHandler.cpp.
+ +std::function< void(const std::shared_ptr< EncodedState >)> modulo_core::communication::SubscriptionHandler< EncodedState >::get_callback | +( | +) | ++ |
Definition at line 98 of file SubscriptionHandler.cpp.
+ +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.
user_callback | Void callback function for additional logic after the message is received and translated. |
Definition at line 104 of file SubscriptionHandler.hpp.
+ +std::shared_ptr< rclcpp::Subscription< MsgT > > modulo_core::communication::SubscriptionHandler< MsgT >::get_subscription | +( | +) | +const | +
Getter of the ROS subscription.
+ +Definition at line 85 of file SubscriptionHandler.hpp.
+ +void modulo_core::communication::SubscriptionHandler< MsgT >::set_subscription | +( | +const std::shared_ptr< rclcpp::Subscription< MsgT > > & | +subscription | ) | ++ |
Setter of the ROS subscription.
+subscription | The ROS subscription |
modulo_core::exceptions::NullPointerException | if the provided subscription pointer is null |
Definition at line 90 of file SubscriptionHandler.hpp.
+ +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.
+user_callback | The ser callback function |
Definition at line 98 of file SubscriptionHandler.hpp.
+ +
+ Modulo 4.2.2
+
+ |
+
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::SubscriptionInterface | inline |
get_message_pair() const | modulo_core::communication::SubscriptionInterface | |
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::SubscriptionInterface | explicit |
SubscriptionInterface(const SubscriptionInterface &subscription)=default | modulo_core::communication::SubscriptionInterface | |
~SubscriptionInterface()=default | modulo_core::communication::SubscriptionInterface | virtual |
+ Modulo 4.2.2
+
+ |
+
Interface class to enable non-templated subscriptions with ROS subscriptions from derived SubscriptionHandler instances through dynamic down-casting. + More...
+ +#include <SubscriptionInterface.hpp>
+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< MessagePairInterface > | get_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. | |
Interface class to enable non-templated subscriptions with ROS subscriptions from derived SubscriptionHandler instances through dynamic down-casting.
+ +Definition at line 20 of file SubscriptionInterface.hpp.
+
+
|
+ +explicit | +
Constructor with the message pair.
+message_pair | The pointer to the message pair with the data that should be updated through the subscription |
Definition at line 7 of file SubscriptionInterface.cpp.
+ +
+
|
+ +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.
PubT | The ROS publisher type |
MsgT | The ROS message type |
modulo_core::exceptions::InvalidPointerException | if the base SubscriptionInterface object has no reference count and validate_pointer is set to true |
modulo_core::exceptions::InvalidPointerCastException | if the derived object from the dynamic down-casting is not a correctly typed instance of a SubscriptionHandler |
validate_pointer | If true, throw an exception when down-casting fails |
Definition at line 75 of file SubscriptionInterface.hpp.
+ +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 10 of file SubscriptionInterface.cpp.
+ +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.
+modulo_core::exceptions::NullPointerException | if the provided message pair pointer is null |
Definition at line 14 of file SubscriptionInterface.cpp.
+ +
+ Modulo 4.2.2
+
+ |
+
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::CoreException | inlineexplicit |
CoreException(const std::string &prefix, const std::string &msg) (defined in modulo_core::exceptions::CoreException) | modulo_core::exceptions::CoreException | inlineprotected |
+ Modulo 4.2.2
+
+ |
+
A base class for all core exceptions. + More...
+ +#include <CoreException.hpp>
+Public Member Functions | |
CoreException (const std::string &msg) | |
+Protected Member Functions | |
CoreException (const std::string &prefix, const std::string &msg) | |
A base class for all core exceptions.
+This inherits from std::runtime_exception.
+ +Definition at line 17 of file CoreException.hpp.
+
+
|
+ +inlineexplicit | +
Definition at line 19 of file CoreException.hpp.
+ +
+
|
+ +inlineprotected | +
Definition at line 21 of file CoreException.hpp.
+ +
+ Modulo 4.2.2
+
+ |
+
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::CoreException | inlineexplicit |
CoreException(const std::string &prefix, const std::string &msg) (defined in modulo_core::exceptions::CoreException) | modulo_core::exceptions::CoreException | inlineprotected |
InvalidPointerCastException(const std::string &msg) (defined in modulo_core::exceptions::InvalidPointerCastException) | modulo_core::exceptions::InvalidPointerCastException | inlineexplicit |
+ Modulo 4.2.2
+
+ |
+
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 <InvalidPointerCastException.hpp>
+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) | |
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 12 of file InvalidPointerCastException.hpp.
+
+
|
+ +inlineexplicit | +
Definition at line 14 of file InvalidPointerCastException.hpp.
+ +
+ Modulo 4.2.2
+
+ |
+
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::CoreException | inlineexplicit |
CoreException(const std::string &prefix, const std::string &msg) (defined in modulo_core::exceptions::CoreException) | modulo_core::exceptions::CoreException | inlineprotected |
InvalidPointerException(const std::string &msg) (defined in modulo_core::exceptions::InvalidPointerException) | modulo_core::exceptions::InvalidPointerException | inlineexplicit |
+ Modulo 4.2.2
+
+ |
+
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 <InvalidPointerException.hpp>
+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) | |
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 12 of file InvalidPointerException.hpp.
+
+
|
+ +inlineexplicit | +
Definition at line 14 of file InvalidPointerException.hpp.
+ +
+ Modulo 4.2.2
+
+ |
+
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::CoreException | inlineexplicit |
CoreException(const std::string &prefix, const std::string &msg) (defined in modulo_core::exceptions::CoreException) | modulo_core::exceptions::CoreException | inlineprotected |
MessageTranslationException(const std::string &msg) (defined in modulo_core::exceptions::MessageTranslationException) | modulo_core::exceptions::MessageTranslationException | inlineexplicit |
+ Modulo 4.2.2
+
+ |
+
An exception class to notify that the translation of a ROS message failed. + More...
+ +#include <MessageTranslationException.hpp>
+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) | |
An exception class to notify that the translation of a ROS message failed.
+ +Definition at line 11 of file MessageTranslationException.hpp.
+
+
|
+ +inlineexplicit | +
Definition at line 13 of file MessageTranslationException.hpp.
+ +
+ Modulo 4.2.2
+
+ |
+
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::CoreException | inlineexplicit |
CoreException(const std::string &prefix, const std::string &msg) (defined in modulo_core::exceptions::CoreException) | modulo_core::exceptions::CoreException | inlineprotected |
NullPointerException(const std::string &msg) (defined in modulo_core::exceptions::NullPointerException) | modulo_core::exceptions::NullPointerException | inlineexplicit |
+ Modulo 4.2.2
+
+ |
+
An exception class to notify that a certain pointer is null. + More...
+ +#include <NullPointerException.hpp>
+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) | |
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 12 of file NullPointerException.hpp.
+
+
|
+ +inlineexplicit | +
Definition at line 14 of file NullPointerException.hpp.
+ +
+ Modulo 4.2.2
+
+ |
+
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::CoreException | inlineexplicit |
CoreException(const std::string &prefix, const std::string &msg) (defined in modulo_core::exceptions::CoreException) | modulo_core::exceptions::CoreException | inlineprotected |
ParameterTranslationException(const std::string &msg) (defined in modulo_core::exceptions::ParameterTranslationException) | modulo_core::exceptions::ParameterTranslationException | inlineexplicit |
+ Modulo 4.2.2
+
+ |
+
An exception class to notify incompatibility when translating parameters from different sources. + More...
+ +#include <ParameterTranslationException.hpp>
+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) | |
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 13 of file ParameterTranslationException.hpp.
+
+
|
+ +inlineexplicit | +
Definition at line 15 of file ParameterTranslationException.hpp.
+ +
+ Modulo 4.2.2
+
+ |
+
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 &component, 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 |
+ Modulo 4.2.2
+
+ |
+
+Public Member Functions | |
PredicatesListener (const std::string &component, 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 |
Definition at line 13 of file PredicatesListener.hpp.
+modulo_utils::testutils::PredicatesListener::PredicatesListener | +( | +const std::string & | +component, | +
+ | + | const std::vector< std::string > & | +predicates, | +
+ | + | const rclcpp::NodeOptions & | +node_options = rclcpp::NodeOptions() |
+
+ | ) | ++ |
Definition at line 5 of file PredicatesListener.cpp.
+ +const std::shared_future< void > & modulo_utils::testutils::PredicatesListener::get_predicate_future | +( | +) | +const | +
Definition at line 32 of file PredicatesListener.cpp.
+ +const std::map< std::string, bool > & modulo_utils::testutils::PredicatesListener::get_predicate_values | +( | +) | +const | +
Definition at line 36 of file PredicatesListener.cpp.
+ +void modulo_utils::testutils::PredicatesListener::reset_future | +( | +) | ++ |
Definition at line 27 of file PredicatesListener.cpp.
+ +
+ Modulo 4.2.2
+
+ |
+
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 |
+ Modulo 4.2.2
+
+ |
+
+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_ |
Definition at line 13 of file ServiceClient.hpp.
+
+
|
+ +inline | +
Definition at line 15 of file ServiceClient.hpp.
+ +
+
|
+ +inline | +
Definition at line 22 of file ServiceClient.hpp.
+ +std::shared_ptr<rclcpp::Client<SrvT> > modulo_utils::testutils::ServiceClient< SrvT >::client_ | +
Definition at line 26 of file ServiceClient.hpp.
+ +
+ Modulo 4.2.2
+
+ |
+
+ Modulo 4.2.2
+
+ |
+
+ Modulo 4.2.2
+
+ |
+
+Directories | |
exceptions | |
utilities | |
+Files | |
Component.hpp | |
ComponentInterface.hpp | |
LifecycleComponent.hpp | |
+ Modulo 4.2.2
+
+ |
+
+ Modulo 4.2.2
+
+ |
+
+ Modulo 4.2.2
+
+ |
+
+Directories | |
communication | |
exceptions | |
translators | |
+Files | |
EncodedState.hpp | |
+ Modulo 4.2.2
+
+ |
+
+Directories | |
utils | |
+Files | |
ControllerInterface.hpp | |
RobotControllerInterface.hpp | |
+ Modulo 4.2.2
+
+ |
+
+Directories | |
modulo_core | |
+ Modulo 4.2.2
+
+ |
+
+ Modulo 4.2.2
+
+ |
+
+ Modulo 4.2.2
+
+ |
+
+ Modulo 4.2.2
+
+ |
+
+Files | |
MessagePair.cpp | |
MessagePairInterface.cpp | |
PublisherInterface.cpp | |
SubscriptionHandler.cpp | |
SubscriptionInterface.cpp | |
+ Modulo 4.2.2
+
+ |
+
+ Modulo 4.2.2
+
+ |
+
+ Modulo 4.2.2
+
+ |
+
+Directories | |
modulo_controllers | |
+ Modulo 4.2.2
+
+ |
+
+ Modulo 4.2.2
+
+ |
+
+ Modulo 4.2.2
+
+ |
+
+Directories | |
modulo_components | |
+ Modulo 4.2.2
+
+ |
+
+Directories | |
communication | |
translators | |
+ Modulo 4.2.2
+
+ |
+
+ Modulo 4.2.2
+
+ |
+
+Directories | |
testutils | |
+ Modulo 4.2.2
+
+ |
+
+ Modulo 4.2.2
+
+ |
+
+ Modulo 4.2.2
+
+ |
+
+ Modulo 4.2.2
+
+ |
+
+Directories | |
src | |
+ Modulo 4.2.2
+
+ |
+
+Directories | |
testutils | |
+ Modulo 4.2.2
+
+ |
+
+ Modulo 4.2.2
+
+ |
+
+Files | |
AddServiceException.hpp | |
AddSignalException.hpp | |
ComponentException.hpp | |
ComponentParameterException.hpp | |
LookupTransformException.hpp | |
+ Modulo 4.2.2
+
+ |
+
+Directories | |
src | |
+ Modulo 4.2.2
+
+ |
+
▼ source | |
▼ modulo_components | |
▼ include | |
▼ modulo_components | |
▼ exceptions | |
AddServiceException.hpp | |
AddSignalException.hpp | |
ComponentException.hpp | |
ComponentParameterException.hpp | |
LookupTransformException.hpp | |
▼ utilities | |
predicate_variant.hpp | |
utilities.hpp | |
Component.hpp | |
ComponentInterface.hpp | |
LifecycleComponent.hpp | |
▼ src | |
Component.cpp | |
ComponentInterface.cpp | |
LifecycleComponent.cpp | |
▼ modulo_controllers | |
▼ include | |
▼ modulo_controllers | |
▼ utils | |
utilities.hpp | |
ControllerInterface.hpp | |
RobotControllerInterface.hpp | |
▼ src | |
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 | |
▼ exceptions | |
CoreException.hpp | |
InvalidPointerCastException.hpp | |
InvalidPointerException.hpp | |
MessageTranslationException.hpp | |
NullPointerException.hpp | |
ParameterTranslationException.hpp | |
▼ translators | |
message_readers.hpp | |
message_writers.hpp | |
parameter_translators.hpp | |
EncodedState.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 | |
▼ src | |
▼ testutils | |
PredicatesListener.cpp |
+ Modulo 4.2.2
+
+ |
+
+ Modulo 4.2.2
+
+ |
+
+ Modulo 4.2.2
+
+ |
+
+ Modulo 4.2.2
+
+ |
+
▼Cmodulo_components::ComponentInterface | Base interface class for modulo components to wrap a ROS Node with custom behaviour |
Cmodulo_components::Component | A wrapper for rclcpp::Node to simplify application composition through unified component interfaces |
Cmodulo_components::LifecycleComponent | A wrapper for rclcpp_lifecycle::LifecycleNode to simplify application composition through unified component interfaces while supporting lifecycle states and transitions |
CComponentInterfacePublicInterface | Friend class to the ComponentInterface to allow test fixtures to access protected and private members |
Cmodulo_components::ComponentServiceResponse | Response structure to be returned by component services |
Cmodulo_controllers::ControllerInput | Input structure to save topic data in a realtime buffer and timestamps in one object |
▼Ccontroller_interface::ControllerInterface | |
▼Cmodulo_controllers::ControllerInterface | Base controller class to combine ros2_control, control libraries and modulo |
Cmodulo_controllers::RobotControllerInterface | Base controller class that automatically associates joints with a JointState object |
Cmodulo_controllers::ControllerServiceResponse | Response structure to be returned by controller services |
▼Cstd::enable_shared_from_this | |
▼Cmodulo_core::communication::MessagePairInterface | Interface 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::PublisherInterface | Interface 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::SubscriptionInterface | Interface 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::LifecycleComponent | A wrapper for rclcpp_lifecycle::LifecycleNode to simplify application composition through unified component interfaces while supporting lifecycle states and transitions |
▼Crclcpp::Node | |
Cmodulo_components::Component | A wrapper for rclcpp::Node to simplify application composition through unified component interfaces |
Cmodulo_utils::testutils::PredicatesListener | |
Cmodulo_utils::testutils::ServiceClient< SrvT > | |
▼Cstd::runtime_error | |
▼Cmodulo_components::exceptions::ComponentException | A base class for all component exceptions |
Cmodulo_components::exceptions::AddServiceException | An exception class to notify errors when adding a service |
Cmodulo_components::exceptions::AddSignalException | An exception class to notify errors when adding a signal |
Cmodulo_components::exceptions::ComponentParameterException | An exception class to notify errors with component parameters |
Cmodulo_components::exceptions::LookupTransformException | An exception class to notify an error while looking up TF transforms |
▼Cmodulo_core::exceptions::CoreException | A base class for all core exceptions |
Cmodulo_core::exceptions::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 |
Cmodulo_core::exceptions::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 |
Cmodulo_core::exceptions::MessageTranslationException | An exception class to notify that the translation of a ROS message failed |
Cmodulo_core::exceptions::NullPointerException | An exception class to notify that a certain pointer is null |
Cmodulo_core::exceptions::ParameterTranslationException | An exception class to notify incompatibility when translating parameters from different sources |
+ Modulo 4.2.2
+
+ |
+
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.
+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 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.
This package defines custom standard interfaces for modulo components.
+This package contains shared test fixtures.
+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.
+