Skip to content

Latest commit

 

History

History
155 lines (114 loc) · 5.42 KB

README.md

File metadata and controls

155 lines (114 loc) · 5.42 KB

ICRA RoboMaster AI Challenge Simulator

Build Status Codacy Badgeplatform License: GPL v3

RM simulator made by Living Machine Lab, ShanghaiTech University

Background

This project is aimed to build a simulator for ICRA RoboMaster AI Challenge. Through the simulator, a lot of Deep Reinforcement Learning algorithms can be tested and train a good policy for the competition. It may also require transfer learning to overcome the gap between sim to real.

This repository contains:

  1. Latest 2020 arena map with RoboMaster Visual Tag.
  2. Robot Model
  3. Compatible with the RoboRTS package.
  4. Multi-agent navigation based on multi-jackle ROS package.
  5. Referee system
    • bunos and supply function.
    • also handle the shooting function(whether the robot shoot the enemy successfully).
  6. Connect gazebo with OpenAi gym framework by openai_ros ROS package.

Preview

Arena

Install

Dependencies

First, install the ROS and the melodic version is recommended (http://wiki.ros.org/melodic/Installation).

$ sudo apt install protobuf-compiler
$ sudo apt install libprotoc-dev
$ sudo apt install ros-melodic-libg2o
$ sudo apt install ros-melodic-controller-manager
$ sudo apt install ros-melodic-realtime-tools 
$ sudo apt install ros-melodic-rosserial-server
$ sudo apt install ros-melodic-serial
$ sudo apt install ros-melodic-robot-localization
$ sudo apt install libgoogle-glog0v5 libgoogle-glog-dev
$ sudo apt install ros-melodic-move-base
$ sudo apt install ros-melodic-interactive-marker-twist-server
$ sudo apt install ros-melodic-gazebo-ros-control
$ sudo apt install ros-melodic-hector-gazebo-plugins
$ sudo apt install ros-melodic-joint-state-controller 
$ sudo apt install ros-melodic-joint-trajectory-controller
$ sudo apt install ros-melodic-lms1xx
$ sudo apt install libarmadillo-dev
$ sudo apt install ros-melodic-map-server

The robot gazebo model contains pointgrey cameras. So it is required to install pointgrey camera driver in your computer. The driver file is named flycapture2-2.11.3.121-amd64-pkg.tgz. Extract this file and run the install script.

$ echo "y\n" | sudo ./install_flycapture_only_simulation.sh

If there is some dependency problem, you may use

$ sudo apt --fix-broken install

Install RoboMaster Visual Tag

$ git submodule update --init --recursive
$ cp -R src/rm_simulator/models/robomaster_visualtag_gazebo/models/* ~/.gazebo/models/

Modify lidar model

$ roscd lms1xx/urdf

$ sudo vim sick_lms1xx.urdf.xacro

Delete <visual> tag (from line 42 to line 48).

Usage

Case1: Launch four robots navigation in a map.

$ roslaunch rm_simulator ridgeback_robots.launch

Case2: Launch one robot navigation in a map.

$ roslaunch rm_simulator one_rm_robot.launch

Case3: Only launch world

$ roslaunch rm_simulator arena.launch

Feel free to take a look at the launch files in rm_simulator pkg.

Config Robot Model

Add or remove camera and turret

if you want to add the camera and turret, modify the arg in the launch file:

<arg name="config" value="our_side" />

<arg name="config" value="enemy_side" />

else:

<arg name="config" value="our_side_no_camera" />

<arg name="config" value="enemy_side_no_camera" />

Func

Rotate the turret.

jackal0 is the robot ID, the unit of an angle is radian. Eg.

$ rostopic pub /jackal0/turret_position std_msgs/Float32 "data: 1.0"

Start new game by call this service.(Not use currently)

rosservice call /start_game "start: true"

Activate the debuff layer(Not use currently)

jackal0 is the robot ID. data's valid input is index from 1 to 6, the index 0 is not used. Eg.

rostopic pub /jackal0/debuff std_msgs/String "data: '0 1 1 0 1 1 1'"

TODO

  1. Run various Gazebo instances
  2. Add stage simulator.

Maintainers

@Yizheng.

Contributing

Feel free to dive in! Open an issue or submit PRs.

Copyright and License

GPL-v3