To compile only one ROS package in a catkin workspace use
catkin_make --pkg MY_PACKAGE_NAME
Please note, that this will still call CMake (and use CMakeLists.txt) to generate Makefile's for ALL the packages of your workspace, but compiling, i.e. calling the GNU compiler with Makefile's will be only performed on MY_PACKAGE_NAME
The equivalent of calling catkin_make
in the workspace root directory is
cd ~/workspace/catkin/build cmake ../src (which is similar to ./configure i guess) make MY_PACKAGE_NAME
The equivalent of $ROS_PACKAGE_PATH for catkin is the CMake environment variable $CMAKE_PREFIX_PATH, which will usually point to your ros distro (i.e. /opt/ros/super-turtle-distro-name) and the devel
directory of your catkin workspace (workspaces). So it seems that CMake doesn't need to know where your source files are, but it needs to know where the makefiles of your packages are and other similar stuff, and they are in the build directory, and the environment setup script in devel
tells cmake where your build directory is. And then the makefiles in their turn point to your packages in the source directory (and CMakeCache.txt is the important file here). So that's why I guess if you delete your devel directory and source ~/.bashrc, ros will not be able to find any catkin packages anymore. So, to summarize, catkin (and ros in general) doesn't care about where your package sources are stored, what is crucial are the corresponding files from devel
generated for each of your catkin packages, and the generated files from build
to which devel points to i guess.
Testing <test_depend> are dependencies that are required for running tests. Catkin packages use macros that define make targets prefixed with run-tests. They can be run by invoking catkin_make run_tests[_…] or just using make run_tests[_…]. <test_depend> should declare dependencies that are only used during this testing process.
Variables that can be used in CMakeLists.txt:
${PROJECT_NAME} ${<PACKAGE_NAME>_FOUND} <PACKAGE_NAME>_INCLUDES <PACKAGE_NAME>_LIBS catkin_INCLUDE_DIRS catkin_LIBRARIES
Hotkeys :
C-c C-d d describe
C-h b list all bindings. Then C-s slime.
Git stuff
cherry-pick remote branch commits:
git fetch my-remote-branch-name (e.g. upstream) git cherry-pick sha-of-commit
–
As upstream for your repo set your fork on GitHub and use git@github.com:yourusername/forkedrepo.git
instead of https://github.com/yourusername/forkedrepo.git
so that it uses your RSA keypairs for authentication instead of asking password each time you push.R: /home/gkazhoya/workspace/rosbuild/mongo_prolog/prolog/init.pl:23:
source_sink `library(xpce_ex)' does not exist
Warning: /home/gkazhoya/workspace/rosbuild/mongo_prolog/prolog/init.pl:23:
Goal (directive) failed: user:use_module(library(xpce_ex))
% /home/gkazhoya/workspace/rosbuild/mongo_prolog/prolog/init.pl compiled 0.01 sec, 313,224 bytes ERROR: /home/gkazhoya/workspace/rosbuild/mongo_prolog/prolog/init.pl:23:
source_sink `library(xpce_ex)' does not exist
–
Moving dir to another repo with history
cd /tmp git clone https://github.com/cram-code/REPO.git cd REPO git filter-branch --prune-empty --subdirectory-filter MY_DIR -- --all git filter-branch --force --index-filter 'git ls-files -s | sed "s-\t\"*-&newsubdir/-" | GIT_INDEX_FILE=$GIT_INDEX_FILE.new git update-index --index-info && mv "$GIT_INDEX_FILE.new" "$GIT_INDEX_FILE"' HEAD roscd REPO2 git remote add tmp /tmp/REPO git pull tmp git commit --amend --vm "Moved MY_DIR here from REPO" git remote rm tmp
—
When installing both moveit full (including mongo-db deps) and mongodb-10gen, both try to write to the same file. So, force the overwrite when installing the second of the mongodb packages: http://www.webupd8.org/2011/02/fix-dpkg-error-trying-to-overwrite-x.html
—
Installing Andrei's system:
- make sure full knowrob installation is provided
- install mongodb-10gen (just google for “install mongodb” for ubuntu)
- import a database into your mongodb: mongoimport –db sim_db –collection collection_X THE-FILE-ANDREI-CREATED-FOR-YOU-BY-EXPORTING
- get Andrei's code from bitbucket: git clone https://bitbucket.org/ahaidu/mongo_prolog.git (or wstool whatever, it's rosmake atm)
(it's a private repo, you'll need to ask andrei for access)
- rosrun rosprolog rosprolog mongo_prolog
- make.
- add_world_clauses.
- in another terminal: roslaunch mongo_prolog mTAB
— Running Daniel's stuff source env.sh from the root pracmln from the correct examples directory