ROS Resources: Documentation | Support | Discussion Forum | Service Status | Q&A answers.ros.org
Ask Your Question
6

How do I start a .launch file from Eclipse IDE

asked 2011-05-23 22:53:27 -0500

Poseidonius gravatar image

updated 2014-01-28 17:09:43 -0500

ngrennan gravatar image

Hi,

I use Eclipse to develop ROS applications and the "cmake eclipse-project" is very helpful for this purpose. But how do I start a .launch file out of this IDE? I made some experiments to define new "External tool configurations" but it does not work :-(

Is there anywhere a guideline or a tutorial for this topic?

Thanks for your help !

edit retag flag offensive close merge delete

Comments

I can't answer your question, but perhaps this person can: http://answers.ros.org/question/930/how-to-configure-eclipse-to-properly-load-a-plugin
Asomerville gravatar imageAsomerville ( 2011-05-24 06:05:30 -0500 )edit
No, I haven't figured out how to use launch files in Eclipse. I activate a launch file for all of the external nodes from the command line and just launch the node I am debugging in Eclipse.
Bart gravatar imageBart ( 2011-05-24 18:03:37 -0500 )edit

1 Answer

Sort by » oldest newest most voted
9

answered 2011-05-25 20:55:13 -0500

Poseidonius gravatar image

updated 2011-05-26 04:59:30 -0500

I take some minutes to find a solution for the problem :


Add a new file association for .launch files

  1. General -> Editors -> File Association ... add a new file type with the suffix *.launch assign the XML Editor to the new file type
  2. General -> Appearance -> Content Types ... roll off entry for TEXT in the menu go to XML and add *.launch

Now a .launch file will be opened by the XML Editor, if you have installed it.


In a second step you have to define a new external tool launch.

  1. Run -> External Tools -> External Tools Configurations
  2. choose PROGRAM and add a new lauch configuration by clicking the left button
  3. write a name like “Launch_ROS” to NAME
  4. integrate the path of roslaunch into LOCATION (usually something like ../ros/ros_comm/tools/roslaunch/bin/roslaunch)
  5. add as ARGUMENTS your ROS package name and .launch file name (for a more general use you can take ${project_name} ${resource_name}, but in this case your focus has to be on your launch file while starting !!!)
  6. then you can start the ROS application by Run -> External Tools -> Launch ROS

Anyone feels free to improve the chain !

Best wishes from Germany

Poseidonius

edit flag offensive delete link more

Comments

Nice. I'm sure this well be helpful to many people.
Asomerville gravatar imageAsomerville ( 2011-05-26 04:44:44 -0500 )edit

I'm trying to run roslaunch or roscore as an External Tool following this guide, but I get an error. Looks like you probably need to define for eclipse the ROS environment variables, I think I've done so, but then I get this error when running: /usr/bin/env: python: No such file or directory

chcorbato gravatar imagechcorbato ( 2012-09-18 00:12:16 -0500 )edit

Eclipse looks for a python interpreter in /usr/bin/env/ ... please check this outside Eclipse. Probably you add a wrong path.

Poseidonius gravatar imagePoseidonius ( 2012-09-18 19:44:07 -0500 )edit

Outside Eclipse everything works. Could it be that Eclipse overwrites the path to the python interpreter? Maybe because of a default configuration for the PyDev plugin? Do you know which is the variable in Eclipse that defines the path?

chcorbato gravatar imagechcorbato ( 2012-09-20 21:13:50 -0500 )edit

Take a view on Window > Preferences > PyDev > Interpreter Python ... You can use "Auto Config" or declare the path manually.

Poseidonius gravatar imagePoseidonius ( 2012-09-21 02:07:02 -0500 )edit

Thank you, @Poseidonius! This is really helpful.

harsha gravatar imageharsha ( 2012-10-17 09:44:58 -0500 )edit
1

Thanks @Poseidonius, I am able to run my launch file in eclipse. I was wondering is there a way I can debug it as well. That will be debugging in eclipse while running an external tool.

aknirala gravatar imageaknirala ( 2013-03-02 20:23:00 -0500 )edit

I figured out a way of debugging nodes started with a launch config, see my blog post http://www.ceh-photo.de/blog/?p=899

chrisLB gravatar imagechrisLB ( 2014-12-14 09:06:13 -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

3 followers

Stats

Asked: 2011-05-23 22:53:27 -0500

Seen: 9,517 times

Last updated: May 26 '11