Ask Your Question
1

make eclipse-project in stack

asked 2011-05-09 22:36:44 -0500

this post is marked as community wiki

This post is a wiki. Anyone with karma >75 is welcome to improve it.

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

ngrennan gravatar image

Hi !

I'm a beginner in ros, and I'm trying to develop ROS code using Eclipse.

My question is, recently I have created a repository in github with a ros stack, and inside of this ros stack I have some packages. I would like to import all the stack like a single project, but I'm not able to do a "make eclipse-project" with the stack.

So I can import as a project all the packages and it work perfectly but I don't know if is possible to import all the stack in one eclipse project.

Any one have done this ?

How do you develop multiple packages using a IDE ? you open a project for each package and put dependencies between them ?

edit retag flag offensive close delete

Comments

The idea of packages is, that they are relatively independent of each other. Usually they only interface either by linking of libraries or by ros messages. What advantage would it be, to have a single eclipse project? See also: http://www.ros.org/wiki/StacksFelix Endres ( 2011-05-09 22:52:21 -0500 )edit
Btw, could you reword your title/headline into a question? It makes the issue clearer when browsing headlines, and fits the question answer model better. Asomerville ( 2011-05-12 05:57:19 -0500 )edit

4 answers

Sort by ┬╗ oldest newest most voted
3

answered 2011-05-10 05:19:15 -0500

this post is marked as community wiki

This post is a wiki. Anyone with karma >75 is welcome to improve it.

updated 2011-05-10 05:19:15 -0500

I use Eclipse and to work on several packages at once, I simply make projects for each individually, and open them into my workspace. Eclipse will find and open all project under any directory you give it which works well for a stack if you've made Eclipse projects for each with make eclipse-project

AFAIK, neither Eclipse nor CMake can auto-detect other eclipse projects to link them automatically

edit flag offensive delete publish link more

Comments

$ cat ~/bin/make-eclipse-all

!/bin/bash

basedir=$(pwd) for file in $(find . -name 'CMakeLists.txt'); do makedir=$(dirname "$file") echo $file - $makedir cd "$basedir" cd "$makedir" make eclipse-project done

markpitchless ( 2012-04-27 09:27:20 -0500 )edit

$ cat ~/bin/make-eclipse-all

!/bin/bash

basedir=$(pwd) for file in $(find . -name 'CMakeLists.txt'); do makedir=$(dirname "$file") echo $file - $makedir cd "$basedir" cd "$makedir" make eclipse-project done

markpitchless ( 2012-04-27 09:27:24 -0500 )edit
3

answered 2012-04-27 09:31:58 -0500

this post is marked as community wiki

This post is a wiki. Anyone with karma >75 is welcome to improve it.

updated 2012-04-27 09:31:58 -0500

markpitchless gravatar image

(This is really a comment to add to Asomerville's answer but I don't have the Karma to edit the post and the comment want format the script nicely).

I have this script to create all the project files for a workspace/stack. Just cd to the root of the workspace and run to have make eclipse-project run on all packages.

 $ cat ~/bin/make-eclipse-all 
 #!/bin/bash
 basedir=$(pwd)
 for file in $(find . -name 'CMakeLists.txt'); do
     makedir=$(dirname "$file")
     echo $file - $makedir
     cd "$basedir"
     cd "$makedir"
     make eclipse-project
 done
edit flag offensive delete publish link more

Comments

This script works great although I can't tell what is the poster's name...anyway thanks a lot!

IsaacSaito ( 2012-06-06 07:30:33 -0500 )edit
2

answered 2011-05-10 00:46:19 -0500

this post is marked as community wiki

This post is a wiki. Anyone with karma >75 is welcome to improve it.

updated 2011-05-10 00:46:19 -0500

dornhege gravatar image

I'm not using eclipse, but I'm guessing that the dependencies should still be resolved by rosmake called via eclipse. You can have a look at this page: ROS IDEs

edit flag offensive delete publish link more
0

answered 2011-05-12 04:45:54 -0500

this post is marked as community wiki

This post is a wiki. Anyone with karma >75 is welcome to improve it.

updated 2011-05-12 04:45:54 -0500

Straszheim gravatar image

This will be more straightforward under rosbuild2, where there is a single invocation of cmake and therefore a single project file generated.

edit flag offensive delete publish link more

Your Answer

Please start posting anonymously - your entry will be published after you log in or create a new account.

Add Answer

[hide preview]

Stats

Asked: 2011-05-09 22:36:44 -0500

Seen: 1,569 times

Last updated: Apr 27 '12