How To Use EIMU With ROS2
Learn how to test and integrate the Easy IMU (EIMU) in your ROS2 project
Last updated
Learn how to test and integrate the Easy IMU (EIMU) in your ROS2 project
Last updated
Firstly, ensure you have calibrated and set its Madgwick filter gain and computed its orientation, rate, and acceleration variances. If not, follow the instructions here []
Also, before you start, it is worth knowing that you can use it with a PC, Raspberry Pi 4, or any microcomputer running Ubuntu OS and ROS2. You can also use docker (if you can).
You should also have some experience with ROS2 as a beginner or intermediate user. (e.g. Installing ROS2, setting up ros workspace, building packages with colcon, rosdep, ros topics, rviz, ros transforms, e.t.c)
The first just involves quick test to see if the Easy IMU is working with ROS2.
The Other Involves using it in your robotics projects (with URDF and robot-state-publisher)
You'll notice the eimu_ros_test_params.yaml
in the config
folder with following content:
the parameters, I believe, are quite self explanatory. (You can adjust any parameter as you see fit)
You'll notice the publish_tf_on_map_frame
is set to true. What this does is to publish the imu data transform from the imu frame to the map frame for quick test view with RVIZ.
all you need to do add TF to the rviz view.
The EIMU can also be used in your ROS2 robotic project where you have the robot's URDF transform published using the robot-state-publisher package.
You'll use the eimu_ros_start_params.yaml
in the config
folder with following content:
the parameters, I believe, are quite self explanatory and are the same as that of the test. (You can adjust any parameter as you see fit)
You'll notice the publish_tf_on_map_frame
is set to false. This means that the imu data transforms will not be published on the map frame. Since you would be using it with your robot's URDF, then the robot-state-publisher will handle the transform.
what you need to do before launching is to ensure the frame_id
parameter in the param file has the same name/value as that of your imu frame/link in your robot URDF file. e.g
Notice that the <link name="imu">
and frame_id: "imu"
have the same value and publish_tf_on_map_frame: false
Once this is done you can start/launch your robot-state-publisher to publish the URDF transform and then run the command below to start the Easy IMU.
Now the the IMU data will now be published on the IMU link of your robot.
Feel free to use the package launch and config file to your preferred taste.
With the above in mind, follow the instructions from its (i.e. package) to get it up and running.
There are two ways of using and launching the package:
After installing and building the eimu_ros package and connecting the EIMU Module to your PC or microcomputer as specified in its . You can quickly test if it is working by running the test launch file with rviz.
Finally, please chekout the package to see proper sample of how combine the EIMU with the EPMC and ekf sensor-fusion in a mobile robot.