RM simulator made by Living Machine Lab, ShanghaiTech University
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:
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
$ git submodule update --init --recursive
$ cp -R src/rm_simulator/models/robomaster_visualtag_gazebo/models/* ~/.gazebo/models/
$ roscd lms1xx/urdf
$ sudo vim sick_lms1xx.urdf.xacro
Delete \
$ roslaunch rm_simulator ridgeback_robots.launch
$ roslaunch rm_simulator one_rm_robot.launch
$ roslaunch rm_simulator arena.launch
Feel free to take a look at the launch files in rm_simulator
pkg.
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" />
jackal0 is the robot ID, the unit of an angle is radian. Eg.
$ rostopic pub /jackal0/turret_position std_msgs/Float32 "data: 1.0"
rosservice call /start_game "start: true"
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'"
Feel free to dive in! Open an issue or submit PRs.