|
3 | 3 |
|
4 | 4 | <xacro:macro name="ur_ros2_control" params="name prefix |
5 | 5 | use_fake_hardware:=false fake_sensor_commands:=false |
| 6 | + initial_positions:=${dict(shoulder_pan_joint=0.0,shoulder_lift_joint=-1.57,elbow_joint=0.0,wrist_1_joint=-1.57,wrist_2_joint=0.0,wrist_3_joint=0.0)} |
6 | 7 | script_filename output_recipe_filename |
7 | 8 | input_recipe_filename tf_prefix |
8 | 9 | hash_kinematics robot_ip"> |
|
51 | 52 | <state_interface name="position"/> |
52 | 53 | <state_interface name="velocity"/> |
53 | 54 | <state_interface name="effort"/> |
54 | | - <param name="initial_position">0.0</param> <!-- initial position for the FakeSystem --> |
| 55 | + <param name="initial_position">${initial_positions['shoulder_pan_joint']}</param> <!-- initial position for the FakeSystem --> |
55 | 56 | </joint> |
56 | 57 | <joint name="${prefix}shoulder_lift_joint"> |
57 | 58 | <command_interface name="position"> |
|
65 | 66 | <state_interface name="position"/> |
66 | 67 | <state_interface name="velocity"/> |
67 | 68 | <state_interface name="effort"/> |
68 | | - <param name="initial_position">-1.57</param> <!-- initial position for the FakeSystem --> |
| 69 | + <param name="initial_position">${initial_positions['shoulder_lift_joint']}</param> <!-- initial position for the FakeSystem --> |
69 | 70 | </joint> |
70 | 71 | <joint name="${prefix}elbow_joint"> |
71 | 72 | <command_interface name="position"> |
|
79 | 80 | <state_interface name="position"/> |
80 | 81 | <state_interface name="velocity"/> |
81 | 82 | <state_interface name="effort"/> |
82 | | - <param name="initial_position">0.0</param> <!-- initial position for the FakeSystem --> |
| 83 | + <param name="initial_position">${initial_positions['elbow_joint']}</param> <!-- initial position for the FakeSystem --> |
83 | 84 | </joint> |
84 | 85 | <joint name="${prefix}wrist_1_joint"> |
85 | 86 | <command_interface name="position"> |
|
93 | 94 | <state_interface name="position"/> |
94 | 95 | <state_interface name="velocity"/> |
95 | 96 | <state_interface name="effort"/> |
96 | | - <param name="initial_position">-1.57</param> <!-- initial position for the FakeSystem --> |
| 97 | + <param name="initial_position">${initial_positions['wrist_1_joint']}</param> <!-- initial position for the FakeSystem --> |
97 | 98 | </joint> |
98 | 99 | <joint name="${prefix}wrist_2_joint"> |
99 | 100 | <command_interface name="position"> |
|
107 | 108 | <state_interface name="position"/> |
108 | 109 | <state_interface name="velocity"/> |
109 | 110 | <state_interface name="effort"/> |
110 | | - <param name="initial_position">0.0</param> <!-- initial position for the FakeSystem --> |
| 111 | + <param name="initial_position">${initial_positions['wrist_2_joint']}</param> <!-- initial position for the FakeSystem --> |
111 | 112 | </joint> |
112 | 113 | <joint name="${prefix}wrist_3_joint"> |
113 | 114 | <command_interface name="position"> |
|
121 | 122 | <state_interface name="position"/> |
122 | 123 | <state_interface name="velocity"/> |
123 | 124 | <state_interface name="effort"/> |
124 | | - <param name="initial_position">0.0</param> <!-- initial position for the FakeSystem --> |
| 125 | + <param name="initial_position">${initial_positions['wrist_3_joint']}</param> <!-- initial position for the FakeSystem --> |
125 | 126 | </joint> |
126 | 127 | <sensor name="tcp_fts_sensor"> |
127 | 128 | <state_interface name="force.x"/> |
|
0 commit comments