Skip to content

Commit 09a654f

Browse files
Update robot state if time since last command exceeds timeout (#3251)
* Update robot state if time since last command exceeds timeout * update last_commanded_state_, when the command is staled * resolve conflicts * delete space * chore: add new line * refactor: if next_joint_state is nullopt, update robot state with blocking * non-blocking update of robot status * remove unused include file
1 parent 9922704 commit 09a654f

File tree

1 file changed

+1
-0
lines changed

1 file changed

+1
-0
lines changed

moveit_ros/moveit_servo/src/servo_node.cpp

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -398,6 +398,7 @@ void ServoNode::servoLoop()
398398
else
399399
{
400400
// if no new command was created, use current robot state
401+
last_commanded_state_ = current_state = servo_->getCurrentRobotState(false);
401402
updateSlidingWindow(current_state, joint_cmd_rolling_window_, servo_params_.max_expected_latency, cur_time);
402403
servo_->resetSmoothing(current_state);
403404
}

0 commit comments

Comments
 (0)