Skip to content

Commit c953967

Browse files
authored
Update README instructions for Twist control (Kinovarobotics#154)
- Related to PickNikRobotics/picknik_controllers#11 - Use Twist instead of TwistStamped because it works better with existing tools - Adds example to use with teleop_twist_keyboard Signed-off-by: Alex Moriarty <[email protected]>
1 parent 706da55 commit c953967

File tree

1 file changed

+6
-20
lines changed

1 file changed

+6
-20
lines changed

README.md

Lines changed: 6 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -211,7 +211,7 @@ ros2 topic pub /joint_trajectory_controller/joint_trajectory trajectory_msgs/Joi
211211
}" -1
212212
```
213213

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`:
214+
You can also command the arm using Twist messages. Before doing so, you must active the `twist_controller` and deactivate the `joint_trajectory_controller`:
215215
```bash
216216
ros2 service call /controller_manager/switch_controller controller_manager_msgs/srv/SwitchController "{
217217
activate_controllers: [twist_controller],
@@ -221,28 +221,14 @@ ros2 service call /controller_manager/switch_controller controller_manager_msgs/
221221
}"
222222
```
223223

224-
Once the `twist_controller` is activated, You can publish TwistStamped messages on the `/twist_controller/commands` topic to command the arm.
224+
Once the `twist_controller` is activated, You can publish Twist messages on the `/twist_controller/commands` topic to command the arm.
225225

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-
```
226+
For example, you can jog the arm using [Teleop Twist Keyboard](https://index.ros.org/p/teleop_twist_keyboard/github-ros2-teleop_twist_keyboard/) with the following command:
227+
228+
**WARNING: you are responsible for collision checking, including self collisions when in this mode.**
236229

237-
Then stop it with the following command:
238230
```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
231+
ros2 run teleop_twist_keyboard teleop_twist_keyboard --ros-args --remap /cmd_vel:=/twist_controller/commands
246232
```
247233

248234
If you wish to use the `joint_trajectory_controller` again to command the arm using JointTrajectory messages, run the following:

0 commit comments

Comments
 (0)