-
Notifications
You must be signed in to change notification settings - Fork 0
/
test_shooter.launch
130 lines (115 loc) · 5.43 KB
/
test_shooter.launch
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
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
<launch>
<arg name="motor0_epos" default="682129003504"/>
<arg name="motor1_epos" default="682129003667"/>
<arg name="motor2_epos" default="682129003289"/>
<arg name="motor3_epos" default="682129003519"/>
<arg name="shooter_epos" default="682129003523"/>
<arg name="motor_mode" default="2"/> <!-- 2 = V Mode -->
<arg name="motor_obtain_data_freq" default="200"/>
<arg name="motor_obtain_p_feedback" default="false"/>
<arg name="motor_obtain_v_feedback" default="true"/>
<arg name="motor_obtain_current_torque" default="false"/>
<arg name="motor_wait_for_serial_number_server" default="true"/>
<arg name="motor_epos4board_serial_number_server_timeout" value="10000"/>
<!-- EPOS4 board via USB -->
<node name="epos4board_serial_number_server"
pkg="epos_board"
type="epos4board_serial_number_server"
output="screen">
</node>
<!-- Motor Front Right -->
<node name="motor_base_0"
pkg="epos_board"
type="epos4board_node"
output="screen">
<param name="board_id" type="str" value="base_0"/>
<param name="mode" value="$(arg motor_mode)"/>
<param name="serial_number" type="str" value="$(arg motor0_epos)"/>
<param name="obtain_data_freq" value="$(arg motor_obtain_data_freq)"/>
<param name="obtain_p_feedback" value="$(arg motor_obtain_p_feedback)"/>
<param name="obtain_v_feedback" value="$(arg motor_obtain_v_feedback)" />
<param name="obtain_current_torque" value="$(arg motor_obtain_current_torque)" />
<param name="wait_for_serial_number_server" value="$(arg motor_wait_for_serial_number_server)" />
<param name="epos4board_serial_number_server_timeout" value="$(arg motor_epos4board_serial_number_server_timeout)" />
</node>
<!-- Motor Front Left -->
<node name="motor_base_1"
pkg="epos_board"
type="epos4board_node"
output="screen">
<param name="board_id" type="str" value="base_1"/>
<param name="mode" value="$(arg motor_mode)"/>
<param name="serial_number" type="str" value="$(arg motor1_epos)"/>
<param name="obtain_data_freq" value="$(arg motor_obtain_data_freq)"/>
<param name="obtain_p_feedback" value="$(arg motor_obtain_p_feedback)"/>
<param name="obtain_v_feedback" value="$(arg motor_obtain_v_feedback)" />
<param name="obtain_current_torque" value="$(arg motor_obtain_current_torque)" />
<param name="wait_for_serial_number_server" value="$(arg motor_wait_for_serial_number_server)" />
<param name="epos4board_serial_number_server_timeout" value="$(arg motor_epos4board_serial_number_server_timeout)" />
</node>
<!-- Motor Back Left -->
<node name="motor_base_2"
pkg="epos_board"
type="epos4board_node"
output="screen">
<param name="board_id" type="str" value="base_2"/>
<param name="mode" value="$(arg motor_mode)"/>
<param name="serial_number" type="str" value="$(arg motor2_epos)"/>
<param name="obtain_data_freq" value="$(arg motor_obtain_data_freq)"/>
<param name="obtain_p_feedback" value="$(arg motor_obtain_p_feedback)"/>
<param name="obtain_v_feedback" value="$(arg motor_obtain_v_feedback)" />
<param name="obtain_current_torque" value="$(arg motor_obtain_current_torque)" />
<param name="wait_for_serial_number_server" value="$(arg motor_wait_for_serial_number_server)" />
<param name="epos4board_serial_number_server_timeout" value="$(arg motor_epos4board_serial_number_server_timeout)" />
</node>
<!-- Motor Back Right -->
<node name="motor_base_3"
pkg="epos_board"
type="epos4board_node"
output="screen">
<param name="board_id" type="str" value="base_3"/>
<param name="mode" value="$(arg motor_mode)"/>
<param name="serial_number" type="str" value="$(arg motor3_epos)"/>
<param name="obtain_data_freq" value="$(arg motor_obtain_data_freq)"/>
<param name="obtain_p_feedback" value="$(arg motor_obtain_p_feedback)"/>
<param name="obtain_v_feedback" value="$(arg motor_obtain_v_feedback)" />
<param name="obtain_current_torque" value="$(arg motor_obtain_current_torque)" />
<param name="wait_for_serial_number_server" value="$(arg motor_wait_for_serial_number_server)" />
<param name="epos4board_serial_number_server_timeout" value="$(arg motor_epos4board_serial_number_server_timeout)" />
</node>
<!-- Motor Shooter -->
<node name="epos4board_node1"
pkg="epos_board"
type="epos4board_node"
output="screen">
<param name="board_id" type="str" value="shooter" />
<param name="mode" value="3" />
<param name="serial_number" type="str" value="$(arg shooter_epos)" />
<param name="obtain_data_freq" value="100" />
<param name="obtain_p_feedback" value="true"/>
<param name="obtain_v_feedback" value="false" />
<param name="obtain_current_torque" value="$(arg motor_obtain_current_torque)" />
<param name="epos4board_serial_number_server_timeout" value="$(arg motor_epos4board_serial_number_server_timeout)" />
</node>
<!-- io board, remember to install python3 -->
<node name="servo_io_board_0001"
pkg="m2_servo_io_board"
type="servo_io_board.py"
respawn="true"
output="screen">
<param name="serial_port" type="str" value="/dev/tinyboard-ServoIOBoard_0001"/>
<param name="board_id" type="int" value="1"/>
</node>
<!-- Convert cmd_vel to motor v_setpoint -->
<include file="$(find m2_chassis_kinematics)/launch/owheel_kinematics.launch">
<arg name="chassis_config" value="$(find m2_pr2020)/launch/owheel_epos4.yaml"/>
<arg name="max_angular_velocity" value="55" />
</include>
<!-- cmd_vel mux, with priorities -->
<node name="cmd_vel_mux"
pkg="m2_chassis_utils"
type="negotiate_cmd_vel.py"
respawn="true"
output="screen">
</node>
</launch>