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

steering_controllers_library: Add reduce_wheel_speed_until_steering_reached parameter (backport #1314) #1429

Merged
merged 1 commit into from
Dec 17, 2024

Conversation

mergify[bot]
Copy link
Contributor

@mergify mergify bot commented Dec 17, 2024

Some features are missing in the library to feature-equally integrate the older tricycle_controller (#850).

reduce_wheel_speed_until_steering_reached is one step closer.

The old code

// Reduce wheel speed until the target angle has been reached
double alpha_delta = abs(alpha_write - alpha_read);
double scale;
if (alpha_delta < M_PI / 6)
{
scale = 1;
}
else if (alpha_delta > M_PI_2)
{
scale = 0.01;
}
else
{
// TODO(anyone): find the best function, e.g convex power functions
scale = cos(alpha_delta);
}
Ws_write *= scale;

I modified the function a bit to be continuously differentiable
image

This breaks ABI of the odometry class, but I don't think that lots of people use this directly without the derived controllers.


This is an automatic backport of pull request #1314 done by Mergify.

@mergify mergify bot added the conflicts label Dec 17, 2024
Copy link
Contributor Author

mergify bot commented Dec 17, 2024

Cherry-pick of 0438a1e has failed:

On branch mergify/bp/humble/pr-1314
Your branch is up to date with 'origin/humble'.

You are currently cherry-picking commit 0438a1e.
  (fix conflicts and run "git cherry-pick --continue")
  (use "git cherry-pick --skip" to skip this patch)
  (use "git cherry-pick --abort" to cancel the cherry-pick operation)

Changes to be committed:
	modified:   steering_controllers_library/include/steering_controllers_library/steering_odometry.hpp
	modified:   steering_controllers_library/src/steering_controllers_library.yaml
	modified:   steering_controllers_library/src/steering_odometry.cpp
	modified:   steering_controllers_library/test/test_steering_odometry.cpp

Unmerged paths:
  (use "git add <file>..." to mark resolution)
	both modified:   doc/release_notes.rst
	both modified:   steering_controllers_library/src/steering_controllers_library.cpp

To fix up this pull request, you can check it out locally. See documentation: https://docs.github.com/en/pull-requests/collaborating-with-pull-requests/reviewing-changes-in-pull-requests/checking-out-pull-requests-locally

Copy link

codecov bot commented Dec 17, 2024

Codecov Report

Attention: Patch coverage is 70.83333% with 35 lines in your changes missing coverage. Please review.

Project coverage is 66.75%. Comparing base (e6b00e1) to head (badfa81).
Report is 1 commits behind head on humble.

Files with missing lines Patch % Lines
...ontrollers_library/test/test_steering_odometry.cpp 67.59% 0 Missing and 35 partials ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##           humble    #1429      +/-   ##
==========================================
+ Coverage   66.71%   66.75%   +0.04%     
==========================================
  Files         113      113              
  Lines       13219    13335     +116     
  Branches     8153     8241      +88     
==========================================
+ Hits         8819     8902      +83     
  Misses       1442     1442              
- Partials     2958     2991      +33     
Flag Coverage Δ
unittests 66.75% <70.83%> (+0.04%) ⬆️

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

Files with missing lines Coverage Δ
...steering_controllers_library/steering_odometry.hpp 100.00% <ø> (ø)
...llers_library/src/steering_controllers_library.cpp 70.99% <100.00%> (+0.11%) ⬆️
...ring_controllers_library/src/steering_odometry.cpp 82.77% <100.00%> (+0.90%) ⬆️
...ontrollers_library/test/test_steering_odometry.cpp 67.02% <67.59%> (+1.11%) ⬆️

@christophfroehlich christophfroehlich merged commit 0e6f08b into humble Dec 17, 2024
12 of 17 checks passed
@christophfroehlich christophfroehlich deleted the mergify/bp/humble/pr-1314 branch December 17, 2024 08:53
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 this pull request may close these issues.

1 participant