Skip to content

Latest commit

 

History

History
117 lines (73 loc) · 3.66 KB

README.md

File metadata and controls

117 lines (73 loc) · 3.66 KB

airsim_ros_client

Overview

This repository is meant to integrate ROS and AirSim plugin using the python APIs available for the simulator.

The airsim_ros_client package has been tested under ROS Kinetic and Ubuntu 16.04LTS. The source code is released under MIT License.

The mesh of DJI M-100 was downloaded from DJI website (link). DJI reserves all rights to this material.

Installation

Dependencies

Install the python depenencies:

# AirSim APIs
pip install airsim

Building

  • To build from source, clone the latest version from this repository into your catkin workspace
mkdir -p ~/catkin_ws/src
cd ~/catkin_ws/src
git clone https://github.com/Mayankm96/airsim_ros_client.git
  • To compile the package:
cd ~/catkin_ws
catkin_make
source devel/setup.bash

Running AirSim in Unreal Engine

Before running the nodes in the package, you need to run Airsim plugin in the Unreal Engine. In case you are unfamiliar on how to do so, refer to the tutorials available here.

A sample settings.json file used to run the simulator with the ROS package is available here. Copy it to the ~/Documents/AirSim directory to use the package without any further modifications.

Usage

Running the tf publisher of drone model (DJI M100)

To use the urdf model of the drone used in AirSim simulator, then run:

roslaunch airsim_ros_client publish_tf.launch

NOTE: In the modified blueprint of the drone for UE4, all cameras are downward-facing.

Running image publisher

Change the IP and Port configurations in pubImages.launch to match the settings in which Airsim is running. Then:

roslaunch airsim_ros_client pubImages.launch

Nodes

airsim_img_publisher

This is a client node at (img_publisher.py) interfaces with the AirSim plugin to retrieve the drone's pose and camera images (rgb, depth).

Published Topics

Parameters

  • Camera parameters: Fx, Fy, cx, cz, width, height
  • Publishing frequency: loop_rate

airsim_follow_trajectory

This is a client node at (follow_trajectory.py) interfaces with the AirSim plugin to follow a trajectory.

Subscribed Topics

Parameters

  • Velocity: velocity