robot model not showing up when using tf_prefix
HI! So I wanted to test out the
The robot driver file is this: https://github.com/AutonomyLab/create_autonomy
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 leftwheel and rightwheel_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 basefootprint and a robot0/base_footprint
the odom is going to the basefootprint while the robot0/basefootprint is going to robot0/base_link
EDIT:
So I went directly into the config and
change frame from basefootprint to "robot0/base_footprint"
and
odom to "robot_0/odom"
it seemed to work because tf tree goes from robot0/odom to robot0/basefootprint to robot0/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 baselink is there. However, when I start the amcl with urgnode, 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 tfprefix there aren't any, does that mean that I need to add tfprefix before each link in the urdf file?
Any help is appreciated! Thank you!!!
Asked by Usui on 2019-08-08 03:26:25 UTC
Answers
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>
...
Asked by TomSon on 2020-04-17 03:13:21 UTC
Comments