MAVROS to read sensors individually

Hello all!

So I was reading about Ardupilot and ROS integration here: ROS — Dev documentation

and it sounds exactly like the solution I need for a project I am currently building (autonomous rover and after an autonomous quadcopter). I have some experience with ROS and ROS2 already.

The thing I want to ask: is it possible to access each sensor data using MAVROS? Is it hardware dependent?

I am planning to buy a Pixhawk 2.4.8 (the chinese version because I can’t find any other more reliable here in Brazil) that comes with a L3GD20H gyroscope, a LSM303D accelerometer/magnetometer and an MPU 6000 accel/gyro. Would I be able to read each one of these individually? Or does the Pixhawk already does the sensor fusion (which I know it does) and what I would be able to read is the output of the fusion?

If not, does any flight controller gives me access to each individual sensor? I saw that Holybro just launched Pixhawk 6X, not so expensive and the sensors are more accurate, so I am considering to import one of these as well. But I don’t want to be disappointed and not be able to do that.

This is important to me because I am studying/researching sensor fusion and I want to implement, just as an exercise not for real world use, my own algorithms, so I would need to read each one individually. The Pixhawk sounds like a perfect solution because everything is already integrated, that is, I wouldn’t need to buy each IMU separated and wire them up to an Arduino or something. On top of that, I could use it for a quadcopter.

Thank you very much!

Hello @andrejpadilha

Take a look on these MAVLink messages, I think they perfectly suite your application:

https://mavlink.io/en/messages/common.html#RAW_IMU
https://mavlink.io/en/messages/common.html#SCALED_IMU
https://mavlink.io/en/messages/common.html#SCALED_IMU2
https://mavlink.io/en/messages/common.html#SCALED_IMU3

Be careful with this FC, I saw some people complaining about ardupilot problems with this board… if possible, try to use Cube Orange instead.

1 Like

@BrunoBagarini thank you very much!

Yep, they will do the job perfectly! Still, do you know if I am able to read them individually on every (or on most at least) ardupilot compatible hardware?

Anyways, you already helped me a lot, thank you again!

Yeah, it should be able, since this is SW related and not HW dependent.

Nice, that’s exactly what I wanted to know! Thanks again!

1 Like