robot model not showing up when using tf_prefix

asked 2019-08-08 03:26:25 -0500

Usui gravatar image

updated 2019-08-08 22:03:51 -0500

HI! So I wanted to test out the <group ns=""> and tf_prefix on one robot before doing 2.

The robot driver file is this:

This is my launch file:

<node pkg="imu" type="imu" name="imu"/>
<group ns="robot_0">
<param name="tf_prefix" value="robot_0" />
<include file="$(find ca_driver)/launch/create_2.launch"/>

I did not get any errors although for some reason the robot model isn't showing at all. Also, I couldn't view left_wheel and right_wheel_link tf on rviz.

Do I need to change my urdf files? Maybe something like:

<link name="$(tf_prefix)base_link"/>

and for base_footprint and all link?

Also, I think the problem is I have a base_footprint and a robot_0/base_footprint

the odom is going to the base_footprint while the robot_0/base_footprint is going to robot_0/base_link


So I went directly into the config and

change frame from base_footprint to "robot_0/base_footprint"


odom to "robot_0/odom"

it seemed to work because tf tree goes from robot_0/odom to robot_0/base_footprint to robot_0/base_link to all the links

BUT the robot model urdf is still not showing


When I ran rviz, sometimes it gave me this error:

Message from [/robot_0/ca_driver] has a non-fully-qualified frame_id [robot_0/odom]. Resolved locally to [robot_0/odom].  This is will likely not work in multi-robot systems.

Usually I don't have too much problem with robot model not appear as long as the tf of base_link is there. However, when I start the amcl with urg_node, it doesn't localize as well as if I just not use tf_prefix.

Also, I notice that I under robot model in rviz, there are links, but when I use tf_prefix there aren't any, does that mean that I need to add tf_prefix before each link in the urdf file?

Any help is appreciated! Thank you!!!

edit retag flag offensive close merge delete