Skip to content

Instantly share code, notes, and snippets.

@fdavidcl
Created February 22, 2016 16:51
Show Gist options
  • Save fdavidcl/7ad3aac6808ec948d013 to your computer and use it in GitHub Desktop.
Save fdavidcl/7ad3aac6808ec948d013 to your computer and use it in GitHub Desktop.
Catkin functions for bash on Arch Linux
# ...
catkin-setup() {
source /opt/ros/jade/setup.bash &> /dev/null
}
catkin-setup
catkin-make() {
catkin_make -DPYTHON_EXECUTABLE=/usr/bin/python2 -DPYTHON_INCLUDE_DIR=/usr/include/python2.7 -DPYTHON_LIBRARY=/usr/lib/libpython2.7.so $*
source devel/setup.bash
}
catkin-init() {
local dir=.
if [[ $# -gt 0 ]]; then
dir=$1
fi
local pre_dir=`pwd`
echo "Creando un nuevo proyecto en el directorio $dir..."
mkdir -p $dir
cd $dir
export PYTHONPATH=/opt/ros/jade/lib/python2.7/site-packages:$PYTHONPATH
export PKG_CONFIG_PATH="/opt/ros/jade/lib/pkgconfig:$PKG_CONFIG_PATH"
mkdir -p src && cd src && catkin_init_workspace &> /dev/null && cd ..
echo "Construyendo el proyecto por primera vez..."
catkin-make
echo "Saliendo..."
cd $pre_dir
}
# ...
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment