Skip to main content

ROS Packages Overview

Panther Lights

The Panther Lights interface was designed to provide information about the robot's system state in the form of simple animations displayed on the Bumper Lights. Animations are placed in the queue and processed according to their priority, as described below:

  • 1 - interrupts and removes from the queue animation with priorities 2 and 3.
  • 2 - interrupts animations with priority 3.
  • 3 - add animation to the end of the queue.

Animations

Default animations supplied by Husarion are listed in the table below.

IDNAMEPRIORITYDESCRIPTION
0E_STOP3red expanding from the center to the edges
1READY3green expanding from center to the edges
2ERROR1red, whole panel blinking twice
3MANUAL_ACTION3blue expanding from the center to the edges
4AUTONOMOUS_ACTION3orange expanding from center to the edges
5GOAL_ACHIEVED2purple, whole panel blinking twice
6LOW_BATTERY2two orange stripes moving towards the center, repeats twice
7CRITICAL_BATTERY2two red stripes moving towards the center, repeats twice
8BATTERY_STATE3two stripes moving towards the edges, stopping at a point representing battery percentage and filling back to the center, color changes from red to green, repeats three times
9CHARGING_BATTERY3the whole panel blinking with a duty cycle proportional to the battery percentage. Short blinking means low battery, no blinking means full battery. The color changes from red to green

Default LED Behavior

The table below outlines the animations and states of the Panther robot that each of them represents.

ANIMATIONROBOT STATE
E_STOProbot E-stop triggered, not ready to operate
READYrobot E-stop released, ready to operate
LOW_BATTERYrobot battery level below 40%, animation displayed periodically every 30 seconds
CRITICAL_BATTERYrobot battery level below 10%, animation displayed periodically every 15 seconds
BATTERY_STATErobot's current battery level, displayed periodically every 120 seconds
CHARGING_BATTERYthe Charger is connected and the robot is charging, available in Panther v1.2 and later

Customize LED Animations

You can easily customize Panther Lights by defining new animations based on images. They can be created with a simple YAML file, such as the one shown below:

# user_animations.yaml
user_animations:
# animation with default image and custom color
- id: 21
name: 'ANIMATION_1'
priority: 2
animation:
both:
type: image_animation
image: $(find panther_lights)/animations/strip01_red.png
duration: 2
repeat: 2
color: 0xffff00

You also have the option to create code-based animations. Detailed information on how to make use of these features, as well as a detailed description of default behavior and customization options for Bumper Lights panels, can be found in panther_lights documentation.

Display LED Animation

To display one of the predefined animations, use /panther/lights/controller/set/animation service of type panther_msgs/SetAnimation. Example:

husarion@mydevice:~$
rosservice call /panther/lights/controller/set/animation "animation:
id: 1
param: ''
repeating: false"

Panther Manager

The Panther system management is implemented using BehaviorTree.CPP, and it comprises three Behavior Trees. They are designed to handle Bumper Lights, safety features, and the soft shutdown of robot components. Each tree can be customized by users according to their specific requirements. Please refer to panther_manager documentation to gain a deeper understanding of how to modify and extend these Behavior Trees effectively.

warning

It is essential to proceed with caution when modifying the trees responsible for safety or shutdown and ensure that default behaviors are not removed.

Lights Tree

The Lights Tree is responsible for displaying animations based on the robot's current state. It handles various scenarios such as charging status, battery level information, E-stop state, and more. By utilizing this Behavior Tree, users can define specific animations to visualize information about the robot's state.

Safety Tree

The Safety Tree plays a crucial role in ensuring the well-being of the robot system. It controls the Fan based on the CPU and driver temperatures, maintaining optimal operating conditions. Additionally, the Safety Tree handles critical safety operations triggered by high battery temperatures. In such cases, the Behavior Tree takes actions like activating the Fan, initiating an E-stop, and disabling AUX Power. It may also, proceed to shutdown the robot in the event of reaching a fatal battery temperature. These measures are implemented to safeguard the robot and prevent any potentially hazardous situation.

Shutdown Tree

The Shutdown Tree is responsible for orchestrating the graceful shutdown of the robot components and the Built-in Computer. When the robot receives a shutdown request, this Behavior Tree ensures that all the relevant system components are powered down in a controlled manner. Following the Shutdown Tree prevents the robot system from abrupt power cuts, which could potentially cause data loss, hardware damage, or other adverse consequences.