Skip to content

Commit 74aae64

Browse files
Add parameter arm_id
This is useful for controlling several instances of the same arm.
1 parent a1c83a8 commit 74aae64

File tree

3 files changed

+11
-8
lines changed

3 files changed

+11
-8
lines changed

config/sot_params_franka_panda.yaml

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,24 +1,24 @@
11
sot_controller:
22
control_mode:
3-
panda_joint1:
3+
$(arg arm_id)_joint1:
44
ros_control_mode: POSITION
55
sot_control_mode: VELOCITY
6-
panda_joint2:
6+
$(arg arm_id)_joint2:
77
ros_control_mode: POSITION
88
sot_control_mode: VELOCITY
9-
panda_joint3:
9+
$(arg arm_id)_joint3:
1010
ros_control_mode: POSITION
1111
sot_control_mode: VELOCITY
12-
panda_joint4:
12+
$(arg arm_id)_joint4:
1313
ros_control_mode: POSITION
1414
sot_control_mode: VELOCITY
15-
panda_joint5:
15+
$(arg arm_id)_joint5:
1616
ros_control_mode: POSITION
1717
sot_control_mode: VELOCITY
18-
panda_joint6:
18+
$(arg arm_id)_joint6:
1919
ros_control_mode: POSITION
2020
sot_control_mode: VELOCITY
21-
panda_joint7:
21+
$(arg arm_id)_joint7:
2222
ros_control_mode: POSITION
2323
sot_control_mode: VELOCITY
2424

launch/controller.launch

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,10 @@
11
<launch>
22
<arg name="simulation" default="false"/>
33
<arg name="robot" default="" />
4+
<arg name="arm_id" default=""
5+
doc="prefix of the arm in case of multi-robot"/>
46
<include file="$(find sot_universal_robot)/launch/sot_params.launch">
7+
<arg name="arm_id" value="$(arg arm_id)"/>
58
<arg name="robot" value="$(arg robot)"/>
69
<arg name="simulation" value="$(arg simulation)"/>
710
</include>

launch/sot_params.launch

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,7 @@
2323
<rosparam command="load"
2424
file="$(find sot_universal_robot)/config/sot_params_common.yaml"/>
2525
<rosparam command="load" if="$(eval robot == 'franka')"
26-
file="$(find sot_universal_robot)/config/sot_params_franka_$(arg arm_id).yaml"
26+
file="$(find sot_universal_robot)/config/sot_params_franka_panda.yaml"
2727
subst_value="true"/>
2828
<rosparam command="load" if="$(eval robot == 'ur')"
2929
file="$(find sot_universal_robot)/config/sot_params_ur.yaml"/>

0 commit comments

Comments
 (0)