forked from yoshito-n-students/layered_hardware_dynamixel
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathsingle_dynamixel_example.launch
94 lines (88 loc) · 3.64 KB
/
single_dynamixel_example.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
<launch>
<!-- The robot description -->
<param name="robot_description" textfile="$(find layered_hardware_dynamixel)/urdf/single_dynamixel_example.urdf" />
<!-- Hardware driver -->
<node name="example_layered_hardware_node" pkg="layered_hardware" type="layered_hardware_node" output="screen">
<rosparam>
control_frequency: 20
use_expected_period: true
# upper (controller-side) to bottom (actuator-side)
layers: [ joint_limits_layer, transmission_layer, dynamixel_actuator_layer ]
joint_limits_layer:
type: layered_hardware_extensions/ExtendedJointLimitsLayer
transmission_layer:
type: layered_hardware/TransmissionLayer
dynamixel_actuator_layer:
type: layered_hardware_dynamixel/DynamixelActuatorLayer
serial_interface: /dev/ttyUSB0
baudrate: 1000000
actuators:
dynamixel_actuator:
id: 1
torque_constant: 2.41
operating_mode_map:
posvel: extended_position
posveleff: current_based_position
velocity: velocity
effort: current
reboot_controller: reboot
additional_states:
- Present_Input_Voltage
- Present_Temperature
additional_commands:
- LED
</rosparam>
</node>
<!-- Controller parameters -->
<rosparam>
joint_state_controller:
type: joint_state_controller/JointStateController
publish_rate: 20
additional_state_controller:
type: integer_controllers/Int32StateController
interval: 1.0
led_controller:
type: integer_controllers/Int32Controller
handle: dynamixel_actuator/LED
posvel_controller:
type: posvel_controllers/JointPosVelController
joint: dynamixel_joint
posveleff_controller:
type: posveleff_controllers/JointPosVelEffController
joint: dynamixel_joint
velocity_controller:
type: velocity_controllers/JointVelocityController
joint: dynamixel_joint
effort_controller:
type: effort_controllers/JointEffortController
joint: dynamixel_joint
reboot_controller:
type: empty_controller/EmptyController
controller_groups:
posvel:
- joint_state_controller
- additional_state_controller
- posvel_controller
- led_controller
posveleff:
- joint_state_controller
- additional_state_controller
- posveleff_controller
- led_controller
velocity:
- joint_state_controller
- additional_state_controller
- velocity_controller
- led_controller
effort:
- joint_state_controller
- additional_state_controller
- effort_controller
- led_controller
</rosparam>
<!-- Controller starter -->
<node name="controller_starter" pkg="controller_manager" type="controller_group" output="screen"
args="switch posvel" />
<!-- joint state msg to tf -->
<node name="robot_state_publisher" pkg="robot_state_publisher" type="robot_state_publisher" output="screen" />
</launch>