MoveIt Pro Behavior
Core Behaviors for MoveIt Pro
calculate_pose_offset.hpp File Reference
#include <behaviortree_cpp/action_node.h>
#include <geometry_msgs/msg/pose.hpp>
#include <geometry_msgs/msg/pose_stamped.hpp>
#include <geometry_msgs/msg/transform_stamped.hpp>
#include <moveit_studio_behavior_interface/shared_resources_node.hpp>
Include dependency graph for calculate_pose_offset.hpp:
This graph shows which files directly or indirectly include this file:

Classes

class  moveit_studio::behaviors::CalculatePoseOffset
 Calculates the offset transform from source_pose to destination_pose. This can be used to measure the distance between two poses and returns the result relative to the source_pose. More...
 

Namespaces

 moveit_studio
 
 moveit_studio::behaviors
 

Functions

tl::expected< void, std::string > preCalculationChecks (const std::shared_ptr< moveit_studio::behaviors::BehaviorContext > &shared_resources, const geometry_msgs::msg::PoseStamped &source_pose, const geometry_msgs::msg::PoseStamped &destination_pose)
 Performs checks to see if the pose offset is actually possible to calculate. More...
 
geometry_msgs::msg::Pose poseOffset (const geometry_msgs::msg::TransformStamped &transform, const geometry_msgs::msg::PoseStamped &source_pose, const geometry_msgs::msg::PoseStamped &destination_pose)
 Calculates the pose offset given the transform between poses, the source pose, and destination pose. More...
 
tl::expected< void, std::string > canTransformCheck (const std::shared_ptr< moveit_studio::behaviors::BehaviorContext > &shared_resources, const std::string &source_frame_id, const std::string &destination_frame_id)
 

Function Documentation

◆ canTransformCheck()

tl::expected<void, std::string> canTransformCheck ( const std::shared_ptr< moveit_studio::behaviors::BehaviorContext > &  shared_resources,
const std::string &  source_frame_id,
const std::string &  destination_frame_id 
)

◆ poseOffset()

geometry_msgs::msg::Pose poseOffset ( const geometry_msgs::msg::TransformStamped &  transform,
const geometry_msgs::msg::PoseStamped &  source_pose,
const geometry_msgs::msg::PoseStamped &  destination_pose 
)

Calculates the pose offset given the transform between poses, the source pose, and destination pose.

Parameters
transformThe transform between the source and destination frame
source_poseThe source pose
destination_poseThe destination pose
Returns
The Pose offset

◆ preCalculationChecks()

tl::expected<void, std::string> preCalculationChecks ( const std::shared_ptr< moveit_studio::behaviors::BehaviorContext > &  shared_resources,
const geometry_msgs::msg::PoseStamped &  source_pose,
const geometry_msgs::msg::PoseStamped &  destination_pose 
)

Performs checks to see if the pose offset is actually possible to calculate.

Parameters
shared_resourcesThe Behavior Context used for ROS operations
source_poseThe source pose
destination_poseThe destination pose
Returns
Returns a tl::expected<void, std::string>, where the string is an error message