-
Notifications
You must be signed in to change notification settings - Fork 276
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
Add parameter to TrajectoryFollower stop rotation when bearing is reached #1349
Conversation
Signed-off-by: Ian Chen <[email protected]>
Signed-off-by: Ian Chen <[email protected]>
Codecov Report
@@ Coverage Diff @@
## ign-gazebo6 #1349 +/- ##
===============================================
+ Coverage 62.92% 62.93% +0.01%
===============================================
Files 299 299
Lines 24159 24167 +8
===============================================
+ Hits 15202 15210 +8
Misses 8957 8957
Continue to review full report at Codecov.
|
|
||
// force angular velocity to be zero when bearing is reached | ||
if (this->dataPtr->forceZeroAngVel && | ||
math::equal(std::abs(bearing.Degree()), 0.0, 1.0)) |
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.
Do we need the second expression math::equal(std::abs(bearing.Degree()), 0.0, 1.0)
?
We're supposed to be within the acceptable range bearing. If we need higher bearing accuracy, I think we should change the parameter bearingTolerance
.
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.
The behavior I found without this check is that as soon as the vehicle moves forward 1 iteration, its bearing immediately becomes outside of bearingTolerance
. So it constantly switched back and forth between rotation and moving forward. The problem was that removing the AngularVelocityCmd
component is found to be very expensive and this locks up simulation. With this check, I still do notice a slight pause in simulation when the component is being removed but it only happens occasionally when bearing needs to be corrected.
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 tweaked the 2nd tol check to be a percentage of bearingTolerance
. aa8cf68
Signed-off-by: Ian Chen <[email protected]>
Signed-off-by: Ian Chen <[email protected]>
Signed-off-by: Ian Chen <[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.
Looks good to me.
This pull request has been mentioned on Gazebo Community. There might be relevant details there: https://community.gazebosim.org/t/new-ignition-releases-2022-03-01-citadel-edifice-fortress/1313/1 |
Signed-off-by: Ian Chen [email protected]
🎉 New feature
Summary
Added parameter
<zero_vel_on_bearing_reached>
. When set to true, it forces angular velocity to be zero when the target bearing is reached. This is intended to remove any residue angular velocity of the link and prevent overshooting.Test it
Test with trajectory_follower.sdf world.
box_02
now has this parameter set and uses high torque for faster rotation and should not overshootChecklist
codecheck
passed (See contributing)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.