-
Notifications
You must be signed in to change notification settings - Fork 5
/
Copy pathros.txt
68 lines (44 loc) · 1.11 KB
/
ros.txt
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
0. install OS
Ubuntu 12.04 LTS
user: user
pswd: 1
1. install
make cmake g++ mc openssh-server
2. network
static IP: 192.168.0.4
3.
# add user to group dialout (to work with /dev/ttyUSB0 (Arduino))
sudo usermod -a -G dialout user
4. Arduino naming:
http://robocraft.ru/blog/arduino/2985.html
for example:
drive controller - ttyUSB0
sensor controller - ttyUSB1
edit configuration file:
ros_4wd_driver\config\4wd_params.yaml
set names:
drive_port: /dev/ttyUSB0
sensor_port: /dev/ttyUSB1
5. Execution
in different terminals
5.1
roscore
5.2
cd catkin_ws
source devel/setup.bash
roslaunch ros_4wd_driver 4wd.launch
5.3
cd catkin_ws
source devel/setup.bash
rosrun ros_4wd_driver robot_4wd_key
5.3.1
before run robot_4wd_key you may change velocity scale:
rosparam set /robot_4wd_teleop/scale_angular 2.0
rosparam set /robot_4wd_teleop/scale_linear 2.0
or when starting node:
rosrun ros_4wd_driver robot_4wd_key _scale_angular:=2.0 _scale_linear:=2.0
5.4 drive separate motor
rosservice call /motor_write 0 100
rosservice call /motor_write 1 -- -100
rosservice call /motor_write 2 100
rosservice call /motor_write 3 -- -100