@@ -201,6 +201,60 @@ ros2 launch kinova_gen3_7dof_robotiq_2f_85_moveit_config robot.launch.py \
201
201
```
202
202
** Note: If you have reassigned your physical arm's robot IP address, then you will need to assign that ip address to ` robot_ip ` **
203
203
204
+ You can command the arm by publishing Joint Trajectory messages directly to the joint trajectory controller:
205
+ ``` bash
206
+ ros2 topic pub /joint_trajectory_controller/joint_trajectory trajectory_msgs/JointTrajectory " {
207
+ joint_names: [joint_1, joint_2, joint_3, joint_4, joint_5, joint_6, joint_7],
208
+ points: [
209
+ { positions: [0, 0, 0, 0, 0, 0, 0], time_from_start: { sec: 10 } },
210
+ ]
211
+ }" -1
212
+ ```
213
+
214
+ You can also command the arm using TwistStamped messages. Before doing so, you must active the ` twist_controller ` and deactivate the ` joint_trajectory_controller ` :
215
+ ``` bash
216
+ ros2 service call /controller_manager/switch_controller controller_manager_msgs/srv/SwitchController " {
217
+ activate_controllers: [twist_controller],
218
+ deactivate_controllers: [joint_trajectory_controller],
219
+ strictness: 1,
220
+ activate_asap: true,
221
+ }"
222
+ ```
223
+
224
+ Once the ` twist_controller ` is activated, You can publish TwistStamped messages on the ` /twist_controller/commands ` topic to command the arm.
225
+
226
+ For example, you can jog the arm with the following command:
227
+ ``` bash
228
+ ros2 topic pub /twist_controller/commands geometry_msgs/TwistStamped " {
229
+ header: auto,
230
+ twist: {
231
+ linear: {x: .05, y: 0, z: 0},
232
+ angular: {x: 0,y: 0,z: 0},
233
+ }
234
+ }" -1
235
+ ```
236
+
237
+ Then stop it with the following command:
238
+ ``` bash
239
+ ros2 topic pub /twist_controller/commands geometry_msgs/TwistStamped " {
240
+ header: auto,
241
+ twist: {
242
+ linear: {x: 0, y: 0, z: 0},
243
+ angular: {x: 0,y: 0,z: 0},
244
+ }
245
+ }" -1
246
+ ```
247
+
248
+ If you wish to use the ` joint_trajectory_controller ` again to command the arm using JointTrajectory messages, run the following:
249
+ ``` bash
250
+ ros2 service call /controller_manager/switch_controller controller_manager_msgs/srv/SwitchController " {
251
+ activate_controllers: [joint_trajectory_controller],
252
+ deactivate_controllers: [twist_controller],
253
+ strictness: 1,
254
+ activate_asap: true,
255
+ }"
256
+ ```
257
+
204
258
The Robotiq 2f 85 Gripper will be available on the Action topic:
205
259
206
260
``` bash
0 commit comments