berkeleyauv / robosub_ws

All the code used to compete in the Robosub competition
3 stars 1 forks source link

Figure out how to have Pixhawk communicate to sensors on I2C/CAN/Serial/SPI #37

Closed AVSurfer123 closed 3 years ago

MrMinos commented 3 years ago

Ashwin, is there a specific component that we are trying to communicate with? The task hinges on PX4 having the firmware for the component, so I'd like to know what we are aiming for with this.

Many common imus comm protocols are supported by PX4. For example, https://dev.px4.io/master/en/middleware/modules_driver_imu.html#mpu9250

It will read from the IMU and publish the data on relevant uORB topics. You can read from uORB topic and stream the data off the Pixhwak by creating a custom mavlink message or use an existing one.

MrMinos commented 3 years ago

@AVSurfer123 Do you have a soldering iron to solder on the cables? Since razor IMU is with you, if we can connect to it over a serial link instead of usb, we can test the px4 imu driver.

AVSurfer123 commented 3 years ago

Our objective is to have the pixhawk communicate with general sensors, like our depth sensor and maybe the IMU. I have the IMU communicating over ROS right now using a third-party package which works well, so I don't know if we need to integrate it with the pixhawk directly. I do have a soldering iron though, so I can try connecting the Pixhawk and IMU over I2C so that you can test on it. I'll just need to buy the correct pin connectors

AVSurfer123 commented 3 years ago

Only issue though is that we use ArduSub firmware from ArduPilot instead of PX4. There is this link https://www.ardusub.com/introduction/hardware-options.html but it doesn't talk about IMUs. But from there I actually found some documentation for the depth sensor we're using, as its supposed to have integration with the Autopilot automatically. https://bluerobotics.com/learn/viewing-bar30-bar100-depth-and-temperature-readings-on-an-ardusub-vehicle/

MrMinos commented 3 years ago

For sure. I'm referring to IMU as an example. It can be any other sensors. Do we have a electronic components diagram that I could refer to? I can take a look at other sensors that we could integrate directly with Pixhawk if it is warranted.

For the depth sensor, that's great!

MrMinos commented 3 years ago

[...] I have the IMU communicating over ROS right now using a third-party package which works well, so I don't know if we need to integrate it with the pixhawk directly. [...]

I'm curious whether we have decided on where to run the KF on. Depending on that answer, how we interface with the auxiliary IMU (Razor) could be better determined.