Tesseract 0.28.4
Loading...
Searching...
No Matches
tesseract::environment::AddTrajectoryLinkCommand Class Reference
Inheritance diagram for tesseract::environment::AddTrajectoryLinkCommand:

Public Types

enum class  Method : std::uint8_t { PER_STATE_OBJECTS , PER_STATE_CONVEX_HULL , GLOBAL_PER_LINK_CONVEX_HULL , GLOBAL_CONVEX_HULL }
 Specifies how the trajectory is represented as a collision object in the environment. More...
using Ptr = std::shared_ptr<AddTrajectoryLinkCommand>
using ConstPtr = std::shared_ptr<const AddTrajectoryLinkCommand>
Public Types inherited from tesseract::environment::Command
using Ptr = std::shared_ptr<Command>
using ConstPtr = std::shared_ptr<const Command>

Public Member Functions

 AddTrajectoryLinkCommand (common::LinkId link_id, common::LinkId parent_link_id, tesseract::common::JointTrajectory trajectory, bool replace_allowed=false, Method method=Method::PER_STATE_OBJECTS)
 Adds or replace a trajectory link to the environment.
const common::LinkId & getLinkId () const
const common::LinkId & getParentLinkId () const
const tesseract::common::JointTrajectory & getTrajectory () const
bool replaceAllowed () const
AddTrajectoryLinkCommand::Method getMethod () const
bool operator== (const AddTrajectoryLinkCommand &rhs) const
bool operator!= (const AddTrajectoryLinkCommand &rhs) const
Public Member Functions inherited from tesseract::environment::Command
 Command (CommandType type=CommandType::UNINITIALIZED)
 Command (const Command &)=default
Command & operator= (const Command &)=default
 Command (Command &&)=default
Command & operator= (Command &&)=default
CommandType getType () const
bool operator== (const Command &rhs) const
bool operator!= (const Command &rhs) const

Friends

template<class Archive>
friend void::tesseract::environment::serialize (Archive &ar, AddTrajectoryLinkCommand &obj)

Member Enumeration Documentation

◆ Method

Specifies how the trajectory is represented as a collision object in the environment.

Enumerator
PER_STATE_OBJECTS 

Adds the collision objects of all active links for every state in the trajectory.

PER_STATE_CONVEX_HULL 

Adds a single convex hull for every state in the trajectory.

GLOBAL_PER_LINK_CONVEX_HULL 

Converts each active link's collision geometry across all trajectory states into a single convex hull, resulting in one collision object per active link.

GLOBAL_CONVEX_HULL 

Merges all collision geometries across all trajectory states and all active links into a single convex hull, represented as one unified collision object.

Constructor & Destructor Documentation

◆ AddTrajectoryLinkCommand()

tesseract::environment::AddTrajectoryLinkCommand::AddTrajectoryLinkCommand ( common::LinkId link_id,
common::LinkId parent_link_id,
tesseract::common::JointTrajectory trajectory,
bool replace_allowed = false,
Method method = Method::PER_STATE_OBJECTS )

Adds or replace a trajectory link to the environment.

If the link exists and replace_allowed equals true:

   This command should replace the current link with the new link

If the link exists and replace_allowed equals false:

   This command should result in an error

If the link does not exist:

   This command should attach the link to the parent link with a fixed joint
   with a joint name of joint_{link name}".
Parameters
link_idThe link id
parent_link_idThe parent link id
trajectoryThe trajectory to used for generating link
replace_allowedIf true then if the link exists it will be replaced, otherwise if false it will fail.
methodSpecifies how the trajectory is represented as a collision object in the environment.