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
navigator: set acceptance radius even for IDLE waypoint #13965
Conversation
@MaEtUgR FYI |
This seems kind of weird and out of place. What if instead we used |
@RomanBapst Please mention the original issue when you make a pr for a fix. It was this one: #13675 Your findings explain why the yaw setpoint is not exactly the yaw estimate to begin with. But it doesn't explain why the yaw setpoint is quickly unfiltered jumping to zero and otherwise gets heavily filtered even though it's a reset. At least the jump to zero is a concern to me. Is there an easy way to reproduce the issue in SITL such that it happens every takeoff? That would help debugging the other issues. |
@MaEtUgR Have a look at the plot above with the fix. I don't see any yaw clamping anymore. If you still see any clamping issues let me know, I do not see them. |
Signed-off-by: RomanBapst <bapstroman@gmail.com>
Signed-off-by: RomanBapst <bapstroman@gmail.com>
9913402
to
48b853b
Compare
@dagar I followed your suggestion, please have a look. |
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.
Good catch!
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.
Sorry that I didn't have time to look at all the details. You should probably get the fix in before we figure out all the questions I added in my comment.
_pos_sp_triplet.previous.acceptance_radius = get_default_acceptance_radius(); | ||
_pos_sp_triplet.current.acceptance_radius = get_default_acceptance_radius(); | ||
_pos_sp_triplet.next.acceptance_radius = get_default_acceptance_radius(); | ||
|
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.
This fixes the heading drift people have been seeing right after a takeoff.
The problem was that the auto flighttask was creating a yaw setpoint in the direction of the velocity setpoint. There is code implemented which locks the yaw setpoint if the vehicle is within the acceptance radius of the target, however, the navigator published an IDLE setpoint with an acceptance radius of 0 and this is what was used by the flight task.
Still not sure why the acceptance radius was not updated once the takeoff setpoint was sent.