ROS Resources: Documentation | Support | Discussion Forum | Index | Service Status | ros @ Robotics Stack Exchange
Ask Your Question

Adding an IMU to Turtlebot 1

asked 2016-02-04 14:38:42 -0500

Waron gravatar image

Hi Everyone,

I'm trying to put together a Turtlebot 1 with some old iRobot creates and kinects I have had around my lab. So far, I've been able to make the plates, standoffs, power regulation board, and get everything working with the turtlebot package. I had to go in the create launch file and disable the gyro (which I can't buy anymore). I decided to order the sparkfun razer 9dof IMU as a replacement since I already saw it had a ROS package available.

I created a launchfile which would call the turtlebot minimal.launch and 3dsensor.launch with the parameters for the Turtlebot 1. I also added in that launchfile the razor-pub.launch for the IMU. I also modified the robot_pose_ekf node launched by create node to subscribe to the /imu topic published by the razor instead of the /mobile_base/sensors/imu_data which was the gyro data published by the create node.

Everything seemed to work, robot_pose_ekf was subscribing to /imu, the /imu topic was publishing data, and I could teleop the turtlebot around. However, I noticed a problem when I tried to run gmapping. It appears that I am missing the transform from base_imu_link to base_footprint.

Now, where I am stuck is: how do I tell the /imu topic to be published as the base_imu_link frame? Does the turtlebot urdf file create the base_imu_link from or does robot_pose_ekf?

I've been chasing this issue through many files, but as a relatively new ROS user, the turtlebot's flexible and cryptic method of launching the URDF gets me lost. My ROS console is giving the error "Could not transform imu message from base_imu_link to base_footprint. Imu will not be activated yet." It is also indicated that /robot_pose_ekf is the topic giving the warning.

Thanks in advance for any pointers or insight.

edit retag flag offensive close merge delete

1 Answer

Sort by ยป oldest newest most voted

answered 2016-02-05 13:46:03 -0500

Waron gravatar image

I guess I'll answer my own question, as I managed to resolve the issue. It appears that the razer 9dof node provides the /base_imu_link frame. I simply added the following line to my launch file, and everything worked perfectly! <node pkg="tf" type="static_transform_publisher" name="imu_to_base" args="0 0 0 0 0 0 base_link base_imu_link 10"/>

I suppose the URDF file for turtlebot provides all of the frames there, but since it's too complicated to bother editing, it's easier/better to manually provide the frame conversion in tf.

edit flag offensive delete link more


Thank you for this pointer -- I ran into the same problem. Edited: I had a follow up question about /imu vs /imu_data but you answered that in the original question. Thanks!

sakumar gravatar image sakumar  ( 2016-03-07 16:54:35 -0500 )edit

OK -- actual follow-up: After getting this to work, I see that /odom_combined only uses the 9DOF to update the orientation. Evidently it doesn't integrate the accelerometer data to get velocity or change of position. Since the TurtleBot pretty much lives in a 2D world, all I got from the IMU is yaw?

sakumar gravatar image sakumar  ( 2016-03-07 17:10:48 -0500 )edit

Question Tools



Asked: 2016-02-04 14:38:42 -0500

Seen: 1,419 times

Last updated: Feb 05 '16