ros-controls / gazebo_ros2_control

Wrappers, tools and additional API's for using ros2_control with Gazebo Classic
Apache License 2.0
188 stars 120 forks source link

Add `hold_joints` parameter (backport #251) #353

Closed mergify[bot] closed 1 week ago

mergify[bot] commented 1 week ago

@HPCLOL posted a use case of gazebo in https://github.com/ros-controls/ros2_controllers/issues/875: If the simulation is started with an inactive controller, the robot should move with gravity as if the joints were passive.

As discussed with #250 this is currently not possible. This PR adds an parameter to enable this behavior (again).

The result looks like this if no controller was spawned:

https://github.com/ros-controls/gazebo_ros2_control/assets/3367244/45e2f56a-7173-4cee-a30e-02713127c63b


This is an automatic backport of pull request #251 done by Mergify.

mergify[bot] commented 1 week ago

Cherry-pick of 7682dced640efcd67211e085cefbca23e2d1dab5 has failed:

On branch mergify/bp/humble/pr-251
Your branch is up to date with 'origin/humble'.

You are currently cherry-picking commit 7682dce.
  (fix conflicts and run "git cherry-pick --continue")
  (use "git cherry-pick --skip" to skip this patch)
  (use "git cherry-pick --abort" to cancel the cherry-pick operation)

Changes to be committed:
    modified:   doc/index.rst
    modified:   gazebo_ros2_control/src/gazebo_ros2_control_plugin.cpp

Unmerged paths:
  (use "git add <file>..." to mark resolution)
    both modified:   gazebo_ros2_control/src/gazebo_system.cpp

To fix up this pull request, you can check it out locally. See documentation: https://docs.github.com/en/pull-requests/collaborating-with-pull-requests/reviewing-changes-in-pull-requests/checking-out-pull-requests-locally