-
Notifications
You must be signed in to change notification settings - Fork 13.5k
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 relposheading in process fix uavcan driver (AP Periph Dronecan Dual RTK support) #23821
base: main
Are you sure you want to change the base?
Conversation
@dirksavage88 Anything we can assist on our end? |
@vincentpoont2 I am having issues getting the rover RTK F9P to get Fix type of fixed (6). It only reports fix type of 3 or 4 even after sitting for a while. (Similar issue to this post: https://discuss.ardupilot.org/t/heading-informations-via-moving-baseline-configuration-gnss-antenna-setup/113674/8) Other than this issue, I have some questions for the maintainers on how to integrate the gps yaw offset correctly, since it is handled differently in PX4 than what ardupilot is doing. |
This pull request has been mentioned on Discussion Forum for PX4, Pixhawk, QGroundControl, MAVSDK, MAVLink. There might be relevant details there: |
@vincentpoont2 I was able to get the dual F9P working with the correct heading offset. The offset had to be applied manually since it only occurs in the serial GPS driver and not in PX4. The rest is just architecture changes from maintainer feedback. |
@bresch FYI this adds an optional EKF2_GPS_YAW_OFF that we can add if there's incoming GPS yaw data from UAVCAN (or any source) that doesn't have the correct offset. |
This pull request has been mentioned on Discussion Forum for PX4, Pixhawk, QGroundControl, MAVSDK, MAVLink. There might be relevant details there: |
E.g. commit d61c069 works, but estimator errors on 74b1f1d Looks like it had to do with the conditional, fixed it and tested. |
e2bcd53
to
656dfc7
Compare
Signed-off-by: dirksavage88 <[email protected]>
Signed-off-by: dirksavage88 <[email protected]>
Signed-off-by: dirksavage88 <[email protected]>
Signed-off-by: dirksavage88 <[email protected]>
Signed-off-by: dirksavage88 <[email protected]>
Signed-off-by: dirksavage88 <[email protected]>
Signed-off-by: dirksavage88 <[email protected]>
…ed for non px4 cannode gps's Signed-off-by: dirksavage88 <[email protected]>
Signed-off-by: dirksavage88 <[email protected]>
Signed-off-by: dirksavage88 <[email protected]>
Signed-off-by: dirksavage88 <[email protected]>
Signed-off-by: dirksavage88 <[email protected]>
656dfc7
to
9d25e2c
Compare
Do we really need to check the |
…usion Signed-off-by: dirksavage88 <[email protected]>
…ing inclusion" This reverts commit 17ed0c9.
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'm going to make a few changes to simplify the logic. I'll re-test it.
One of my GPS antennas was loose, looks good now. @dirksavage88 @dagar can you guys do one more pass and if it looks good hit the merge button |
Looks good to me |
report.heading_offset = heading_offset; | ||
report.heading_accuracy = heading_accuracy; | ||
// Use heading from RelPosHeading message if available and we have RTK Fixed solution. | ||
if (_rel_heading_valid && (fix_type == sensor_gps_s::FIX_TYPE_RTK_FIXED)) { |
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 wonder if we should also have a timestamp associated with the rel_heading. I'm not sure if this can happen, but I'm imagining a case where we have heading from moving base, but then it goes away and comes back as an RTK fix but without the heading...
Signed-off-by: dirksavage88 <[email protected]>
Co-authored-by: Mathieu Bresciani <[email protected]>
Co-authored-by: Mathieu Bresciani <[email protected]>
This pull request has been mentioned on Discussion Forum for PX4, Pixhawk, QGroundControl, MAVSDK, MAVLink. There might be relevant details there: |
src/drivers/uavcan/sensors/gnss.cpp
Outdated
{ | ||
_rel_heading_valid = msg.reported_heading_acc_available; | ||
_rel_heading = matrix::wrap_pi(math::radians(msg.reported_heading_deg)); | ||
_rel_heading_accuracy = matrix::wrap_2pi(math::radians(msg.reported_heading_acc_deg)); |
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.
_rel_heading_accuracy = matrix::wrap_2pi(math::radians(msg.reported_heading_acc_deg)); | |
_rel_heading_accuracy = math::radians(msg.reported_heading_acc_deg); |
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.
fixed
src/drivers/uavcan/sensors/gnss.cpp
Outdated
uavcan::ReceivedDataStructure<ardupilot::gnss::RelPosHeading> &msg) | ||
{ | ||
_rel_heading_valid = msg.reported_heading_acc_available; | ||
_rel_heading = matrix::wrap_pi(math::radians(msg.reported_heading_deg)); |
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.
_rel_heading = matrix::wrap_pi(math::radians(msg.reported_heading_deg)); | |
_rel_heading = math::radians(msg.reported_heading_deg); |
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.
fixed
if (_rel_heading_valid && (fix_type == sensor_gps_s::FIX_TYPE_RTK_FIXED)) { | ||
report.heading = _rel_heading; | ||
report.heading_offset = NAN; | ||
report.heading_accuracy = _rel_heading_accuracy; |
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.
report.heading_accuracy = _rel_heading_accuracy; | |
report.heading_accuracy = _rel_heading_accuracy; | |
_rel_heading = NAN; | |
_rel_heading_accuracy = NAN; | |
_rel_heading_valid = false; | |
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.
fixed
Signed-off-by: dirksavage88 <[email protected]>
Solved Problem
Adds support for dual RTK heading via AP Periph, which publishes heading as a distinct message (RelPosHeading) instead of via the ecef position fields.
Fixes #22520
Solution
Changelog Entry
For release notes:
Alternatives
Create a sub to the sensor gnss relative uORB topic directly in EKF2
Test coverage
Context
TODO: post logPending doc update PR: PX4/PX4-user_guide#3406