Ask Your Question

robot model not showing up when using tf_prefix

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

Usui gravatar image

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

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

1 Answer

Sort by ยป oldest newest most voted

answered 2020-04-17 03:13:21 -0600

TomSon gravatar image

updated 2020-04-17 03:40:36 -0600

I got the same issue with the husky package I try to just add a tf_prefix "husky" in front of every link, seems working until I display everything in rviz

The robot_description seems to be the issue, it doesn't care about tf_prefix at all from all the xacro of husky.

My launcher looks like this for the moment, hope you got a solution

  <!-- HUSKY -->
  <group ns="husky">
  <param name="tf_prefix" value="husky" />
  <param name="robot_description" command="$(find xacro)/xacro '$(find erl_simulations)/models/husky.urdf.xacro'" />

  <include file="$(find erl_simulations)/launch/spawn_husky.launch">
    <arg name="x" value="-10.0"/>
    <arg name="y" value="-15.0"/>
edit flag offensive delete link more

Your Answer

Please start posting anonymously - your entry will be published after you log in or create a new account.

Add Answer

Question Tools



Asked: 2019-08-08 03:26:25 -0600

Seen: 167 times

Last updated: Apr 17