-
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
msg: fix comments in SensorOpticalFlow and VehicleOpticalFlow #24337
base: main
Are you sure you want to change the base?
Conversation
|
||
float32[3] delta_angle # (radians) accumulated gyro radians where a positive value is produced by a RH rotation about the body axis. Set to NaN if flow sensor does not have 3-axis gyro data. | ||
float32[3] delta_angle # (radians) accumulated gyro radians where a negative value is produced by a RH rotation about the body axis. Set to NaN if flow sensor does not have 3-axis gyro data. |
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.
Are you sure about the delta angle? This should just be an integral of the gyro data so it should be positive.
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.
@@ -3,9 +3,9 @@ uint64 timestamp_sample | |||
|
|||
uint32 device_id # unique device ID for the sensor that does not change between power cycles | |||
|
|||
float32[2] pixel_flow # (radians) optical flow in radians where a positive value is produced by a RH rotation about the body axis | |||
float32[2] pixel_flow # (radians) optical flow in radians where a negative value is produced by a RH rotation about the body axis |
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.
float32[2] pixel_flow # (radians) optical flow in radians where a negative value is produced by a RH rotation about the body axis | |
float32[2] pixel_flow # (radians) optical flow in radians where a positive value is produced by a RH rotation of the sensor about the body axis |
EKF assumes positive LOS rate is produced by a RH rotation of the image about the sensor axis.
The opposite of this is a negative rotation of the image, or a positive rotation of the sensor. This message tells that a positive pixel flow is produces by a positive rotation of the sensor, which is correct (maybe just modify to the "RH rotation of the sensor about the body axis")
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.
If it were positive rotation wouldn't it have to be from the features perspective? From the sensors perspective (camera looking down) the drone moving forward causes the features to move backwards in the image (-X). This looks like the features are rotating in the negative direction around the Y axis (staying in FRD vehicle body frame of reference)
The EKF uses this convention but the raw sensor input data uses the opposite convention.
See comments in code about this
sensors
https://github.com/PX4/PX4-Autopilot/blob/main/src/modules/sensors/vehicle_optical_flow/VehicleOpticalFlow.cpp#L291-L292
ekf2
https://github.com/PX4/PX4-Autopilot/blob/main/src/modules/ekf2/EKF2.cpp#L2342-L2343