Skip to content

Commit

Permalink
Fix stair step in JTC when new trajectory message received
Browse files Browse the repository at this point in the history
  • Loading branch information
bijoua29 authored and destogl committed Sep 26, 2023
1 parent be07b0a commit 4a85ca0
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -142,6 +142,7 @@ class JointTrajectoryController : public controller_interface::ControllerInterfa
Params params_;

trajectory_msgs::msg::JointTrajectoryPoint last_commanded_state_;
rclcpp::Time last_commanded_time_;
/// Specify interpolation method. Default to splines.
interpolation_methods::InterpolationMethod interpolation_method_{
interpolation_methods::DEFAULT_INTERPOLATION};
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -318,6 +318,7 @@ controller_interface::return_type JointTrajectoryController::update(

// store the previous command. Used in open-loop control mode
last_commanded_state_ = state_desired_;
last_commanded_time_ = time;
}

if (active_goal)
Expand Down

0 comments on commit 4a85ca0

Please sign in to comment.