Ask Your Question
1

Error in Building a Visual Robot Model with URDF from Scratch

asked 2014-03-18 11:37:54 -0600

Eman gravatar image

updated 2014-03-18 11:50:26 -0600

-In the tutorial http://wiki.ros.org/urdf/Tutorials/Bu...

when I typed the following command roslaunch urdf_tutorial display.launch model:=urdf/01-myfirst.urdf in the terminal to examine the model, I had the following error

... logging to /home/eman/.ros/log/c7aa09c8-aee6-11e3-82a3-f46d04518b4d/roslaunch-eman-K52F-6478.log
Checking log directory for disk usage. This may take awhile.
Press Ctrl-C to interrupt
Done checking log file disk usage. Usage is <1GB.

Traceback (most recent call last):
  File "/opt/ros/hydro/lib/python2.7/dist-packages/roslaunch/__init__.py", line 279, in main
    p.start()
  File "/opt/ros/hydro/lib/python2.7/dist-packages/roslaunch/parent.py", line 257, in start
    self._start_infrastructure()
  File "/opt/ros/hydro/lib/python2.7/dist-packages/roslaunch/parent.py", line 206, in _start_infrastructure
    self._load_config()
  File "/opt/ros/hydro/lib/python2.7/dist-packages/roslaunch/parent.py", line 121, in _load_config
    self.config = roslaunch.config.load_config_default(self.roslaunch_files, self.port, verbose=self.verbose)
  File "/opt/ros/hydro/lib/python2.7/dist-packages/roslaunch/config.py", line 428, in load_config_default
    loader.load(f, config, verbose=verbose)
  File "/opt/ros/hydro/lib/python2.7/dist-packages/roslaunch/xmlloader.py", line 698, in load
    self._load_launch(launch, ros_config, is_core=core, filename=filename, argv=argv, verbose=verbose)
  File "/opt/ros/hydro/lib/python2.7/dist-packages/roslaunch/xmlloader.py", line 670, in _load_launch
    self._recurse_load(ros_config, launch.childNodes, self.root_context, None, is_core, verbose)
  File "/opt/ros/hydro/lib/python2.7/dist-packages/roslaunch/xmlloader.py", line 614, in _recurse_load
    self._param_tag(tag, context, ros_config, verbose=verbose)
  File "/opt/ros/hydro/lib/python2.7/dist-packages/roslaunch/xmlloader.py", line 95, in call
    return f(*args, **kwds)
  File "/opt/ros/hydro/lib/python2.7/dist-packages/roslaunch/xmlloader.py", line 240, in _param_tag
    value = self.param_value(verbose, name, ptype, *vals)
  File "/opt/ros/hydro/lib/python2.7/dist-packages/roslaunch/loader.py", line 453, in param_value
    with open(textfile, 'r') as f:
IOError: [Errno 2] No such file or directory: u'urdf/01-myfirst.urdf'

even though,the urdf_tutorial package are found in the following path filesystem/opt/ros/hydro/share and contains the urdf file. when I tried the command rospack find urdf_tutorial,it returned the package path /opt/ros/hydro/share/urdf_tutorial. so,it means that ROS can see the package. So,my question is; What is the cause of this error?? & why does it return "no such file or directory" ??

  • my distribution is hydro.
  • I use Ubuntu 12.10.

please,help. Thanks in advance.

edit retag flag offensive close merge delete

Comments

2

Did you run roslaunch from within the urdf_tutorial package? Did you run roscd urdf_tutorial before roslaunch?

BennyRe gravatar imageBennyRe ( 2014-03-18 21:12:51 -0600 )edit

3 Answers

Sort by ยป oldest newest most voted
6

answered 2014-03-18 23:41:22 -0600

gvdhoorn gravatar image

updated 2014-03-18 23:43:48 -0600

To extend a little on the answers by @Maya and @BennyRe: the tutorial explicitly tells you that you should either first roscd urdf_tutorials, or always provide the full (absolute) path to the urdf files.

From the tutorial:

# All of the robot models mentioned in this tutorial can be found in the urdf_tutorial package.
[..]
$ roscd urdf_tutorial

and:

This launch file assumes that 01-myfirst.urdf is in the urdf subdirectory of the directory that you type the command in. Otherwise, you should say model:='$(find pkg-name)/urdf/01-myfirst.urdf' where pkg-name is the name of the package that the file is in (single quotes required). All of the example files are in the urdf_tutorial package, so if you are in that directory you can run the commands without modification.

It would appear that your current working directory is not the urdf_tutorial package, hence the launch fails.

edit flag offensive delete link more
2

answered 2014-03-18 21:59:00 -0600

Maya gravatar image

Enter the complete path of the 01-myfirst.rudf file

roslaunch urdf_tutorial display.launch model:=/opt/ros/hydro/stacks/robot_model_tutorials/urdf_tutorial/01-myfirst.urdf

I have the same problem when I try to launch the urdf tutorial from groovy and hydro. This did the fix for me.

edit flag offensive delete link more
1

answered 2014-03-19 06:57:41 -0600

Eman gravatar image

updated 2014-03-19 07:06:29 -0600

@BennyRe @gvdhoorn @Maya

Thanks a lot for your help.

  • The cause of error was that I didn't run roscd urdf_tutorial before roslaunch.
  • The problem has been solved when I :-
    • first, run roscd urdf_tutorial.
    • then, run the command roslaunch urdf_tutorial display.launch model:=urdf/01-myfirst.urdf.

It is working successfully now & the cylinder appears in Rviz as shown in the tutorial.

image description

image description

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

2 followers

Stats

Asked: 2014-03-18 11:37:54 -0600

Seen: 2,197 times

Last updated: Mar 19 '14