Code Monkey home page Code Monkey logo

robomaster-simulator's Introduction

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

robomaster-simulator's People

Contributors

privilger avatar lydiarong avatar hezip avatar zhuwangshu avatar jhuizhu avatar imgbotapp avatar

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.