Skip to content

Commit

Permalink
non-blocking update of robot status
Browse files Browse the repository at this point in the history
  • Loading branch information
KazuyaOguma18 committed Feb 6, 2025
1 parent e88d08d commit 7a1f1b9
Showing 1 changed file with 2 additions and 4 deletions.
6 changes: 2 additions & 4 deletions moveit_ros/moveit_servo/src/servo_node.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -38,6 +38,7 @@
*
*/

#include <cstddef>
#if __has_include(<realtime_tools/realtime_helpers.hpp>)
#include <realtime_tools/realtime_helpers.hpp>
#else
Expand Down Expand Up @@ -397,11 +398,8 @@ void ServoNode::servoLoop()
}
else
{
// The next command does not exist = Because the robot is in a stopped state and there is no next target pose, a blocking process is used to fully update the robot's state.
if (!next_joint_state) {
last_commanded_state_ = servo_->getCurrentRobotState(true);
}
// if no new command was created, use current robot state
last_commanded_state_ = current_state = servo_->getCurrentRobotState(false);
updateSlidingWindow(current_state, joint_cmd_rolling_window_, servo_params_.max_expected_latency, cur_time);
servo_->resetSmoothing(current_state);
}
Expand Down

0 comments on commit 7a1f1b9

Please sign in to comment.