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

IMU Issues with namespace, data, RVIZ

asked 2022-04-25 23:27:41 -0500

factos07 gravatar image

updated 2022-04-26 16:36:28 -0500

Hello,

I am running into an IMU data error in junction with the rest of my code for ROS navigation stack. Basically, the imu doesn't really seem to be outputting anything to the correct rostopic and nothing shows up in RVIZ. This is an image of what some of the rostopics are. As you can see, there is both /imu/imu/data and /imu/data, when in reality I think there should just be one. We created an rqt_graph, and it showed that the Imu topic is indeed connecting to ekf_robot_pose, but it inside another box (there's a main /imu box and there is another /imu/imu box in that box that contains the /data topic).

image description

In fact, (i think???) /imu/data is the right one, but /imu/imu/data is where everything is being fed. Even if reversed, it doesn't really make sense to us.

image description

In both cases, it seems like there is some frame_id as well named imu_link, but we don't have anything like this in our files.

image description

Does this have to do with namespace? Any help in this would be great! Thanks! image description

image description

edit retag flag offensive close merge delete

1 Answer

Sort by ยป oldest newest most voted
0

answered 2022-04-28 02:32:14 -0500

Joe28965 gravatar image

Yes, as expected. The first line of your launch file: <node ns="imu" name="imu_node" ...

ns=imu means that you give the node a namespace, called imu. A namespace is a name that is added in front of the name of the node and the topic. You could for instance use to when having multiple robots on the same network. ns=robot1 ns=robot2 kinda thing.

That node is the driver for your imu, the default topic is imu/data. So you get ns + default topic = imu + imu/data = imu/imu/data.

As for why imu_link is used even though you set the frame_id to imu. If I am right, I found the mpu_6050_driver that you use. If you check this line you will see it uses the parameter imu_frame to get the frame, with default value imu_link. You used the parameter name frame_id while that parameter doesn't seem to exist.

edit flag offensive delete link more

Question Tools

1 follower

Stats

Asked: 2022-04-25 23:27:41 -0500

Seen: 226 times

Last updated: Apr 28 '22