Skip to content

Commit

Permalink
hold position on path tolerance error
Browse files Browse the repository at this point in the history
  • Loading branch information
dcconner committed Jun 1, 2018
1 parent 3a9b7b1 commit 569ef90
Showing 1 changed file with 7 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -419,6 +419,12 @@ update(const ros::Time& time, const ros::Duration& period)
}
rt_segment_goal->preallocated_result_->error_code =
control_msgs::FollowJointTrajectoryResult::PATH_TOLERANCE_VIOLATED;

// If we violate path tolerance then hold current position and return error
// This either sets current joint position or current desired position based on the
// stop_trajectory_duration_ parameter
setHoldPosition(time_data.uptime, rt_active_goal_);

rt_segment_goal->setAborted(rt_segment_goal->preallocated_result_);
rt_active_goal_.reset();
successful_joint_traj_.reset();
Expand Down Expand Up @@ -705,7 +711,7 @@ queryStateService(control_msgs::QueryTrajectoryState::Request& req,
response_point.velocity[i] = state.velocity[0];
response_point.acceleration[i] = state.acceleration[0];
}

// Populate response
resp.name = joint_names_;
resp.position = response_point.position;
Expand Down

0 comments on commit 569ef90

Please sign in to comment.