Trajectory blending with new trajectory deferral#2401
Conversation
Codecov Report❌ Patch coverage is Additional details and impacted files@@ Coverage Diff @@
## master #2401 +/- ##
==========================================
+ Coverage 86.76% 86.93% +0.16%
==========================================
Files 148 148
Lines 15853 16102 +249
Branches 1347 1357 +10
==========================================
+ Hits 13755 13998 +243
+ Misses 1604 1601 -3
- Partials 494 503 +9
Flags with carried forward coverage won't be shown. Click here to find out more.
🚀 New features to boost your workflow:
|
christophfroehlich
left a comment
There was a problem hiding this comment.
Partial port of the ROS 1 "update existing trajectory" behavior to ROS 2 joint_trajectory_controller.
Fixes #84
For documentation here, what is different from the ROS 1 behavior/what is maybe missing to port?
Please also update the release_notes and update the documentation.
| const rclcpp::Duration update_rate = rclcpp::Duration::from_seconds(0.01)) | ||
| { | ||
| if (start_time == rclcpp::Time(0, 0, RCL_STEADY_TIME)) | ||
| if (start_time.nanoseconds() == 0) |
There was a problem hiding this comment.
Why did you have to change this?
There was a problem hiding this comment.
IMO this is a better comparison as it doesn't involve the type of the clock in a zero check
There was a problem hiding this comment.
For the new test I had to pass a future stamp which was required to use ROS_TIME to pass validate_trajectory_msg. This caused a clock type mismatch in updateControllerAsync because the check start_time == rclcpp::Time(0, 0, RCL_STEADY_TIME) throws when start_time is a different clock type. Since the check is purely testing for a zero value, I switched to start_time.nanoseconds() == 0 which is clock-type-agnostic.
|
I'll review the logic and tests soon. I need time |
498c4ed to
e7db781
Compare
saikishor
left a comment
There was a problem hiding this comment.
The main logic looks good.
I still need to verify the tests though
Description
Partial port of the ROS 1 "update existing trajectory" behavior to ROS 2 joint_trajectory_controller.
Related to #84
What this PR does:
What this PR does NOT target: ( Compared to ROS1 blending feature )
Is this user-facing behavior change?
Yes. When allow_trajectory_blending is true (default), the active trajectory will continue running until the new trajectory's start time.
Did you use Generative AI?
Yes, Google Gemini and Claude were used to make improvements in manually written code, architectural analysis, edge-case review.
Additional Information
TODOs
To send us a pull request, please:
colcon testandpre-commit run(requires you to install pre-commit bypip3 install pre-commit)