-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy path.rosrc
73 lines (60 loc) · 1.54 KB
/
.rosrc
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
#!/bin/bash
rosdistro="kinetic"
if test -e /opt/ros/$rosdistro/setup.bash
then
source /opt/ros/$rosdistro/setup.bash
fi
if test -e $marked/catkin
then
source $(cat $marked/catkin)/devel/setup.bash
fi
alias cdc='cd $(cat $marked/catkin)'
alias cds='cd $(cat $marked/catkin)/src'
function make()
{
if test -e $(pwd)/Makefile
then
command make $@
else
pushd $(cat $marked/catkin) && command catkin_make $@ && source devel/setup.bash
rospack profile | sed -E "s/(.*)(\s\**\s)(.*)/\3/g" | grep -e "\/.*" | sort
popd
fi
}
function build()
{
pushd $(cat $marked/catkin) && command catkin build $@ && source devel/setup.bash
rospack profile | sed -E "s/(.*)(\s\**\s)(.*)/\3/g" | grep -e "\/.*" | sort
popd
}
function sros()
{
pushd $(cat $marked/catkin) && source devel/setup.bash
rospack profile | sed -E "s/(.*)(\s\**\s)(.*)/\3/g" | grep -e "\/.*" | sort
popd
}
function dros()
{
pushd $(cat $marked/catkin) && rosdep install -iry --from-paths src
popd
}
function tros()
{
pushd $(cat $marked/catkin) > /dev/null
catkin run_tests
catkin_test_results
popd > /dev/null
}
function recursive_wstool_update()
{
pushd $(cat $marked/catkin)
wstool init src
echo "hoge" > /tmp/wstool_outputs
while test "$(cat /tmp/wstool_outputs)" != "Merge caused no change, no new elements found"
do
find -regextype posix-basic -regex "\./src/.*/.*\.rosinstall" | xargs -n1 wstool merge --target-workspace=src | uniq | tee /tmp/wstool_outputs
wstool update --target-workspace=src
done
rm /tmp/wstool_outputs
popd
}