Tesseract
Motion Planning Environment
Loading...
Searching...
No Matches
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 <boost/serialization/access.hpp>
34#include <memory>
35#include <vector>
37
39{
40enum class CommandType
41{
42 UNINITIALIZED = -1,
43 ADD_LINK = 0,
44 MOVE_LINK = 1,
45 MOVE_JOINT = 2,
46 REMOVE_LINK = 3,
47 REMOVE_JOINT = 4,
54 ADD_SCENE_GRAPH = 11,
59 REPLACE_JOINT = 16,
64};
65
66template <class Archive>
67void save(Archive& ar, const CommandType& g, const unsigned int version); // NOLINT
68
69template <class Archive>
70void load(Archive& ar, CommandType& g, const unsigned int version); // NOLINT
71
72template <class Archive>
73void serialize(Archive& ar, CommandType& g, const unsigned int version); // NOLINT
74
76{
77public:
78 using Ptr = std::shared_ptr<Command>;
79 using ConstPtr = std::shared_ptr<const Command>;
80
82 virtual ~Command() = default;
83 Command(const Command&) = default;
84 Command& operator=(const Command&) = default;
85 Command(Command&&) = default;
86 Command& operator=(Command&&) = default;
87
88 CommandType getType() const { return type_; }
89
90 bool operator==(const Command& rhs) const;
91 bool operator!=(const Command& rhs) const;
92
93private:
95
97 template <class Archive>
98 void serialize(Archive& ar, const unsigned int version); // NOLINT
99};
100
101using Commands = std::vector<Command::ConstPtr>;
102} // namespace tesseract_environment
103
104#endif // COMMAND_H
Definition: command.h:76
void serialize(Archive &ar, const unsigned int version)
Definition: command.cpp:71
std::shared_ptr< Command > Ptr
Definition: command.h:78
Command(Command &&)=default
std::shared_ptr< const Command > ConstPtr
Definition: command.h:79
Command & operator=(Command &&)=default
CommandType getType() const
Definition: command.h:88
Command & operator=(const Command &)=default
friend class boost::serialization::access
Definition: command.h:96
Command(const Command &)=default
bool operator!=(const Command &rhs) const
Definition: command.cpp:68
CommandType type_
Definition: command.h:94
bool operator==(const Command &rhs) const
Definition: command.cpp:62
Common Tesseract Macros.
#define TESSERACT_COMMON_IGNORE_WARNINGS_PUSH
Definition: macros.h:71
Definition: create_convex_hull.cpp:36
Definition: command.h:39
void save(Archive &ar, const CommandType &g, const unsigned int version)
Definition: command.cpp:42
void serialize(Archive &ar, CommandType &g, const unsigned int version)
Definition: command.cpp:57
std::vector< Command::ConstPtr > Commands
Definition: command.h:101
void load(Archive &ar, CommandType &g, const unsigned int version)
Definition: command.cpp:49
CommandType
Definition: command.h:41
mCollisionCheckConfig contact_request type
Definition: tesseract_environment_collision.cpp:103
SceneGraph g
Definition: tesseract_srdf_unit.cpp:239