Skip to content

[bicycle_steering_controller] Wrong command return #1732

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

Closed
metanav opened this issue Jun 3, 2025 · 1 comment · Fixed by #1733
Closed

[bicycle_steering_controller] Wrong command return #1732

metanav opened this issue Jun 3, 2025 · 1 comment · Fixed by #1733

Comments

@metanav
Copy link

metanav commented Jun 3, 2025

Why does the bicycle_steering_controller return the traction command as angular speed of the rear virtual wheel? I expect it to return linear velocity along with steering angle.

https://github.com/ros-controls/ros2_controllers/blob/master/steering_controllers_library/src/steering_odometry.cpp#L286-L290

$ ros2 topic pub /bicycle_steering_controller/reference  \ 
geometry_msgs/msg/TwistStamped "{twist: {linear: {x: 0.2}, angular: {z: 0.01}}}"

As shown below the linear_velocity_command is 3.2 that is 0.2 /0.0625 (linear.x / wheel_radius).

$ ros2 topic echo /bicycle_steering_controller/controller_state
header:
  stamp:
    sec: 1748972977
    nanosec: 107514147
  frame_id: odom
traction_wheels_position: []
traction_wheels_velocity:
- 3.2
steer_positions:
- 0.016098609122644516
linear_velocity_command:
- 3.2
steering_angle_command:
- 0.016098609122644516

If the wheels angular velocity is intended then the above message is misleading.

The documentation mentions:

Command interfaces [(https://control.ros.org/iron/doc/ros2_controllers/steering_controllers_library/doc/userdoc.html#command-interfaces)
If parameter front_steering == true
<front_wheels_names[i]>/position double, in rad
<rear_wheels_names[i]>/velocity double, in m/s

@christophfroehlich
Copy link
Contributor

christophfroehlich commented Jun 4, 2025

From the comment in the message I'd say that the intention was to publish the command with the same unit as sent to the hardware
https://github.com/ros-controls/control_msgs/blob/323c96d6d8d98faa3799ba90a369d6c49a1c2b75/control_msgs/msg/SteeringControllerStatus.msg#L5

I agree that the msg field name is misleading, as well as the docs are wrong.

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 a pull request may close this issue.

2 participants