[ros-users] Eclipse projects

Daniel Stonier d.stonier at gmail.com
Thu Oct 21 23:04:57 UTC 2010


Oops, the eclipse one was quite simple. It was the gnome-terminal one I was
thinking of - it's a little more difficult to get started with the
appropriate variables exported. If you've only got one ros installation,
then of course you can just export the setup in your .profile and eclipse
will immediately grab the environment variables (you can check by clicking
windows->preferences->build->environment->select - you should be able to see
ROS_ROOT in the list, no need to actually select it, just verify that it is
there).

However if you start to layout out multiple installations (like we do here,
one for each robot), then the following is very convenient as you just set a
different path for each eclipse-ros starter. I usually put this script in my
path and then create new menu items in my gnome/kde/e17.


#!/bin/bash
# This only needed by ubuntu karmic and eclipse ganymede(?), otherwise
comment out
# export GDK_NATIVE_WINDOWS=1
source /opt/ros/setup.sh
# Add the full path if eclipse is not in your PATH
exec eclipse


On 22 October 2010 01:52, Aditya Gadre <agadre at vt.edu> wrote:

>  Hi Daniel,
>
> Thank you very much for your email. I think I will follow your suggestion
> of manually creating an eclipse project. That way my sources will remain
> clutter free. I would much appreciate if you could give me the script you
> use to start eclipse.
>
> Thanks again!
> - Aditya
>
>
> On 10/21/2010 11:22 AM, Daniel Stonier wrote:
>
> Oh, only gotcha with the method I outlines is that you have to start your
> eclipse from a shell with all the usual ROS variables being exported...that
> or either fire up a script which does that for you so you can put desktop
> icons on your panels (I have one I can paste here if you need).
>
> On 22 October 2010 00:20, Daniel Stonier <d.stonier at gmail.com> wrote:
>
>> I actually prefer just using makefile projects within eclipse.
>>
>>  - create a new ros package
>> - in eclipse:
>>   - create anew, empty Makefile project. Turn off the default location and
>> choose your ros package location instead.
>> - make sure you add the line 'set(CMAKE_VERBOSE_MAKEFILE true)' to your
>> CMakeLists.txt, this helps eclipses' c++ indexer.
>>  - build project, clean project then both work as you expect...with a
>> parallel build directory.
>>
>>  Of course, that will only let you make the individual project. But i
>> typically do an rosmake for the project now and then (i.e. when I download
>> or other packages have changed alot). Usually while developing all you need
>> is to make the single package.
>>
>>  The above also has the advantage in that you don't have any problems
>> with the .project, .cproject files getting shared amongst your team. That
>> and the fact that you can make/rosmake from a shell and build from inside
>> eclipse without it getting mucked up.
>>
>>  I should probably add some notes about this to the wiki.
>>
>> On 21 October 2010 11:31, Aditya Gadre <agadre at vt.edu> wrote:
>>
>>> I have a question about "make eclipse-project" command. I created a
>>> package which has a number of CMakeLists.txt files as follows -
>>>
>>> gps (package_dir)
>>>     - CMakeLists.txt ( with add_subdirectory(src) )
>>>     - src (directory)
>>>         - CMakeLists.txt (with add_subdirectory(gps) and
>>> add_subdirectory(node))
>>>         - gps (directory)
>>>             - CMakeLists.txt (with add_library)
>>>         - node (directory)
>>>             - CMakeLists.txt (with add_executable)
>>>
>>> When I run "rosmake gps", all CMakeFiles directories and other related
>>> CMake files are under the "build" directory as expected for an
>>> out-of-source build. However, when I run "make eclipse-project", then
>>> CMakeFiles directories, along with other CMake files are created in
>>> directories that contain CMakeLists.txt files. The ROS wiki mentions the
>>> work-around used by "make eclipse-project". Are all CMakeFiles folders
>>> created outside the build directory a result of this work-around?
>>>
>>> Thanks,
>>> - Aditya
>>> _______________________________________________
>>> ros-users mailing list
>>> ros-users at code.ros.org
>>> https://code.ros.org/mailman/listinfo/ros-users
>>>
>>
>>
>>
>>  --
>> Phone : +82-10-5400-3296 (010-5400-3296)
>> Home: http://snorriheim.dnsdojo.com/
>> Yujin Robot: http://www.yujinrobot.com/
>> Embedded Control Libraries:
>> http://snorriheim.dnsdojo.com/redmine/wiki/ecl
>>
>
>
>
> --
> Phone : +82-10-5400-3296 (010-5400-3296)
> Home: http://snorriheim.dnsdojo.com/
> Yujin Robot: http://www.yujinrobot.com/
> Embedded Control Libraries: http://snorriheim.dnsdojo.com/redmine/wiki/ecl
>
> _______________________________________________
> ros-users mailing listros-users at code.ros.orghttps://code.ros.org/mailman/listinfo/ros-users
>
>
> _______________________________________________
> ros-users mailing list
> ros-users at code.ros.org
> https://code.ros.org/mailman/listinfo/ros-users
>
>


-- 
Phone : +82-10-5400-3296 (010-5400-3296)
Home: http://snorriheim.dnsdojo.com/
Yujin Robot: http://www.yujinrobot.com/
Embedded Control Libraries: http://snorriheim.dnsdojo.com/redmine/wiki/ecl
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.ros.org/pipermail/ros-users/attachments/20101022/cab80c82/attachment-0003.html>


More information about the ros-users mailing list