Skip to main content

Robot Management and Configuration

Controlling ROS Nodes with Docker

The Panther robot uses a Docker container to launch ROS nodes on the Built-in Computer. By default, four Docker containers are launched:

  • ros_master - starts the ROS master node,
  • panther_ros - starts default Panther nodes,
  • webui-ros-joystick - starts the WebUI,
  • gamepad_controller - starts the Gamepad node.

Docker containers can be controlled (e.g., stopped, restarted) and configured (e.g., modified restart policy) by logging into the Built-in Computer (default ssh husarion@10.15.20.2 password: husarion) and using standard Docker CLI. For more information on how to control Docker containers, refer to How to use Docker.

Controlling Panther Robot

warning

Do not try controlling the robot from different sources at the same time! It may cause unpredictable behavior!

By default, the robot can be controlled using /cmd_vel topic. Panther will process all messages sent to the topic and provide output velocity to the wheels unless E-stop is triggered. Output velocities are scaled according to velocity smoother limits (see Changing Velocity Smoothing Parameters for more information). Below are some tools that allow you to control the Panther robot, but any node publishing to /cmd_vel topic will be valid.

REPEATING /cmd_vel MESSAGES

For safety reasons, the robot will initiate a stop if the time since the last velocity command exceeds 1 second. When utilizing a custom control system, ensure that velocity commands are sent at an appropriate frequency. The recommended minimum frequency is 10 Hz.

/cmd_vel SAFETY CONDITIONS

To control the Panther robot with /cmd_vel topic E-stop state has to be reset. It can be done using the ROS service, WebUI, or the Gamepad controller.

If some messages are being published to /cmd_vel while E-stop is triggered, it is impossible to reset it.

WebUI

WebUI is a default tool launched when the Panther robot starts. It is a simple browser-based interface that can be accessed at 10.15.20.2:8000. It allows handling the Panther robot E-stop and controlling its movement. An E-stop state can be changed using the button in the top-right corner of the app. When resetting E-stop a pop-up window will ask for confirmation. The red or green ring around the joystick indicates if the robot is ready to move. Use a joystick to move the robot around. For more information, see webui-ros-joystick GitHub page.

note

To use the Web interface, your device has to be connected to Panther's hotspot. See Connecting to Panther's Hotspot.

Gamepad

The ROS Joy2Twist node allows controlling the Panther robot with a Gamepad. By default, it can be used with the F710 gamepad, but the node can be configured to work with any Gamepad controller.

  • Press B to trigger E-stop on Panther.
  • Hold LT button and press A to release the E-stop.
  • To control Panther hold the LB button and use the left stick to drive forward/backward (additionally left/right when using mecanum wheels) and the right stick to turn the robot.

For more information on how to run and use it, see the Joy2Twist GitHub page.

Keyboard

A teleop_twist_keyboard ROS package is one of the basic ROS tools that allows you to control a robot. It converts keyboard input to velocity commands published in the /cmd_vel topic. It can be easily installed and applied to any device with ROS. When using teleop_twist_keyboard with Panther, it is advised to set the repeat_rate parameter in order to meet the required publishing rate. For more information on how to run and use it, see teleop_twist_keyboard.

REPEATING /cmd_vel MESSAGES

To run teleop_twist_keyboard with ROS parameter repeat_rate, use command:

husarion@mydevice:~$
rosrun teleop_twist_keyboard teleop_twist_keyboard.py _repeat_rate:=10.0

Changing Velocity Smoothing Parameters

The Panther driver ROS package includes an integrated velocity smoother designed to limit the robot's velocities and accelerations. Its parameters can be found in the panther_driver node. By default, these values correspond to the upper limits of the robot's velocities and accelerations. To modify the default velocity smoother parameters, follow these steps:

  1. Create a YAML file similar to panther_common.yaml and set your desired parameter values.

  2. To incorporate the YAML file into Docker, make changes to the main Docker compose file located at ~/compose.yaml. Add a volume entry to the panther_ros container section:

    volumes:
    # other volumes
    - /path/to/panther_common_custom.yaml:/panther_common_custom.yaml
    CHANGE FILE NAME

    Ensure to replace /path/to/panther_common_custom.yaml with the correct path to the YAML file you created.

  3. Modify the launch command to use that parameter file. Add parameter panther_common_config_file:

    command: >
    roslaunch --wait panther_bringup bringup.launch
    panther_common_config_file:=/panther_common_custom.yaml
  4. Restart Docker containers to apply the changes:

    husarion@10.15.20.2:~$
    docker compose up -d --force-recreate

Configuring Panther with Various Wheel Types

To configure Panther with different wheel types, please refer to Panther WH03 - wheel swap.

Using Custom Robot Description

Custom descriptions have to follow certain requirements in order to work correctly. For more information on how to create a valid Panther robot description, please visit panther_description.

There are two approaches to launching a custom Panther description, depending on your use case.

First, include launching the robot description from a different part of your project. For example, if you intend to launch the Panther description with custom sensors from a separate computer, such as PC02. In this case, you only need to disable the default robot description to prevent any conflicts with the desired description. To do so, you have to modify the main compose file located at ~/compose.yaml.

  1. Edit the launch command in the panther_ros container to disable publishing the default Panther robot description:

    command: >
    roslaunch --wait panther_bringup bringup.launch
    publish_robot_state:=false
  2. Restart Docker containers to apply the changes:

    husarion@10.15.20.2:~$
    docker compose up -d --force-recreate

The second option involves changing the default Panther robot description. With this approach, your custom robot description will be published whenever the Panther robot is started. To incorporate the robot description file into the Docker container, make changes to the main compose file located at ~/compose.yaml.

  1. Add a volume entry to the panther_ros container section:

    volumes:
    # other volumes
    - /path/to/custom_panther.urdf.xacro:/custom_panther.urdf.xacro
    CHANGE FILE NAME

    Ensure to replace /path/to/custom_panther.urdf.xacro with the correct path to the robot's description file you created.

  2. Modify the launch command to utilize the description file, which can be accomplished using the robot_description launch parameter:

    command: >
    roslaunch --wait panther_bringup bringup.launch
    robot_description:="xacro /custom_panther.urdf.xacro"
  3. Restart Docker containers to apply the changes:

    husarion@10.15.20.2:~$
    docker compose up -d --force-recreate

GNSS API

PREREQUIREMENTS

To use the GNSS (including GPS), Panther has to be equipped with the ANT02 option.

GNSS data in NMEA format is forwarded to the Built-in Computer IP address at port 5000. Typically you can access it at upd://10.15.20.2:5000.

You can make sure the address is correct by typing http://10.15.20.1 into your browser (username: admin, password: Husarion1). Navigate to Services -> GPS -> NMEA -> NMEA forwarding -> Hostname and Port. Remember that you must be connected to the robot's WiFi network. If changes are needed, finish the configuration by pressing save & apply at the bottom of the screen. To learn more about GPS configuration, please refer to RUTX11 GPS.

Data frequency is 1 Hz and can be interacted ether with GPSD daemon

husarion@mydevice:~$
gpsd -N udp://10.15.20.2:5000

or directly with the ROS package, translating the signal to a ROS topic.

USE DOCKER COMPOSE

It is recommended to use a Docker image through a compose.yaml file.

If launching on a Built-in Computer you can utilize the main Panther compose file located at ~/compose.yaml. Edit the file using the text editor of your choice and add the following container:

  nmea-gps:
image: husarion/nmea-gps:noetic
container_name: nmea-gps
<<: *common-config
command: >
rosrun nmea_navsat_driver nmea_socket_driver
__ns:=panther
_port:=5000
_local_ip:=10.15.20.2

To restart Docker containers, execute the following command from within the directory containing the compose file:

husarion@10.15.20.2:~$
docker compose up -d --force-recreate

You should be able to see data from the GNSS by listening to a ROS topic.

husarion@mydevice:~$
rostopic echo /panther/fix

Operating System Image Reinstallation

In some cases, you will need to restore Panther's system to its default settings:

  • in case of accidental damage to the system,
  • to update the OS,
  • to clear all user changes and restore factory settings.

Find the full instructions in Operating System Reinstallation.