Skip to content

Conversation

@Narukara
Copy link
Contributor

From ros-controls/gz_ros2_control#595

The current calculation method is an approximation for small angles, which can lead to significant errors. In fact, the exact algorithm is used in the other two implementations of update_from_velocity, and should be used here as well.

const double angular_velocity = std::tan(steer_pos) * linear_velocity / wheel_base_;

const double angular_velocity = std::tan(steer_pos_) * linear_velocity / wheel_base_;

const double angular_velocity = steer_pos_ * linear_velocity / wheel_base_;


Contributions via pull requests are much appreciated. Before sending us a pull request, please ensure that:

  1. Limited scope. Your PR should do one thing or one set of things. Avoid adding “random fixes” to PRs. Put those on separate PRs.
  2. Give your PR a descriptive title. Add a short summary, if required.
  3. Make sure the pipeline is green.
  4. Don’t be afraid to request reviews from maintainers.
  5. New code = new tests. If you are adding new functionality, always make sure to add some tests exercising the code and serving as live documentation of your original intention.

To send us a pull request, please:

  • Fork the repository.
  • Modify the source; please focus on the specific change you are contributing. If you also reformat all the code, it will be hard for us to focus on your change.
  • Ensure local tests pass. (colcon test and pre-commit run (requires you to install pre-commit by pip3 install pre-commit)
  • Commit to your fork using clear commit messages.
  • Send a pull request, answering any default questions in the pull request interface.
  • Pay attention to any automated CI failures reported in the pull request, and stay involved in the conversation.

Copy link
Contributor

@christophfroehlich christophfroehlich left a comment

Choose a reason for hiding this comment

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

Thanks, it seems that this was only partially fixed with #1117
I forgot that in #1150

@codecov
Copy link

codecov bot commented Jun 27, 2025

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 86.38%. Comparing base (a88bf0a) to head (e2fc3cc).
Report is 1 commits behind head on master.

Additional details and impacted files
@@           Coverage Diff           @@
##           master    #1777   +/-   ##
=======================================
  Coverage   86.38%   86.38%           
=======================================
  Files         123      123           
  Lines       12240    12240           
  Branches     1024     1024           
=======================================
  Hits        10574    10574           
  Misses       1348     1348           
  Partials      318      318           
Flag Coverage Δ
unittests 86.38% <100.00%> (ø)

Flags with carried forward coverage won't be shown. Click here to find out more.

Files with missing lines Coverage Δ
...ring_controllers_library/src/steering_odometry.cpp 83.42% <100.00%> (ø)
🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

@christophfroehlich christophfroehlich added backport-humble Triggers PR backport to ROS 2 humble. backport-jazzy Triggers PR backport to ROS 2 jazzy. labels Jun 27, 2025
@christophfroehlich christophfroehlich merged commit 2800f21 into ros-controls:master Jun 27, 2025
21 of 27 checks passed
mergify bot pushed a commit that referenced this pull request Jun 27, 2025
(cherry picked from commit 2800f21)

# Conflicts:
#	steering_controllers_library/src/steering_odometry.cpp
mergify bot pushed a commit that referenced this pull request Jun 27, 2025
christophfroehlich pushed a commit that referenced this pull request Jun 28, 2025
christophfroehlich pushed a commit that referenced this pull request Jun 28, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

backport-humble Triggers PR backport to ROS 2 humble. backport-jazzy Triggers PR backport to ROS 2 jazzy.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants