Skip to content

coswang1120/airsim_ros_client

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

17 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

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

About

ROS Wrapper in Python for Microsoft AirSim

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • Python 98.7%
  • CMake 1.3%