1

I am new to Linux. I am trying to develop ROS application using eclipse. I don't understand the below which is provided in ROS website. Can you explain this in more simple way, So that I can configure my eclipse after downloading from eclipse.org.

Reusing your shell's environment

For building and running ROS programs from inside IDEs, the ROS enviroment has to be set up. All IDEs might have a config for that, but running your IDE from your ROS-sourced shell should be the easiest way, avoiding inconsistency.

Likewise, you can enhance your IDE's launcher icon to load your shells environment. E.g., replace its command eclipse with bash -i -c "eclipse". This will make bash source ~/.bashrc, in which ROS has to be sourced and parameterized, and start that IDE.

Bunsen McDubbs
  • 1,151
  • 1
  • 9
  • 9
Subhasis P
  • 11
  • 1
  • 3

3 Answers3

6

use following commands:

cd <your_catkin_workspace>
catkin_make --force-cmake -G"Eclipse CDT4 - Unix Makefiles"
cd build
cmake ../src -DCMAKE_BUILD_TYPE=Debug

now you can import your project to eclipse

after that you can create a desktop application entry for eclispe:

sudo vim /usr/share/applications/eclipse.desktop

[Desktop Entry]
Type=Application
Terminal=false
Icon=<path_to_your_eclipse_dir>/icon.xpm
Exec=bash -i -c "source /opt/ros/hydro/setup.bash && source $HOME/workspace/<your_catkin_workspace>/devel/setup.bash && <path_to_your_eclipse_dir>/eclipse"
Comment=IDE
Name=eclipse
Comment=IDE
  • After that you can nautilus /usr/share/applications/ and drag your eclipse.desktop file to Ubuntu launcher – Vinicius May 22 '15 at 17:00
2

It seems that a wiki was published about this subject here

Fabien R
  • 685
  • 1
  • 8
  • 24
0

Put simply, the lines you listed are suggesting you run your IDE (eclipse) from a terminal which has already been sourced. So for instance, if you have a package called mypackage, you might type in a terminal:

    cd ~/mypackage
    source devel/setup.bash
    eclipse

The first line is just however you get to your package, the second line sets up environmental variables for you (like changing your PATH), then you can run eclipse with all of those already setup so you don't have to configure your package in eclipse 100% manually.

Tim Sweet
  • 636
  • 5
  • 15