Skip to content

Commit

Permalink
Use trajectory execution info from parent only if controller list is …
Browse files Browse the repository at this point in the history
…empty

Remove underscore from public members

Remove unnecessary string msg include
  • Loading branch information
sjahr committed Oct 20, 2023
1 parent dafd416 commit 408b933
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 5 deletions.
6 changes: 3 additions & 3 deletions capabilities/src/execute_task_solution_capability.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -168,9 +168,9 @@ bool ExecuteTaskSolutionCapability::constructMotionPlan(const moveit_task_constr
RCLCPP_DEBUG(LOGGER, "Using JointModelGroup '%s' for execution", group->getName().c_str());
}
}
exec_traj.trajectory_ = std::make_shared<robot_trajectory::RobotTrajectory>(model, group);
exec_traj.trajectory_->setRobotTrajectoryMsg(state, sub_traj.trajectory);
exec_traj.controller_names_ = sub_traj.execution_info.controller_names;
exec_traj.trajectory = std::make_shared<robot_trajectory::RobotTrajectory>(model, group);
exec_traj.trajectory->setRobotTrajectoryMsg(state, sub_traj.trajectory);
exec_traj.controller_name = sub_traj.execution_info.controller_names;

/* TODO add action feedback and markers */
exec_traj.effect_on_success = [this, sub_traj,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,6 @@
#pragma once

#include <moveit_task_constructor_msgs/msg/trajectory_execution_info.hpp>
#include <std_msgs/msg/string.hpp>
#include <string>
#include <vector>

Expand Down
4 changes: 3 additions & 1 deletion core/src/container.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -365,7 +365,9 @@ void ContainerBase::insert(Stage::pointer&& stage, int before) {
if (!stage)
throw std::runtime_error(name() + ": received invalid stage pointer");

stage->setTrajectoryExecutionInfo(this->trajectoryExecutionInfo());
if (stage->trajectoryExecutionInfo().controller_names.empty()) {
stage->setTrajectoryExecutionInfo(this->trajectoryExecutionInfo());
}

StagePrivate* impl = stage->pimpl();
impl->setParent(this);
Expand Down

0 comments on commit 408b933

Please sign in to comment.