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

How do I use eclipse with python (pydev)

asked 2012-06-23 16:48:49 -0500

PaulBouchier gravatar image

updated 2014-01-28 17:12:48 -0500

ngrennan gravatar image

This page explains how to use eclipse with C++: This page explains how to set up eclipse with pydev to edit python files:

But nothing seems to tell me how to actually run python ros packages under eclipse, set breakpoints, etc. When I try to run it fails with an exception when trying to load the manifest:

Traceback (most recent call last):
  File "/home/bouchier/ros_workspace/randomWalk/src/", line 6, in <module>
    import roslib; roslib.load_manifest('randomWalk')
  File "/opt/ros/fuerte/lib/python2.7/dist-packages/roslib/", line 62, in load_manifest
    sys.path = _generate_python_path(package_name, _rospack) + sys.path
  File "/opt/ros/fuerte/lib/python2.7/dist-packages/roslib/", line 93, in _generate_python_path
    m = rospack.get_manifest(pkg)
  File "/usr/lib/pymodules/python2.7/rospkg/", line 118, in get_manifest
    return self._load_manifest(name)
  File "/usr/lib/pymodules/python2.7/rospkg/", line 157, in _load_manifest
    retval = self._manifests[name] = parse_manifest_file(self.get_path(name), self._manifest_name)
  File "/usr/lib/pymodules/python2.7/rospkg/", line 149, in get_path
    raise ResourceNotFound(name, ros_paths=self._ros_paths)
rospkg.common.ResourceNotFound: randomWalk

I've single-stepped through rosserial_python (which is what I really want to run in a debugger), and it gets the same error. I've tried running from different directories, & it seems to be unable to find manifest.xml when running in eclipse. (It runs fine from rosrun).

How do python developers do debugging? Is there an easy fix to use eclipse? Any other toolsets I should be using?



edit retag flag offensive close merge delete

2 Answers

Sort by ยป oldest newest most voted

answered 2012-06-24 14:03:12 -0500

updated 2012-06-24 14:03:25 -0500

Hi Paul,

as far as I know there is no direct support yet to launch ros nodes out of eclipse (and debug them). I use eclipse with pydev to develop the node but I still run it from the console with rosrun.

There has been done some effort by the guys from TU Munich to integrate the ros tools into an IDE, but I don't know how far the project is and if it is still actively developed. You can find the source in this repository.

You could try to execute rosrun as an external run script in eclipse. I tried to set it up once but gave up because I could not find a way to properly set up all the paths ros has set in the console (through setup.bash). There is probably a way but I decided its not worth it.

Good luck


edit flag offensive delete link more


tum rosclipse project is dormant, pydev integration was not even on the todo list yet.

KruseT gravatar image KruseT  ( 2012-06-26 22:33:38 -0500 )edit

answered 2012-06-25 00:19:09 -0500

PaulBouchier gravatar image

Thanks Felix.

Answering my own question with a hypothesis

I guess most ros python developers would debug a python node by adding import pdb and inserting a pdb.set_trace() statement at a point where they want to start single-stepping.

Is that correct? Is there a better answer?

Sorry for the noobie question.


edit flag offensive delete link more

Question Tools



Asked: 2012-06-23 16:48:49 -0500

Seen: 2,899 times

Last updated: Jul 27 '13