Jump into concepts and practice - no test required
or
Recommended
Test this pattern10 questions across easy, medium, and hard to know if this pattern is strong
Recall & Review
beginner
What is the purpose of the teleop_twist_keyboard package in ROS?
It allows you to control a robot by sending velocity commands using your keyboard. You can move the robot forward, backward, and turn it by pressing keys.
Click to reveal answer
beginner
Which ROS message type does teleop_twist_keyboard publish to control robot movement?
It publishes geometry_msgs/Twist messages, which contain linear and angular velocity data for the robot.
Click to reveal answer
beginner
How do you start the teleop_twist_keyboard node from the command line?
You run the command: rosrun teleop_twist_keyboard teleop_twist_keyboard.py in your terminal.
Click to reveal answer
beginner
What keys are commonly used to move the robot forward and backward in teleop_twist_keyboard?
The i key moves the robot forward, and the k key moves it backward.
Click to reveal answer
beginner
Why is it important to have a terminal window focused when using teleop_twist_keyboard?
Because the node reads keyboard input from the terminal, it must be active and focused to capture your key presses and send commands to the robot.
Click to reveal answer
Which message type does teleop_twist_keyboard publish to control robot velocity?
Asensor_msgs/Image
Bgeometry_msgs/Twist
Cstd_msgs/String
Dnav_msgs/Odometry
✗ Incorrect
teleop_twist_keyboard publishes geometry_msgs/Twist messages to control linear and angular velocity.
What command starts the teleop_twist_keyboard node?
4. You run ros2 run teleop_twist_keyboard teleop_twist_keyboard but pressing keys does not move the robot. What is the most likely cause?
medium
A. The robot is not connected or not receiving velocity commands
B. The keyboard keys are incorrect; use arrow keys instead
C. The teleop_twist_keyboard node must be launched with a launch file
D. ROS 2 is not installed properly
Solution
Step 1: Check common reasons for no robot movement
If keys are pressed but robot doesn't move, often the robot is not connected or not subscribed to velocity commands.
Step 2: Evaluate other options
Keyboard keys are correct as per documentation; launch file is not required; ROS 2 installation issues would prevent node running.
Final Answer:
The robot is not connected or not receiving velocity commands -> Option A
Quick Check:
No movement = no connection [OK]
Hint: Check robot connection before blaming keys or launch files [OK]
Common Mistakes:
Assuming arrow keys must be used
Thinking launch file is mandatory
Blaming ROS 2 install without checking connection
5. You want to increase the robot's forward speed using teleop_twist_keyboard. Which method correctly achieves this?
hard
A. Press 'i' key twice quickly to double speed
B. Press 'w' key to increase speed while running teleop_twist_keyboard
C. Restart teleop_twist_keyboard with a higher speed parameter
D. Edit the robot's URDF file to increase max speed
Solution
Step 1: Understand teleop_twist_keyboard speed control
The node allows speed adjustment during runtime using 'w' and 'x' keys to increase or decrease linear speed.
Step 2: Evaluate other options
Editing URDF changes robot model, not teleop speed; restarting with parameters is possible but less direct; pressing 'i' twice does not increase speed.
Final Answer:
Press 'w' key to increase speed while running teleop_twist_keyboard -> Option B
Quick Check:
Use 'w' to increase speed live [OK]
Hint: Use 'w' and 'x' keys to adjust speed live [OK]
Common Mistakes:
Trying to speed up by pressing movement keys repeatedly
Editing URDF for speed instead of teleop parameters