-
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
Fix driver load order for external ICM20948/Here GNSS for Pixhawk Cube #11189
Conversation
@DanielePettenuzzo @dagar @dakejahl This does not fix the issue for other boards though, not sure which to add it to. I noticed e.g. ist8310 gets loaded in various rc.board's. Is there some better place to load an external driver, like rc.sensors, but before rc.board runs? |
I'd rather we try to fix the underlying issue than to have to juggle startup ordering. What's being published in each scenario? What are the existing parameters? Is it being correctly detected as external? nsh> listener sensor_mag -i 0
nsh> listener sensor_mag -i 1
nsh> listener sensor_mag -i 2
nsh> listener sensor_mag -i 3
nsh> param show CAL_MAG* |
Related #11190 |
@dagar There's no underlying issue to this in the mpu9250 driver. I cross-tested with a Pixhawk 4 GPS (ist8310 Magnetometer) and it has the same problem when the driver load is moved to rc.sensors. The issue is solved if the mpu9250 driver for external I2C is loaded in the same place as ist8310, at the beginning of rc.board. |
@dagar Btw. both external mags, ICM20948 and ist8310, are recognized as external mags and are set as CAL_MAG_PRIME even if activated as last in order. But they still don't show up in QGroundcontrol and their orientation can't be set. |
Then it's likely something on the QGC side. |
@@ -47,6 +47,9 @@ hmc5883 -C -T -X start | |||
lis3mdl -X start | |||
ist8310 -C start | |||
|
|||
# ICM20948 as external magnetometer on I2C (with Rotation 6 for Here GNSS) | |||
mpu9250 -X -M -R 6 start |
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.
Side question, is the icm20948 actually mounted at yaw 270 in the Here GNSS or is this also accounting for rotations in the driver itself?
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.
Edit (short answer): Yes, it's mounted yaw270 in the Here GNSS.
Sorry, misread your question a bit first.
I don't have this issue, we only use a single mag. As a side note however, I do know that the driver startup order does matter for selecting the primary imu. This matters because whichever imu is started first becomes instance 0 with respect to CAL_GYRO0_EN/CAL_ACC0_EN. Obviously you can still specify the primary imu with CAL_GYRO_PRIME/CAL_ACC_PRIME, but if you want to turn off the gyro/accel from an imu, you need to know which order it was started in. For example, our 6500 is hard mounted to our PCB, so we don't want that data used at all because it is incredibly noisy and the flight controller cannot control around it (we've tried, it goes nuts). So I need to start the 6500 second, since I specify
Haha sorry this is a little tangent to the topic at hand, but I felt it was at least a little relevant and good to know. |
No, thanks for the comment! Just gave me an idea for an issue I need to test out :) |
@dagar
Of course it would be nice if QGroundcontrol would handle the 4th sensor correctly, but until then I think the Here GNSS should not be handled differently than the other external mags if it causes this problem.
|
Let's get this in after #11044 is merged. |
This issue has been automatically marked as stale because it has not had recent activity. Thank you for your contributions. |
No longer an issue (we don't use the mpu9250 mags by default). |
With the driver load in rc.sensors, the external ICM20948 magnetometer on Here GNSS gets activated as last (and 4th) magnetometer on Pixhawk Cube. It gets set as primary mag after calibration, but QGroundControl does not show the "External Compass Orientation" Dropdown in Parameters -> Sensors -> Set Orientations:
I moved the driver load to the start of rc.board of px4fmu-v3, after the load of external ist8310. This resolves the issue for Pixhawk Cube.