-
Notifications
You must be signed in to change notification settings - Fork 12
/
.env.template
106 lines (96 loc) · 4 KB
/
.env.template
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
#!/bin/bash
function _complete_hubo_limit_update {
local resource_types="table|home|log|txt"
# not processing a current option, so offer all the options again
local opts="--logfile --joint-table --limit-table ---help"
#Try to offer command line options for openhubo.py
cur="${COMP_WORDS[COMP_CWORD]}"
prev="${COMP_WORDS[COMP_CWORD-1]}"
case "${prev}" in
--joint-table)
opts=`ls /etc/hubo-ach | grep 'table$'`
COMPREPLY=($(compgen -W "$opts" -- ${cur};compgen -f -X "!*.+table" -- ${cur};compgen -d -- ${cur}));compopt -o filenames
return 0
;;
--limit-table)
COMPREPLY=($(compgen -f -X '!*.+home|txt$' -- ${cur};compgen -d -- ${cur}));compopt -o filenames
return 0
;;
*)
;;
esac
COMPREPLY=($(compgen -W "$opts" -- ${cur}))
if [[ ${cur} != -* ]] ; then
# add in xml and dae and zae files
COMPREPLY=($(compgen -f -X "!*.+(${resource_types})" -- ${cur}) ${COMPREPLY[@]})
fi
}
function _complete_openhubo {
local resource_types="py"
local robot_exts="dae|zae|xml"
# not processing a current option, so offer all the options again
local opts="--robot --no-robot --scene --no-scene --physicsfile --no-physics --ghost --atheight --interpreter --no-interact --no-interactive-imports --profile --testsuite --example --record --no-stop-simulation --video-capture-file --viewer --level --physics ---help"
#Try to offer command line options for openhubo.py
cur="${COMP_WORDS[COMP_CWORD]}"
prev="${COMP_WORDS[COMP_CWORD-1]}"
case "${prev}" in
--example)
opts=`ls $OPENHUBO_DIR/examples | grep '.py$'`
COMPREPLY=($(compgen -W "$opts" -- ${cur}))
return 0
;;
--robot)
opts=`ls $OPENHUBO_DIR/robots | grep '.robot.xml$'`
COMPREPLY=($(compgen -W "$opts" -- ${cur};compgen -f -X "!*.+(${robot_exts})" -- ${cur};compgen -d -- ${cur}));compopt -o filenames
return 0
;;
--scene)
opts=`ls $OPENHUBO_DIR/scenes | grep ".env.xml"`
COMPREPLY=($(compgen -W "$opts" -- ${cur};compgen -f -X "!*.+(${robot_exts})" -- ${cur};compgen -d -- ${cur}));compopt -o filenames
return 0
;;
--physicsfile)
opts=`ls $OPENHUBO_DIR/scenes | grep '.xml$'`
COMPREPLY=($(compgen -W "$opts" -- ${cur};compgen -f -X '!*.+xml$' -- ${cur};compgen -d -- ${cur}));compopt -o filenames
return 0
;;
--physics)
opts="ode"
COMPREPLY=($(compgen -W "$opts" -- ${cur}))
return 0
;;
--level|-l)
opts="fatal error warn info debug verbose"
COMPREPLY=($(compgen -W "$opts" -- ${cur}))
return 0
;;
--viewer)
opts=`openrave0.9.py --listinterfaces viewer`
COMPREPLY=($(compgen -W "$opts" -- ${cur}))
return 0
;;
*)
;;
esac
COMPREPLY=($(compgen -W "$opts" -- ${cur}))
if [[ ${cur} != -* ]] ; then
# add in xml and dae and zae files
COMPREPLY=($(compgen -f -X "!*.+(${resource_types})" -- ${cur}) ${COMPREPLY[@]})
fi
}
export OPENHUBO_DIR=
if [[ ${#OPENRAVE_PLUGINS} == 0 ]]
then
export OPENRAVE_PLUGINS=$OPENHUBO_DIR/plugins
else
export OPENRAVE_PLUGINS=$OPENRAVE_PLUGINS:$OPENHUBO_DIR/plugins
fi
source `openrave-config --share-dir`/openrave_completion.bash
complete -F "_complete_openravepy" -o filenames -o plusdirs "openrave"
complete -F "_complete_openhubo" "openhubo"
complete -F "_complete_hubo_limit_update" "hubo-limit-update"
export PYTHONPATH=$PYTHONPATH:$OPENHUBO_DIR/
export MATLABPATH=$MATLABPATH:$OPENHUBO_DIR/comps-code/matlab:$OPENHUBO_DIR/matlab
export OPENRAVE_DATA=$OPENRAVE_DATA:$OPENHUBO_DIR/robots:$OPENHUBO_DIR/scenes:$OPENHUBO_DIR/kinbody
#This option forces rendering when running on a VM. If you experience video issues / crashes, try disabling this flag
export COIN_FULL_INDIRECT_RENDERING=1