Add new parameter to nav2_velocity_smoother to also smooth the timestamp of TwistStamped messages#5858
Conversation
|
@AndreiCostinescu, all pull requests must be targeted towards the |
Codecov Report❌ Patch coverage is
... and 6 files with indirect coverage changes 🚀 New features to boost your workflow:
|
|
If the PR should target the main branch, should I make the same changes in the main branch and then open a new pull request for that branch? |
There was a problem hiding this comment.
I don't think think this necessarily needs to be parameterized. I think this is a totally sane way for this to be done. Since we still have the timeout in place to stop if it gets too old, marching the interpolation seems fine.
We do need this forward ported to main so that this is available in Rolling and newer distributions so that when you update, you get this also included.
Here's what I think: For Jazzy keep the parameterized nature so that the existing behavior doesn't change for existing users. For the main PR, remove parameterization and simply do the time interpolation as a part of the main code. Then I can merge the pair.
Open a PR for docs.nav2.org and add to the configuration guide the parameter with a note that it is only in Jazzy and otherwise is the default behavior in all other newer distributions.
|
Thanks for you input. I have opened a new pull request #5861 for the main branch to smooth the timestamps of the sent cmd_vel commands by default (not needing a parameter for this). |
|
Great! I commented on the other PR with a couple of changes that should be reflected here as well. Otherwise, this should be good to merge by tomorrow :-) |
|
With that frame_id change, can you also fix the DCO job? |
…p of the smoothed velocity header message Signed-off-by: Andrei Costinescu <andreicostinescu96@gmail.com>
…g_time in nav2_velocity_smoother/README.md Signed-off-by: Andrei Costinescu <andreicostinescu96@gmail.com>
…meter examples in nav2_bringup Signed-off-by: Andrei Costinescu <andreicostinescu96@gmail.com>
Signed-off-by: Andrei Costinescu <andreicostinescu96@gmail.com>
Signed-off-by: Andrei Costinescu <andreicostinescu96@gmail.com>
Signed-off-by: Andrei Costinescu <andreicostinescu96@gmail.com>
Signed-off-by: Andrei Costinescu <andreicostinescu96@gmail.com>
…e and 2) make the difference explicit between using and not using the new parameter Signed-off-by: Andrei Costinescu <andreicostinescu96@gmail.com>
4b7740e to
176a0ca
Compare
…amp of TwistStamped messages (ros-navigation#5858) * Add new parameter to nav2_velocity_smoother that updates the timestamp of the smoothed velocity header message Signed-off-by: Andrei Costinescu <andreicostinescu96@gmail.com> * Update parameter description of stamp_smoothed_velocity_with_smoothing_time in nav2_velocity_smoother/README.md Signed-off-by: Andrei Costinescu <andreicostinescu96@gmail.com> * Add new parameter stamp_smoothed_velocity_with_smoothing_time in parameter examples in nav2_bringup Signed-off-by: Andrei Costinescu <andreicostinescu96@gmail.com> * Fix lines too long cpplint issues in velocity_smoother.cpp Signed-off-by: Andrei Costinescu <andreicostinescu96@gmail.com> * Rephrase parameter description for improved clarity Signed-off-by: Andrei Costinescu <andreicostinescu96@gmail.com> * Rename delta time variable for clarity. Signed-off-by: Andrei Costinescu <andreicostinescu96@gmail.com> * Make the time-smoothing computation more concise. Signed-off-by: Andrei Costinescu <andreicostinescu96@gmail.com> * Change code to 1) not write the timestamp in the cmd_vel->header twice and 2) make the difference explicit between using and not using the new parameter Signed-off-by: Andrei Costinescu <andreicostinescu96@gmail.com> --------- Signed-off-by: Andrei Costinescu <andreicostinescu96@gmail.com>
Add parameter to velocity_smoother controlling whether to overwite the timestamp of the smoothed message or to keep the timestamp of the last received command.
Basic Info
Description of contribution in a few bullet points
stamp_smoothed_velocity_with_smoothing_timeparameter to velocity_smoother node.builtin-interfaces/msg/Time stampmessage header of the TwistStamped output is also smoothed based on the smoothing time.Description of documentation updates required from your changes
Description of how this change was tested
Previous output:
cmd_vel_data_sim.txt
Current output with
stamp_smoothed_velocity_with_smoothing_timeparameter set to true:cmd_vel_data_sim_withParameterEnabled.txt
Future work that may be required in bullet points
For Maintainers:
backport-*.