moveit2
The MoveIt Motion Planning Framework for ROS 2.
Loading...
Searching...
No Matches
Public Types | Public Member Functions | List of all members
planning_scene_monitor::CurrentStateMonitor::MiddlewareHandle Class Referenceabstract

Dependency injection class for testing the CurrentStateMonitor. More...

#include <current_state_monitor.h>

Inheritance diagram for planning_scene_monitor::CurrentStateMonitor::MiddlewareHandle:
Inheritance graph
[legend]

Public Types

using TfCallback = std::function< void(const tf2_msgs::msg::TFMessage::ConstSharedPtr)>
 

Public Member Functions

virtual ~MiddlewareHandle ()=default
 Destroys the object.
 
virtual rclcpp::Time now () const =0
 Get the current time.
 
virtual void createJointStateSubscription (const std::string &topic, JointStateUpdateCallback callback)=0
 Creates a joint state subscription.
 
virtual void createStaticTfSubscription (TfCallback callback)=0
 Creates a static transform message subscription.
 
virtual void createDynamicTfSubscription (TfCallback callback)=0
 Creates a dynamic transform message subscription.
 
virtual void resetJointStateSubscription ()=0
 Reset the joint state subscription.
 
virtual std::string getJointStateTopicName () const =0
 Get the joint state topic name.
 
virtual bool sleepFor (const std::chrono::nanoseconds &nanoseconds) const =0
 Block for the specified amount of time.
 
virtual bool ok () const =0
 Uses rclcpp::ok to check the context status.
 
virtual std::string getStaticTfTopicName () const =0
 Get the static transform topic name.
 
virtual std::string getDynamicTfTopicName () const =0
 Get the dynamic transform topic name.
 
virtual void resetTfSubscriptions ()=0
 Reset the static & dynamic transform subscriptions.
 

Detailed Description

Dependency injection class for testing the CurrentStateMonitor.

Definition at line 67 of file current_state_monitor.h.

Member Typedef Documentation

◆ TfCallback

using planning_scene_monitor::CurrentStateMonitor::MiddlewareHandle::TfCallback = std::function<void(const tf2_msgs::msg::TFMessage::ConstSharedPtr)>

Definition at line 70 of file current_state_monitor.h.

Constructor & Destructor Documentation

◆ ~MiddlewareHandle()

virtual planning_scene_monitor::CurrentStateMonitor::MiddlewareHandle::~MiddlewareHandle ( )
virtualdefault

Destroys the object.

Member Function Documentation

◆ createDynamicTfSubscription()

virtual void planning_scene_monitor::CurrentStateMonitor::MiddlewareHandle::createDynamicTfSubscription ( TfCallback  callback)
pure virtual

Creates a dynamic transform message subscription.

Parameters
[in]callbackThe callback

◆ createJointStateSubscription()

virtual void planning_scene_monitor::CurrentStateMonitor::MiddlewareHandle::createJointStateSubscription ( const std::string &  topic,
JointStateUpdateCallback  callback 
)
pure virtual

Creates a joint state subscription.

Parameters
[in]topicThe topic
[in]callbackThe callback

Implemented in planning_scene_monitor::CurrentStateMonitorMiddlewareHandle.

◆ createStaticTfSubscription()

virtual void planning_scene_monitor::CurrentStateMonitor::MiddlewareHandle::createStaticTfSubscription ( TfCallback  callback)
pure virtual

Creates a static transform message subscription.

Parameters
[in]callbackThe callback

◆ getDynamicTfTopicName()

virtual std::string planning_scene_monitor::CurrentStateMonitor::MiddlewareHandle::getDynamicTfTopicName ( ) const
pure virtual

Get the dynamic transform topic name.

Returns
The dynamic transform topic name.

Implemented in planning_scene_monitor::CurrentStateMonitorMiddlewareHandle.

◆ getJointStateTopicName()

virtual std::string planning_scene_monitor::CurrentStateMonitor::MiddlewareHandle::getJointStateTopicName ( ) const
pure virtual

Get the joint state topic name.

Returns
The joint state topic name.

Implemented in planning_scene_monitor::CurrentStateMonitorMiddlewareHandle.

◆ getStaticTfTopicName()

virtual std::string planning_scene_monitor::CurrentStateMonitor::MiddlewareHandle::getStaticTfTopicName ( ) const
pure virtual

Get the static transform topic name.

Returns
The static transform topic name.

Implemented in planning_scene_monitor::CurrentStateMonitorMiddlewareHandle.

◆ now()

virtual rclcpp::Time planning_scene_monitor::CurrentStateMonitor::MiddlewareHandle::now ( ) const
pure virtual

Get the current time.

Returns
Time object representing the time when this is called

Implemented in planning_scene_monitor::CurrentStateMonitorMiddlewareHandle.

◆ ok()

virtual bool planning_scene_monitor::CurrentStateMonitor::MiddlewareHandle::ok ( ) const
pure virtual

Uses rclcpp::ok to check the context status.

Returns
Return of rclcpp::ok

Implemented in planning_scene_monitor::CurrentStateMonitorMiddlewareHandle.

◆ resetJointStateSubscription()

virtual void planning_scene_monitor::CurrentStateMonitor::MiddlewareHandle::resetJointStateSubscription ( )
pure virtual

Reset the joint state subscription.

Implemented in planning_scene_monitor::CurrentStateMonitorMiddlewareHandle.

◆ resetTfSubscriptions()

virtual void planning_scene_monitor::CurrentStateMonitor::MiddlewareHandle::resetTfSubscriptions ( )
pure virtual

Reset the static & dynamic transform subscriptions.

Implemented in planning_scene_monitor::CurrentStateMonitorMiddlewareHandle.

◆ sleepFor()

virtual bool planning_scene_monitor::CurrentStateMonitor::MiddlewareHandle::sleepFor ( const std::chrono::nanoseconds &  nanoseconds) const
pure virtual

Block for the specified amount of time.

Parameters
[in]nanosecondsThe nanoseconds to sleep
Returns
True if sleep happened as expected.

Implemented in planning_scene_monitor::CurrentStateMonitorMiddlewareHandle.


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