Skip to content

Commit

Permalink
Update joint_trajectory_controller.cpp
Browse files Browse the repository at this point in the history
  • Loading branch information
destogl authored Feb 6, 2024
1 parent a058846 commit dcda1c3
Showing 1 changed file with 0 additions and 32 deletions.
32 changes: 0 additions & 32 deletions joint_trajectory_controller/src/joint_trajectory_controller.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -134,38 +134,6 @@ controller_interface::return_type JointTrajectoryController::update(
}
}

<<<<<<< HEAD
auto compute_error_for_joint = [&](
JointTrajectoryPoint & error, int index,
const JointTrajectoryPoint & current,
const JointTrajectoryPoint & desired)
{
// error defined as the difference between current and desired
if (joints_angle_wraparound_[index])
{
// if desired, the shortest_angular_distance is calculated, i.e., the error is
// normalized between -pi<error<pi
error.positions[index] =
angles::shortest_angular_distance(current.positions[index], desired.positions[index]);
}
else
{
error.positions[index] = desired.positions[index] - current.positions[index];
}
if (
has_velocity_state_interface_ &&
(has_velocity_command_interface_ || has_effort_command_interface_))
{
error.velocities[index] = desired.velocities[index] - current.velocities[index];
}
if (has_acceleration_state_interface_ && has_acceleration_command_interface_)
{
error.accelerations[index] = desired.accelerations[index] - current.accelerations[index];
}
};

=======
>>>>>>> 833ed7f ([JTC] Convert lambda to class functions (#945))
// don't update goal after we sampled the trajectory to avoid any racecondition
const auto active_goal = *rt_active_goal_.readFromRT();

Expand Down

0 comments on commit dcda1c3

Please sign in to comment.