moveit2
The MoveIt Motion Planning Framework for ROS 2.
Loading...
Searching...
No Matches
planning_scene_monitor::CurrentStateMonitor::MiddlewareHandle Class Referenceabstract

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

#include <current_state_monitor.hpp>

Inheritance diagram for planning_scene_monitor::CurrentStateMonitor::MiddlewareHandle:

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 74 of file current_state_monitor.hpp.

Member Typedef Documentation

◆ TfCallback

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

Definition at line 77 of file current_state_monitor.hpp.

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

Implemented in planning_scene_monitor::CurrentStateMonitorMiddlewareHandle.

Here is the caller graph for this function:

◆ 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.

Here is the caller graph for this function:

◆ createStaticTfSubscription()

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

Creates a static transform message subscription.

Parameters
[in]callbackThe callback

Implemented in planning_scene_monitor::CurrentStateMonitorMiddlewareHandle.

Here is the caller graph for this function:

◆ 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.

Here is the caller graph for this function:

◆ 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.

Here is the caller graph for this function:

◆ 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.

Here is the caller graph for this function:

◆ 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.

Here is the caller graph for this function:

◆ 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.

Here is the caller graph for this function:

◆ resetJointStateSubscription()

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

Reset the joint state subscription.

Implemented in planning_scene_monitor::CurrentStateMonitorMiddlewareHandle.

Here is the caller graph for this function:

◆ resetTfSubscriptions()

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

Reset the static & dynamic transform subscriptions.

Implemented in planning_scene_monitor::CurrentStateMonitorMiddlewareHandle.

Here is the caller graph for this function:

◆ 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.

Here is the caller graph for this function:

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