ros-controls / gazebo_ros2_control

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

Robot still saggs if interfaces are not claimed #250

Open christophfroehlich opened 6 months ago

christophfroehlich commented 6 months ago

Since #177 the joints without claimed interfaces are set to have zero velocity. I'm still not exactly sure if this really solves an issue, because IMHO it does not work but breaks other configurations (passive joints were already fixed; but joints without active controller might be expected to fall down, e.g. with effort interface: fix proposed with #251 ):

https://github.com/ros-controls/gazebo_ros2_control/assets/3367244/be3d1751-a2f8-4d3f-91fb-89f5d680c9db

If this is an important usecase, we should save the position at time of initialization or perform_command_mode_switch (if a controller was deactivated later) and set also the position to that value, not only the velocity to zero (similar to #213) https://github.com/ros-controls/gazebo_ros2_control/blob/3c8f5bb4a4cc5eb01240afdbda9094f3ea3263ec/gazebo_ros2_control/src/gazebo_system.cpp#L604-L607