moveit2
The MoveIt Motion Planning Framework for ROS 2.
Public Member Functions | List of all members
moveit::core::AttachedBody Class Reference

Object defining bodies that can be attached to robot links. More...

#include <attached_body.h>

Public Member Functions

 AttachedBody (const LinkModel *parent, const std::string &id, const Eigen::Isometry3d &pose, const std::vector< shapes::ShapeConstPtr > &shapes, const EigenSTL::vector_Isometry3d &shape_poses, const std::set< std::string > &touch_links, const trajectory_msgs::msg::JointTrajectory &detach_posture, const moveit::core::FixedTransformsMap &subframe_poses=moveit::core::FixedTransformsMap())
 Construct an attached body for a specified link. More...
 
 ~AttachedBody ()
 
const std::string & getName () const
 Get the name of the attached body. More...
 
const Eigen::Isometry3d & getPose () const
 Get the pose of the attached body relative to the parent link. More...
 
const Eigen::Isometry3d & getGlobalPose () const
 Get the pose of the attached body, relative to the world. More...
 
const std::string & getAttachedLinkName () const
 Get the name of the link this body is attached to. More...
 
const LinkModelgetAttachedLink () const
 Get the model of the link this body is attached to. More...
 
const std::vector< shapes::ShapeConstPtr > & getShapes () const
 Get the shapes that make up this attached body. More...
 
const EigenSTL::vector_Isometry3d & getShapePoses () const
 Get the shape poses (the transforms to the shapes of this body, relative to the pose). The returned transforms are guaranteed to be valid isometries. More...
 
const std::set< std::string > & getTouchLinks () const
 Get the links that the attached body is allowed to touch. More...
 
const trajectory_msgs::msg::JointTrajectory & getDetachPosture () const
 Return the posture that is necessary for the object to be released, (if any). This is useful for example when storing the configuration of a gripper holding an object. More...
 
const EigenSTL::vector_Isometry3d & getShapePosesInLinkFrame () const
 Get the fixed transforms (the transforms to the shapes of this body, relative to the link). The returned transforms are guaranteed to be valid isometries. More...
 
const EigenSTL::vector_Isometry3d & getFixedTransforms () const
 Get the fixed transforms (the transforms to the shapes of this body, relative to the link). The returned transforms are guaranteed to be valid isometries. Deprecated. Use getShapePosesInLinkFrame instead. More...
 
const moveit::core::FixedTransformsMapgetSubframes () const
 Get subframes of this object (relative to the object pose). The returned transforms are guaranteed to be valid isometries. More...
 
const moveit::core::FixedTransformsMapgetGlobalSubframeTransforms () const
 Get subframes of this object (in the world frame) More...
 
void setSubframeTransforms (const moveit::core::FixedTransformsMap &subframe_poses)
 Set all subframes of this object. More...
 
const Eigen::Isometry3d & getSubframeTransform (const std::string &frame_name, bool *found=nullptr) const
 Get the fixed transform to a named subframe on this body (relative to the body's pose) More...
 
const Eigen::Isometry3d & getSubframeTransformInLinkFrame (const std::string &frame_name, bool *found=nullptr) const
 Get the fixed transform to a named subframe on this body (relative to the robot link) More...
 
const Eigen::Isometry3d & getGlobalSubframeTransform (const std::string &frame_name, bool *found=nullptr) const
 Get the fixed transform to a named subframe on this body, relative to the world frame. The frame_name needs to have the object's name prepended (e.g. "screwdriver/tip" returns true if the object's name is "screwdriver"). Returns an identity transform if frame_name is unknown (and set found to false). The returned transform is guaranteed to be a valid isometry. More...
 
bool hasSubframeTransform (const std::string &frame_name) const
 Check whether a subframe of given @frame_name is present in this object. More...
 
const EigenSTL::vector_Isometry3d & getGlobalCollisionBodyTransforms () const
 Get the global transforms (in world frame) for the collision bodies. The returned transforms are guaranteed to be valid isometries. More...
 
void setPadding (double padding)
 Set the padding for the shapes of this attached object. More...
 
void setScale (double scale)
 Set the scale for the shapes of this attached object. More...
 
void computeTransform (const Eigen::Isometry3d &parent_link_global_transform)
 Recompute global_collision_body_transform given the transform of the parent link. More...
 

Detailed Description

Object defining bodies that can be attached to robot links.

This is useful when handling objects picked up by the robot.

Definition at line 57 of file attached_body.h.

Constructor & Destructor Documentation

◆ AttachedBody()

moveit::core::AttachedBody::AttachedBody ( const LinkModel parent,
const std::string &  id,
const Eigen::Isometry3d &  pose,
const std::vector< shapes::ShapeConstPtr > &  shapes,
const EigenSTL::vector_Isometry3d &  shape_poses,
const std::set< std::string > &  touch_links,
const trajectory_msgs::msg::JointTrajectory &  detach_posture,
const moveit::core::FixedTransformsMap subframe_poses = moveit::core::FixedTransformsMap() 
)

Construct an attached body for a specified link.

The name of this body is id and it consists of shapes that attach to the link by the transforms shape_poses. The set of links that are allowed to be touched by this object is specified by touch_links. detach_posture may describe a detach motion for the gripper when placing the object. The shape and subframe poses are relative to the pose, and pose is relative to the parent link.

Definition at line 45 of file attached_body.cpp.

◆ ~AttachedBody()

moveit::core::AttachedBody::~AttachedBody ( )
default

Member Function Documentation

◆ computeTransform()

void moveit::core::AttachedBody::computeTransform ( const Eigen::Isometry3d &  parent_link_global_transform)

Recompute global_collision_body_transform given the transform of the parent link.

Definition at line 103 of file attached_body.cpp.

◆ getAttachedLink()

const LinkModel* moveit::core::AttachedBody::getAttachedLink ( ) const
inline

Get the model of the link this body is attached to.

Definition at line 98 of file attached_body.h.

Here is the caller graph for this function:

◆ getAttachedLinkName()

const std::string& moveit::core::AttachedBody::getAttachedLinkName ( ) const
inline

Get the name of the link this body is attached to.

Definition at line 92 of file attached_body.h.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ getDetachPosture()

const trajectory_msgs::msg::JointTrajectory& moveit::core::AttachedBody::getDetachPosture ( ) const
inline

Return the posture that is necessary for the object to be released, (if any). This is useful for example when storing the configuration of a gripper holding an object.

Definition at line 124 of file attached_body.h.

Here is the caller graph for this function:

◆ getFixedTransforms()

const EigenSTL::vector_Isometry3d& moveit::core::AttachedBody::getFixedTransforms ( ) const
inline

Get the fixed transforms (the transforms to the shapes of this body, relative to the link). The returned transforms are guaranteed to be valid isometries. Deprecated. Use getShapePosesInLinkFrame instead.

Definition at line 139 of file attached_body.h.

◆ getGlobalCollisionBodyTransforms()

const EigenSTL::vector_Isometry3d& moveit::core::AttachedBody::getGlobalCollisionBodyTransforms ( ) const
inline

Get the global transforms (in world frame) for the collision bodies. The returned transforms are guaranteed to be valid isometries.

Definition at line 199 of file attached_body.h.

Here is the caller graph for this function:

◆ getGlobalPose()

const Eigen::Isometry3d& moveit::core::AttachedBody::getGlobalPose ( ) const
inline

Get the pose of the attached body, relative to the world.

Definition at line 86 of file attached_body.h.

Here is the caller graph for this function:

◆ getGlobalSubframeTransform()

const Eigen::Isometry3d & moveit::core::AttachedBody::getGlobalSubframeTransform ( const std::string &  frame_name,
bool *  found = nullptr 
) const

Get the fixed transform to a named subframe on this body, relative to the world frame. The frame_name needs to have the object's name prepended (e.g. "screwdriver/tip" returns true if the object's name is "screwdriver"). Returns an identity transform if frame_name is unknown (and set found to false). The returned transform is guaranteed to be a valid isometry.

Definition at line 153 of file attached_body.cpp.

◆ getGlobalSubframeTransforms()

const moveit::core::FixedTransformsMap& moveit::core::AttachedBody::getGlobalSubframeTransforms ( ) const
inline

Get subframes of this object (in the world frame)

Definition at line 152 of file attached_body.h.

◆ getName()

const std::string& moveit::core::AttachedBody::getName ( ) const
inline

Get the name of the attached body.

Definition at line 74 of file attached_body.h.

◆ getPose()

const Eigen::Isometry3d& moveit::core::AttachedBody::getPose ( ) const
inline

Get the pose of the attached body relative to the parent link.

Definition at line 80 of file attached_body.h.

Here is the caller graph for this function:

◆ getShapePoses()

const EigenSTL::vector_Isometry3d& moveit::core::AttachedBody::getShapePoses ( ) const
inline

Get the shape poses (the transforms to the shapes of this body, relative to the pose). The returned transforms are guaranteed to be valid isometries.

Definition at line 111 of file attached_body.h.

Here is the caller graph for this function:

◆ getShapePosesInLinkFrame()

const EigenSTL::vector_Isometry3d& moveit::core::AttachedBody::getShapePosesInLinkFrame ( ) const
inline

Get the fixed transforms (the transforms to the shapes of this body, relative to the link). The returned transforms are guaranteed to be valid isometries.

Definition at line 131 of file attached_body.h.

Here is the caller graph for this function:

◆ getShapes()

const std::vector<shapes::ShapeConstPtr>& moveit::core::AttachedBody::getShapes ( ) const
inline

Get the shapes that make up this attached body.

Definition at line 104 of file attached_body.h.

Here is the caller graph for this function:

◆ getSubframes()

const moveit::core::FixedTransformsMap& moveit::core::AttachedBody::getSubframes ( ) const
inline

Get subframes of this object (relative to the object pose). The returned transforms are guaranteed to be valid isometries.

Definition at line 146 of file attached_body.h.

Here is the caller graph for this function:

◆ getSubframeTransform()

const Eigen::Isometry3d & moveit::core::AttachedBody::getSubframeTransform ( const std::string &  frame_name,
bool *  found = nullptr 
) const

Get the fixed transform to a named subframe on this body (relative to the body's pose)

The frame_name needs to have the object's name prepended (e.g. "screwdriver/tip" returns true if the object's name is "screwdriver"). Returns an identity transform if frame_name is unknown (and set found to false). The returned transform is guaranteed to be a valid isometry.

Definition at line 135 of file attached_body.cpp.

Here is the caller graph for this function:

◆ getSubframeTransformInLinkFrame()

const Eigen::Isometry3d& moveit::core::AttachedBody::getSubframeTransformInLinkFrame ( const std::string &  frame_name,
bool *  found = nullptr 
) const

Get the fixed transform to a named subframe on this body (relative to the robot link)

The frame_name needs to have the object's name prepended (e.g. "screwdriver/tip" returns true if the object's name is "screwdriver"). Returns an identity transform if frame_name is unknown (and set found to false). The returned transform is guaranteed to be a valid isometry.

◆ getTouchLinks()

const std::set<std::string>& moveit::core::AttachedBody::getTouchLinks ( ) const
inline

Get the links that the attached body is allowed to touch.

Definition at line 117 of file attached_body.h.

Here is the caller graph for this function:

◆ hasSubframeTransform()

bool moveit::core::AttachedBody::hasSubframeTransform ( const std::string &  frame_name) const

Check whether a subframe of given @frame_name is present in this object.

The frame_name needs to have the object's name prepended (e.g. "screwdriver/tip" returns true if the object's name is "screwdriver").

Definition at line 171 of file attached_body.cpp.

Here is the call graph for this function:

◆ setPadding()

void moveit::core::AttachedBody::setPadding ( double  padding)

Set the padding for the shapes of this attached object.

Definition at line 118 of file attached_body.cpp.

◆ setScale()

void moveit::core::AttachedBody::setScale ( double  scale)

Set the scale for the shapes of this attached object.

Definition at line 86 of file attached_body.cpp.

◆ setSubframeTransforms()

void moveit::core::AttachedBody::setSubframeTransforms ( const moveit::core::FixedTransformsMap subframe_poses)
inline

Set all subframes of this object.

Use these to define points of interest on the object to plan with (e.g. screwdriver/tip, kettle/spout, mug/base).

Definition at line 162 of file attached_body.h.


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