#include <add_link_command.h>
Public Types | |
using | ConstPtr = std::shared_ptr< const AddLinkCommand > |
using | Ptr = std::shared_ptr< AddLinkCommand > |
![]() | |
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 |
![]() | |
Command (Command &&)=default | |
Command (CommandType type=CommandType::UNINITIALIZED) | |
Command (const Command &)=default | |
CommandType | getType () const |
bool | operator!= (const Command &rhs) const |
Command & | operator= (Command &&)=default |
Command & | operator= (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::Joint > | joint_ |
std::shared_ptr< const tesseract_scene_graph::Link > | link_ |
bool | replace_allowed_ { false } |
Friends | |
class | boost::serialization::access |
struct | tesseract_common::Serialization |
Definition at line 45 of file add_link_command.h.
using tesseract_environment::AddLinkCommand::ConstPtr = std::shared_ptr<const AddLinkCommand> |
Definition at line 49 of file add_link_command.h.
using tesseract_environment::AddLinkCommand::Ptr = std::shared_ptr<AddLinkCommand> |
Definition at line 48 of file add_link_command.h.
tesseract_environment::AddLinkCommand::AddLinkCommand | ( | ) |
Definition at line 41 of file add_link_command.cpp.
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}".
link | The link to be added to the graph |
replace_allowed | If 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.
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
link | The link to be added to the graph |
joint | The joint to be used to attach link to environment |
replace_allowed | If true then if the link and joint exists it will be replaced, otherwise if false it will fail. |
Definition at line 51 of file add_link_command.cpp.
const std::shared_ptr< const tesseract_scene_graph::Joint > & tesseract_environment::AddLinkCommand::getJoint | ( | ) | const |
Definition at line 67 of file add_link_command.cpp.
const std::shared_ptr< const tesseract_scene_graph::Link > & tesseract_environment::AddLinkCommand::getLink | ( | ) | const |
Definition at line 66 of file add_link_command.cpp.
bool tesseract_environment::AddLinkCommand::operator!= | ( | const AddLinkCommand & | rhs | ) | const |
Definition at line 79 of file add_link_command.cpp.
bool tesseract_environment::AddLinkCommand::operator== | ( | const AddLinkCommand & | rhs | ) | const |
Definition at line 70 of file add_link_command.cpp.
bool tesseract_environment::AddLinkCommand::replaceAllowed | ( | ) | const |
Definition at line 68 of file add_link_command.cpp.
|
private |
Definition at line 82 of file add_link_command.cpp.
|
friend |
Definition at line 109 of file add_link_command.h.
|
friend |
Definition at line 110 of file add_link_command.h.
|
private |
Definition at line 106 of file add_link_command.h.
|
private |
Definition at line 105 of file add_link_command.h.
|
private |
Definition at line 107 of file add_link_command.h.