X-Git-Url: https://git.rmz.io/dotfiles.git/blobdiff_plain/02b0a666f335a1683808196b777d2a315d154514..6edb558f9c43fa934e4e418294bc652f5a34cf28:/zsh/functions/rosinit?ds=sidebyside diff --git a/zsh/functions/rosinit b/zsh/functions/rosinit new file mode 100644 index 0000000..245cd3f --- /dev/null +++ b/zsh/functions/rosinit @@ -0,0 +1,15 @@ +#!/bin/zsh + +function rosinit() { + local ROS_DISTRO=hydro + local WORKSPACE=~/src/ros + if [[ -f "/opt/ros/$ROS_DISTRO/setup.zsh" ]]; then + export ROS_OS_OVERRIDE=arch + source /opt/ros/$ROS_DISTRO/setup.zsh + source $WORKSPACE/devel/setup.zsh + export ROS_WORKSPACE=$WORKSPACE + roscd + else + echo "ROS $ROS_DISTRO doesn't seem to be installed." >&2 + fi +}