Skip to content

Commit

Permalink
Merge pull request #236 from gavanderhoorn/jta_remove_unused_overload
Browse files Browse the repository at this point in the history
driver: remove unused overload of withinGoalConstraints(..).
  • Loading branch information
shaun-edwards authored Aug 13, 2018
2 parents 564ad80 + 959a858 commit 8e46584
Show file tree
Hide file tree
Showing 2 changed files with 0 additions and 35 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -283,9 +283,6 @@ class JointTrajectoryAction

bool withinGoalConstraints(const control_msgs::FollowJointTrajectoryFeedbackConstPtr &msg,
const trajectory_msgs::JointTrajectory & traj, int robot_id);

bool withinGoalConstraints(const control_msgs::FollowJointTrajectoryFeedbackConstPtr &msg,
const motoman_msgs::DynamicJointTrajectory & traj);
};

} // namespace joint_trajectory_action
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -629,38 +629,6 @@ bool JointTrajectoryAction::withinGoalConstraints(
return rtn;
}

bool JointTrajectoryAction::withinGoalConstraints(const control_msgs::FollowJointTrajectoryFeedbackConstPtr &msg,
const motoman_msgs::DynamicJointTrajectory & traj)
{
bool rtn = false;
if (traj.points.empty())
{
ROS_WARN("Empty joint trajectory passed to check goal constraints, return false");
rtn = false;
}
else
{
int last_point = traj.points.size() - 1;

const motoman_msgs::DynamicJointsGroup &pt = traj.points[last_point].groups[3];

int group_number = pt.group_number;

if (industrial_robot_client::utils::isWithinRange(
last_trajectory_state_map_[group_number]->joint_names,
last_trajectory_state_map_[group_number]->actual.positions, traj.joint_names,
traj.points[last_point].groups[3].positions, goal_threshold_))
{
rtn = true;
}
else
{
rtn = false;
}
}
return rtn;
}

bool JointTrajectoryAction::withinGoalConstraints(
const control_msgs::FollowJointTrajectoryFeedbackConstPtr &msg,
const trajectory_msgs::JointTrajectory & traj, int robot_id)
Expand Down

0 comments on commit 8e46584

Please sign in to comment.