Ask Your Question
1

Running roscore and roslaunch from eclipse

asked 2012-09-18 00:17:47 -0500

chcorbato gravatar image

updated 2014-01-28 17:13:41 -0500

ngrennan gravatar image

I'm trying to run roslaunch or roscore as an External Tool following another post, but I got 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 the External Tool:

/usr/bin/env: python: No such file or directory

I think it is probably a matter of configuring the ROS environment variables for eclipse. I've set ROS_ROOT, ROS_PACKAGE_PATH and ROS_MASTER_URI, are there any more?

Maybe there is another reason.

I would be grateful if anyone can shed some light on this.

Thank you!

edit retag flag offensive close merge delete

Comments

2

Are you starting eclipse from a shell or via a starter? Does it work, when starting it from a shell?

dornhege gravatar image dornhege  ( 2012-09-18 02:02:02 -0500 )edit

It seems to work as you suggest, running eclipse from a shell, thank you very much However, I do not get the output in the eclipse console, a Progress Information eclipse window dialog appears instead and keeps saying "launching roslaunch" checking from a shell I see that the ROS system is up

chcorbato gravatar image chcorbato  ( 2012-09-18 03:57:55 -0500 )edit

1 Answer

Sort by ยป oldest newest most voted
0

answered 2012-09-21 04:21:03 -0500

You might need to source the setup.bash file from ~/.bash_profile to make ROS environment variables available to all the system not only to bash session. The ~/.bash_profile shell script is called only once when you log in, contrary to ~/.bashrc which is executed locally every time a new terminal window is opened.

P.S. Another useful approach to debug nodes started via launch files is to attach gdb to already running process. I am using this a lot and it is quite handy. The only problem is that you will not be able to debug any startup code, e.g. constructors, with such approach.

To use this option go to Run->Debug Configurations... and double-click on C/C++ Attach to Application. Then fill in C/C++ Application and press Debug.

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

1 follower

Stats

Asked: 2012-09-18 00:17:47 -0500

Seen: 919 times

Last updated: Sep 21 '12