💡
aColor-BlueRov2
  • aColor-BlueRov2 ROS implementation
  • Topside computer
    • Required configuration
    • File system and ROS architecture
    • Launch ROS implementation
    • ROS-MAVlink bridge
    • Controllers
      • Depth control
      • Heading control
      • Velocity control
      • Gamepad
    • Commander
    • Graphical User Interface (GUI)
      • GUI modification
    • Additional IMUs : client
  • Companion computer
    • Required configuration
    • Additional IMUs : server
  • ArduSub
    • ArduSub parameters
  • MAVlink message
    • Pymavlink
  • Configure new frame
    • Custom Ardusub 3.5
  • Bibliography
    • Bibliography
Powered by GitBook
On this page
  • Connect IMUs on the Raspberry :
  • Libraries
  • Server
  • Server configuration

Was this helpful?

  1. Companion computer

Additional IMUs : server

Description of the file server.py from Raspberry Py

The two additional IMUs are connected to Rasberry Pi in I2C. If you have flashed the SD card with the image : aColor-BlueRov2-raspberry-with-server-for-imu-4Gb.img the only thing to do is to connect the two IMUs to the Raspberry.

Connect IMUs on the Raspberry :

Raspberry Pin

Sensor Pin

3V3

VIN

GND

GND

SCL

SCL

SDA

SDA

GND

SDOM (only for the second IMU)

GND

SDOAG (only for the second IMU)

To connect the two adafruit LSM9D1 IMUs on the same I2C bus, one of them must have its SDOM and SDOAG pin connected to the ground

Libraries

This is already setup in the aColor-BlueRov2-raspberry-with-server-for-imu-4Gb.img

This require Python3 and pip.

sudo apt-get update
sudo apt-get upgrade
        
sudo apt-get python-smbus
sudo apt-get i2c-tools
        
pip3 install RPi.GPIO #a sudo may be necessary
pip3 install --upgrade setuptools #a sudo may be necessary
pip3 install adafruit-circuitpython-lsm9ds1 #a sudo may be necessary
sudo cp [path2imu_i2cfolder]/imu_i2c/lib2imus/adafruit_lsm9ds1.py /usr/local/lib/python3.4/dist-packages/

Server

To send data to topside computer, a server is launched when the Raspberry start. This server read data from IMUs. To collect data on topside computer, you should launch the client which is the file Imu_brigde.py. It is a client to the server running on Raspberry Pi.

Server configuration

IP

192.168.2.2

Port

14600

PreviousRequired configurationNextArduSub parameters

Last updated 5 years ago

Was this helpful?

In order to deal with the two IMUs on the same I2C bus we must replace the adafruit_lsm9ds1.py file in /usr/local/lib/python3.4/dist-packages/ by the file adafruit_lsm9ds1.py from the folder tools/lib2imus/ in the folder . You can use this command in Raspberry Pi terminal :

imu_i2c