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

imu "buffer length" is zero

asked 2020-09-07 19:41:19 -0500

Ahmed_Desoky gravatar image

updated 2020-09-09 11:08:36 -0500

I have a differential drive mobile robot.

I am using mpu9250 IMU with this package jeskesen /i2c_imu

thr tf_tree is as shown in link text

the tf_tree show that the imu :

"Average rate" is 10000,

"Buffer length" is zero,

"Oldest transform" is zero ,

Edit 1 : The imu frame comes from mpu9250 IMU "it is the real imu" not from robot_state_publisher.

and what is deference between my tf_tree link text and others project in this links link text link text link text

edit retag flag offensive close merge delete

2 Answers

Sort by ยป oldest newest most voted
-1

answered 2020-09-09 13:07:51 -0500

Ahmed_Desoky gravatar image

The tf_tree shows buffer zero because I activate the imu_link and base_link transformation in the urdf file.

and this overwrite the real imu package transformation.

When I deactivate "comment" this transformation from urdf file. It is works and the imu buffer is 0.697.

edit flag offensive delete link more
0

answered 2020-09-08 20:55:36 -0500

JackB gravatar image

It is a static transform so it never changes. If the transform never changes, that means every single version of it is the same, which means we only need its exact value, and storing extra's in a buffer would be meaningless, so its length is zero.

edit flag offensive delete link more

Comments

the imu frame comes from mpu9250 IMU "it is the real imu" not from robot_state_publisher I cant understand you about static transform? and what is deference between my tf_treelink text and others project in this links link textlink textlink text

Ahmed_Desoky gravatar image Ahmed_Desoky  ( 2020-09-09 11:02:28 -0500 )edit
1

Does the IMU ever change position RELATIVE to the base_link? If it does not, then that means the transformation between the imu_link and base_link is "static". From your screen shots it looks like the transform is being produced by a tf2_rosstatic_transform_publisher, and your other partners are using either tf or some dynamic tf publisher.

JackB gravatar image JackB  ( 2020-09-09 11:22:59 -0500 )edit
1

Start a roscore, open a new terminal and run rosrun tf2_ros static_transform_publisher 0 0 0 0 0 0 1 map imu . Then in another terminal run rosrun tf view_frames. Inspect the pdf output of that. Kill the rocore and open a new terminal and run roscore again, and in another terminal run rosrun tf static_transform_publisher 0 0 0 0 0 0 map imu 100. Then in another terminal run rosrun tf view_frames. Inspect the pdf output of that and compare to the previous case. You will see that tf requires you to specify a frequency (100 in this case) and that tf2_ros does not specify a frequency.

JackB gravatar image JackB  ( 2020-09-09 11:28:22 -0500 )edit

Thanks a lot for your reply.

The tf_tree shows buffer zero because I activate the imu_link and base_link transformation in the urdf file.

When I deactivate "comment" this transformation from urdf file. It is works and the imu buffer is 0.697.

Ahmed_Desoky gravatar image Ahmed_Desoky  ( 2020-09-09 13:06:45 -0500 )edit
1

It should not matter where you activate it. It matters WHAT you activate. I imagine in one case it is using a different package than in the other (tf or tf2_ros) but I am not familiar enough with URDF files to layout why this does or does not happen. Again, because the transform is static I think "buffer length=0" and "oldest transform=0" (behavior from tf2_ros) is actually a more desirable notation, and works better with ROS timing.

JackB gravatar image JackB  ( 2020-09-09 13:47:09 -0500 )edit

Question Tools

1 follower

Stats

Asked: 2020-09-07 19:41:19 -0500

Seen: 563 times

Last updated: Sep 09 '20