Ask Your Question

How to read a urdf in python in Indigo?

asked 2014-11-17 11:17:12 -0500

lucasw gravatar image

updated 2020-11-21 11:29:01 -0500 doesn't answer the question because it ends with Fuerte, I believe because the functionality was moved into urdfdom, but there isn't much documentation at .

Trying to run the Fuerte example with loading from the parameter server produces an error:

 Traceback (most recent call last):
   File "./", line 11, in <module>
   File "/opt/ros/indigo/lib/python2.7/dist-packages/roslib/", line 62, in load_manifest
     sys.path = _generate_python_path(package_name, _rospack) + sys.path
   File "/opt/ros/indigo/lib/python2.7/dist-packages/roslib/", line 93, in _generate_python_path
     m = rospack.get_manifest(pkg)
   File "/usr/lib/python2.7/dist-packages/rospkg/", line 159, in get_manifest
     return self._load_manifest(name)
   File "/usr/lib/python2.7/dist-packages/rospkg/", line 198, in _load_manifest
     retval = self._manifests[name] = parse_manifest_file(self.get_path(name), self._manifest_name, rospack=self)
   File "/usr/lib/python2.7/dist-packages/rospkg/", line 190, in get_path
     raise ResourceNotFound(name, ros_paths=self._ros_paths)
 rospkg.common.ResourceNotFound: urdf_parser_py
 ROS path [0]=/opt/ros/indigo/share/ros
 ROS path [1]=/home/lucasw/catkin_ws/src
 ROS path [2]=/opt/ros/indigo/share
 ROS path [3]=/opt/ros/indigo/stacks

Commenting out the load manifest then produces:

AttributeError: type object 'Robot' has no attribute 'load_from_parameter_server'
edit retag flag offensive close merge delete

1 Answer

Sort by ยป oldest newest most voted

answered 2014-11-17 11:24:11 -0500

lucasw gravatar image

updated 2014-11-17 11:27:18 -0500

From looking at the source it looks like 'load_from_parameter_server' has become 'from_parameter_server', so the complete example looks like:

import roslib
import rospy

from urdf_parser_py.urdf import URDF

robot = URDF.from_parameter_server()

edit flag offensive delete link more


I noticed an odd warning about 'upper' if a <limit> without an upper is provided, only the urdf parser generated a warning (The rest of the system worked fine though it wasn't clear if the other limits were working or silently ignored).

lucasw gravatar image lucasw  ( 2014-11-19 16:01:56 -0500 )edit

Your Answer

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

Add Answer

Question Tools

1 follower


Asked: 2014-11-17 11:17:12 -0500

Seen: 1,103 times

Last updated: Nov 17 '14