Skip to main content

Panther ROS 2 driver released

· 10 min read
Dominik Nowak
CEO @ Husarion

We are excited to announce the beta release of the ROS 2 Humble driver for the Panther UGV (Unmanned Ground Vehicle), which brings new features designed to improve real-time performance, provide better control of hardware components, and offer advanced diagnostic monitoring. In this blog post, we’ll highlight the key advantages of the ROS 2 driver compared to its predecessor, with a focus on improvements in communication, integration with side frameworks, and the introduction of new features.

Continue reading to explore the key features of the Panther ROS 2 driver, including:

  • Full control of robot hardware components through the robust ros2_control framework.
  • Optimization for a real-time Linux kernel, ensuring enhanced performance.
  • Advanced safety features and state management powered by BehaviorTree.
  • A refined Gazebo simulation with easy robot configuration management.
tip

📌 To upgrade the Operating System and start using new ROS 2 driver on your Panther, please follow the steps from OS reinstallation guide in the Built-in Computer.

Learn more about the key differences between ROS and ROS 2 below 👇🏻

ROS 2 offers several enhancements over the original ROS, aimed at boosting the efficiency, reliability, and security of robotic applications. Key features include:

  • Real-Time Support: With real-time capabilities, ROS 2 allows developers to create applications with strict timing constraints, ensuring predictable and reliable robot behavior for complex, coordinated actions.
  • Quality of Service (QoS) Settings: Developers can define the data transmission policy to meet the needs of a specific application and adapt the communication characteristics to the type of data.
  • Enhanced Communication Layer: Using a decentralized Data Distribution Service (DDS), ROS 2 improves the reliability and scalability of node communication, essential for mobile robots in dynamic environments.
  • Seamless Integration: The ROS 2 ecosystem supports a wide range of industry-ready software, enabling easy integration of advanced technologies like specialized hardware drivers and point cloud preprocessing libraries.
  • Cross-Platform Support: ROS 2 extends its compatibility beyond Ubuntu to Windows and macOS, expanding the development ecosystem.

Thanks to these enhancements in security, communication, and real-time support, we believe that transitioning the Panther driver from ROS to ROS 2 will significantly enhance Panther's capabilities and applications, ensuring its reliability even in the most demanding robotic environments.

Features of the Panther ROS 2 Driver

The diagram below illustrates the system architecture of the ROS 2 driver for the Panther UGV.

Panther ROS 2 driver system diagram

In the following sections, we'll delve into the key features of the ROS 2 driver:

Optimized for a real-time Linux Kernel.

The new Panther driver operates on a custom-configured version of Ubuntu 22.04 LTS, specifically tailored for seamless integration with ROS 2 Humble and enhanced for real-time performance, ensuring both stability and security. To simplify working with Panther and facilitate deployment across various hardware and software configurations, the driver processes are conveniently packaged in a Docker container (with a Snapped version and Ubuntu Core image coming soon).

A critical component of Panther's operating system is its Linux kernel, custom-built for real-time tasks. This kernel is derived from the configuration provided by the ROS 2 Real-Time Working Group, ensuring optimal performance with ROS 2.

Based on ros2_control Framework

The ros2_control framework is designed for the real-time control of robots, providing a standardized approach to managing various hardware systems. Seamlessly integrated with ROS 2, it enhances Panther's ability to execute precise movements and simplifies managing hardware components.

The ros2_control framework offers several advantages, including real-time operation that provides direct access to hardware components, ensuring time determinism and predictability. It seamlessly integrates GPIO and Estop functions into the ROS 2 ecosystem, enabling centralized control and interaction across different system nodes. Additionally, our custom controller ensures thread-safe operations, preventing concurrent access risks and guaranteeing safe interaction with hardware, which is essential for reliability in real-time robotic applications.

You can learn more about Panther’s features built on ros2_control below 👇🏻

Driving Panther: DiffDriveController

A core element in the Panther's design is its use of the DiffDriveController, a component of the ros2_control framework that is designed to control differential drive robots. The controller translates velocity commands, into precise wheel movements, functioning as the interface between high-level navigation instructions (like publishing the /cmd_vel topic), and the robot's physical movement.

The DiffDriveController provides Panther with accurate control over its movements and offers advanced features that enhance its performance. It is designed for real-time operations and enables computing and publishing odometry data such as the robot's position and velocity estimates, which are crucial for accurate navigation. Additionally, it supports limits on velocity, acceleration, and jerk to ensure smooth and safe movement. An automatic stop mechanism halts the robot if no command is received within a specified timeout, improving operational safety.

Utilizing IMU data: IMUSensorBroadcaster

To navigate and interact with its environment effectively, Panther employs an Inertial Measurement Unit (IMU) sensor. The sensor's data is broadcasted via the IMUSensorBroadcaster, another component of the ros2_control framework. This allows the robot to have a keen perception of its orientation, acceleration, and angular velocity, critical for stable and accurate movement, especially in uneven or challenging terrains.

Hardware integration: GPIO and Estop functionality

The Panther robot features integrated General-Purpose Input/Output (GPIO) and Emergency Stop (E-Stop) functionalities via the ros2_control framework. The E-Stop mechanism is designed to immediately disable the motors, ensuring the robot can be safely stopped. Additionally, a service is available to temporarily release the motors while the E-Stop is active, allowing manual movement of the robot if needed.

The E-Stop can be triggered in several ways: physically by pressing the emergency button on the Panther's rear panel, through the User Safety Interface (eg. from safety LIDAR), programmatically through the user software, or automatically when the battery level becomes critically low.

The robot's state, including E-Stop status, is managed by a Behavior Tree.

For example, the behavior tree controlling the E-Stop is illustrated below:

E-Stop behavior tree

This configuration ensures a balance between real-time performance, flexibility, and safety, enabling the robot to interact efficiently with external devices and respond rapidly to emergency situations.

Streamlined system health monitoring

An integral part of the Panther robot's software stack is its implementation of a standardized diagnostics topic, a feature designed to ensure the system's reliability and performance through health monitoring.

In ROS 2, the diagnostics topic collects and shares information about various system components. Panther ROS 2 driver provides diagnostics for motor controllers, battery, LED lights, and the operating system’s memory and CPU usage. By consolidating data from these elements into a single channel, Panther allows for easy monitoring of both hardware and software, helping quickly identify and address any issues.

Panther ROS 2 Driver health monitor

Diagnostics data can be accessed through Command Line Interface (CLI) tools for quick checks or through graphical tools like rqt. Rqt, in particular, provides an interactive environment for visualizing and analyzing messages related to specific hardware components and system status, making it easier to perform detailed system analysis.

High Code Quality

The entire hardware control system is designed to be thread-safe. We have dedicated significant effort to ensure code quality through comprehensive testing at multiple levels:

  1. A robust suite of unit tests.
  2. Tests conducted on the actual Panther hardware using a self-hosted GitHub runner for every Pull Request.
  3. Stability tests, where the driver undergoes prolonged testing over many hours
  4. Usability tests in challenging terrains to assess Panther's mobility, reliability, and safety features in real-world conditions.

Enhanced Gazebo Simulation

The Panther's ROS 2 driver can be run not only on the actual hardware but also within the Gazebo simulation environment. We have invested considerable effort to ensure that the Gazebo simulation closely mirrors the real hardware driver, allowing for rapid development and testing without the immediate need for physical hardware, thus accelerating the development process.

Key features of the Panther Gazebo simulation include:

  1. Multiple Panther Instances: You can spawn multiple Panther UGVs simultaneously within Gazebo.

Multiple Panther UGV spawned in Gazebo

  1. LED Animation Support: The Gazebo simulation models support LED animations on the Panther bumper, replicating the same set and behavior as the physical model.

Panther Gazebo LED support

  1. GPS Functionality: The simulation includes GPS support, enabling the creation of outdoor Panther simulations.

GPS support in Panther UGV simulation

  1. Customizable URDF Configurations: Both in the Gazebo simulation and for a real hardware you can choose the URDF configurations of Panther by using an easy to use .yaml file for that. Available equipment is listed here. Eg. let's create a Panther UGV in Gazebo equipped with:

    • UR-5 manipulator (component code MAN02)
    • Robotiq 2F-85 gripper (component code GRP02)
    • Stereolabs ZED X camera (component code CAM06)
    • Velodyn Puck LIDAR (component code LDR20)

    The corresponding Gazebo (or real-hardware) configuration .yaml file would look like this:


components:
- type: MAN02
parent_link: cover_link
xyz: 0.1 0.15 0.0
rpy: 0.0 0.0 0.0
device_namespace: ur5e

- type: CAM06
parent_link: lights_channel_1_link
xyz: 0.0 0.0 0.01
rpy: 0.0 0.0 0.0
device_namespace: front_camera

- type: LDR20
parent_link: cover_link
xyz: 0.0 0.0 0.0
rpy: 0.0 0.0 0.0
device_namespace: lidar3d

- type: GRP02
parent_link: ur5e_tool0
xyz: 0.0 0.0 0.0
rpy: 0.0 0.0 0.0
device_namespace: gripper

And the resulting setup would be:

Summary

The release of the ROS 2 Humble driver for Panther UGV brings a host of new features focused on enhancing real-time performance, improving hardware control, and advancing diagnostics. Key highlights include:

  • Full Control with ros2_control: This framework enables precise and real-time management of hardware components, ensuring smooth and accurate operations.
  • Real-Time Performance Optimization: The driver is built on a custom-configured version of Ubuntu 22.04 LTS, specifically optimized for ROS 2 to deliver superior real-time performance..
  • Enhanced Safety and Diagnostics: With features like BehaviorTree-based state management, a dedicated diagnostics topic for critical hardware components, and a robust health monitoring system, the platform ensures high levels of operational safety and reliability.

In summary, the integration of ROS 2 elevates Panther's capabilities, making it an even more versatile platform for developing and deploying advanced robotic technologies. 🤖 We’re excited for you to test the upgraded Panther software, and we can’t wait to hear your feedback!

tip
  • 📌 To upgrade the Operating System and start using new ROS 2 driver on your Panther, please follow the steps from OS reinstallation guide.
  • You can find more information and exact details about smaller features, bug fixes and API changes in our release notes.
  • ⚠️ Please note that the Panther ROS 1 driver will no longer receive major feature improvements, only bug fixes. ⚠️

If you have any comments or questions, you can easily reach us at our Community Portal, by e-mail at contact@husarion.com, or through GitHub's Issues and Pull Requests.