• sales

    +86-0755-88291180

10 DOF ROS IMU (A) User Guide

Introduction

10 DOF ROS IMU (A) is a 10-axis IMU sensor that integrates an ARM 32-bit DSP processor, BLE5.3 Bluetooth, high-precision accelerometer, gyroscope, magnetometer, and temperature and pressure sensor. When used together, it can collect surrounding acceleration, gyroscope, and magnetic field data, and detect the motion attitude of the robot.

Features

  • Adopts self-developed attitude estimation algorithm, it offers excellent real-time performance, high accuracy, and stability without drifting.
  • Uses serial port and BLE5.3 Bluetooth communication to assist the robot in motion attitude and orientation detection.
  • Supports Android, iOS, Windows, Linux systems, and other BLE Bluetooth devices for connection and use.

Specifications

Product10 DOF ROS IMU (A)
Power supply3.3V~5V
Baud rate115200
Interface packageZH1.5-4A
Communication format8 data bits, 1 stop bit, no parity bit
Data packet formatPreamble+Start Code+Address+Length+Data Body+Checksum+End Code
Data outputAcceleration, angular velocity, magnetic field vector, temperature, atmospheric pressure, Euler angle, quaternion
AccelerometerRange: ±16g
Resolution: 0.00048g
GyroscopeRange: ±2000°/s
Resolution: 0.061°/s
MagnetometerRange: ±8Guass
Resolution: 0.12uT
Temperature sensorRange: -45℃~85℃
Resolution: 0.01℃(onboard temperature)
BarometerRange: 300~1200hPa
Resolution: 0.006hPa

Pinout Definition

Pin No.IdentifierDescription
15V3.3V~5.0V power supply
2GConnect to GND, ground pin
3RxSerial data receive pin
4TxSerial data transmit pin

Hardware connection

1. Serial port connection, red wire VCC, black wire GND, blue wire TXD, yellow wire RXD
2. This product does not include a USB to UART serial port module

Assembly with same coordinate axes directions:


Axial description

The axial orientation of the 10 DOF ROS IMU (A) is shown in the figure above and conforms to the right-hand coordinate system

Dimensions


Demo

Serial communication

  1. Install the serial port driver, find the device port number
    Install the corresponding driver according to the type of serial port conversion module chipTake Windows as an example. The port number is shown in the following figure

  2. Install the required dependencies
    Windows, Linux:
    pip install pyserial numpy pygame PyOpenGL
  3. Initialize
    Replace the line 8 ser_port = "COM13" with the corresponding serial port, and rotate the Z-axis of the module more than a full circle perpendicular to the horizontal plane and the Z-axis balanced on the horizontal plane within 10 seconds
    Windows, Linux:
    python3 imu_init.py
  4. Execute data parsing code
    Replace the line 7 ser_port = "COM13" with the corresponding serial port
    • Windows: Usually COMx.
    python3 imu_uart.py
    • Linux: Different ports for different systems, for example /dev/ttyUSBx, /dev/ttySx, you can query the device for confirmation of newly added devices by hot-plugging the devices
    ls /dev/tty*
    python3 imu_uart.py
  5. GUI visualization interface
    Need to stop the data parsing program in the previous step and execute the following program
    python3 imu_uart_gui.py


Bluetooth communication

  1. Install the Bluetooth debugging software and find the MAC address of the device
    Take Android as an example. The MAC address is shown in the figure below

  2. Install the required dependencies
    • Windows:
    pip install bleak numpy
    • Linux:
    sudo apt-get install bluez libbluetooth-dev
    pip install gatt
  3. Execute the code
    Before use, it is recommended to perform the initialization steps in serial communication
    • Windows: Replace line 14 par_device_addr="70:53:B2:02:20:02" with the MAC address found in the first step
    python3 imu_ble.py
    • Linux: Replace with the MAC address found in the first step
    python3 imu_ble.py 70:53:B2:02:20:02

ROS serial communication

Take "/dev/ttyUSB0" as an example

  1. Find the device port number
    • Query the device for confirmation of newly added devices by hot-plugging the devices
    ls /dev/tty*
    • Grant serial port permissions:
    sudo chmod 666 /dev/ttyUSB0
  2. Install the required dependencies
    • ROS1 noetic:
    sudo apt update && sudo apt install ros-noetic-serial  ros-noetic-imu-tools
    • ROS2 humble:

    Install the serial port library

    cd serial && mkdir build && cd build
    cmake .. && make
    sudo make install

    Install other dependncies

    sudo apt update && sudo apt install libserial-dev  ros-humble-imu-tools
  3. Compile
    • ROS1 noetic:
    Go to the root directory of the workspace and compile
    catkin_make -DCATKIN_WHITELIST_PACKAGES="imu"

    Update environment variables

    source devel/setup.bash
    • ROS2 humble:
    Go to the root directory of the workspace and compile
    colcon build --packages-select imu
    Update environment variables
    source install/setup.bash
  4. Execute data parsing code
    • ROS1 noetic:
    Need to have Roscore started, or have a launch file running in the system
    (Optional) Open a new window to start roscore
    roscore
    Open a new window to parse data
    rosrun imu imu_node _port_name:=/dev/ttyUSB0
    Open a new window to view data
    rostopic echo /imu/data
    • ROS2 humble:
    Open a new window to parse data
    ros2 run imu imu_node --ros-args --param port_name:=/dev/ttyUSB0
    Open a new window to view data
    ros2 topic echo /imu/data
  5. RVIZ visualization interface
    Need to stop the data parsing program in the previous step and execute the following program
    • ROS1 noetic:
    roslaunch imu imu_view.launch port_name:=/dev/ttyUSB0


    • ROS2 humble:
    ros2 launch imu imu_view.launch.py port_name:=/dev/ttyUSB0


Demo download

1. Click to download 10_DOF_ROS_IMU_(A) Code
2. Please install the related libraries and then run the demo. For the ROS demo, please compile and use it on the ROS system


Support

Monday-Friday (9:30-6:30) Saturday (9:30-5:30)

Email: services01@spotpear.com