PublishGhostRobotState Class
Publishes a robot state for the 3D Visualizer to render as a translucent ghost robot. More...
Declaration
class moveit_pro::behaviors::PublishGhostRobotState { ... }
#include <publish_ghost_robot_state.hpp>
Base class
Public Constructors Index
| PublishGhostRobotState (const std::string &name, const BT::NodeConfiguration &config, const std::shared_ptr< BehaviorContext > &shared_resources) |
|
|
|
Public Member Functions Index
| BT::NodeStatus | tick () override |
|
|
|
Public Static Functions Index
Public Static Attributes Index
Description
Publishes a robot state for the 3D Visualizer to render as a translucent ghost robot.
This Behavior publishes a moveit_msgs::msg::DisplayRobotState message to /display_robot_state, which the MoveIt Pro Desktop App renders alongside the live robot. Use it to preview a single suggested configuration — a candidate pick pose, an IK solution — without planning a trajectory.
The publisher is latched and owned by the BehaviorContext rather than this Behavior, so the ghost survives a Desktop App reload and the next Objective load. Set 'hide' to true to clear a previously published ghost.
ClearSnapshot drops every publisher the BehaviorContext owns, this one included, so the retained message goes with it and a Desktop App that reloads afterwards sees no ghost. It does not clear a ghost already on screen — destroying a publisher tells a connected subscriber nothing. Only 'hide' does that.
Returns SUCCESS once the message is published. Returns FAILURE when 'hide' is false and 'robot_state' is unset, names no joints, has mismatched or non-finite values, or when another Behavior already publishes a different message type on this topic.
The 3D Visualizer applies the state on top of the robot's live pose, so a state covering only one planning group leaves the rest of the robot where it is. That re-anchoring happens every time the ghost is drawn, so a partial state renders differently after a reload if the robot moved meanwhile — publish a complete state when the ghost must outlive the run. Other DisplayRobotState consumers differ: the legacy RViz plugin poses unnamed joints from the URDF defaults instead. highlight_links and attached_collision_objects are not rendered.
| Data Port Name | Port Type | Object Type |
|---|
| robot_state | input | moveit_msgs::msg::RobotState |
| hide | input | bool |
Definition at line 48 of file publish_ghost_robot_state.hpp.
Public Constructors
PublishGhostRobotState()
| moveit_pro::behaviors::PublishGhostRobotState::PublishGhostRobotState (const std::string & name, const BT::NodeConfiguration & config, const std::shared_ptr< BehaviorContext > & shared_resources) |
|
Public Member Functions
tick()
| BT::NodeStatus moveit_pro::behaviors::PublishGhostRobotState::tick () |
|
Public Static Functions
metadata()
| BT::KeyValueVector moveit_pro::behaviors::PublishGhostRobotState::metadata () |
|
static
|
providedPorts()
| BT::PortsList moveit_pro::behaviors::PublishGhostRobotState::providedPorts () |
|
static
|
Public Static Attributes
kPortIDHide
| constexpr auto moveit_pro::behaviors::PublishGhostRobotState::kPortIDHide = "hide" |
|
constexpr
static
|
kPortIDRobotState
| constexpr auto moveit_pro::behaviors::PublishGhostRobotState::kPortIDRobotState = "robot_state" |
|
constexpr
static
|
The documentation for this class was generated from the following files:
Generated via doxygen2docusaurus 2.2.2 by Doxygen 1.9.8.