URDF problem

250 views
Skip to first unread message

samue...@gmail.com

unread,
Jun 29, 2015, 12:05:26 PM6/29/15
to ros-by-...@googlegroups.com
Hello,

I'm using Ros Indigo and Ubuntu 14.04 LTS. I'm actually reading the book Ros by example Volume 1 for RoS Indigo to have a guideline on the creation of the base motions of my robot.
I have encountered a problem when was trying to run the Simulator with my robot (part 6.3).
I created the fake_my_robot.launch file and ran :  roslaunch rbx1_bringup fake_pi_robot.launch   and  " $ rosrun rviz rviz -d `rospack find rbx1_nav`/sim.rviz "
But it loaded a wrong description of my robot.
I did the same with the pr2 description and I had the same problem.

I saw that the same has been encountered but the solution doesn't work for me. https://groups.google.com/forum/#!searchin/ros-by-example/urdf/ros-by-example/sPO5yo1_yCA/DgKncJjtj4IJ
I downloaded the rbx2 for indigo, I used $ rosrun rviz rviz -d `rospack find rbx2_description`/urdf.rviz and I still have a wrong description of my robot. The problem seems to come from the Robot Model.
How can I solve this problem? Did I miss something ?

Samuel
base_description_rbx1.png
base_description_rbx2.png
robotmodel_rbx1.png
robotmodel_rbx2.png
my_robot_forplanar.urdf.xacro
wheel_wheelmount_steering_piston.urdf.xacro

Patrick Goebel

unread,
Jun 29, 2015, 8:04:08 PM6/29/15
to ros-by-...@googlegroups.com
Hi Samuel,

Can you post the PDF of the tf tree you see when you run all your launch files and then run the commands:

$ cd /tmp
$ rosrun tf view_frames
$ evince frames.pdf

The resulting tree should help you identify any missing transforms.

--patrick
--

--
The Pi Robot Project
http://www.pirobot.org/wordpress

samue...@gmail.com

unread,
Jun 30, 2015, 5:13:16 AM6/30/15
to ros-by-...@googlegroups.com
Hello,

I ran the command you gave me to see the tf tree of the fake_my_robot.launch and I there is missing links in the tree: the wheels and the wheel mounts (It correspond to the component that are white in the picture of my robot in Rviz).
Then, I used the display.launch file from the urdf_tutorial package ( found here : https://github.com/ros/urdf_tutorial/tree/indigo ) -Arbotix is not running with this launch file- with the command: "roslaunch urdf_tutorial display.launch model:=my_robot.urdf" ("my_robot.urdf" is the urdf version of the xacro files I linked before), and I had the good tf tree. 
I don't get where is the problem coming from.

Note:
When I change my continuous and revolute joints -for the wheels and the wheel mounts (the problematic links)- into fixed joints, the robot appears with the good configuration while using fake_my_robot.launch . It was just a test to understand where the problem is coming from, but it confused me even more.
fake_my_robot_frames.pdf
display.launch
display_launch_robot.png
display_launch_frame.pdf

Patrick Goebel

unread,
Jun 30, 2015, 9:44:16 PM6/30/15
to ros-by-...@googlegroups.com
Hi Samuel,

I don't think you have posted your fake_my_robot.launch file yet.  Can you please do that?

--patrick
--
You received this message because you are subscribed to the Google Groups "ros-by-example" group.
To unsubscribe from this group and stop receiving emails from it, send an email to ros-by-exampl...@googlegroups.com.
Visit this group at http://groups.google.com/group/ros-by-example.
For more options, visit https://groups.google.com/d/optout.

samue...@gmail.com

unread,
Jul 1, 2015, 5:30:21 AM7/1/15
to ros-by-...@googlegroups.com
Hello Patrick,

Here is my fake_my_robot.launch file.
I copied and pasted the fake_turtlebot.launch, renamed it, and changed the path of the turtlebot.urdf.xacro file to the path of my_robot_forplanar.urdf.xacro file.

Samuel

fake_my_robot.launch

Patrick Goebel

unread,
Jul 1, 2015, 9:33:21 AM7/1/15
to ros-by-...@googlegroups.com
Hi Samuel,

OK, I think I see what's going on.  The display.launch file includes a joint_state_publisher node that is making sure your wheel joints are getting added to the TF tree.  This is normally the job of the base controller which in the case of the fake Turtlebot or fake Pi Robot is the arbotix_python diff_controller.py script.  This script assumes the wheel joint names are "base_l_wheel_joint" and "base_r_wheel_joint" which don't match your wheel joint names so your wheel joints are not getting added to the TF tree.

A simple work around is to use a node like the one I have attached to publish fake joint states for your wheel joints.  After changing the joint names appropriately, run this node with your fake_my_robot.launch file.

--patrick
fake_wheel_pub.py

samue...@gmail.com

unread,
Jul 2, 2015, 4:49:48 AM7/2/15
to ros-by-...@googlegroups.com
Hello,

In so far as my robot base is a 4 wheeled square base.
Can I put  msg.name = ["back_right_wheel_joint", "back_left_wheel_joint", "front_right_wheel_joint", "front_left_wheel_joint"] in my node or will there be a problem of compatibility with the existing controller?

Thank you for your help,
Samuel

Patrick Goebel

unread,
Jul 2, 2015, 9:38:11 AM7/2/15
to ros-by-...@googlegroups.com
Hi Samuel,

Adding all four wheel joints shouldn't be a problem. The ArbotiX base
controller really isn't doing anything with the wheel joint states it
publishes--it does so just to make the URDF model complete if you happen
to use the same wheel joint naming convention that it does. If for some
reason down the road you use a different base controller that publishes
real values for some or all of your wheel joints, then you'll want to
take those joints out of the fake_wheel_pub.py node or eliminate the
node altogether if all four joints are handled by your controller.

--patrick

samue...@gmail.com

unread,
Jul 3, 2015, 4:43:38 AM7/3/15
to ros-by-...@googlegroups.com
Hi Patrick,

Thank you for your answers, it helped me a lot. Things are clear now.

Best regards,
Samuel
Reply all
Reply to author
Forward
0 new messages