GithubHelp home page GithubHelp logo

tiers / mrs-uwb-sim Goto Github PK

View Code? Open in Web Editor NEW
14.0 0.0 3.0 5.94 MB

Gazebo simulations for modelling and testing relative UWB-based localization in heterogeneous multi-robot systems.

License: MIT License

CMake 4.49% C++ 47.75% Shell 0.60% Jinja 47.16%

mrs-uwb-sim's Introduction

License: MIT

Multi-robot UGVs+UAVs with UWB | Gazebo Sim

Status
ROS Melodic build badge

Description

Gazebo simulations for relative UWB-based localization. Focus on modeling UWB noise cause by ground and aerial robots in addition to their environment.

The simulator uses ClearPath Husky robots as ground units and PX4 iris quadrotors as aerial units with SITL simulation.

Simulator screenshot

This simulator uses parts of AUVSL / UWB-Jackal-World

Dependencies

This package depends on mavros and husky_gazebo mainly. Install dependencies for ROS Melodic:

sudo apt install ros-melodic-mavros ros-melodic-mavros-extras python-catkin-tools \
    ros-melodic-husky-gazebo python-pip python-dev python3-pip python3-dev \
    libgstreamer-plugins-base1.0-dev gstreamer1.0-plugins-bad gstreamer1.0-plugins-base gstreamer1.0-plugins-good gstreamer1.0-plugins-ugly

    
sudo -H python3 -m pip install empy jinja2 packaging toml numpy jsonschema

Other dependencies

wget https://raw.githubusercontent.com/mavlink/mavros/master/mavros/scripts/install_geographiclib_datasets.sh
sudo bash ./install_geographiclib_datasets.sh

Installation

Create a catkin workspace

mkdir -p ~/mrs_uwb_sim_ws/src
cd mrs_uwb_sim_ws/src

Clone this repository and the tiers_ros_msgs dependency:

git clone [email protected]:TIERS/mrs-uwb-sim.git
git clone https://github.com/TIERS/tiers-ros-msgs

Build it (catkin recommended):

catkin build

Download PX4

To be able to launch aerial units in the simulator, we use PX4 and its SITL simulation.

In your catkin workspace, download the PX4 Autopilot stack and built the sitl simulation files:

cd ~/mrs_uwb_sim_ws
git clone https://github.com/PX4/PX4-Autopilot.git --recursive
cd PX4-Autopilot
DONT_RUN=1 make px4_sitl gazebo

Copy the modified quadrotos sdf file:

mv ~/mrs_uwb_sim_ws/PX4-Autopilot/Tools/sitl_gazebo/models/iris/iris.sdf.jinja ~/mrs_uwb_sim_ws/PX4-Autopilot/Tools/sitl_gazebo/models/iris/iris.sdf.jinja.old
mv ~/mrs_uwb_sim_ws/src/mrs-uwb-sim/models/sdf/iris.sdf.jinja ~/mrs_uwb_sim_ws/PX4-Autopilot/Tools/sitl_gazebo/models/iris/iris.sdf.jinja

Launch simulation

Before launching the simulations, you will need to source PX4 files on top of the devel/setup,bash. A script in this repo does both. Move it to your workspace root and source it:

mv ~/mrs_uwb_sim_ws/src/mrs-uwb-sim/source_all.bash ~/mrs_uwb_sim_ws/source_all.bash
cd ~/mrs_uwb_sim_ws
source source_all.bash

Alternatively, you will need to run the following:

cd PX4-Autopilot
source Tools/setup_gazebo.bash $(pwd) $(pwd)/build/px4_sitl_default
export ROS_PACKAGE_PATH=$ROS_PACKAGE_PATH:$(pwd)
export ROS_PACKAGE_PATH=$ROS_PACKAGE_PATH:$(pwd)/Tools/sitl_gazebo

Now you can directly:

roslaunch mrs_uwb_sim tiers_mrs_px4.launch

To launch only the UWB simulator (for example while running a rosbag recorded with Gazebo):

roslaunch mrs_uwb_sim uwb_sim.launch

UWB Ranging simulation and configuration

The basic parameters defining the position are the following:

  • model_names: list of Gazebo model names where UWB nodes are simulated to be.
  • uwb_nodes: list of UWB nodes per model, including the number, their positions relative to the model position and the names (used for the ranging topic names).
  • uwb_ranges: list of UWB ranges to be calculated and published.

Simulator screenshot

UWB noise simulation

TODO

Add more mobile robots (Husky and PX4 Iris)

  1. Open the launch file in ./launch/tiers_mrs_px4.launch.
  2. Add as many code blocks for the husky and iris vehicles as shown in the image Sampla robots in launch file
  3. Change at least the following configuration parameters:
    • x and y to set the initial position
    • robot_namespace for the Husky spawners (different for each robot), used as the robot's ROS namespace.
    • ID and ns for the Iris spawners (different for each quadrotor), used as the robot's ROS namespace.

License

MIT

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.