-
Notifications
You must be signed in to change notification settings - Fork 334
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
Fix steering controllers library code documentation and naming #1149
Fix steering controllers library code documentation and naming #1149
Conversation
4b06b5f
to
77212df
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Few minor comments
ackermann_steering_controller/src/ackermann_steering_controller.cpp
Outdated
Show resolved
Hide resolved
bicycle_steering_controller/src/bicycle_steering_controller.cpp
Outdated
Show resolved
Hide resolved
steering_controllers_library/include/steering_controllers_library/steering_odometry.hpp
Show resolved
Hide resolved
steering_controllers_library/include/steering_controllers_library/steering_odometry.hpp
Show resolved
Hide resolved
tricycle_steering_controller/src/tricycle_steering_controller.cpp
Outdated
Show resolved
Hide resolved
Co-authored-by: Sai Kishor Kothakota <[email protected]>
Co-authored-by: Sai Kishor Kothakota <[email protected]>
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM. Thanks for addressing the comments!
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I've left comments regarding the new commits
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM
const double steer_position = state_interfaces_[STATE_STEER_AXIS].get_value(); | ||
if ( | ||
!std::isnan(rear_right_wheel_value) && !std::isnan(rear_left_wheel_value) && | ||
!std::isnan(steer_position)) | ||
std::isfinite(traction_right_wheel_value) && std::isfinite(traction_left_wheel_value) && |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
What does traction
mean in this context?
We have front and rear wheel actuated tricycles.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
steering_controller lib does implement tricycles with traction on the other axle as the steering wheel (different than the earlier tricycle_controller, assuming steering+traction no the same wheel), but with front or rear steering (subsequently, rear or front traction)
Here, the old variable name was rear_right/left_wheel_value
independent of the params_.front_steering
value. See the state_interface_configuration()
method, where depending on the params_.front_steering
the front or rear wheel names are exported as state interfaces, which is read here as state_interfaces_[STATE_TRACTION_RIGHT_WHEEL].get_value()
. I just renamed the variable to be valid for both configurations.
Or have I misunderstood something?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
steering_controller lib does implement tricycles with traction on the other axle as the steering wheel (different than the earlier tricycle_controller, assuming steering+traction on the same wheel)
Ah, this might be part of the confusion. But it only supports a subset of tricycles then. In that case this variable is in line with that.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
exactly. I have plans to include the "old" tricycle controller into the steering lib, but step by step
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
nit
ackermann_steering_controller/src/ackermann_steering_controller.cpp
Outdated
Show resolved
Hide resolved
Co-authored-by: Quique Llorente <[email protected]>
* Update documentation and consolidate variable names * Simplify private methods and further update docs * Rename methods * Rename method and variables * Rename convert method * Rename variables and improve doc * Rename local variables * Use std::isfinite instead of !isnan Co-authored-by: Sai Kishor Kothakota <[email protected]> * Use a lowercase theta for heading Co-authored-by: Sai Kishor Kothakota <[email protected]> * Make some temporary variables const * Let update_from_position call update_from_velocity * Explicitly set variables with 0 in constructor * Fix docstring * Apply consistent variable naming Co-authored-by: Quique Llorente <[email protected]> --------- Co-authored-by: Sai Kishor Kothakota <[email protected]> Co-authored-by: Quique Llorente <[email protected]> (cherry picked from commit b245155)
* Update documentation and consolidate variable names * Simplify private methods and further update docs * Rename methods * Rename method and variables * Rename convert method * Rename variables and improve doc * Rename local variables * Use std::isfinite instead of !isnan Co-authored-by: Sai Kishor Kothakota <[email protected]> * Use a lowercase theta for heading Co-authored-by: Sai Kishor Kothakota <[email protected]> * Make some temporary variables const * Let update_from_position call update_from_velocity * Explicitly set variables with 0 in constructor * Fix docstring * Apply consistent variable naming Co-authored-by: Quique Llorente <[email protected]> --------- Co-authored-by: Sai Kishor Kothakota <[email protected]> Co-authored-by: Quique Llorente <[email protected]> (cherry picked from commit b245155)
#1164) * Update documentation and consolidate variable names * Simplify private methods and further update docs * Rename methods * Rename method and variables * Rename convert method * Rename variables and improve doc * Rename local variables * Use std::isfinite instead of !isnan Co-authored-by: Sai Kishor Kothakota <[email protected]> * Use a lowercase theta for heading Co-authored-by: Sai Kishor Kothakota <[email protected]> * Make some temporary variables const * Let update_from_position call update_from_velocity * Explicitly set variables with 0 in constructor * Fix docstring * Apply consistent variable naming Co-authored-by: Quique Llorente <[email protected]> --------- Co-authored-by: Sai Kishor Kothakota <[email protected]> Co-authored-by: Quique Llorente <[email protected]> (cherry picked from commit b245155) Co-authored-by: Christoph Fröhlich <[email protected]>
#1165) * Update documentation and consolidate variable names * Simplify private methods and further update docs * Rename methods * Rename method and variables * Rename convert method * Rename variables and improve doc * Rename local variables * Use std::isfinite instead of !isnan Co-authored-by: Sai Kishor Kothakota <[email protected]> * Use a lowercase theta for heading Co-authored-by: Sai Kishor Kothakota <[email protected]> * Make some temporary variables const * Let update_from_position call update_from_velocity * Explicitly set variables with 0 in constructor * Fix docstring * Apply consistent variable naming Co-authored-by: Quique Llorente <[email protected]> --------- Co-authored-by: Sai Kishor Kothakota <[email protected]> Co-authored-by: Quique Llorente <[email protected]> (cherry picked from commit b245155) Co-authored-by: Christoph Fröhlich <[email protected]>
A follow-up to #1118, using consistent nomenclature introduced in #954
My commits do not change any logic or behavior, just make the code more readable.