@@ -105,7 +105,7 @@ static bool getJointStateFromOffset(const boost::any& direction, const moveit::c
105105}
106106
107107bool MoveRelative::compute (const InterfaceState& state, planning_scene::PlanningScenePtr& scene,
108- SubTrajectory& solution, Direction dir) {
108+ SubTrajectory& solution, Interface:: Direction dir) {
109109 scene = state.scene ()->diff ();
110110 const robot_model::RobotModelConstPtr& robot_model = scene->getRobotModel ();
111111 assert (robot_model);
@@ -191,7 +191,7 @@ bool MoveRelative::compute(const InterfaceState& state, planning_scene::Planning
191191 }
192192
193193 // invert direction?
194- if (dir == BACKWARD) {
194+ if (dir == Interface:: BACKWARD) {
195195 linear *= -1.0 ;
196196 angular *= -1.0 ;
197197 }
@@ -220,7 +220,7 @@ bool MoveRelative::compute(const InterfaceState& state, planning_scene::Planning
220220 linear_norm = linear.norm ();
221221
222222 // invert direction?
223- if (dir == BACKWARD)
223+ if (dir == Interface:: BACKWARD)
224224 linear *= -1.0 ;
225225
226226 // compute absolute transform for link
@@ -275,7 +275,7 @@ bool MoveRelative::compute(const InterfaceState& state, planning_scene::Planning
275275 rviz_marker_tools::makeArrow (m, linear_norm);
276276 auto quat = Eigen::Quaterniond::FromTwoVectors (Eigen::Vector3d::UnitX (), linear);
277277 Eigen::Vector3d pos (link_pose.translation ());
278- if (dir == BACKWARD) {
278+ if (dir == Interface:: BACKWARD) {
279279 // flip arrow direction
280280 quat = quat * Eigen::AngleAxisd (M_PI, Eigen::Vector3d::UnitY ());
281281 // arrow tip at goal pose
@@ -291,7 +291,7 @@ bool MoveRelative::compute(const InterfaceState& state, planning_scene::Planning
291291 // store result
292292 if (robot_trajectory) {
293293 scene->setCurrentState (robot_trajectory->getLastWayPoint ());
294- if (dir == BACKWARD)
294+ if (dir == Interface:: BACKWARD)
295295 robot_trajectory->reverse ();
296296 solution.setTrajectory (robot_trajectory);
297297
@@ -302,25 +302,6 @@ bool MoveRelative::compute(const InterfaceState& state, planning_scene::Planning
302302 return false ;
303303}
304304
305- void MoveRelative::computeForward (const InterfaceState& from) {
306- planning_scene::PlanningScenePtr to;
307- SubTrajectory trajectory;
308-
309- if (!compute (from, to, trajectory, FORWARD) && trajectory.comment ().empty ())
310- silentFailure (); // there is nothing to report (comment is empty)
311- else
312- sendForward (from, InterfaceState (to), std::move (trajectory));
313- }
314-
315- void MoveRelative::computeBackward (const InterfaceState& to) {
316- planning_scene::PlanningScenePtr from;
317- SubTrajectory trajectory;
318-
319- if (!compute (to, from, trajectory, BACKWARD) && trajectory.comment ().empty ())
320- silentFailure ();
321- else
322- sendBackward (InterfaceState (from), to, std::move (trajectory));
323- }
324305} // namespace stages
325306} // namespace task_constructor
326307} // namespace moveit
0 commit comments