ROS Resources: Documentation | Support | Discussion Forum | Index | Service Status | ros @ Robotics Stack Exchange
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.

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 merge 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/Stacks
Felix Endres gravatar image Felix 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 gravatar image 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.

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 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 gravatar image 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 gravatar image 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.

(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 link more

Comments

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

130s gravatar image 130s  ( 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.

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 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.

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 link more

Question Tools

Stats

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

Seen: 1,920 times

Last updated: Apr 27 '12