-
Notifications
You must be signed in to change notification settings - Fork 49
/
Copy pathallegro_hand_noRviz.launch
executable file
·71 lines (58 loc) · 3.95 KB
/
allegro_hand_noRviz.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
<launch>
<arg name="CONTROLLER" default="grasp"/> <!-- grasp, pd, velSat -->
<!-- Controllers include:
-grasp *
-pd
-velSat
*The default controller is 'grasp' which employs the included grasping library (libBHand). -->
<arg name="polling" default="true"/> <!-- true, false for polling the CAN communication -->
<!-- The inclusion of which_hand in the zero.yaml file has been deprecated.
Which hand (left/right) must now be specified as an argument when launching the Allegro Hand
as an input for both the robot_description and for the grasping library controllers. -->
<arg name="HAND"/> <!-- left, right -->
<arg name="NUM" default='0'/> <!-- 0, 1, 2, ... -->
<arg name="CAN_CH" default="/dev/pcanusb0"/> <!-- ls -l /dev/pcan* to see your open CAN ports -->
<arg name="ZEROS" default="parameters/zero.yaml"/> <!-- yaml param files for your hand can be found in parameters/zero_files/ -->
<param name="/robot_description" textfile="$(find allegro_hand_description)/allegro_hand_description_$(arg HAND).urdf"/>
<param name="/allegroHand_$(arg NUM)/robot_description" textfile="$(find allegro_hand_description)/allegro_hand_description_$(arg HAND).urdf"/>
<!-- This launch file is set up for ROS FUERTE by default. If you are using GROOVY, please change the param "GROOVY" below to 'true'
or use the arg GROOVY:=true argument when launching. -->
<arg name="GROOVY" default="false"/>
<!-- Allegro Hand controller and communication node -->
<node name="allegroHand_$(arg HAND)_$(arg NUM)" pkg="allegro_hand_core_$(arg CONTROLLER)" type="allegro_hand_core_$(arg CONTROLLER)" output="screen" clear_params="true" args="$(arg polling)">
<!-- Remapping of topics into enumerated allegroHand_# namespace -->
<remap from="/allegroHand/joint_states" to="/allegroHand_$(arg NUM)/joint_states"/>
<remap from="/allegroHand/joint_cmd" to="/allegroHand_$(arg NUM)/joint_cmd"/>
<remap from="/allegroHand/lib_cmd" to="/allegroHand_$(arg NUM)/lib_cmd"/>
<!--parameters are within the scope of the hand node so that multiple hands can be run at the same time -->
<rosparam file="$(arg ZEROS)" command="load" />
<rosparam file="parameters/gains_pd.yaml" command="load" />
<rosparam file="parameters/gains_velSat.yaml" command="load" />
<rosparam file="parameters/initial_position.yaml" command="load" />
<param name="/comm/CAN_CH" value="$(arg CAN_CH)" />
<param name="/hand_info/which_hand" value="$(arg HAND)" /> <!-- See HAND arg above -->
</node>
<!-- Joint States (angles) to Joint Transforms -->
<node name="jointState2tf_$(arg NUM)" pkg="robot_state_publisher" type="state_publisher">
<remap from="/tf" to="/allegroHand_$(arg NUM)/tf"/>
<remap from="/joint_states" to="/allegroHand_$(arg NUM)/joint_states"/>
</node>
<!-- Rviz Robot model visualization -->
<!-- for Fuerte -->
<!-- <node name="rviz_$(arg NUM)" pkg="rviz" type="rviz" args="-d $(find allegro_hand_description)/allegro_hand_config.vcg" unless="$(arg GROOVY)">
<remap from="/tf" to="/allegroHand_$(arg NUM)/tf"/>
</node> -->
<!-- for Groovy -->
<!-- <node name="rviz_$(arg NUM)" pkg="rviz" type="rviz" args="-d $(find allegro_hand_description)/allegro_hand_config.rviz" if="$(arg GROOVY)">
<remap from="/tf" to="/allegroHand_$(arg NUM)/tf"/>
</node> -->
<!-- Keyboard handler -->
<node name="keyboard_$(arg NUM)" pkg="allegro_hand_keyboard" type="allegro_hand_keyboard" output="screen">
<remap from="/allegroHand/lib_cmd" to="/allegroHand_$(arg NUM)/lib_cmd"/>
</node>
<!-- Plotting of Joint positions, velocities, and commanded torques -->
<!-- <node pkg="rxtools" type="rxplot" name="plot_speed_$(arg NUM)"
args="/allegroHand/joint_desired_states/position[9],/allegroHand/joint_current_states/position[9]
/allegroHand/joint_desired_states/velocity[9],/allegroHand/joint_current_states/velocity[9]
/allegroHand/joint_current_states/effort[9]" /> -->
</launch>