-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathrun
executable file
·61 lines (49 loc) · 1.19 KB
/
run
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
#!/bin/bash
run(){
roslaunch starter starter.launch
}
boot_run(){
source /opt/ros/melodic/setup.bash
source /home/swucar/swucar/devel/setup.bash
run
}
build(){
rm -rf devel/ build/
# 解决roscpp程序对于其它包common,引用导致的依赖问题
# 分2次编译
catkin_make -DPYTHON_EXECUTABLE=/usr/bin/python3 -DCATKIN_WHITELIST_PACKAGES='common'
catkin_make -DPYTHON_EXECUTABLE=/usr/bin/python3 -DCATKIN_WHITELIST_PACKAGES=''
# 单核编译
# catkin_make -DPYTHON_EXECUTABLE=/usr/bin/python3 -j1
}
driver(){
enable_can
}
enable_can(){
busybox devmem 0x0c303000 32 0x0000C400
busybox devmem 0x0c303008 32 0x0000C458
busybox devmem 0x0c303010 32 0x0000C400
busybox devmem 0x0c303018 32 0x0000C458
modprobe can
modprobe can_raw
modprobe mttcan
ip link set can0 type can bitrate 500000 dbitrate 2000000 berr-reporting on fd on
#ip link set can1 type can bitrate 500000 dbitrate 2000000 berr-reporting on fd on
ip link set up can0
#ip link set up can1
}
case $1 in
"build")
build
;;
"driver")
driver
;;
"boot_run")
boot_run
;;
*)
run
;;
esac
exit 0