Codebase list ros-ros / cad291f
Imported Upstream version 1.12.1 Jochen Sprickerhof 9 years ago
26 changed file(s) with 432 addition(s) and 27 deletion(s). Raw diff Collapse all Expand all
00 ^^^^^^^^^^^^^^^^^^^^^^^^
11 Changelog for package mk
22 ^^^^^^^^^^^^^^^^^^^^^^^^
3
4 1.12.1 (2015-04-16)
5 -------------------
36
47 1.12.0 (2014-12-26)
58 -------------------
00 <package>
11 <name>mk</name>
2 <version>1.12.0</version>
2 <version>1.12.1</version>
33 <description>
44 A collection of .mk include files for building ROS architectural elements.
55 Most package authors should use cmake .mk, which calls CMake for the build of the package.
00 ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
11 Changelog for package rosbuild
22 ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
3
4 1.12.1 (2015-04-16)
5 -------------------
36
47 1.12.0 (2014-12-26)
58 -------------------
00 <package>
11 <name>rosbuild</name>
2 <version>1.12.0</version>
2 <version>1.12.1</version>
33 <description>
44 rosbuild contains scripts for managing the CMake-based build system for ROS.
55 </description>
00 ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
11 Changelog for package roslang
22 ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
3
4 1.12.1 (2015-04-16)
5 -------------------
36
47 1.12.0 (2014-12-26)
58 -------------------
00 <package>
11 <name>roslang</name>
2 <version>1.12.0</version>
2 <version>1.12.1</version>
33 <description>
44 roslang is a common package that all <a href="http://www.ros.org/wiki/Client%20Libraries">ROS client libraries</a> depend on.
55 This is mainly used to find client libraries (via 'rospack depends-on1 roslang').
00 ^^^^^^^^^^^^^^^^^^^^^^^^^^^^
11 Changelog for package roslib
22 ^^^^^^^^^^^^^^^^^^^^^^^^^^^^
3
4 1.12.1 (2015-04-16)
5 -------------------
6 * remove usage of CATKIN_TEST_RESULTS_DIR environment variable (`#80 <https://github.com/ros/ros/pull/80>`_)
37
48 1.12.0 (2014-12-26)
59 -------------------
00 <package>
11 <name>roslib</name>
2 <version>1.12.0</version>
2 <version>1.12.1</version>
33 <description>
44 Base dependencies and support libraries for ROS.
55 roslib contains many of the common data structures and tools that are shared across ROS client library implementations.
5858 ROS_NAMESPACE ="ROS_NAMESPACE"
5959 ## directory in which log files are written
6060 ROS_LOG_DIR ="ROS_LOG_DIR"
61 ## directory in which test result files are written
62 CATKIN_TEST_RESULTS_DIR = "CATKIN_TEST_RESULTS_DIR"
61
6362
6463 class ROSEnvException(Exception):
6564 """Base class of roslib.rosenv errors."""
188187 def get_test_results_dir(env=None):
189188 """
190189 Get directory to use for writing test result files. There are multiple
191 possible locations for this. The CATKIN_TEST_RESULTS_DIR environment variable
192 has priority. If that is set, CATKIN_TEST_RESULTS_DIR is returned.
193 If CATKIN_TEST_RESULTS_DIR is not set, then ROS_HOME/test_results is used. If
194 ROS_HOME is not set, $HOME/.ros/test_results is used.
190 possible locations for this. If ROS_HOME is set ROS_HOME/test_results
191 is used. Otherwise $HOME/.ros/test_results is used.
195192
196193 @param env: environment dictionary (defaults to os.environ)
197194 @type env: dict
198195 @return: path to use use for log file directory
199196 @rtype: str
200197 """
201 if env is None:
202 env = os.environ
203
204 if CATKIN_TEST_RESULTS_DIR in env:
205 return env[CATKIN_TEST_RESULTS_DIR]
206 else:
207 return os.path.join(get_ros_home(env), 'test_results')
198 return os.path.join(get_ros_home(env), 'test_results')
208199
209200 # this is a copy of the roslogging utility. it's been moved here as it is a common
210201 # routine for programs using accessing ROS directories
00 <package>
11 <name>ros</name>
2 <version>1.12.0</version>
2 <version>1.12.1</version>
33 <description>ROS packaging system</description>
44 <maintainer email="dthomas@osrfoundation.org">Dirk Thomas</maintainer>
55 <license>BSD</license>
00 ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
11 Changelog for package rosbash
22 ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
3
4 1.12.1 (2015-04-16)
5 -------------------
6 * add support for fish shell (`#77 <https://github.com/ros/ros/pull/77>`_)
7 * enable roslaunch args completion in rosbash
38
49 1.12.0 (2014-12-26)
510 -------------------
22 find_package(catkin)
33 catkin_package()
44
5 install(FILES rosbash rostcsh roszsh
5 install(FILES rosbash rosfish rostcsh roszsh
66 DESTINATION ${CATKIN_PACKAGE_SHARE_DESTINATION})
77 install(PROGRAMS scripts/rosrun
88 DESTINATION ${CATKIN_GLOBAL_BIN_DESTINATION})
1313 ${CATKIN_DEVEL_PREFIX}/bin/rosrun
1414 @ONLY)
1515
16 catkin_add_env_hooks(15.rosbash SHELLS bash tcsh zsh DIRECTORY ${CMAKE_CURRENT_SOURCE_DIR}/env-hooks)
16 catkin_add_env_hooks(15.rosbash SHELLS bash fish tcsh zsh DIRECTORY ${CMAKE_CURRENT_SOURCE_DIR}/env-hooks)
0 # generated from rosbash/env-hooks/15.rosbash.fish.em
1
2 @[if DEVELSPACE]@
3 . "@(CMAKE_CURRENT_SOURCE_DIR)/rosfish"
4 @[else]@
5 if [ -z "$CATKIN_ENV_HOOK_WORKSPACE" ]; then
6 CATKIN_ENV_HOOK_WORKSPACE="@(CMAKE_INSTALL_PREFIX)"
7 fi
8 . "$CATKIN_ENV_HOOK_WORKSPACE/share/rosbash/rosfish"
9 @[end if]@
00 <package>
11 <name>rosbash</name>
2 <version>1.12.0</version>
2 <version>1.12.1</version>
33 <description>
44 Assorted shell commands for using ros with bash.
55 </description>
556556 arg="${COMP_WORDS[COMP_CWORD]}"
557557 COMPREPLY=()
558558 if [[ ${arg} =~ \-\-.* ]]; then
559 COMPREPLY=(${COMPREPLY[@]} $(compgen -W "--files --args --nodes --find-node --child --local --screen --server_uri --run_id --wait --port --core --pid --dump-params" -- ${arg}))
559 COMPREPLY=(${COMPREPLY[@]} $(compgen -W "--files --args --nodes --find-node --child --local --screen --server_uri --run_id --wait --port --core --pid --dump-params --skip-log-check --ros-args" -- ${arg}))
560560
561561 else
562562 _roscomplete_search_dir "( -type f -regex .*\.launch$ -o -type f -regex .*\.test$ )"
563563 if [[ $COMP_CWORD == 1 ]]; then
564564 COMPREPLY=($(compgen -o plusdirs -f -X "!*.launch" -- ${arg}) ${COMPREPLY[@]} $(compgen -o plusdirs -f -X "!*.test" -- ${arg}) ${COMPREPLY[@]})
565 fi
566 # complete roslaunch arguments for a launch file
567 if [[ ${#COMP_WORDS[@]} -ge 2 ]]; then
568 ROSLAUNCH_COMPLETE=$(which roslaunch-complete)
569 if [[ -x ${ROSLAUNCH_COMPLETE} ]]; then
570 # Call roslaunch-complete instead of roslaunch to get arg completion
571 _roslaunch_args=$(${ROSLAUNCH_COMPLETE} ${COMP_WORDS[@]:1:2} 2> /dev/null)
572 # roslaunch-complete should be very silent about
573 # errors and return 0 if it produced usable completion.
574 if [[ $? == 0 ]]; then
575 COMPREPLY=($(compgen -W "${_roslaunch_args}" -- "${arg}") ${COMPREPLY[@]})
576 # FIXME maybe leave ${COMPREPLY[@]} out if we completed successfully.
577 fi
578 fi
565579 fi
566580 fi
567581 }
0
1 function _rossed
2 if test (uname) = "Darwin" -o (uname) = "FreeBSD"
3 sed -E $argv
4 else
5 sed -r $argv
6 end
7 end
8
9 function _rosfind
10 if test (uname) = "Darwin" -o (uanme) = "FreeBSD"
11 # BSD find needs -E for extended regexp
12 find -E $argv
13 else
14 find $argv
15 end
16 end
17
18 # _ros_location_find
19 # Takes a name of a ros location and returns it's path
20 function _ros_location_find
21 set -l homedir (echo $HOME | sed -e "s/\//\t\//g" -e "s/\t/\\\/g")
22 set -l ROS_LOCATION_KEYS_ARR (echo $ROS_LOCATIONS | _rossed -e 's/([^:=]*)=([^:=]*)(:*[^=])*(:|$)/\1 /g')
23 set -l ROS_LOCATIONS_ARR (echo $ROS_LOCATIONS | _rossed -e 's/([^:=]*)=([^:=]*)(:*[^=])*(:|$)/\2 /g' -e "s/~/{$homedir}/g")
24 for key in $ROS_LOCATION_KEYS_ARR
25 if test $argv[1] = $key
26 echo $key
27 return 0
28 end
29 end
30
31 if test $argv[1] = log
32 echo (roslaunch-logs)
33 return 0
34 else if test $argv[1] = test_results
35 echo (rosrun rosunit test_results_dir.py)
36 return 0
37 end
38
39 set -l loc (set -x ROS_CACHE_TIMEOUT -1.0; rospack find $argv[1] 2> /dev/null)
40 if test $status != 0
41 set loc (set -x ROS_CACHE_TIMEOUT -1.0; rosstack find $argv[1] 2> /dev/null)
42 if test $status != 0
43 return 1
44 end
45 echo $loc
46 return 0
47 end
48 echo $loc
49 return 0
50 end
51
52 function _ros_list_locations
53 set -l ROS_LOCATION_KEYS (echo $ROS_LOCATIONS | _rossed -e 's/([^:=]*)=([^:=]*)(:*[^=])*(:|$)/\1 /g')
54 set -l packages (set -x ROS_CACHE_TIMEOUT -1.0; rospack list-names)
55 set -l stacks (set -x ROS_CACHE_TIMEOUT -1.0; rosstack list-names)
56 echo $packages $stacks log test_results $ROS_LOCATION_KEYS | tr ' ' '\n'
57 return 0
58 end
59
60 function _ros_package_find
61 set -l loc (set -x ROS_CACHE_TIMEOUT -1.0; rospack find $1 2> /dev/null)
62 if test $status != 0
63 return 1
64 end
65 echo $loc
66 return 0
67 end
68
69 function _ros_list_packages
70 set -l packages (set -x ROS_CACHE_TIMEOUT -1.0; rospack list-names)
71 echo $packages | tr ' ' '\n'
72 return 0
73 end
74
75 function _ros_list_stacks
76 set -l stacks (set -x ROS_CACHE_TIMEOUT -1.0; rosstack list-names)
77 echo $stacks | tr ' ' '\n'
78 return 0
79 end
80
81 # takes as argument either just a package-path or just a pkgname
82 # returns 0 for no argument or if package (+ path) exist, 1 else
83 # on success with arguments returns [name, abspath, basepath, remainder]
84 function _ros_decode_path
85 if test -z $argv[1]
86 return 0
87 end
88
89 set -l rosname (echo $argv[1] | sed -n 's/\([^/]\+\).*/\1/p')
90
91 if not test -z $rosname
92 set remainder (echo $argv[1] | sed -n "s/$rosname"'\(.*\)/\1/p')
93 else
94 set rosname $argv[1]
95 if test (count $argv) != "2" -o $argv[2] != "forceeval"
96 echo $rosname
97 return 1
98 end
99 end
100
101 set -l rosdir (_ros_location_find $rosname)
102 if test $status != "0"
103 echo $rosname
104 return 1
105 end
106 set -l reldir (echo $remainder | sed -n 's/\(.*\/\)[^/]*/\1/p')
107 set -l last (echo $remainder | sed -n 's/.*\/\([^/]*\)/\1/p')
108
109 if test -z $reldir
110 set reldir /
111 end
112
113 set rosvals {$rosname} {$rosdir} {$reldir} {$last}
114 echo {$rosdir}{$remainder}
115 return 0
116 end
117
118 function rospython
119 if test -z $argv
120 python -i -c "import roslib; roslib.load_manifest('$1')"
121 return 0
122 end
123 if test (count $argv) = 1
124 if test $argv[1] = "--help"
125 echo -e "usage: rospython [package] \n\nRun python loading package manifest first."
126 return 0
127 end
128 end
129 if test -f ./manifest.xml
130 set pkgname (basename (pwd))
131 python -i -c "import roslib; roslib.load_manifest($pkgname)"
132 else
133 python
134 end
135 end
136
137 function roscd
138 if test -z $argv[1]
139 if test -n $ROS_WORKSPACE
140 cd $ROS_WORKSPACE
141 return 0
142 end
143 if test -n $CMAKE_PREFIX_PATH[1]
144 for ws in $CMAKE_PREFIX_PATH
145 ls $ws/.catkin
146 if test -f $ws/.catkin
147 cd $ws
148 return 0
149 end
150 end
151 end
152 echo -e "Neither ROS_WORKSPACE is set nor a catkin workspace is listed in CMAKE_PREFIX_PATH. Please set ROS_WORKSPACE or source a catkin workspace to use roscd with no arguments."
153 return 1
154 end
155
156 if test $argv[1] = "--help"
157 echo -e "usage: roscd package\n\nJump to target package."
158 return 0
159 end
160
161 set -l rospath (_ros_decode_path $argv[1] forceeval)
162 if test -z $rospath
163 if test -z $ROS_WORKSPACE
164 echo -e "No ROS_WORKSPACE set. Please set ROS_WORKSPACE to use roscd with no arguments."
165 return 1
166 end
167 cd $ROS_WORKSPACE
168 return 0
169 else
170 cd $rospath
171 return 0
172 end
173 end
174
175 function _is_integer
176 not test -z (expr $argv[1] - $argv[1] 2>/dev/null)
177 return $status
178 end
179
180 function rosd
181 if test (count $argv) != 0
182 if test $argv[1] = "--help"
183 echo -e "usage: rosd\n\nDisplays the list of currently remembered directories with indexes."
184 return 0
185 end
186 end
187 set count 0
188 for items in (dirs | sed -e 's/ /\n/g')
189 echo $count $items;
190 set count (expr $count + 1)
191 end
192 end
193
194 function rospd
195 if test (count $argv) != 0
196 if test $argv[1] = "--help"
197 echo -e "usage: rospd\n\nLike pushd, also accepts indexes from rosd."
198 return 0
199 end
200 else
201 echo -e "usage: rospd\n\nLike pushd, also accepts indexes from rosd."
202 return 0
203 end
204 set -l rospath (_ros_decode_path $argv[1] forceeval)
205 pushd $rospath > /dev/null
206 rosd
207 end
208
209 function rosls
210 if test (count $argv) != 0
211 if test $argv[1] = "--help"
212 echo -e "usage: rosls [package]\n\nLists contents of a package directory."
213 return 0
214 end
215 else
216 echo -e "usage: rosls [package]\n\nLists contents of a package directory."
217 return 0
218 end
219 set -l rospath (_ros_decode_path $argv[1] forceeval)
220 ls $rospath
221 end
222
223 # sets arg as return value
224 function _roscmd
225 set -l opt
226 if test -n $CMAKE_PREFIX_PATH
227 set -l catkin_package_libexec_dir (catkin_find --without-underlays --libexec $argv[1] 2> /dev/null)
228 end
229 set -l pkgdir (_ros_package_find $argv[1])
230 if test -z $catkin_package_libexec_dir -a -z $pkgdir
231 echo "Couldn't find package $argv[1]"
232 return 1
233 end
234 set -l exepath (find -L $catkin_package_libexec_dir $pkgdir -name $2 -type f ! -regex .*/[.].* ! -regex .*$pkgdir\/build\/.* | uniq)
235 if test (count $execpath) = "0"
236 echo "That file does not exist in that package."
237 return 1
238 else if test (expr (count $exepath) '>' 1) = "1"
239 echo "You have chosen a non-unique filename, please pick one of the following:"
240 for i in (seq (count $execpath))
241 echo $i") " $execpath[i]
242 end
243 read choice
244 set -l opt $execpath[$choice]
245 else
246 set -l opt $exepath[1]
247 end
248 arg=$opt
249 end
250
251 function rosed
252 set -l arg
253 if test (count $argv) = 0
254 echo -e "usage: rossed [package] [file]\n\nEdit a file within a package."
255 return 0
256 end
257 if test $argv[1] = "--help"
258 echo -e "usage: rossed [package] [file]\n\nEdit a file within a package."
259 return 0
260 end
261 _roscmd $argv[1]
262 if test -n $arg
263 if test -z $EDITOR
264 vi $arg
265 else
266 $EDITOR $arg
267 end
268 end
269 end
270
271 function roscp
272 set -l arg
273 if test (count $argv) != "3"
274 echo -e "usage: roscp package filename target\n\nCopy a file from a package to target location."
275 return 0
276 end
277 _roscmd $argv[1] $argv[2]
278 cp $arg $argv[3]
279 end
280
281 function _roscomplete
282 _ros_list_locations
283 _ros_list_stacks
284 end
285
286 function _roscomplete_sub_dir
287 set -l wd $PWD
288 set -l roslocs (_ros_list_locations)
289 set -l arg (commandline -ct)
290 set -g rosvals
291 set -l path (_ros_decode_path $arg)
292 if test -z $rosvals[1]
293 # Not a full ROS location
294 _ros_list_locations
295 else
296 # The first section is a full ROS location, so we complete from it's subdirs
297 find -L $rosvals[2]$rosvals[3] -maxdepth 1 -mindepth 1 -type d ! -regex ".*/[.].*" -print0 | tr '\000' '\n' | sed -e "s/.*\/\(.*\)/$rosvals[1]\/\1/g"
298 end
299 end
300
301 function _roscomplete_rosmake
302 _roscomplete
303 set options --test-only --all --mark-installed --unmark-installed --robust --build-everything --specified-only --buildtest --buildtest1 --output --pre-clean --bootstrap --disable-logging --target --pjobs= --threads --profile --skip-blacklist --status-rate
304 for i in $options
305 echo $i
306 end
307 end
308
309 function _roscomplete_search_dir
310 set -l command (commandline -o)
311 if test (count $command) = 1
312 echo "1" >> ~/output.txt
313 _ros_list_packages
314 end
315 if test (count $command) = 2
316 echo "2" >> ~/output.txt
317 _ros_list_packages
318 end
319 if test (count $command) = 3
320 echo "3" >> ~/output.txt
321 find (_ros_location_find $command[1]) $arg -printf "%f\n"
322 end
323 end
324
325 function _roscomplete_rosrun
326 _roscomplete_search_dir '-type f -perm +111'
327 end
328
329 function _roscomplete_file
330 _roscomplete_search_dir '-type f ! -regex .*[.][oa]$'
331 end
332
333 function _roscomplete_launch
334 if test -z (commandline -ct | grep i-)
335 set options --files --args --nodes --find-node --child --local --screen --server_uri --run_id --wait --port --core --pid --dump-params
336 for i in $options
337 echo $i
338 end
339 else
340 _roscomplete_search_dir '-type f -regex \'.*\.launch$\' -o -type f -regex \'.*\.test$\''
341 end
342 end
343
344 complete -x -c roscd -a '(_roscomplete_sub_dir)'
345 complete -c roscd -l help --description "prints command info"
346 complete -c rospd -a '(_roscomplete_sub_dir)'
347 complete -c rosls -a '(_roscomplete_sub_dir)'
348 complete -c rosls -l help --description "prints command info"
349 complete -x -c rosmake -a '(_roscomplete_rosmake)'
350 complete -x -c rosclean -a 'check purge'
351 complete -x -c rosrun -a '(_roscomplete_rosrun)'
352 complete -x -c roslaunch -a '(_roscomplete_launch)'
353 complete -x -c rosed -a '(_roscomplete_file)'
354 complete -c rosed -l help --description "prints command info"
355 complete -x -c roscp -a '(_roscomplete_file)'et -x TEST works
356 complete -c roscp -l help --description "prints command info"
00 ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
11 Changelog for package rosboost_cfg
22 ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
3
4 1.12.1 (2015-04-16)
5 -------------------
36
47 1.12.0 (2014-12-26)
58 -------------------
00 <package>
11 <name>rosboost_cfg</name>
2 <version>1.12.0</version>
2 <version>1.12.1</version>
33 <description>
44 Contains scripts used by the rosboost-cfg tool for determining cflags/lflags/etc. of boost on your system
55 </description>
00 ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
11 Changelog for package rosclean
22 ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
3
4 1.12.1 (2015-04-16)
5 -------------------
36
47 1.12.0 (2014-12-26)
58 -------------------
00 <package>
11 <name>rosclean</name>
2 <version>1.12.0</version>
2 <version>1.12.1</version>
33 <description>
44 rosclean: cleanup filesystem resources (e.g. log files).
55 </description>
00 ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
11 Changelog for package roscreate
22 ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
3
4 1.12.1 (2015-04-16)
5 -------------------
36
47 1.12.0 (2014-12-26)
58 -------------------
00 <package>
11 <name>roscreate</name>
2 <version>1.12.0</version>
2 <version>1.12.1</version>
33 <description>
44 roscreate contains a tool that assists in the creation of ROS filesystem resources.
55 It provides: <tt>roscreate-pkg</tt>, which creates a new package directory,
00 ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
11 Changelog for package rosmake
22 ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
3
4 1.12.1 (2015-04-16)
5 -------------------
36
47 1.12.0 (2014-12-26)
58 -------------------
00 <package>
11 <name>rosmake</name>
2 <version>1.12.0</version>
2 <version>1.12.1</version>
33 <description>
44 rosmake is a ros dependency aware build tool which can be used to
55 build all dependencies in the correct order.
00 ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
11 Changelog for package rosunit
22 ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
3
4 1.12.1 (2015-04-16)
5 -------------------
36
47 1.12.0 (2014-12-26)
58 -------------------
00 <package>
11 <name>rosunit</name>
2 <version>1.12.0</version>
2 <version>1.12.1</version>
33 <description>
44 Unit-testing package for ROS. This is a lower-level library for rostest and handles unit tests, whereas rostest handles integration tests.
55 </description>