This project aims to develop and maintain ROS2 drivers for the IM1R product.
| 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.
im1r_ros2_interface has been merged into this repository/package.
- Executable name changed:
im1r_node(Python) →im1r_driver_node(C++) - Topic changes:
/temperatureis no longer published (temperature is provided inim1r/extra)
- If you upgraded from an older Python version, clean your workspace overlay to avoid running stale nodes.
- Ubuntu 22.04 / ROS2 Humble
- Ubuntu 20.04 / ROS2 Foxy
- C++14 compiler support (required)
-
Install ROS2: Please refer to the ROS2 Documentation for detailed instructions.
-
Create ROS2 workspace:
mkdir -p ~/ros2_ws/src -
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
-
Install ROS dependencies:
cd ~/ros2_ws rosdep install --from-paths src --ignore-src -r -y
If
rosdepis not available on your system, install it first:sudo apt update sudo apt install python3-rosdep rosdep update
-
Build the driver:
cd ~/ros2_ws/ colcon build --packages-select im1r_ros2_driver
-
Update the
.bashrcfile:⚠️ 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
-
Connect IM1R via UART1 data cable.
-
Identify the serial port for the IM1R device:
sudo dmesg | grep ttyAssuming the IM1R device is connected to /dev/ttyUSB0:
sudo chmod 666 /dev/ttyUSB0
-
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.
-
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. - Assume the serial port connected to the IM1R is
-
List all the topic:
ros2 topic list
-
echo the specific topic:
ros2 topic echo /imu/data
imu/data(sensor_msgs/Imu) quaternion, angular velocity and linear accelerationim1r/extra(DAISCH Custom Topic) extra params from IM1R
| 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 |
✘ |
| 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) |
