Skip to content

ROS2-Based Gazebo Simulation of Marsupial UAV-UGV Systems Connected by Hanging Tether

License

Notifications You must be signed in to change notification settings

robotics-upo/marsupial_simulator_ros2

Repository files navigation

Logo

Physical simulation of Marsupial UAV-UGV Systems Connected by a Hanging Tether using Gazebo

For a detailed explanation of the system's architecture and experiments, refer to the full paper available on arXiv.

Table of Contents

  1. Introduction
  2. System Overview
  3. Installation
  4. Usage
  5. Modifying the Tether
  6. References

Introduction

This project presents a ROS 2-based simulator framework for tethered UAV-UGV marsupial systems in Gazebo. The framework models interactions among a UAV, a UGV, and a winch with dynamically adjustable length and slack of the tether. It supports both manual control and automated trajectory tracking, with the winch adjusting the length of the tether based on the relative distance between the robots. The simulator's performance is demonstrated through experiments, including comparisons with real-world data, showcasing its capability to simulate tethered robotic systems. The framework offers a flexible tool for researchers exploring tethered robot dynamics.

stage_1 simulation

(back to top)

System Overview

Architecture

The architecture of the marsupial UAV-UGV simulator is composed of key components that interact to replicate the behavior of the tethered robotic system. Built using ROS 2 and Gazebo, the simulator supports both manual and autonomous operations.

  • Model Initialization: The UGV, UAV, and tether are spawned in Gazebo, with the UAV placed on a platform atop the UGV and the tether initialized in a coiled configuration around the winch.

  • Trajectory Tracking: A flexible tracking module accepts waypoints (YAML files) or dynamic ROS messages to guide the UAV and UGV. The winch adjusts the tether length in real time based on relative positions to maintain proper slack.

  • Controllers: Independent controllers manage the UAV and UGV movements, enabling customizable dynamics and the integration of new control strategies.

  • Evaluation and Data Recording: An evaluation module logs key metrics, such as ground-truth poses, tether behavior, and trajectory accuracy, facilitating performance analysis and validation.

Architecture Diagram

This modular architecture allows researchers to customize and test various algorithms and components within a controlled simulation environment. For a detailed explanation, refer to the accompanying paper.

Models

  • UAV: Quadrotor with ROS2-compatible position and velocity control.
  • UGV: Holonomic ground vehicle with integrated winch.
  • Tether: Flexible, multi-segmented tether with dynamic length adjustment. Configurable length, mass, and stiffness.

Default parameters (e.g., spring stiffness, damping) can be modified as described here.

Architecture Diagram

Installation

Dependencies

This package has been designed and tested in an x86_64 machine under a Ubuntu 22.04 operating system and ROS2 Humble distribution. The following repositories are required for the implementation of the project:

Build Instructions

  1. Clone this repository into the src directory of your colcon workspace.

  2. clones the required dependencies into the src directory.

  3. Finally compile your workspace using colcon build

(back to top)

Usage

Six scenarios with different features can be set to use the optimizer. S1: Open environment, S2: Narrow/constrained environment, S3: Confined environment, S5: Open environment, S6: Confined environment, S7: Open environment, as shown in the next figure.

scenaries simulation

An extra scenario has been included to replicate the trajectory tracking experiment in a theatre conducted for the Path and Trajectory paper. Uncomment the spawn theatre line in the marsupial_simulation.launch.py file to see the theatre model (This can noticeably slow down the simulation on older hardware.).

theatre simulation

The package has a set of predefined configurations (and completely extendable according to the user's need) that relate to the stage number and initial position number.

Manual control

To launch the marsupial system in manual mode just launch the file launch/marsupial_manual_simulation.launch.py. The control of the ugv can be done using a remote control (default option) or the keyboard. The uav is controlled by the teleop option. To manage the scenario and initial position predefined is recommended to use the parameters for this launch, world and pos_x, pos_y, pos_z. Thus, for example, to use S5 and initial position (3, 1, 0):

  1. Launch of the gazebo environment:
    ros2 launch marsupial_simulator marsupial_manual_simulation.launch.py world:=stage_5.world pos_x:=3 pos_y:=1 pos_z:=0
  2. In order to control the drone it is necessary to send a message for take-off:
    ros2 topic pub /sjtu_drone/takeoff std_msgs/msg/Empty {} --once
  3. Landing message:
    ros2 topic pub /sjtu_drone/land std_msgs/msg/Empty {} --once

Automatic control

To launch the marsupial system in automatic mode just launch the file launch/marsupial_simulation.launch.py. To manage the scenario and initial position predefined is recommended to use the parameters for this launch, world and pos_x, pos_y, pos_z. Thus, for example, to use S5 and initial position (3, 1, 0):

  1. Launch of the gazebo environment:
    ros2 launch marsupial_simulator_ros2 marsupial_simulation.launch.py world:=stage_5.world pos_x:=3 pos_y:=1 pos_z:=0
  2. To start the movement to the defined point:
    ros2 launch marsupial_simulator_ros2 marsupial_to_point.launch.py uav_x:=1.0 uav_y:=2.0 uav_z:=7.0 ugv_x:=5.0 ugv_y:=3.0
  3. To change the destination point during simulation:
    • UGV
      ros2 topic pub /target_position_ugv geometry_msgs/msg/Pose '{position: {x: 3.0, y: 2.0, z: 0.0}, orientation: {x: 0.0, y: 0.0, z: 0.0, w: 1.0}}' --once
    • UAV
      ros2 topic pub /target_position_uav geometry_msgs/msg/Pose '{position: {x: 3.0, y: 2.0, z: 7.0}, orientation: {x: 0.0, y: 0.0, z: 0.0, w: 1.0}}' --once
  4. To record a bag:
    ros2 bag record /sjtu_drone/gt_pose /sjtu_drone/cmd_vel /ugv_gt_pose /forward_velocity_controller/commands /cable_length /target_position_uav /target_position_ugv /tether_positions

Experiments

To replicate the experiments conducted just launch the file launch/marsupial_simulation.launch.py and launch/marsupial_experiment.launch.py. It is recommended to perform the experiments in the predefined scenario to increase the efficiency of the simulator.

  1. Launch of the gazebo environment:
    ros2 launch marsupial_simulator_ros2 marsupial_simulation.launch.py
  2. To start the experiment:
    ros2 launch marsupial_simulator_ros2 marsupial_experiment.launch.py mission:=test1
  3. To record a bag: the bag is recorded automatically

The tests carried out are as follows:

  • Test 1. The UGV is kept static. UAV ascends and descends N times.
  • Test 2. The UAV is kept static. The UGV moves between two points N times.
  • Test 3. UAV and UGV move in opposite directions N times.
  • Test 4. The test performed inside a theatre mentioned in "Path and Trajectory Planning of a Tethered UAV-UGV Marsupial Robotic System" (https://ieeexplore.ieee.org/document/10207830) is replicated. The length of the tether is calculated as a function of the relative distance between the UAV and the UGV. The test is maintained up to the target point 100.
  • Test 5. The test performed inside a theatre is replicated again. In this case, the length of the tether is provided by the test trajectory. The test is maintained up to the target point 100.
theatre simulation

It is possible to modify the self.tether_coef value of the ugv_theter_trajectory_follower.py script to adjust the behaviour of the tether. The test0 is included for this purpose. This parameter should be changed between 0 and 1 until a realistic result is achieved.

(back to top)

Modifying the Tether

By adjusting these parameters, you can simulate different types of tethers and study their behavior under various conditions. The parameters of the tether connecting the UAV and UGV can be customized through a Jinja file. This file allows you to adjust various physical properties of the tether elements to better suit your simulation needs.

How to modify

  1. Open the Jinja file located at models > tether > tether.sdf.jinja.

  2. Adjust the values of the parameters as needed. To increase the size of the tether, it is recommended to focus on increasing the number_elements parameter. This will result in a longer tether composed of more segments.

  3. Save the changes to the Jinja file.

  4. Recompile your workspace if necessary to apply the changes to the simulation.

  5. To implement the changes run:

    python3  ~/marsupial/src/marsupial_simulator_ros2/scripts/jinja_gen.py   ~/marsupial/src/marsupial_simulator_ros2/models/tether/tether.sdf.jinja ~/marsupial/src/marsupial_simulator_ros2/models/tether 

(back to top)

References

J. E. Maese, F. Caballero, and L. Merino, "Physical simulation of Marsupial UAV-UGV Systems Connected by a Hanging Tether using Gazebo"

About

ROS2-Based Gazebo Simulation of Marsupial UAV-UGV Systems Connected by Hanging Tether

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published