Controlling the robot

_images/coord.png
  1. The robot driver subscribes to a specific type of messages called velocity commands. The standard name for this topic is /cmd_vel.

  2. The message is of type geometry_msgs/Twist and it’s structure can be found from ROS wiki.

  3. To set and control the robot speed, the velocity commands need to be published continuously.

Controlling the robot using teleop twist keyboard

  1. If teleop twist keyboard is not installed

    sudo apt update
    sudo apt install ros-noetic-teleop-twist-keyboard
    
  2. Open a new terminal window

  3. Get the robot and PC into the same ROS environment as shown here: Distributed ROS.

  4. 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
    
  5. Use the following keys to move the robot:

    _images/twist_keys.png

    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

  1. Make sure that the user device and Robot device are connected to the same wifi router

  2. 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:

_images/webapp_ok_step.png
  1. Click OK to close the connection status dialog

  2. Now you can teleoperate the robot using the touch joystick button as well as see the camera feed and depthcloud.

    _images/webapp3.png