IMU Issues with namespace, data, RVIZ
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 rqtgraph, and it showed that the Imu topic is indeed connecting to ekfrobot_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).
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.
In both cases, it seems like there is some frameid as well named imulink, but we don't have anything like this in our files.
Does this have to do with namespace? Any help in this would be great! Thanks!
Asked by factos07 on 2022-04-25 23:27:41 UTC
Answers
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.
Asked by Joe28965 on 2022-04-28 02:32:14 UTC
Comments