Port wheel slip plugin to ros2 (eloquent)#1099
Port wheel slip plugin to ros2 (eloquent)#1099scpeters merged 12 commits intoros-simulation:eloquentfrom
Conversation
|
I may need to rework this a bit to match the changes in #1111 |
|
@jacobperron considering the change in #1126 in noetic that attempts to use the parameter value specified in the launch file, what would the equivalent be for ros2? I'm guessing this PR might need a change to match that behavior |
|
I can make a new branch and target to foxy as well |
Note that technically Foxy has already been released (bloomed but not synced yet, still in ros2-testing). So if you really want to break behaviour on Foxy, I'd recommend doing it soon. Otherwise, targeting Galactic. |
This is adding a new plugin, so I don't think it breaks anything |
I don't think we have the same problem in ROS 2, since native parameters are reconfigurable. A parameter passed to the node in a launch file should override the default value in |
Similar to the change in ros-simulation#1111, moves the WheelSlipPlugin::Load call before the parameter callback so that the values from SDF/URDF are set first. Then the callback is changed to ignore negative values, and the default slip parameter values are set to -1, so that the SDF/URDF values are still preferred unless a different parameter value is specified in a launch file.
129b6bb to
00257a6
Compare
Signed-off-by: Steve Peters <scpeters@openrobotics.org>
Signed-off-by: Steve Peters <scpeters@openrobotics.org>
Signed-off-by: Steve Peters <scpeters@openrobotics.org>
| return result; | ||
| }; | ||
|
|
||
| impl_->ros_node_->add_on_set_parameters_callback(param_change_callback); |
There was a problem hiding this comment.
You might want to double-check, but I think we should maintain a reference to the returned callback handle, otherwise the callback may be unregistered.
There was a problem hiding this comment.
yeah, it looks like this was done in ros2/rclcpp#1136
There was a problem hiding this comment.
I copied the approach from disparity_node in stereo_image_proc: https://github.com/ros-perception/image_pipeline/blob/2.2.0/stereo_image_proc/src/stereo_image_proc/disparity_node.cpp#L92-L182 in 0bef26d
Signed-off-by: Steve Peters <scpeters@openrobotics.org>
|
@osrf-jenkins run tests please |
|
some unrelated test failures, but CI is finally working |
Initial port of gazebo_ros_wheel_slip_plugin to ros2. It includes a similar change to ros-simulation#1111, which moved the WheelSlipPlugin::Load call before the parameter callback so that the values from SDF/URDF are set first. Then the callback is changed to ignore negative values, and the default slip parameter values are set to -1, so that the SDF/URDF values are still preferred unless a different parameter value is specified in a launch file. Signed-off-by: Steve Peters <scpeters@openrobotics.org>
Forward port of wheel slip plugin from eloquent (#1099) to foxy. It includes a similar change to #1111, which moved the WheelSlipPlugin::Load call before the parameter callback so that the values from SDF/URDF are set first. Then the callback is changed to ignore negative values, and the default slip parameter values are set to -1, so that the SDF/URDF values are still preferred unless a different parameter value is specified in a launch file. Signed-off-by: Steve Peters <scpeters@openrobotics.org> Co-authored-by: Jacob Perron <jacob@openrobotics.org>
This ports the wheel slip plugin from melodic (#995) to ros2. It uses ros2 parameters instead of dynamic reconfigure.
An example world is provided that shows two
trisphere_cyclemodels that each have two instances of the wheel slip plugin, allowing separate parameters for the front and rear wheels. The demo world has some exampleros2 paramcommands to adjusting the parameters dynamically.