moveit2
The MoveIt Motion Planning Framework for ROS 2.
Public Member Functions | List of all members
planning_scene_monitor::CurrentStateMonitorMiddlewareHandle Class Reference

This class contains the ros interfaces for CurrentStateMontior. More...

#include <current_state_monitor_middleware_handle.hpp>

Inheritance diagram for planning_scene_monitor::CurrentStateMonitorMiddlewareHandle:
Inheritance graph
[legend]
Collaboration diagram for planning_scene_monitor::CurrentStateMonitorMiddlewareHandle:
Collaboration graph
[legend]

Public Member Functions

 CurrentStateMonitorMiddlewareHandle (const rclcpp::Node::SharedPtr &node)
 Constructor. More...
 
rclcpp::Time now () const override
 Get the current time. More...
 
void createJointStateSubscription (const std::string &topic, JointStateUpdateCallback callback) override
 Creates a joint state subscription. More...
 
void createStaticTfSubscription (std::function< void(const tf2_msgs::msg::TFMessage::ConstSharedPtr)> callback) override
 Creates a static transform message subscription. More...
 
void createDynamicTfSubscription (std::function< void(const tf2_msgs::msg::TFMessage::ConstSharedPtr)> callback) override
 Creates a dynamic transform message subscription. More...
 
void resetJointStateSubscription () override
 Reset the joint state subscription. More...
 
std::string getJointStateTopicName () const override
 Get the joint state topic name. More...
 
bool sleepFor (const std::chrono::nanoseconds &nanoseconds) const override
 Uses rclcpp::sleep_for to sleep. More...
 
bool ok () const override
 Uses rclcpp::ok to check the context status. More...
 
std::string getStaticTfTopicName () const override
 Get the static transform topic name. More...
 
std::string getDynamicTfTopicName () const override
 Get the dynamic transform topic name. More...
 
void resetTfSubscriptions () override
 Reset the static & dynamic transform subscriptions. More...
 
- Public Member Functions inherited from planning_scene_monitor::CurrentStateMonitor::MiddlewareHandle
virtual ~MiddlewareHandle ()=default
 Destroys the object. More...
 
virtual void createStaticTfSubscription (TfCallback callback)=0
 Creates a static transform message subscription. More...
 
virtual void createDynamicTfSubscription (TfCallback callback)=0
 Creates a dynamic transform message subscription. More...
 

Additional Inherited Members

- Public Types inherited from planning_scene_monitor::CurrentStateMonitor::MiddlewareHandle
using TfCallback = std::function< void(const tf2_msgs::msg::TFMessage::ConstSharedPtr)>
 

Detailed Description

This class contains the ros interfaces for CurrentStateMontior.

Definition at line 52 of file current_state_monitor_middleware_handle.hpp.

Constructor & Destructor Documentation

◆ CurrentStateMonitorMiddlewareHandle()

planning_scene_monitor::CurrentStateMonitorMiddlewareHandle::CurrentStateMonitorMiddlewareHandle ( const rclcpp::Node::SharedPtr &  node)

Constructor.

Parameters
[in]nodeThe ros node

Definition at line 55 of file current_state_monitor_middleware_handle.cpp.

Member Function Documentation

◆ createDynamicTfSubscription()

void planning_scene_monitor::CurrentStateMonitorMiddlewareHandle::createDynamicTfSubscription ( std::function< void(const tf2_msgs::msg::TFMessage::ConstSharedPtr)>  callback)
override

Creates a dynamic transform message subscription.

Parameters
[in]callbackThe callback

Definition at line 99 of file current_state_monitor_middleware_handle.cpp.

◆ createJointStateSubscription()

void planning_scene_monitor::CurrentStateMonitorMiddlewareHandle::createJointStateSubscription ( const std::string &  topic,
JointStateUpdateCallback  callback 
)
overridevirtual

Creates a joint state subscription.

Parameters
[in]topicThe topic
[in]callbackThe callback

Implements planning_scene_monitor::CurrentStateMonitor::MiddlewareHandle.

Definition at line 65 of file current_state_monitor_middleware_handle.cpp.

◆ createStaticTfSubscription()

void planning_scene_monitor::CurrentStateMonitorMiddlewareHandle::createStaticTfSubscription ( std::function< void(const tf2_msgs::msg::TFMessage::ConstSharedPtr)>  callback)
override

Creates a static transform message subscription.

Parameters
[in]callbackThe callback

Definition at line 105 of file current_state_monitor_middleware_handle.cpp.

◆ getDynamicTfTopicName()

std::string planning_scene_monitor::CurrentStateMonitorMiddlewareHandle::getDynamicTfTopicName ( ) const
overridevirtual

Get the dynamic transform topic name.

Returns
The dynamic transform topic name.

Implements planning_scene_monitor::CurrentStateMonitor::MiddlewareHandle.

Definition at line 116 of file current_state_monitor_middleware_handle.cpp.

◆ getJointStateTopicName()

std::string planning_scene_monitor::CurrentStateMonitorMiddlewareHandle::getJointStateTopicName ( ) const
overridevirtual

Get the joint state topic name.

Returns
The joint state topic name.

Implements planning_scene_monitor::CurrentStateMonitor::MiddlewareHandle.

Definition at line 77 of file current_state_monitor_middleware_handle.cpp.

◆ getStaticTfTopicName()

std::string planning_scene_monitor::CurrentStateMonitorMiddlewareHandle::getStaticTfTopicName ( ) const
overridevirtual

Get the static transform topic name.

Returns
The static transform topic name.

Implements planning_scene_monitor::CurrentStateMonitor::MiddlewareHandle.

Definition at line 111 of file current_state_monitor_middleware_handle.cpp.

◆ now()

rclcpp::Time planning_scene_monitor::CurrentStateMonitorMiddlewareHandle::now ( ) const
overridevirtual

Get the current time.

Returns
Time object representing the time when this is called

Implements planning_scene_monitor::CurrentStateMonitor::MiddlewareHandle.

Definition at line 60 of file current_state_monitor_middleware_handle.cpp.

◆ ok()

bool planning_scene_monitor::CurrentStateMonitorMiddlewareHandle::ok ( ) const
overridevirtual

Uses rclcpp::ok to check the context status.

Returns
Return of rclcpp::ok

Implements planning_scene_monitor::CurrentStateMonitor::MiddlewareHandle.

Definition at line 94 of file current_state_monitor_middleware_handle.cpp.

◆ resetJointStateSubscription()

void planning_scene_monitor::CurrentStateMonitorMiddlewareHandle::resetJointStateSubscription ( )
overridevirtual

Reset the joint state subscription.

Implements planning_scene_monitor::CurrentStateMonitor::MiddlewareHandle.

Definition at line 72 of file current_state_monitor_middleware_handle.cpp.

◆ resetTfSubscriptions()

void planning_scene_monitor::CurrentStateMonitorMiddlewareHandle::resetTfSubscriptions ( )
overridevirtual

Reset the static & dynamic transform subscriptions.

Implements planning_scene_monitor::CurrentStateMonitor::MiddlewareHandle.

Definition at line 121 of file current_state_monitor_middleware_handle.cpp.

◆ sleepFor()

bool planning_scene_monitor::CurrentStateMonitorMiddlewareHandle::sleepFor ( const std::chrono::nanoseconds &  nanoseconds) const
overridevirtual

Uses rclcpp::sleep_for to sleep.

Parameters
[in]nanosecondsThe nanoseconds to sleep for
Returns
Return of rclcpp::sleep_for

Implements planning_scene_monitor::CurrentStateMonitor::MiddlewareHandle.

Definition at line 89 of file current_state_monitor_middleware_handle.cpp.


The documentation for this class was generated from the following files: