ROS/iNemo-M1 Discovery: the node is working!

Finally the ROS node to interface with the ST iNemo-M1 Discovery is ready and we can get information about the accelerations and the rotation speed of the robot directly from the board.

And this is not everything. The iNemo-M1 Discovery runs also an AHRS (Attitude and Heading Reference System) algorithm, so we can get Roll Pitch and Yaw information and relative quaternion.
The sum of these information can be used, together with Encoder Odometry and Visual Odometry, to estimate the position of the robot with an Extended Kalman Filter (EKF) and to navigate in an known or unknown map.

The code is available (as always) on Github:

The usage is simple. Add the source code in a full operating ROS environment and compile it:
$ cd catkin_ws
$ cd src
$ https://github.com/Myzhar/ST-iNemo_M1-IMU.git
$ catkin_make

After the compilation step the new node is ready to be launched.
Open a new terminal and start ROS:
$ roscore

Connect the iNemo-M1 board to an USB port and in the previous terminal start the iNemo node:
$ rosrun st_inemo_m1_imu inemo_m1_node

If you get error about serial port not available, you must enable it for your user and run the node again:
$ sudo chmod 666 /dev/ttyACM0

Now you will see the data coming from the board printed in succession:

ROS iNemo-M1 Data

ROS iNemo-M1 Data

You can also visualize the “movements” of the IMU on rviz:
$ rosrun rviz rviz

ROS iNemo-M1 Rviz

ROS iNemo-M1 Rviz

The pink arrow is the direction of the versor of the top plane of the IMU. You can see it moving simply rotating the board.
To visualize the arrow you must add a “Imu” visualizer, set “imu_link” as fixed frame and select “/imu_data” as topic for IMU.
You can also add temperature information that is shown as a colored sphere… each color is a temperature measured by iNemo-M1. The topic is “/inemo/temperature”.

The board is configured in “standard usage”… I will insert in the future all the services to configure it according to ST communication protocol.

That’s all… stay tuned for the integration of the IMU on MyzharBot

Leave a Reply

Your email address will not be published. Required fields are marked *

This site uses Akismet to reduce spam. Learn how your comment data is processed.