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
Rework NXP UWB driver #21124
Rework NXP UWB driver #21124
Conversation
…or), one as Controllee (Anchor) uwb_sr150: template for new UWB driver with modifications uwb_sr150: included pr_nxp_uwb_driver & add. to new driver uwb_sr150: updated files to make UWB demo functional. Added actuator_controls_3 again uwb_sr150: Navigation elements localization and precision navigation removed from UWB driver to LandingTargetEstimator. rc.sensor: Added uwb to rc.sensor list for auto-start uwb_sr150driver: Deleted experimental uwb files uwb_sr150: Removed parameters from uwb module.yaml uwb_sr150: Cleaned up the code uwb_sr150: Removed the navigation functions to LandingTargetEstimator LTE: translated landing_target_estimator_params.c into module.yaml LTE: added UWB params from uwb_sr150 module.yaml UwbDistance.msg-> SensorUwb.msg: renamed UwbDistance.msg to SensorUwb.msg SensorUwb.msg: renamed everything to correspond with the renaming of the message uwb_sr150: Added orientation param, but need to check with Loic. uwb_sr150: Removed gps & pos struct. uwb_sr150: Cleaned up driver of unnecessary code. uwb_sr150: Edited UWB board orientation param. uwb_sr150: Readded position. uwb_sr150: Added orientation param to module.yaml uwb_sr150: Started making changes to UWB driver to be work queue task uwb_sr150: Added getter for orientation param uwb_sr150: Restructured header file to match workqueue example uwb_sr150: Reworked to work with workqueue and remove unnecessary items uwb_sr150: Revert "Added getter for orientation param". This reverts commit a4ccdf4. uwb_sr150: Revert "updated files to make UWB demo functional. Added actuator_controls_3 again". This reverts commit a7db41f. Removed Yaw and Pitch related items. TBD with Daniel uwb_sr150: Updated copyright years & readded *buffer pointer to collectData() rc.sensor: UWB added to wq, so not needed Added UWB SR150 to board config uwb_sr150: Removed no longer relevant code: uwb_sr150: position (moved to landing_target_estimator). uwb_sr150: uwb_pos_debug is removed completely Added uwb_sr150 driver config to NXP boards LTE: added new corrected position conversion algorithm from uwb spherical coordinates to kartesian LTE: removed deprecated code LTE: Fixed compile issues LTE: LTE produces data upon UWB sensor_uwb publish produced data is corrupt LTE: Fixed LTE position not bein calculated on non corrupt data LTE: Fixed POV orientation of conversion algorithm SensorUwb.msg: Added metadata to UWB Uorb message SensorUwb.msg: Added UWB Aoa figure of merit to Uorb message SensorUwb.msg: Added UWB sensor mounting configuration to Uorb message LTE: Added Offset and Orientation from UWB LTE: Added Offset and orientation calculation to the LTE position calculation LTE: Changed double precision to float precision LTE: Fixed formating uwb_sr150: Fixed formating
Added uwb sensor plausability check
Picture of landing place - Test 1 Video final approach - Test 2 |
src/modules/landing_target_estimator/LandingTargetEstimator.cpp
Outdated
Show resolved
Hide resolved
src/modules/landing_target_estimator/LandingTargetEstimator.cpp
Outdated
Show resolved
Hide resolved
src/modules/landing_target_estimator/LandingTargetEstimator.cpp
Outdated
Show resolved
Hide resolved
src/modules/landing_target_estimator/LandingTargetEstimator.cpp
Outdated
Show resolved
Hide resolved
src/modules/landing_target_estimator/LandingTargetEstimator.cpp
Outdated
Show resolved
Hide resolved
Removed Deg2Rad and used PX4 function Changed FOV limit of AOA UWB measurements to const
@potaito I commited your requested changes |
@NXPBrianna i guess this reflects UWB MW v4 orientation? Why has the offset Y been removed (replaced) ? There could be situations where the sensor is not mounted in the centerline of the vehicle. BTW i would not use the term "drone" in the code since we are vehicle type independent. |
Remove unnecessary changes
I will take a look on Monday/Tuesday 🙂 |
@NXPLoic what's your plan for using the I don't see an issue with merging it the way it is now. Just curious what will be next, because now there is no subscriber to |
Hi @potaito Allesandro, Loic will do the precision landing part soon that will use that message. We just liked to have the driver portion done before moving forward. It also gives us the ability to send the topic to ROS via dds bridge. |
Understood, thank you. Makes sense 👍 |
Default position is the antannaes downward facing, UWB board parallel with body frame. | ||
type: enum | ||
values: | ||
0: ROTATION_NONE |
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.
@bresch is there a way to re-use the rotation value definitions that already exist for other sensors?
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.
Could we get an answer here?
Removed whitespace for formater
@dagar @potaito @mrpollo i'd like to bring this to the developer call this week since we are stuck it seems. |
Apologies, I'm on vacation right now. But last I checked the PR looked good to me. |
We can discuss on this weeks Q&A if someone from your team can join @dk7xe |
This pull request has been mentioned on Discussion Forum for PX4, Pixhawk, QGroundControl, MAVSDK, MAVLink. There might be relevant details there: https://discuss.px4.io/t/px4-community-q-a-july-12-2023/33086/5 |
Thanks for joining the call @dk7xe, glad to see this merged |
* UWB driver rework that uses 2 UWB MKBoards - 1 as Controller (Initiator), one as Controllee (Anchor) Co-authored-by: NXPBrianna <108274268+NXPBrianna@users.noreply.github.com>
UWB sr150 driver rework
This is a rework for the NXP UWB SR150 driver.
Enabling precision navigation task (Preclanding) based on the NXP UWB SR150 chip.
The PR includes the enablement of the UWB driver for single anchor ranging and modification of the Landing Target Estimator for precision landing.
UWB driver rework uses 2 UWB boards - 1 as a Controller (Initiator) and one as the Controllee (Anchor).
This is an improvement over the previous UWB system requiring at least 4 Anchors.
With this new system, a Angle of Arrival from three antennas on the UWB module can be used to transfer a spherical position into the Drones cartesian local position (in NED).
Graphic showing the coordinate system that is measured by the UWB system (Antennas facing up):
UWB driver module changes:
Landing_target_estimator module changes:
Uorb topics:
For multiple NXP boards
Major new features:
Autostart via workqueue
Parameters for offset and orientation propagated via Uorb
Relative position calculation via a single ground anchor
Preclanding with higher quality and easier setup
Test coverage
Screenshot showing Landing_target_pose publishing a position based on UWB:
Screenshot of data from the UWB driver:
Screenshot of data from the landing target estimator driver:
Flying tests 11.02.2023:
For all tests the Anchor is placed on the ground pointing north.
Parameters as listed below will be tweaked.
Test 1
LTEST_ACC_UNC = 20.0
LTEST_MEAS_UNC = 0.0005
LTEST_MODE = Moving
MPC_LAND_SPEED = 0.1 m/s
5m alt
Observations
https://logs.px4.io/plot_app?log=21814395-8676-4fff-ba6a-3fd865b73b36
Drone landed 15cm W of anchor.
Precision is higher. But wide swings left right during descend.
Test 2
LTEST_ACC_UNC = 20.0
LTEST_MEAS_UNC = 0.0005
LTEST_MODE = Moving
MPC_LAND_SPEED = 0.1 m/s
10m alt
Observations
https://logs.px4.io/plot_app?log=6bb7eee2-3fe0-47c6-82e9-cb138a58f6f3
Drone landed 20cm SW of anchor.
Precision is higher. But wide swings left right during descend and "Toilet bowl" at static search.
Test 3
LTEST_ACC_UNC = 20.0
LTEST_MEAS_UNC = 0.0005
LTEST_MODE = Stationary
MPC_LAND_SPEED = 0.1 m/s
10m alt
Observations
https://logs.px4.io/plot_app?log=bd795998-d257-4325-9ed1-056355670e37
Drone landed 30cm SE of anchor.
Precision lower than with LTEST_MODE = Moving. "Toiled bowl" at descend and very slow.
Future
Context
This is a rework of #14474
Videos and Picture will follow.
@dk7xe @NXPBrianna @dagar @bkueng @junwoo091400 @igalloway @potaito