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

gazebo_ros_wheel_slip: support parameters specified in launch file #1126

Conversation

scpeters
Copy link
Member

This re-targets #1111 to noetic.

The gazebo_ros_wheel_slip plugin currently ignores slip compliance values specified in a launch file due to the check of the level parameter added in 3cf9f5e, which ensures that parameter values specified in the urdf / sdf xml parameters are not over-ridden by the default values specified in the .cfg file. In order to respect the values set in launch files but ignore the defaults in the .cfg file, change the .cfg default values to -1 and adjust the callback to ignore negative values. This is fine because gazebo's WheelSlipPlugin already has default values for the slip compliance parameters, so the .cfg defaults are extraneous.

This also reverts 3cf9f5e so that the level parameter is ignored again.

See also the comment by @Maxx84 on #1111: #1111 (comment)

The WheelSlipPlugin already has default values for the slip
compliance parameters, so ignore the default values set in
WheelSlip.cfg by making them negative and instruct the
callback to ignore negative values.
Also, ignore the `level` variable in callback so that
parameters set in launch file will not be ignored.
@scpeters scpeters changed the title WheelSlip.cfg: ignore default parameter values gazebo_ros_wheel_slip: support parameters specified in launch file Jun 17, 2020
Copy link
Collaborator

@jacobperron jacobperron left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@scpeters
Copy link
Member Author

one unrelated test failure; it's probably flaky

@scpeters scpeters merged commit bf07b40 into ros-simulation:noetic-devel Jun 24, 2020
@scpeters scpeters deleted the wheel_slip_noetic_ignore_cfg_default branch June 24, 2020 21:32
cohen39 pushed a commit to cohen39/gazebo_ros_pkgs that referenced this pull request Nov 15, 2021
The WheelSlipPlugin already has default values for the slip
compliance parameters, so ignore the default values set in
WheelSlip.cfg by making them negative and instruct the
callback to ignore negative values.
Also, ignore the `level` variable in callback so that
parameters set in launch file will not be ignored.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants