command.h
Go to the documentation of this file.
1 
28 #ifndef TESSERACT_ENVIRONMENT_COMMAND_H
29 #define TESSERACT_ENVIRONMENT_COMMAND_H
30 
33 #include <memory>
34 #include <vector>
35 #include <boost/serialization/export.hpp>
37 
38 #include <tesseract_common/fwd.h>
39 
40 namespace boost::serialization
41 {
42 class access;
43 }
44 
46 {
47 enum class CommandType
48 {
49  UNINITIALIZED = -1,
50  ADD_LINK = 0,
51  MOVE_LINK = 1,
52  MOVE_JOINT = 2,
53  REMOVE_LINK = 3,
54  REMOVE_JOINT = 4,
61  ADD_SCENE_GRAPH = 11,
66  REPLACE_JOINT = 16,
72 };
73 
74 template <class Archive>
75 void save(Archive& ar, const CommandType& g, const unsigned int version); // NOLINT
76 
77 template <class Archive>
78 void load(Archive& ar, CommandType& g, const unsigned int version); // NOLINT
79 
80 template <class Archive>
81 void serialize(Archive& ar, CommandType& g, const unsigned int version); // NOLINT
82 
83 class Command
84 {
85 public:
86  using Ptr = std::shared_ptr<Command>;
87  using ConstPtr = std::shared_ptr<const Command>;
88 
90  virtual ~Command() = default;
91  Command(const Command&) = default;
92  Command& operator=(const Command&) = default;
93  Command(Command&&) = default;
94  Command& operator=(Command&&) = default;
95 
96  CommandType getType() const { return type_; }
97 
98  bool operator==(const Command& rhs) const;
99  bool operator!=(const Command& rhs) const;
100 
101 private:
103 
106  template <class Archive>
107  void serialize(Archive& ar, const unsigned int version); // NOLINT
108 };
109 
110 using Commands = std::vector<std::shared_ptr<const Command>>;
111 } // namespace tesseract_environment
112 
113 BOOST_CLASS_EXPORT_KEY(tesseract_environment::Command)
114 
115 #endif // COMMAND_H
tesseract_environment::Command::operator!=
bool operator!=(const Command &rhs) const
Definition: command.cpp:66
tesseract_environment::Command::Ptr
std::shared_ptr< Command > Ptr
Definition: command.h:86
tesseract_environment::Command::operator==
bool operator==(const Command &rhs) const
Definition: command.cpp:60
tesseract_environment
Definition: command.h:45
tesseract_environment::CommandType::MODIFY_ALLOWED_COLLISIONS
@ MODIFY_ALLOWED_COLLISIONS
tesseract_environment::CommandType::ADD_SCENE_GRAPH
@ ADD_SCENE_GRAPH
tesseract_environment::CommandType::CHANGE_JOINT_VELOCITY_LIMITS
@ CHANGE_JOINT_VELOCITY_LIMITS
tesseract_environment::CommandType::CHANGE_JOINT_ACCELERATION_LIMITS
@ CHANGE_JOINT_ACCELERATION_LIMITS
tesseract_environment::CommandType::CHANGE_JOINT_ORIGIN
@ CHANGE_JOINT_ORIGIN
tesseract_environment::Command
Definition: command.h:83
tesseract_environment::CommandType::REMOVE_ALLOWED_COLLISION_LINK
@ REMOVE_ALLOWED_COLLISION_LINK
tesseract_environment::CommandType::CHANGE_COLLISION_MARGINS
@ CHANGE_COLLISION_MARGINS
tesseract_environment::Command::operator=
Command & operator=(const Command &)=default
tesseract_environment::CommandType::MOVE_JOINT
@ MOVE_JOINT
TESSERACT_COMMON_IGNORE_WARNINGS_PUSH
#define TESSERACT_COMMON_IGNORE_WARNINGS_PUSH
tesseract_environment::CommandType::ADD_KINEMATICS_INFORMATION
@ ADD_KINEMATICS_INFORMATION
tesseract_environment::CommandType::MOVE_LINK
@ MOVE_LINK
tesseract_common::Serialization
tesseract_environment::Command::~Command
virtual ~Command()=default
tesseract_environment::CommandType::ADD_LINK
@ ADD_LINK
tesseract_environment::Command::type_
CommandType type_
Definition: command.h:102
tesseract_environment::serialize
void serialize(Archive &ar, CommandType &g, const unsigned int version)
Definition: command.cpp:55
tesseract_environment::CommandType::CHANGE_JOINT_POSITION_LIMITS
@ CHANGE_JOINT_POSITION_LIMITS
tesseract_environment::CommandType::REMOVE_JOINT
@ REMOVE_JOINT
tesseract_environment::Command::access
friend class boost::serialization::access
Definition: command.h:104
tesseract_environment::Command::serialize
void serialize(Archive &ar, const unsigned int version)
Definition: command.cpp:69
tesseract_environment::CommandType::REPLACE_JOINT
@ REPLACE_JOINT
tesseract_environment::CommandType::SET_ACTIVE_CONTINUOUS_CONTACT_MANAGER
@ SET_ACTIVE_CONTINUOUS_CONTACT_MANAGER
tesseract_environment::CommandType::CHANGE_LINK_ORIGIN
@ CHANGE_LINK_ORIGIN
tesseract_environment::CommandType::SET_ACTIVE_DISCRETE_CONTACT_MANAGER
@ SET_ACTIVE_DISCRETE_CONTACT_MANAGER
boost::serialization
TESSERACT_COMMON_IGNORE_WARNINGS_POP
tesseract_environment::CommandType::CHANGE_LINK_COLLISION_ENABLED
@ CHANGE_LINK_COLLISION_ENABLED
fwd.h
tesseract_environment::CommandType::CHANGE_LINK_VISIBILITY
@ CHANGE_LINK_VISIBILITY
tesseract_environment::Command::ConstPtr
std::shared_ptr< const Command > ConstPtr
Definition: command.h:87
tesseract_environment::load
void load(Archive &ar, CommandType &g, const unsigned int version)
Definition: command.cpp:47
tesseract_environment::Command::Command
Command(CommandType type=CommandType::UNINITIALIZED)
Definition: command.cpp:37
tesseract_environment::CommandType::REMOVE_LINK
@ REMOVE_LINK
tesseract_environment::CommandType::ADD_TRAJECTORY_LINK
@ ADD_TRAJECTORY_LINK
macros.h
tesseract_environment::CommandType::ADD_CONTACT_MANAGERS_PLUGIN_INFO
@ ADD_CONTACT_MANAGERS_PLUGIN_INFO
tesseract_environment::CommandType::UNINITIALIZED
@ UNINITIALIZED
tesseract_environment::CommandType
CommandType
Definition: command.h:47
tesseract_environment::Commands
std::vector< std::shared_ptr< const Command > > Commands
Definition: command.h:110
tesseract_environment::save
void save(Archive &ar, const CommandType &g, const unsigned int version)
Definition: command.cpp:40
tesseract_environment::Command::getType
CommandType getType() const
Definition: command.h:96


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