Skip to content

Commit

Permalink
Fixed bug in JointWaypointMotion
Browse files Browse the repository at this point in the history
  • Loading branch information
Tim Schneider committed Aug 29, 2023
1 parent 7908aa0 commit de1558d
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion src/motion/joint_waypoint_motion.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,10 @@ void JointWaypointMotion::initWaypointMotion(
const franka::RobotState &robot_state,
const std::optional<franka::JointPositions> &previous_command,
ruckig::InputParameter<7> &input_parameter) {
input_parameter.current_position = previous_command->q;
if (previous_command.has_value())
input_parameter.current_position = previous_command->q;
else
input_parameter.current_position = robot_state.q;
input_parameter.current_velocity = robot_state.dq_d;
input_parameter.current_acceleration = robot_state.ddq_d;
}
Expand Down

0 comments on commit de1558d

Please sign in to comment.