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

I can not launch the sample code

asked 2012-10-21 04:53:56 -0600

kuzeyli gravatar image

updated 2012-10-22 02:50:10 -0600

Hello,

I am a real beginner in ROS area. I have started with a tutorial, which is based on gazebo. Here it is: link text

On page 10, I have written the p3dx.launch file as:

<launch>
<include file="$(find p2os_urdf)/launch/upload_pioneer3dx.xml"/>
<!-- push robot_description to factory and spawn robot in gazebo -->
<node name="spawn_pioneer" pkg="gazebo" type="spawn_model" args="-z 0.051
-urdf -param robot_description -model robot_description" respawn="false"
 output="screen" />
 <!-- Controller Manager -->
 <include file="$(find pr2_controller_manager)/controller_manager.launch"
 />
 <!-- load controllers -->
 <node name="diffdrive" pkg="gazebo_plugins" type="gazebo_ros_diffdrive"
 respawn="true" output="screen"/>
 </launch>

and saved it to my Documents file.

Then I have started gazebo with an empty world by: roslaunch gazebo_worlds empty_world.launch

Then I am trying to lauch the p3dx.launch file by: roslaunch p3dx.launch

but I am getting this:

... logging to /home/tuba/.ros/log/3b7c26aa-1b8c-11e2-aba8-00e04c534458/roslaunch-ubuntu-2871.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/fuerte/lib/python2.7/dist-packages/roslaunch/__init__.py", line 257, in main
    p.start()
  File "/opt/ros/fuerte/lib/python2.7/dist-packages/roslaunch/parent.py", line 257, in start
    self._start_infrastructure()
  File "/opt/ros/fuerte/lib/python2.7/dist-packages/roslaunch/parent.py", line 206, in _start_infrastructure
    self._load_config()
  File "/opt/ros/fuerte/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/fuerte/lib/python2.7/dist-packages/roslaunch/config.py", line 421, in load_config_default
    loader.load(f, config, verbose=verbose)
  File "/opt/ros/fuerte/lib/python2.7/dist-packages/roslaunch/xmlloader.py", line 694, in load
    self._load_launch(launch, ros_config, is_core=core, filename=filename, argv=argv, verbose=verbose)
  File "/opt/ros/fuerte/lib/python2.7/dist-packages/roslaunch/xmlloader.py", line 666, in _load_launch
    self._recurse_load(ros_config, launch.childNodes, self.root_context, None, is_core, verbose)
  File "/opt/ros/fuerte/lib/python2.7/dist-packages/roslaunch/xmlloader.py", line 630, in _recurse_load
    val = self._include_tag(tag, context, ros_config, default_machine, is_core, verbose)
  File "/opt/ros/fuerte/lib/python2.7/dist-packages/roslaunch/xmlloader.py", line 95, in call
    return f(*args, **kwds)
  File "/opt/ros/fuerte/lib/python2.7/dist-packages/roslaunch/xmlloader.py", line 549, in _include_tag
    inc_filename = self.resolve_args(tag.attributes['file'].value, context)
  File "/opt/ros/fuerte/lib/python2.7/dist-packages/roslaunch/xmlloader.py", line 159, in resolve_args
    return substitution_args.resolve_args(args, context=context.resolve_dict, resolve_anon=self.resolve_anon)
  File "/opt/ros/fuerte/lib/python2.7/dist-packages/roslaunch/substitution_args.py", line 203, in resolve_args
    resolved = _find(resolved, a, args, context)
  File "/opt/ros/fuerte/lib/python2.7/dist-packages/roslaunch/substitution_args.py", line 139, in _find
    return resolved[0:idx-len(arg)] + r.get_path(args[0]) + resolved[idx:]
  File "/usr/lib/pymodules/python2.7/rospkg/rospack.py", line 149, in get_path
    raise ResourceNotFound(name, ros_paths=self._ros_paths)
ResourceNotFound: p2os_urdf
ROS path [0]=/opt/ros/fuerte/share/ros
ROS path [1]=/opt/ros/fuerte/share
ROS path [2 ...
(more)
edit retag flag offensive close merge delete

2 Answers

Sort by ยป oldest newest most voted
4

answered 2012-10-21 12:12:17 -0600

tfoote gravatar image

That suggests that you have not installed the p2os_urdf package, or do not have it in your ROS_PACKAGE_PATH.

edit flag offensive delete link more
2

answered 2013-03-12 01:23:54 -0600

swagatk gravatar image

updated 2013-03-15 04:15:38 -0600

You should build the package using rosmake in a folder lying in $ ROS_PACKAGE_PATH. See the link below:

http://ros.org/wiki/p2os/Tutorials/Getting%20Started%20with%20p2os

rosmake p2os

Once it is done, you can launch the above file. However, I find another error saying: "ERROR: cannot launch node of type [gazebo_plugins/gazebo_ros_diffdrive]: can't locate node [gazebo_ros_diffdrive] in package [gazebo_plugins]"

It turns out that gazebo_ros_diffdrive is no longer available in Fuerte. Is there anyone, I can make my robot move.

edit flag offensive delete link more

Question Tools

Stats

Asked: 2012-10-21 04:53:56 -0600

Seen: 2,640 times

Last updated: Mar 15 '13