-
Notifications
You must be signed in to change notification settings - Fork 422
Add AckermannDriveStamped control to steering library #1563
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
base: master
Are you sure you want to change the base?
Conversation
|
The tests on HEAD are currently broken, but I wanted to get this PR out in order to track progress. |
christophfroehlich
left a comment
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.
why WIP?
Please fix the failing jobs, start with the pre-commit and clang job.
The tests on the master branch are green.
steering_controllers_library/include/steering_controllers_library/steering_odometry.hpp
Outdated
Show resolved
Hide resolved
@wittenator, sorry for missing your comment. I noticed that you have updated the tests. Will take another look shortly. |
@wittenator, great work on the test coverage added in I'd suggest adding one more test to cover the new Overall, these changes look solid! |
|
This pull request is in conflict. Could you fix it @wittenator? |
christophfroehlich
left a comment
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 responded to your questions, could you please address them and fix the conflicts from the latest refactoring?
Isn't this implicitly done by the new tests using the yaml parmeterfile? |
I'm on it and going to fix the conflicts over the coming days. Thanks for answering the remaining few questions! |
christophfroehlich
left a comment
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.
Please also address the old open conversation about the argument and variable renaming.
steering_controllers_library/src/steering_controllers_library.cpp
Outdated
Show resolved
Hide resolved
steering_controllers_library/src/steering_controllers_library.cpp
Outdated
Show resolved
Hide resolved
steering_controllers_library/src/steering_controllers_library.cpp
Outdated
Show resolved
Hide resolved
steering_controllers_library/src/steering_controllers_library.cpp
Outdated
Show resolved
Hide resolved
steering_controllers_library/src/steering_controllers_library.cpp
Outdated
Show resolved
Hide resolved
steering_controllers_library/src/steering_controllers_library.cpp
Outdated
Show resolved
Hide resolved
steering_controllers_library/test/test_steering_controllers_library_steering_input.hpp
Outdated
Show resolved
Hide resolved
Co-authored-by: Christoph Fröhlich <christophfroehlich@users.noreply.github.com>
christophfroehlich
left a comment
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.
Thanks for your patience, I still have some comments to be solved.
Co-authored-by: Christoph Fröhlich <christophfroehlich@users.noreply.github.com>
Co-authored-by: Christoph Fröhlich <christophfroehlich@users.noreply.github.com>
|
Thanks for looking over it again! I've fixed both open requests |
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.
Thanks again for the followup. Almost finished IMHO:
- I think the renaming to
angular_commandwas missing in the header files, and I hope that I found all occurrences for improving the argument name. - The build fails now. Please apply the changes from this PR to the added file.
|
|
||
| void SteeringOdometry::update_open_loop(const double v_bx, const double omega_bz, const double dt) | ||
| void SteeringOdometry::update_open_loop( | ||
| const double v_bx, const double last_angular_command_, const double dt, |
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.
| const double v_bx, const double last_angular_command_, const double dt, | |
| const double v_bx, const double angular_command, const double dt, |
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.
Trailing _ is denoting a member variable. and why using last?
|
|
||
| /// Integrate odometry: | ||
| integrate_fk(v_bx, omega_bz, dt); | ||
| integrate_fk(v_bx, last_angular_command_, dt); |
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.
| integrate_fk(v_bx, last_angular_command_, dt); | |
| integrate_fk(v_bx, angular_command, dt); |
| */ | ||
| void update_open_loop(const double v_bx, const double omega_bz, const double dt); | ||
| void update_open_loop( | ||
| const double v_bx, const double omega_bz, const double dt, const bool use_twist_input = true); |
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.
| const double v_bx, const double omega_bz, const double dt, const bool use_twist_input = true); | |
| const double v_bx, const double angular_command, const double dt, const bool use_twist_input = true); |
steering_controllers_library/test/test_steering_controllers_library_ackermann.hpp
Show resolved
Hide resolved
steering_controllers_library/test/test_steering_controllers_library_ackermann.hpp
Show resolved
Hide resolved
| angular_ = use_twist_input | ||
| ? last_angular_command_ | ||
| : convert_steering_angle_to_angular_velocity(v_bx, last_angular_command_); |
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.
| angular_ = use_twist_input | |
| ? last_angular_command_ | |
| : convert_steering_angle_to_angular_velocity(v_bx, last_angular_command_); | |
| angular_ = use_twist_input | |
| ? angular_command | |
| : convert_steering_angle_to_angular_velocity(v_bx, angular_command); |
| std::tuple<std::vector<double>, std::vector<double>> SteeringOdometry::get_commands( | ||
| const double v_bx, const double omega_bz, const bool open_loop, | ||
| const bool reduce_wheel_speed_until_steering_reached) | ||
| const double v_bx, const double last_angular_command_, const bool open_loop, |
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.
| const double v_bx, const double last_angular_command_, const bool open_loop, | |
| const double v_bx, const double angular_command, const bool open_loop, |
| ? SteeringOdometry::convert_twist_to_steering_angle(v_bx, last_angular_command_) | ||
| : last_angular_command_; |
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.
| ? SteeringOdometry::convert_twist_to_steering_angle(v_bx, last_angular_command_) | |
| : last_angular_command_; | |
| ? SteeringOdometry::convert_twist_to_steering_angle(v_bx, angular_command) | |
| : angular_command; |
| * \return Tuple of velocity commands and steering commands | ||
| */ | ||
| std::tuple<std::vector<double>, std::vector<double>> get_commands( | ||
| const double v_bx, const double omega_bz, const bool open_loop = true, |
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.
| const double v_bx, const double omega_bz, const bool open_loop = true, | |
| const double v_bx, const double angular_command, const bool open_loop = true, |
This PR adds the option to use steering angle and linear velocity for controllers that inherit from the steering library.
To send us a pull request, please:
colcon testandpre-commit run(requires you to install pre-commit bypip3 install pre-commit)