Skip to content

Commit b1c1c00

Browse files
committed
Check for acceleration state interface before attempting to read from it
1 parent 7e680a7 commit b1c1c00

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

ur_controllers/src/passthrough_trajectory_controller.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -607,7 +607,7 @@ bool PassthroughTrajectoryController::check_goal_tolerance()
607607
return false;
608608
}
609609
}
610-
if (!active_joint_traj_.points.back().accelerations.empty()) {
610+
if (!active_joint_traj_.points.back().accelerations.empty() && !joint_acceleration_state_interface_.empty()) {
611611
const auto joint_acc = joint_acceleration_state_interface_[i].get().get_optional();
612612
if (!joint_acc.has_value()) {
613613
return false;

0 commit comments

Comments
 (0)