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

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: https://github.com/AutonomyLab/create...

This is my launch file:

<launch>
<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"/>
</group>
</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

EDIT:

So I went directly into the config and

change frame from base_footprint to "robot_0/base_footprint"

and

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

EDIT 2:

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

2 Answers

Sort by ยป oldest newest most voted
0

answered 2021-04-01 14:00:50 -0600

ratz gravatar image

While using RVIz, you can update tf_prefix. Refer this for your answer.

edit flag offensive delete link more
0

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"/>
  </include>
  </group>
...
edit flag offensive delete link more

Question Tools

2 followers

Stats

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

Seen: 1,047 times

Last updated: Apr 01 '21