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

Ackermann steering with steering angle and sub_topic. #1860

Merged
merged 4 commits into from
Jan 24, 2023

Conversation

bperseghetti
Copy link
Member

@bperseghetti bperseghetti commented Jan 15, 2023

🎉 New feature

Closes #1863

Summary

Option to use <steering_only> to enable a mode that does not drive the wheels. It instead only controls the central steering angle phi in radians on a /model/{name_of_model}/steer_angle gz::msgs::Double. This is usefull for simulating the control of a real vehicle without direct cmd_vel capabilities.

Test it

Example:

<plugin
  filename="gz-sim-ackermann-steering-system"
  name="gz::sim::systems::AckermannSteering">
  <steering_only>true</steering_only>
  <left_steering_joint>MR_Buggy3/FrontLeftWheelSteeringJoint</left_steering_joint>
  <right_steering_joint>MR_Buggy3/FrontRightWheelSteeringJoint</right_steering_joint>
  <steering_limit>0.4</steering_limit>
  <wheel_base>.2255</wheel_base>
  <wheel_separation>.2</wheel_separation>
</plugin>
UpdatedAckermannPlugin.mp4

Checklist

  • Signed all commits for DCO
  • Added tests
  • Added example and/or tutorial
  • Updated documentation (as needed)
  • Updated migration guide (as needed)
  • Consider updating Python bindings (if the library has them)
  • codecheck passed (See contributing)
  • All tests passed (See test coverage)
  • While waiting for a review on your PR, please help review another open pull request to support the maintainers

Note to maintainers: Remember to use Squash-Merge and edit the commit message to match the pull request summary while retaining Signed-off-by messages.

@bperseghetti bperseghetti force-pushed the pr-combined-ackermann-steer-only branch 3 times, most recently from 953de77 to c041d57 Compare January 16, 2023 16:01
@bperseghetti bperseghetti requested review from ahcorde and removed request for mjcarroll January 16, 2023 16:03
@bperseghetti bperseghetti force-pushed the pr-combined-ackermann-steer-only branch from c041d57 to 88d4dbf Compare January 17, 2023 14:07
Option to use <steering_only> to enable a mode that does not drive the
wheels. It instead only controls the central steering angle phi in radians
on a /model/{name_of_model}/steer_angle gz::msgs::Double.
This is usefull for simulating the control of a real vehicle without
direct cmd_vel capabilities.

Signed-off-by: Benjamin Perseghetti <[email protected]>
@bperseghetti bperseghetti force-pushed the pr-combined-ackermann-steer-only branch from 88d4dbf to 53d556f Compare January 17, 2023 14:56
@codecov
Copy link

codecov bot commented Jan 17, 2023

Codecov Report

Merging #1860 (6cd2907) into gz-sim7 (1eb3a95) will decrease coverage by 0.03%.
The diff coverage is 75.97%.

❗ Current head 6cd2907 differs from pull request most recent head 4b053e8. Consider uploading reports for the commit 4b053e8 to get more accurate results

@@             Coverage Diff             @@
##           gz-sim7    #1860      +/-   ##
===========================================
- Coverage    64.71%   64.68%   -0.03%     
===========================================
  Files          343      343              
  Lines        27430    27495      +65     
===========================================
+ Hits         17750    17785      +35     
- Misses        9680     9710      +30     
Impacted Files Coverage Δ
...rc/systems/ackermann_steering/AckermannSteering.hh 100.00% <ø> (ø)
...rc/systems/ackermann_steering/AckermannSteering.cc 80.44% <75.97%> (-5.11%) ⬇️

Help us with your feedback. Take ten seconds to tell us how you rate us. Have a feature suggestion? Share it here.

@mjcarroll
Copy link
Contributor

Changes look good to me, but can you add some tests to cover this new functionality?

@bperseghetti
Copy link
Member Author

Mmmmm, found one last interesting use that needs addressed. 4 wheel steer and multiple vehicles, guess I get to add sub_topics to it as well.

Signed-off-by: Benjamin Perseghetti <[email protected]>
@bperseghetti bperseghetti changed the title Ackermann steering with steering angle. Ackermann steering with steering angle and sub_topic. Jan 19, 2023
test/integration/ackermann_steering_system.cc Outdated Show resolved Hide resolved
test/integration/ackermann_steering_system.cc Outdated Show resolved Hide resolved
test/integration/ackermann_steering_system.cc Outdated Show resolved Hide resolved
test/integration/ackermann_steering_system.cc Outdated Show resolved Hide resolved
test/worlds/ackermann_steering_only.sdf Outdated Show resolved Hide resolved
test/worlds/ackermann_steering_only_custom_sub_topics.sdf Outdated Show resolved Hide resolved
@bperseghetti bperseghetti force-pushed the pr-combined-ackermann-steer-only branch from e33cd2b to 3f436f8 Compare January 20, 2023 22:00
@bperseghetti
Copy link
Member Author

@ahcorde thanks for the reviews, just finished adding them all.

Copy link
Contributor

@mjcarroll mjcarroll left a comment

Choose a reason for hiding this comment

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

A few more nits

src/systems/ackermann_steering/AckermannSteering.cc Outdated Show resolved Hide resolved
test/integration/ackermann_steering_system.cc Outdated Show resolved Hide resolved
test/integration/ackermann_steering_system.cc Outdated Show resolved Hide resolved
test/integration/ackermann_steering_system.cc Outdated Show resolved Hide resolved
test/integration/ackermann_steering_system.cc Outdated Show resolved Hide resolved
test/integration/ackermann_steering_system.cc Outdated Show resolved Hide resolved
Signed-off-by: Benjamin Perseghetti <[email protected]>
@bperseghetti bperseghetti force-pushed the pr-combined-ackermann-steer-only branch 2 times, most recently from 8eb207e to a8a327d Compare January 20, 2023 22:33
Signed-off-by: Benjamin Perseghetti <[email protected]>

Co-authored-by: Michael Carroll <[email protected]>
@bperseghetti bperseghetti force-pushed the pr-combined-ackermann-steer-only branch from a8a327d to 4b053e8 Compare January 20, 2023 22:35
@mjcarroll
Copy link
Contributor

@osrf-jenkins retest this please

@mjcarroll
Copy link
Contributor

Only known CI issues remain on this one, so I think we are good.

@ahcorde ahcorde merged commit 81e3b68 into gazebosim:gz-sim7 Jan 24, 2023
@bperseghetti bperseghetti deleted the pr-combined-ackermann-steer-only branch October 18, 2023 07:05
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
🌱 garden Ignition Garden
Projects
Archived in project
Development

Successfully merging this pull request may close these issues.

Servo style central steering angle for Ackermann plugin
3 participants