ROS Resources: Documentation | Support | Discussion Forum | Index | Service Status | ros @ Robotics Stack Exchange
Ask Your Question

Revision history [back]

click to hide/show revision 1
initial version

In Hydro fake_localization is not a rosbuild package so rosmake isn't going to work.

The "strange" organization of ../bin, ../include and ../share is called FHS:

http://en.wikipedia.org/wiki/Filesystem_Hierarchy_Standard

And is the recommended way of installing files in linux.

But the second option adds all these bloated scripts in the bin directory.

You shouldn't set your CMAKE_INSTALL_PREFIX to a bin folder.

The bloated scripts you are referring to are there to help you extend your environment by running source path/to/bloated/scripts/setup.bash you will have that path extended on to your PATH, PYTHONPATH, CMAKE_PREFIX_PATH, PKG_CONFIG_PATH, etc... However, if you do not want to use them, simply pass -DCATKIN_BUILD_BINARY_PACKAGE="1" to cmake and catkin will not generate them. They are on by default because most people find them useful.

Finally you need to move the executable out of the build directory for who knows why ...

You don't need to move anything. You can either set the CMAKE_INSTALL_PREFIX to something already on your path, like /usr or /usr/local, or you can source the resulting setup.bash file, e.g. source devel/setup.bash.

However, to setup an entire workspace for catkin builds and move all my sources in a weird hierarchy is completely unacceptable to me.

So, what weird hierarchy are you referring to, the default suggestion to put source code under the src folder? If you do not want to do that you can organize your code how ever you like. If you can you describe to me how you like your source to be setup and then I can probably tell you how to build them in that layout.

In the simplest form you can just source whatever workspace you have navigation in, i.e. source /opt/ros/hydro/setup.bash or source /home/me/workspace/navigation/.../setup.bash. And then build fake_localization as if it were a normal CMake project:

source /opt/ros/hydro/setup.bash
cd /path/to/fake_localization_source
mkdir build
cd build
cmake .. -DCMAKE_INSTALL_PREFIX=./install
make
make install
source ./install/setup.bash
rosrun ...

I have found catkin to be quite conventional and that it imposes very few requirements on your workflow, but that's just my opinion. I hope this answer helps you with your problems and allows you to use catkin however you like.