Skip to content
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

Changed all 'NED board' references to 'FRD body'. Also cleaned up mix… #16339

Merged
merged 4 commits into from
Dec 15, 2020

Conversation

rblilja
Copy link
Contributor

@rblilja rblilja commented Dec 6, 2020

…ing of m/s/s and m/s^2 to use the latter. Corrected m/s/s to Pascals. Plus minor typos. There are still some messages that needs to be looked at for correct reference frame: 'vehicle_rates_setpoint.msg' and 'vehicle_attitude_setpoint.msg. Also made some minor cosmetic clean ups.

Solves: #16328

Note: This PR replaces PR #16337

…ing of m/s/s and m/s^2 to use the latter. Corrected m/s/s to Pascals. Plus minor typos. There are still some messages that needs to be looked at for correct reference frame: 'vehicle_rates_setpoint.msg' and 'vehicle_attitude_setpoint.msg. Also made some minor cosmetic clean ups.
@rblilja
Copy link
Contributor Author

rblilja commented Dec 6, 2020

@dagar @bresch New PR. Closed previous one (#16337) as it got messy. My bad.

Copy link
Member

@bresch bresch left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks for the PR; just 2 small things, the rest seems good

@bresch bresch added the Documentation 📑 Anything improving the documentation of the code / ecosystem label Dec 7, 2020
rblilja and others added 2 commits December 7, 2020 18:01
Co-authored-by: Mathieu Bresciani <brescianimathieu@gmail.com>
Co-authored-by: Mathieu Bresciani <brescianimathieu@gmail.com>
@rblilja
Copy link
Contributor Author

rblilja commented Dec 7, 2020

Good catch! Shall be included now.

@rblilja rblilja requested a review from bresch December 7, 2020 17:14
Copy link
Member

@bresch bresch left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I went through it in details and there was still a bit of confusion (due to my comment in the issue).

To make it clear:

  • all the sensor_* are in the "autopilot hardware frame" (called "board"). This is not necessarily the frame of the MEMS itself.
  • all the vehicle_* are in the vehicle body frame

For example:
The data of an accelerometer is sampled, rotated in the board frame (i.e.:autopilot hardware, e.g.: Pixhawk) and published as sensor_accel. Then the calibrations and estimated bias are applied and the result is rotated in body frame and re-published as vehicle_imu and potentially in sensors_combined (if it has the highest priority).

@rblilja
Copy link
Contributor Author

rblilja commented Dec 14, 2020

Makes sense. Good work! Perhaps it is a good idea to define and list the coordinate systems in the documentation for completeness. I have not really managed to find anything in the documentation other than the mentioning of NED and FRD systems here: https://dev.px4.io/v1.11/en/contribute/notation.html

Note that FRD in the documentation refers to the vehicle front axis etc. i.e. rather easy to misconcive mentioning of 'body' and 'board' in the RTPS message comments.

Also, to me 'board' is somewhat vague as it might refer to the complete flight controller, or just the sensor board of the Cube if you are using such flight controller. Perhaps obvious to some people, but if you have whatever diagnosis a psychiatrist would label me with, it keeps you awake at night :)

@bresch bresch merged commit aa244a0 into PX4:master Dec 15, 2020
int16[32] x # acceleration in the NED X board axis in m/s/s
int16[32] y # acceleration in the NED Y board axis in m/s/s
int16[32] z # acceleration in the NED Z board axis in m/s/s
int16[32] x # acceleration in the FRD board frame X-axis in m/s^2
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

To add to the confusion these FIFO messages are the raw data that we get out of an IMU's FIFO. They're in the sensor frame and the data is raw 16 bit integers, typically with UINT16_MAX corresponding to the configured max range (eg 16 G accelerometer). That's why the message carries a rotation and scale factor.

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Ouch, so they're not always in the same frame as sensor_accel ?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Documentation 📑 Anything improving the documentation of the code / ecosystem
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants