Skip to main content

VisualizeLine Class

Publishes a visualization marker that draws a line between two poses. More...

Declaration​

class moveit_pro::behaviors::VisualizeLine { ... }

Included Headers​

#include <visualize_line.hpp>

Base class​

classSharedResourcesNode<BehaviorTreeNodeT>

The SharedResourcesNode class provides a BehaviorContext object when constructing a BehaviorTree.Cpp node. More...

Public Constructors Index​

VisualizeLine (const std::string &name, const BT::NodeConfiguration &config, const std::shared_ptr< BehaviorContext > &shared_resources)

Public Member Functions Index​

BT::NodeStatustick () override

Private Member Attributes Index​

std::shared_ptr< rclcpp::Publisher< visualization_msgs::msg::MarkerArray > >marker_publisher_
std::stringmarker_namespace_ = fmt::format("VisualizeLine{}", ++instance_counter_)

Public Static Functions Index​

static BT::PortsListprovidedPorts ()
static BT::KeyValueVectormetadata ()

Public Static Attributes Index​

static constexpr autokPortIDStartPose = "start_pose"
static constexpr autokPortIDEndPose = "end_pose"
static constexpr autokPortIDLineThickness = "line_thickness"
static constexpr autokPortIDMarkerLifetime = "marker_lifetime"

Private Static Attributes Index​

static std::atomic< int >instance_counter_ { 0 }

Description​

Publishes a visualization marker that draws a line between two poses.

This Behavior composes a visualization_msgs::msg::MarkerArray message which contains a green LINE_LIST marker connecting the origins of two input poses. It publishes the message to a ROS topic named /visual_markers, which is then visualized in the UI.

Input poses can be given in any known frame. The Behavior will transform them to the world frame before visualization. If the transform cannot be found, the Behavior will return a FAILURE status.

Each instance gets a unique marker namespace (VisualizeLine1, VisualizeLine2, ...) so multiple lines can coexist without overwriting each other.

Data Port NamePort TypeObject Type
start_poseinputgeometry_msgs::msg::PoseStamped
end_poseinputgeometry_msgs::msg::PoseStamped
line_thicknessinputdouble
marker_lifetimeinputdouble

Definition at line 42 of file visualize_line.hpp.

Public Constructors​

VisualizeLine()​

moveit_pro::behaviors::VisualizeLine::VisualizeLine (const std::string & name, const BT::NodeConfiguration & config, const std::shared_ptr< BehaviorContext > & shared_resources)

Declaration at line 50 of file visualize_line.hpp, definition at line 29 of file visualize_line.cpp.

Public Member Functions​

tick()​

BT::NodeStatus moveit_pro::behaviors::VisualizeLine::tick ()

Declaration at line 57 of file visualize_line.hpp, definition at line 56 of file visualize_line.cpp.

Private Member Attributes​

marker_namespace_​

std::string moveit_pro::behaviors::VisualizeLine::marker_namespace_ = fmt::format("VisualizeLine{}", ++instance_counter_)

Definition at line 64 of file visualize_line.hpp.

marker_publisher_​

std::shared_ptr<rclcpp::Publisher<visualization_msgs::msg::MarkerArray> > moveit_pro::behaviors::VisualizeLine::marker_publisher_

Definition at line 61 of file visualize_line.hpp.

Public Static Functions​

metadata()​

BT::KeyValueVector moveit_pro::behaviors::VisualizeLine::metadata ()
static

Declaration at line 55 of file visualize_line.hpp, definition at line 51 of file visualize_line.cpp.

providedPorts()​

BT::PortsList moveit_pro::behaviors::VisualizeLine::providedPorts ()
static

Declaration at line 53 of file visualize_line.hpp, definition at line 37 of file visualize_line.cpp.

Public Static Attributes​

kPortIDEndPose​

constexpr auto moveit_pro::behaviors::VisualizeLine::kPortIDEndPose = "end_pose"
constexpr static

Definition at line 46 of file visualize_line.hpp.

kPortIDLineThickness​

constexpr auto moveit_pro::behaviors::VisualizeLine::kPortIDLineThickness = "line_thickness"
constexpr static

Definition at line 47 of file visualize_line.hpp.

kPortIDMarkerLifetime​

constexpr auto moveit_pro::behaviors::VisualizeLine::kPortIDMarkerLifetime = "marker_lifetime"
constexpr static

Definition at line 48 of file visualize_line.hpp.

kPortIDStartPose​

constexpr auto moveit_pro::behaviors::VisualizeLine::kPortIDStartPose = "start_pose"
constexpr static

Definition at line 45 of file visualize_line.hpp.

Private Static Attributes​

instance_counter_​

std::atomic< int > moveit_pro::behaviors::VisualizeLine::instance_counter_ { 0 }
static

Definition at line 67 of file visualize_line.hpp.


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


Generated via doxygen2docusaurus 2.2.2 by Doxygen 1.9.8.