Function moveit_servo::updateSlidingWindow

Function Documentation

void moveit_servo::updateSlidingWindow(KinematicState &next_joint_state, std::deque<KinematicState> &joint_cmd_rolling_window, double max_expected_latency, const rclcpp::Time &cur_time)

Adds a new joint state command to a queue containing commands over a time window. Also modifies the velocities of the commands to help avoid overshooting.

Parameters:
  • next_joint_state – The next commanded joint state.

  • joint_cmd_rolling_window – Queue of containing a rolling window of joint commands.

  • max_expected_latency – The next_joint_state will be added to the joint_cmd_rolling_window with a time stamp of

  • cur_time – The current time stamp when the method is called. This value is used to update the time stamp of next_joint_state