Skip to main content

TransformPose Class

Transforms a stamped pose given an input translation and orientation. More...

Declaration

class moveit_pro::behaviors::TransformPose { ... }

Included Headers

#include <transform_pose.hpp>

Base class

classSharedResourcesNode<BehaviorTreeNodeT>

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

Public Constructors Index

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

Constructor for TransformPose behavior. More...

Public Member Functions Index

BT::NodeStatustick () override

Contains the logic to transform a geometry_msgs::msg::PoseStamped message. More...

Private Member Functions Index

BT::NodeStatuspublishVisualizationMarkers (const geometry_msgs::msg::PoseStamped &output_pose)

Publish coordinate-frame visualization markers for the given pose. More...

Private Member Attributes Index

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

Public Static Functions Index

static BT::PortsListprovidedPorts ()

Custom tree nodes that have input and/or output ports must define them in this static function. More...

static BT::KeyValueVectormetadata ()

Private Static Attributes Index

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

Description

Transforms a stamped pose given an input translation and orientation.

The transformation occurs in the reference frame specified by the pose stamp. For example, if the input pose is expressed in the "world" frame, the translation and orientation are also applied in the "world" frame to produce the output pose.

Optionally visualizes the output pose by publishing a coordinate-frame marker to /visual_markers. Visualization is disabled by default for backwards compatibility.

Data Port NamePort TypeObject Type
input_poseinputgeometry_msgs::msg::PoseStamped
translation_xyzinputgeometry_msgs::msg::Vector3
quaternion_xyzwinputgeometry_msgs::msg::Quaternion
visualize_poseinputbool
marker_textinputstd::string
marker_sizeinputdouble
marker_lifetimeinputdouble
output_poseoutputgeometry_msgs::msg::PoseStamped

Definition at line 44 of file transform_pose.hpp.

Public Constructors

TransformPose()

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

Constructor for TransformPose behavior.

Parameters
name

Name of the node. Must match the name used for this node in the behavior tree definition file (the .xml file).

config

Node configuration. Only used here because the BehaviorTree.CPP expects constructor signature with name and config first before custom constructor parameters.

shared_resources

Provides access to common resources such as the node handle and failure logger that are shared between all the behaviors that inherit from moveit_pro::behaviors::SharedResourcesNode.

Declaration at line 58 of file transform_pose.hpp, definition at line 44 of file transform_pose.cpp.

Public Member Functions

tick()

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

Contains the logic to transform a geometry_msgs::msg::PoseStamped message.

Returns

BT::NodeStatus Returns success if successful, else failure.

Declaration at line 77 of file transform_pose.hpp, definition at line 79 of file transform_pose.cpp.

Private Member Functions

publishVisualizationMarkers()

BT::NodeStatus moveit_pro::behaviors::TransformPose::publishVisualizationMarkers (const geometry_msgs::msg::PoseStamped & output_pose)

Publish coordinate-frame visualization markers for the given pose.

Declaration at line 81 of file transform_pose.hpp, definition at line 145 of file transform_pose.cpp.

Private Member Attributes

marker_namespace_

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

Definition at line 87 of file transform_pose.hpp.

marker_publisher_

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

Definition at line 84 of file transform_pose.hpp.

Public Static Functions

metadata()

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

Declaration at line 71 of file transform_pose.hpp, definition at line 74 of file transform_pose.cpp.

providedPorts()

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

Custom tree nodes that have input and/or output ports must define them in this static function.

This function must be static. It is a requirement set by the BehaviorTree.CPP library.

Returns

List of ports with the names and port info. The return value is for the internal use of the behavior tree.

Declaration at line 69 of file transform_pose.hpp, definition at line 50 of file transform_pose.cpp.

Private Static Attributes

instance_counter_

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

Definition at line 90 of file transform_pose.hpp.


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


Generated via doxygen2docusaurus 2.2.2 by Doxygen 1.9.8.