-
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
Closed
Closed
Changes from 1 commit
Commits
Show all changes
26 commits
Select commit
Hold shift + click to select a range
1f3aca5
Created basic NXP UWB driver
eb1c1fd
Added pozyx driver based on upstream.
cmic0 9a22db0
Added pozyx. Fixed hardfaults (increased pozyx stack allocation).
cmic0 392d5e6
Addedd pozyx_report to logger. Added debug messages.
cmic0 1cc3d0d
removed debug comments.
cmic0 fc8bc84
Removed deprecated dependency in CMakeLists.txt.
cmic0 3dc736c
Topic publishing
6dece35
Added basic bounds checking
6c1502f
Code cleanup and documentation
0356d6f
Removed baudrate option
2572824
Added message ID for pozyx_report message
2e56eb0
Some debugging
30a3ad0
Squash this commit in the rebase
f5fc125
Squash this commit too
525c22c
Removed landing point adjustment
0815ecc
Added comment for future reference
2317a63
Added UWB driver to NXP board
8e103ae
Added configurable baudrate
2d1c48b
Gave better names to pozyx_report message and UWB driver
e529840
Removed Pozyx driver (to be moved to another PR)
030a844
Fixed problem from rebase
2f71076
Fixed landing target pose issue
868960c
Added important stuff to startup script. Delete this before merging
1ccbf2f
Add support for new UWB MSG and Raw Distances.
LowOrbitIonCannon c6b415d
Fixed Typo
LowOrbitIonCannon efcf518
Phase 1 new Loc process
LowOrbitIonCannon File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -4,4 +4,4 @@ serial_config: | |
port_config_param: | ||
name: UWB_CONFIG | ||
group: UWB | ||
default: TEL2 | ||
default: "" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -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 commentThe reason will be displayed to describe this comment to others. Learn more. Why is y before x? |
||
!PX4_ISFINITE(_uwbReport.target_pos_z)) { | ||
return; | ||
} | ||
|
||
_new_sensorReport = true; | ||
_uncertainty_scale = 1.0f; | ||
|
||
// we're assuming the coordinate system is NEU | ||
// to get the position relative to use we just need to negate x and y | ||
// The coordinate system is NED (north-east-down). | ||
// The coordinates "rel_pos_*" are the position of the landing point relative to the vehicle. | ||
// The UWB report contains the position of the vehicle relative to the landing point. | ||
// So, just negate all 3 components. | ||
_sensor_report.timestamp = _uwbReport.timestamp; | ||
_sensor_report.rel_pos_x = -_uwbReport.pos_x; | ||
_sensor_report.rel_pos_y = -_uwbReport.pos_y; | ||
_sensor_report.rel_pos_z = _uwbReport.pos_z; | ||
_sensor_report.rel_pos_x = -_uwbReport.target_pos_x; | ||
_sensor_report.rel_pos_y = -_uwbReport.target_pos_y; | ||
_sensor_report.rel_pos_z = -_uwbReport.target_pos_z; | ||
|
||
//PX4_WARN("data from uwb x: %.2f, y: %.2f", (double)_sensor_report.rel_pos_x, | ||
//PX4_INFO("data from uwb x: %.2f, y: %.2f", (double)_sensor_report.rel_pos_x, | ||
// (double)_sensor_report.rel_pos_y); | ||
} | ||
} | ||
|
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
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?