-
Notifications
You must be signed in to change notification settings - Fork 13.7k
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 support for NXP UWB position sensor #12956
Conversation
@dk7xe This is still in the early stages, but here it is if you want to keep up with development. Right now it is reading the data and publishing a uORB topic, but I still need to add error checking and generally clean up the code. |
@ItsTimmy Have you thought about docs for this? Possible integration points:
|
src/drivers/drv_pozyx.h
Outdated
/** | ||
* @file drv_pozyx.h | ||
* | ||
* Pozyx device API |
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.
A reference to the exact thing would be nice. And it's not really a device API but just the driver, I would say.
src/drivers/drv_pozyx.h
Outdated
}; | ||
|
||
struct pozyx_position_s { | ||
int32_t x; |
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.
Unit?
src/drivers/drv_pozyx.h
Outdated
struct pozyx_beacon_config_s { | ||
uint8_t beacon_id; | ||
uint8_t beacon_count; | ||
int32_t x; |
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.
Unit?
src/drivers/pozyx/pozyx.cpp
Outdated
|
||
/* | ||
* Stop the driver | ||
*/ |
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.
Unnecessary comment.
src/drivers/pozyx/pozyx.cpp
Outdated
|
||
} | ||
|
||
PX4_WARN("unrecognized arguments, try: start [device_name], stop, info "); |
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.
_new_irlockReport = _irlockReportSub.update(&_irlockReport); | ||
_sensorBias_valid = _sensorBiasSub.update(&_sensorBias); | ||
|
||
//TODO: Uncomment this so it still works with both IRLock and Pozyx |
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.
What's the plan here? I don't exactly understand what this is about.
@@ -132,3 +132,51 @@ PARAM_DEFINE_FLOAT(LTEST_SCALE_X, 1.0f); | |||
* @group Landing target Estimator | |||
*/ | |||
PARAM_DEFINE_FLOAT(LTEST_SCALE_Y, 1.0f); | |||
|
|||
/** | |||
* Landing target X offset from estimated position in NED |
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.
Body or world frame?
* @max 100.0 | ||
* @decimal 2 | ||
* | ||
* @group Landing target Estimator |
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.
* @group Landing target Estimator | |
* @group Landing target estimator |
src/modules/logger/logger.cpp
Outdated
@@ -549,6 +549,7 @@ void Logger::add_default_topics() | |||
add_topic("vehicle_status", 200); | |||
add_topic("vehicle_status_flags"); | |||
add_topic("vtol_vehicle_status", 200); | |||
add_topic("pozyx_report"); |
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 topic probably needs a more generic name.
import serial | ||
import struct | ||
import time | ||
|
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.
Can you add a comment how this script can be used, and to do what?
src/drivers/pozyx/pozyx.cpp
Outdated
|
||
#include <uORB/topics/pozyx_report.h> | ||
|
||
#define DEFAULT_PORT "/dev/ttyS2" // telem2 on Pixhawk |
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 wouldn't provide a default at all. There isn't a consistent choice across boards, so just make it a requirement and use the module.yaml
to make it easy to configure and start on any port.
src/drivers/drv_pozyx.h
Outdated
****************************************************************************/ | ||
|
||
/** | ||
* @file drv_pozyx.h |
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.
We should be able to move away from block devices like this (/dev/pozyx) and entirely use ORB. It's ultimately going to be more portable.
I'm just curious, in the pozyx case has anyone looked into doing it directly without the arduino sketch? |
21f6116
to
7124af6
Compare
24bcbaa
to
ea2c8f3
Compare
Have you started to develop UWB fusion for indoor positioning? |
I have not. The goal of this PR is to use the UWB positioning only within the existing precision landing framework. However, once this is done, it should be easy to get the raw data from UWB and use it however you want. |
Signed-off-by: Claudio Micheli <claudio@auterion.com>
Signed-off-by: Claudio Micheli <claudio@auterion.com>
Signed-off-by: Claudio Micheli <claudio@auterion.com>
Signed-off-by: Claudio Micheli <claudio@auterion.com>
ea2c8f3
to
030a844
Compare
#float32 yaw_offset # Angle between the X axis of the UWB grid frame and true north. I.e., your compass heading if you face along the positive X axis | ||
# The reason these values are kept in the uwb_report message is that we do not know the transform between the | ||
# UWB coordinate system and the world coordinate system. Different UWB systems might have different mechanisms for | ||
# this, so the UWB driver should handle it. Unless you |
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.
Unless you?
@@ -279,22 +279,24 @@ void LandingTargetEstimator::_update_topics() | |||
return; | |||
} | |||
|
|||
if (!PX4_ISFINITE(_uwbReport.pos_y) || !PX4_ISFINITE(_uwbReport.pos_x) || | |||
!PX4_ISFINITE(_uwbReport.pos_z)) { | |||
if (!PX4_ISFINITE(_uwbReport.target_pos_y) || !PX4_ISFINITE(_uwbReport.target_pos_x) || |
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.
Why is y before x?
new Uorb Topics Changed Distance message according to new process
This issue has been automatically marked as stale because it has not had recent activity. Thank you for your contributions. |
Describe problem solved by the proposed pull request
Based on #9029. This PR adds a driver for the NXP RDDrone UWB system, and integrates it with the existing precision landing code.
Test data / coverage
I held the sensor in my hands, spun around in my chair, and looked at the logs.
This is a WIP, I have not tested much.