Controlling the robot
The robot driver subscribes to a specific type of messages called velocity commands. The standard name for this topic is
/cmd_vel
.The message is of type
geometry_msgs/Twist
and it’s structure can be found from ROS wiki.To set and control the robot speed, the velocity commands need to be published continuously.
Controlling the robot using teleop twist keyboard
If teleop twist keyboard is not installed
sudo apt update sudo apt install ros-noetic-teleop-twist-keyboard
Open a new terminal window
Get the robot and PC into the same ROS environment as shown here: Distributed ROS.
On ROBOTONT on-board computer or on on PC run the following command:
rosrun teleop_twist_keyboard teleop_twist_keyboard.py
or
roslaunch demo_teleop teleop_keyboard.launch
Use the following keys to move the robot:
Warning
From this point beyond, you are able to drive the robot with a keyboard. Should you loose control over the robot, do one of the following
PRESS “k” TO STOP THE ROBOT!
PRESS THE EMERGENCY SWITCH ON THE ROBOT.
Hint
Notice that the teleop node receives keypresses only when the terminal window is active.
Tip
Use
CTRL + C
to stop the node.
Controlling the robot using a web interface
Make sure that the user device and Robot device are connected to the same wifi router
Open the following URL in the user device browser, replacing the IP address with the robot’s IP address:
http://Robot-IP:3000/
You should see the following page: