Tesseract
Motion Planning Environment
Loading...
Searching...
No Matches
Public Types | Public Member Functions | Private Member Functions | Private Attributes | Friends | List of all members
tesseract_environment::AddLinkCommand Class Reference

#include <add_link_command.h>

Inheritance diagram for tesseract_environment::AddLinkCommand:
Inheritance graph
[legend]
Collaboration diagram for tesseract_environment::AddLinkCommand:
Collaboration graph
[legend]

Public Types

using Ptr = std::shared_ptr< AddLinkCommand >
 
using ConstPtr = std::shared_ptr< const AddLinkCommand >
 
- Public Types inherited from tesseract_environment::Command
using Ptr = std::shared_ptr< Command >
 
using ConstPtr = std::shared_ptr< const Command >
 

Public Member Functions

 AddLinkCommand ()
 
 AddLinkCommand (const tesseract_scene_graph::Link &link, bool replace_allowed=false)
 Adds or replace a link to the environment. More...
 
 AddLinkCommand (const tesseract_scene_graph::Link &link, const tesseract_scene_graph::Joint &joint, bool replace_allowed=false)
 Adds a link and joint in the environment. More...
 
const tesseract_scene_graph::Link::ConstPtrgetLink () const
 
const tesseract_scene_graph::Joint::ConstPtrgetJoint () const
 
bool replaceAllowed () const
 
bool operator== (const AddLinkCommand &rhs) const
 
bool operator!= (const AddLinkCommand &rhs) const
 
- Public Member Functions inherited from tesseract_environment::Command
 Command (CommandType type=CommandType::UNINITIALIZED)
 
virtual ~Command ()=default
 
 Command (const Command &)=default
 
Commandoperator= (const Command &)=default
 
 Command (Command &&)=default
 
Commandoperator= (Command &&)=default
 
CommandType getType () const
 
bool operator== (const Command &rhs) const
 
bool operator!= (const Command &rhs) const
 

Private Member Functions

template<class Archive >
void serialize (Archive &ar, const unsigned int version)
 

Private Attributes

tesseract_scene_graph::Link::ConstPtr link_
 
tesseract_scene_graph::Joint::ConstPtr joint_
 
bool replace_allowed_ { false }
 

Friends

class boost::serialization::access
 

Member Typedef Documentation

◆ ConstPtr

◆ Ptr

Constructor & Destructor Documentation

◆ AddLinkCommand() [1/3]

tesseract_environment::AddLinkCommand::AddLinkCommand ( )
inline

◆ AddLinkCommand() [2/3]

tesseract_environment::AddLinkCommand::AddLinkCommand ( const tesseract_scene_graph::Link link,
bool  replace_allowed = false 
)
inline

Adds or replace a 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 root link with a fixed joint
   with a joint name of joint_{link name}".
Parameters
linkThe link to be added to the graph
replace_allowedIf true then if the link exists it will be replaced, otherwise if false it will fail.

◆ AddLinkCommand() [3/3]

tesseract_environment::AddLinkCommand::AddLinkCommand ( const tesseract_scene_graph::Link link,
const tesseract_scene_graph::Joint joint,
bool  replace_allowed = false 
)
inline

Adds a link and joint in the environment.

If the link and joint exist and replace is allowed

   This command will replace both link and joint if the link is the child link, otherwise this results in error

If the link and joint exist and replace is not allowed

   This command should result in an error

If the link or joint only exists:

   This command should result in an error
Parameters
linkThe link to be added to the graph
jointThe joint to be used to attach link to environment
replace_allowedIf true then if the link and joint exists it will be replaced, otherwise if false it will fail.
Todo:
if joint is not fixed we should verify that limits are provided

Member Function Documentation

◆ getJoint()

const tesseract_scene_graph::Joint::ConstPtr & tesseract_environment::AddLinkCommand::getJoint ( ) const
inline

◆ getLink()

const tesseract_scene_graph::Link::ConstPtr & tesseract_environment::AddLinkCommand::getLink ( ) const
inline

◆ operator!=()

bool tesseract_environment::AddLinkCommand::operator!= ( const AddLinkCommand rhs) const

◆ operator==()

bool tesseract_environment::AddLinkCommand::operator== ( const AddLinkCommand rhs) const

◆ replaceAllowed()

bool tesseract_environment::AddLinkCommand::replaceAllowed ( ) const
inline

◆ serialize()

template<class Archive >
void tesseract_environment::AddLinkCommand::serialize ( Archive &  ar,
const unsigned int  version 
)
private

Friends And Related Function Documentation

◆ boost::serialization::access

friend class boost::serialization::access
friend

Member Data Documentation

◆ joint_

tesseract_scene_graph::Joint::ConstPtr tesseract_environment::AddLinkCommand::joint_
private

◆ link_

tesseract_scene_graph::Link::ConstPtr tesseract_environment::AddLinkCommand::link_
private

◆ replace_allowed_

bool tesseract_environment::AddLinkCommand::replace_allowed_ { false }
private

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