Skip to content

Commit

Permalink
Add uuid to tesseract_common::JointTrajectory
Browse files Browse the repository at this point in the history
  • Loading branch information
Levi-Armstrong committed Oct 30, 2024
1 parent da8b145 commit 405a63d
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 0 deletions.
3 changes: 3 additions & 0 deletions tesseract_common/include/tesseract_common/joint_state.h
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,8 @@
#include <tesseract_common/macros.h>
TESSERACT_COMMON_IGNORE_WARNINGS_PUSH
#include <boost/serialization/export.hpp>
#include <boost/serialization/version.hpp>
#include <boost/uuid/uuid.hpp>
#include <Eigen/Core>
#include <vector>
TESSERACT_COMMON_IGNORE_WARNINGS_POP
Expand Down Expand Up @@ -81,6 +83,7 @@ class JointTrajectory
JointTrajectory(std::string description = "");
JointTrajectory(std::vector<JointState> states, std::string description = "");

boost::uuids::uuid uuid{};
std::vector<JointState> states;
std::string description;

Expand Down
4 changes: 4 additions & 0 deletions tesseract_common/src/joint_state.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,8 @@ TESSERACT_COMMON_IGNORE_WARNINGS_PUSH
#include <boost/serialization/nvp.hpp>
#include <boost/serialization/string.hpp>
#include <boost/serialization/vector.hpp>
#include <boost/uuid/uuid_io.hpp>
#include <boost/uuid/uuid_serialize.hpp>
TESSERACT_COMMON_IGNORE_WARNINGS_POP

#include <tesseract_common/utils.h>
Expand Down Expand Up @@ -77,6 +79,7 @@ JointTrajectory::JointTrajectory(std::vector<JointState> states, std::string des
bool JointTrajectory::operator==(const JointTrajectory& other) const
{
bool ret_val = true;
ret_val &= (uuid == other.uuid);
ret_val &= (description == other.description);
ret_val &= (states == other.states);
return ret_val;
Expand Down Expand Up @@ -172,6 +175,7 @@ void JointTrajectory::swap(std::vector<value_type>& other) { states.swap(other);
template <class Archive>
void JointTrajectory::serialize(Archive& ar, const unsigned int version) // NOLINT
{
ar& BOOST_SERIALIZATION_NVP(uuid);
ar& BOOST_SERIALIZATION_NVP(states);
ar& BOOST_SERIALIZATION_NVP(description);
}
Expand Down

0 comments on commit 405a63d

Please sign in to comment.