Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- # ===== aliases and functions for aml_library using docker (ubuntu 16.04 and ros kinetic) ====================
- # ----- alias to lauch aml docker
- function amldocker () { $HOME/Projects/aml_ws/src/aml/aml_docker/bash.sh dev:kinetic-cuda; cd $HOME/Projects/aml_ws/; }
- function newdockterm (){ $HOME/Projects/aml_ws/src/aml/aml_docker/exec_container.sh $($HOME/Projects/aml_ws/src/aml/aml_docker/get_containerId.sh) || ( if [[ $InDocker == true ]]; then echo -e "\nAlready in docker!\n"; else echo -e "\nNo active amldocker container found!\n"; fi; ) && return 0 ; cd $HOME/Projects/aml_ws/; }
- # ----- checks if a command exists
- function command_exists {
- type "$1" &> /dev/null
- }
- # ----- checking if in docker
- if ! command_exists docker; then
- InDocker=true;
- fi
- # ----- function to set docker environment for aml
- if [[ $InDocker == true ]]; then
- function dockerenv () {
- cd $HOME/Projects/aml_ws/
- if [ $# == 0 ] || [ "$1" == "interasim" ]; then $HOME/Projects/aml_ws/intera.sh sim;
- elif [ "$1" == "intera" ]; then $HOME/Projects/aml_ws/intera.sh;
- elif [ "$1" == "baxtersim" ]; then $HOME/Projects/aml_ws/baxter.sh sim;
- elif [ "$1" == "baxter" ]; then $HOME/Projects/aml_ws/baxter.sh;
- else printf "\nInvalid environment argument! Available Arguments: \n\tintera, interasim, baxter, baxtersim\n\n";
- fi;
- }
- alias intera="dockerenv intera"
- alias interasim="dockerenv interasim"
- alias start_avahi="sudo service avahi-daemon start"
- alias sawyer_tuck="rosrun aml_robot sawyer_robot.py -u"
- alias sawyer_enable="rosrun intera_interface enable_robot.py -e"
- alias baxter_tuck="rosrun baxter_tools tuck_arms.py"
- alias baxter_enable="rosrun baxter_tools enable_robot.py -e"
- source $HOME/Projects/aml_ws/src/aml/aml_data/extra/bash_completion # ----- use only if JustaBash is installed
- source $HOME/Projects/aml_ws/src/aml/set_env.sh
- else
- source "/usr/local/bin/virtualenvwrapper.sh"
- export WORKON_HOME="/home/saif/.virtual_envs/"
- fi
- # ----- to check if in docker or not
- function indocker () { if [[ $InDocker == true ]]; then echo "Yes"; else echo "No"; fi; }
- # =============================================================================
- # ----- check kernel version
- alias kernelversion="uname -r"
- alias find_all_files_in_subdir="find . -path ./.git -prune -o -name '*' -print"
- alias justopen="mimeopen"
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement