Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

velocity_control: allow non-persistent initial velocity commands #2265

Conversation

scpeters
Copy link
Member

🎉 New feature

Specify non-persistent initial velocity

Summary

Currently the velocity_control system allows specifying initial velocities, but it treats them as persistent velocity commands. This adds a @persistent attribute to the //initial_angular and //initial_linear plugin elements, which can be set to false in order to specify an initial velocity rather than a persistently updated velocity.

This pull request builds upon #2228 and targets that branch. This is in draft mode until the example is well-documented and a test is added.

Test it

Run with the examples/worlds/initial_velocity.sdf example world and observe different behaviors with different values of the @persistent attribute.

Checklist

  • Signed all commits for DCO
  • Added tests
  • Added example and/or tutorial
  • Updated documentation (as needed)
  • Updated migration guide (as needed)
  • Consider updating Python bindings (if the library has them)
  • codecheck passed (See contributing)
  • All tests passed (See test coverage)
  • While waiting for a review on your PR, please help review another open pull request to support the maintainers

Note to maintainers: Remember to use Squash-Merge and edit the commit message to match the pull request summary while retaining Signed-off-by messages.

Refactor to set model linear and angular velocity
commands directly in the OnCmdVel callback. Remove
the targetVel member variable and UpdateVelocity
method.

Signed-off-by: Steve Peters <[email protected]>
Currently the velocity_control system commands
velocities in a persistent manner. This change adds a
@Persistent attribute (default true) to the //initial_linear
and //initial_angular XML tags of the velocity_control
system. By setting @Persistent=false, the initial_*
values will correspond to initial velocities that may
change over time. Any twist values published to the
cmd_vel topic will still be interpreted as persistent
velocity commands.

Signed-off-by: Steve Peters <[email protected]>
Copy link

codecov bot commented Dec 12, 2023

Codecov Report

All modified and coverable lines are covered by tests ✅

❗ No coverage uploaded for pull request base (scpeters/physics_remove_velocity_cmds@b145c05). Click here to learn what that means.

Additional details and impacted files
@@                           Coverage Diff                            @@
##             scpeters/physics_remove_velocity_cmds    #2265   +/-   ##
========================================================================
  Coverage                                         ?   65.84%           
========================================================================
  Files                                            ?      323           
  Lines                                            ?    30682           
  Branches                                         ?        0           
========================================================================
  Hits                                             ?    20204           
  Misses                                           ?    10478           
  Partials                                         ?        0           

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

@scpeters
Copy link
Member Author

scpeters commented Apr 4, 2024

I will use a different approach to set initial velocity for a model

@scpeters scpeters closed this Apr 4, 2024
@scpeters scpeters deleted the scpeters/nonpersistent_velocity_control branch April 4, 2024 07:11
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
Archived in project
Development

Successfully merging this pull request may close these issues.

1 participant