Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Cleanup JointTrajectorySet and leverage JointTrajectory UUID #132

Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 0 additions & 1 deletion .clang-format
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,6 @@ AllowAllParametersOfDeclarationOnNextLine: false
AllowShortFunctionsOnASingleLine: true
AllowShortIfStatementsOnASingleLine: false
AllowShortLoopsOnASingleLine: false
AllowShortLoopsOnASingleLine: false
AlwaysBreakBeforeMultilineStrings: false
AlwaysBreakTemplateDeclarations: true
BinPackArguments: false
Expand Down
1 change: 0 additions & 1 deletion common/include/tesseract_qt/common/joint_trajectory_set.h
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,6 @@ struct JointTrajectoryInfo
{
JointState joint_state;
JointTrajectory joint_trajectory;
std::string description;

friend class boost::serialization::access;
template <class Archive>
Expand Down
6 changes: 3 additions & 3 deletions common/src/joint_trajectory_set.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -46,11 +46,10 @@
namespace tesseract_common
{
template <class Archive>
void JointTrajectoryInfo::serialize(Archive& ar, const unsigned int /*version*/)
void JointTrajectoryInfo::serialize(Archive& ar, const unsigned int version)
{
ar& BOOST_SERIALIZATION_NVP(joint_state);
ar& BOOST_SERIALIZATION_NVP(joint_trajectory);
ar& BOOST_SERIALIZATION_NVP(description);
}

JointTrajectorySet::JointTrajectorySet(const std::unordered_map<std::string, double>& initial_state,
Expand Down Expand Up @@ -143,7 +142,8 @@ void JointTrajectorySet::appendJointTrajectory(const JointTrajectory& joint_traj
JointTrajectoryInfo traj_info;
traj_info.joint_state = getNewTrajectoryInitialState();
traj_info.joint_trajectory.reserve(joint_trajectory.size());
traj_info.description = joint_trajectory.description;
traj_info.joint_trajectory.uuid = joint_trajectory.uuid;
traj_info.joint_trajectory.description = joint_trajectory.description;

std::set<std::string> prune_joint_names;
double last_time = traj_info.joint_state.time;
Expand Down
5 changes: 3 additions & 2 deletions joint_trajectory/src/models/joint_trajectory_set_item.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -59,8 +59,9 @@ void JointTrajectorySetItem::ctor()
for (std::size_t i = 0; i < trajectory_set.size(); ++i)
{
auto& traj_info = trajectory_set[i];
QString description = traj_info.description.empty() ? QString("trajectory[%1]").arg(i) :
QString::fromStdString(traj_info.description);
QString description = traj_info.joint_trajectory.description.empty() ?
QString("trajectory[%1]").arg(i) :
QString::fromStdString(traj_info.joint_trajectory.description);
QStandardItem* trajectory_item = new JointTrajectoryInfoItem(description, traj_info);
appendRow(trajectory_item);
}
Expand Down
Loading