Skip to content

About

ROS2 driver for daisch im1r sensor

Resources

Stars

2 stars

Watchers

0 watching

Forks

Repository files navigation

DAISCH Banner

IM1R_ROS2_Driver

GitHub issues GitHub pr GitHub GitHub release (with filter) GitHub Repo stars

English · 简体中文 · Global Official Site · 中文官网


Table of Contents

Project Description

This project aims to develop and maintain ROS2 drivers for the IM1R product.

Branches

Branch Description
main Primary maintained branch. It contains the current stable implementation of the driver.
backup/python-implementation Archive of the previous Python implementation. Use this branch when the legacy Python driver is required.
feature/high-frequency-protocol Development branch for supporting the IM1R high-frequency communication protocol.
debug/show-quat Debug branch that prints quaternion orientation messages for troubleshooting.

Branches other than main are retained for development, compatibility, debugging, or historical reference and may not receive ongoing updates.

Getting Started

Important Notice (Migration)

⚠️ This driver has been refactored from a Python implementation to a C++ implementation, and the former standalone message package im1r_ros2_interface has been merged into this repository/package.

  • Executable name changed: im1r_node (Python) → im1r_driver_node (C++)
  • Topic changes:
    • /temperature is no longer published (temperature is provided in im1r/extra)
  • If you upgraded from an older Python version, clean your workspace overlay to avoid running stale nodes.

System Requirements

  • Ubuntu 22.04 / ROS2 Humble
  • Ubuntu 20.04 / ROS2 Foxy
  • C++14 compiler support (required)

Installation Setups

  1. Install ROS2: Please refer to the ROS2 Documentation for detailed instructions.

  2. Create ROS2 workspace:

    mkdir -p ~/ros2_ws/src
  3. Clone the project repository to the src directory of your catkin workspace:

    cd ~/ros2_ws/src
    git clone https://github.com/DAISCHSensor/im1r_ros2_driver.git
  4. Install ROS dependencies:

    cd ~/ros2_ws
    rosdep install --from-paths src --ignore-src -r -y

    If rosdep is not available on your system, install it first:

    sudo apt update
    sudo apt install python3-rosdep
    rosdep update
  5. Build the driver:

    cd ~/ros2_ws/
    colcon build --packages-select im1r_ros2_driver
  6. Update the .bashrc file:

    ⚠️ Note: If you've already added these lines to your .bashrc, do not add them again to avoid duplicates.

    For ROS 2 Foxy

    echo "source /opt/ros/foxy/setup.bash" >> ~/.bashrc
    echo "source ~/ros2_ws/install/setup.bash" >> ~/.bashrc
    source ~/.bashrc

    For ROS 2 Humble

    echo "source /opt/ros/humble/setup.bash" >> ~/.bashrc
    echo "source ~/ros2_ws/install/setup.bash" >> ~/.bashrc
    source ~/.bashrc

Usage Instructions

  1. Connect IM1R via UART1 data cable.

  2. Identify the serial port for the IM1R device:

    sudo dmesg | grep tty

    Assuming the IM1R device is connected to /dev/ttyUSB0:

    sudo chmod 666 /dev/ttyUSB0
  3. Confirm the baud rate of the IM1R device. The default baud rate is 115200, which can be modified via the host computer software DS_RVision.

  4. Launch the driver node:

    • Assume the serial port connected to the IM1R is /dev/ttyUSB0
    • Assume the baud rate used by the IM1R is 115200

    Method 1: Using ros2 run

    ros2 run im1r_ros2_driver im1r_driver_node --ros-args -p serial_port:=/dev/ttyUSB0 -p baud_rate:=115200

    Method 2: Using launch file

    ros2 launch im1r_ros2_driver im1r_driver.launch.py serial_port:=/dev/ttyUSB0 baud_rate:=115200 frame_id:=IM1R

    Launch arguments: serial_port, baud_rate, frame_id. You can also edit the default values in im1r_driver.launch.py if needed.

  5. List all the topic:

    ros2 topic list
  6. echo the specific topic:

    ros2 topic echo /imu/data

Published Topics

Parameters Introductions

Standard Topic

imu/data

Variable Supported
time header.stamp ✔️
string header.frame_id ✔️
float64 orientation.x ✔️
float64 orientation.y ✔️
float64 orientation.z ✔️
float64 orientation.w ✔️
float64[9] orientation_covariance ✘
float64 angular_velocity.x ✔️
float64 angular_velocity.y ✔️
float64 angular_velocity.z ✔️
float64[9] angular_velocity_covariance ✘
float64 linear_acceleration.x ✔️
float64 linear_acceleration.y ✔️
float64 linear_acceleration.z ✔️
float64[9] linear_acceleration_covariance ✘

Custom Topic

im1r/extra

Variable Type Definition Unit Remarks
count uint8 Message counter - 0~255 cyclic increment
timestamp uint64 Timestamp of the measurement microseconds (µs) UNIX time
pitch float64 Pitch angle degrees (°)
roll float64 Roll angle degrees (°)
yaw float64 Yaw angle degrees (°)
imu_status uint8 IMU status indicator - See the product manual for bit definitions.
temperature float64 Temperature degrees Celsius (°C)

Contributing

License

BSD-3-Clause

About

ROS2 driver for daisch im1r sensor

Resources

Stars

2 stars

Watchers

0 watching

Forks

Releases

Packages

Used by

Contributors

Languages