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]

Public Types

using ConstPtr = std::shared_ptr< const AddLinkCommand >
 
using Ptr = std::shared_ptr< AddLinkCommand >
 
- Public Types inherited from tesseract_environment::Command
using ConstPtr = std::shared_ptr< const Command >
 
using Ptr = std::shared_ptr< 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 std::shared_ptr< const tesseract_scene_graph::Joint > & getJoint () const
 
const std::shared_ptr< const tesseract_scene_graph::Link > & getLink () const
 
bool operator!= (const AddLinkCommand &rhs) const
 
bool operator== (const AddLinkCommand &rhs) const
 
bool replaceAllowed () const
 
- Public Member Functions inherited from tesseract_environment::Command
 Command (Command &&)=default
 
 Command (CommandType type=CommandType::UNINITIALIZED)
 
 Command (const Command &)=default
 
CommandType getType () const
 
bool operator!= (const Command &rhs) const
 
Commandoperator= (Command &&)=default
 
Commandoperator= (const Command &)=default
 
bool operator== (const Command &rhs) const
 
virtual ~Command ()=default
 

Private Member Functions

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

Private Attributes

std::shared_ptr< const tesseract_scene_graph::Jointjoint_
 
std::shared_ptr< const tesseract_scene_graph::Linklink_
 
bool replace_allowed_ { false }
 

Friends

class boost::serialization::access
 
struct tesseract_common::Serialization
 

Detailed Description

Definition at line 45 of file add_link_command.h.

Member Typedef Documentation

◆ ConstPtr

Definition at line 49 of file add_link_command.h.

◆ Ptr

Definition at line 48 of file add_link_command.h.

Constructor & Destructor Documentation

◆ AddLinkCommand() [1/3]

tesseract_environment::AddLinkCommand::AddLinkCommand ( )

Definition at line 41 of file add_link_command.cpp.

◆ AddLinkCommand() [2/3]

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

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.

Definition at line 43 of file add_link_command.cpp.

◆ AddLinkCommand() [3/3]

tesseract_environment::AddLinkCommand::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.

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

Definition at line 51 of file add_link_command.cpp.

Member Function Documentation

◆ getJoint()

const std::shared_ptr< const tesseract_scene_graph::Joint > & tesseract_environment::AddLinkCommand::getJoint ( ) const

Definition at line 67 of file add_link_command.cpp.

◆ getLink()

const std::shared_ptr< const tesseract_scene_graph::Link > & tesseract_environment::AddLinkCommand::getLink ( ) const

Definition at line 66 of file add_link_command.cpp.

◆ operator!=()

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

Definition at line 79 of file add_link_command.cpp.

◆ operator==()

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

Definition at line 70 of file add_link_command.cpp.

◆ replaceAllowed()

bool tesseract_environment::AddLinkCommand::replaceAllowed ( ) const

Definition at line 68 of file add_link_command.cpp.

◆ serialize()

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

Definition at line 82 of file add_link_command.cpp.

Friends And Related Function Documentation

◆ boost::serialization::access

friend class boost::serialization::access
friend

Definition at line 109 of file add_link_command.h.

◆ tesseract_common::Serialization

friend struct tesseract_common::Serialization
friend

Definition at line 110 of file add_link_command.h.

Member Data Documentation

◆ joint_

std::shared_ptr<const tesseract_scene_graph::Joint> tesseract_environment::AddLinkCommand::joint_
private

Definition at line 106 of file add_link_command.h.

◆ link_

std::shared_ptr<const tesseract_scene_graph::Link> tesseract_environment::AddLinkCommand::link_
private

Definition at line 105 of file add_link_command.h.

◆ replace_allowed_

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

Definition at line 107 of file add_link_command.h.


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


tesseract_environment
Author(s): Levi Armstrong
autogenerated on Sun May 18 2025 03:02:21