File tree Expand file tree Collapse file tree 1 file changed +12
-11
lines changed
docs_versioned_docs/version-ros2jazzy/ros/tutorials Expand file tree Collapse file tree 1 file changed +12
-11
lines changed Original file line number Diff line number Diff line change @@ -44,29 +44,30 @@ sudo apt-get install ros-jazzy-teleop-twist-keyboard
4444Once installed, run the node:
4545
4646```
47- ros2 run teleop_twist_keyboard teleop_twist_keyboard
47+ ros2 run teleop_twist_keyboard teleop_twist_keyboard --ros-args -p stamped:=true
4848```
4949
5050If your robot uses a namespace, the namespace should be applied to ` teleop_twist_keyboard ` :
5151
5252```
53- ros2 run teleop_twist_keyboard teleop_twist_keyboard --ros-args -r __ns:=/j100_0001
53+ ros2 run teleop_twist_keyboard teleop_twist_keyboard --ros-args -p stamped:=true - r __ns:=/j100_0001
5454```
5555
5656## Command Velocity
5757
5858You can manually publish to the ` cmd_vel ` topic through the command line by calling:
5959
6060```
61- ros2 topic pub /cmd_vel geometry_msgs/msg/Twist \
62- "linear:
63- x: 0.0
64- y: 0.0
65- z: 0.0
66- angular:
67- x: 0.0
68- y: 0.0
69- z: 0.0"
61+ ros2 topic pub /cmd_vel geometry_msgs/msg/TwistStamped \
62+ "twist:
63+ linear:
64+ x: 0.0
65+ y: 0.0
66+ z: 0.0
67+ angular:
68+ x: 0.0
69+ y: 0.0
70+ z: 0.0"
7071```
7172
7273Set the ` linear.x ` value to drive the robot forwards or backwards, and the ` angular.z ` value to rotate left or right.
You can’t perform that action at this time.
0 commit comments