=================================================================
All Code in this repository - unless otherwise stated in local license or code headers is
Copyright 2021 Max Planck Institute for Intelligent Systems
Licensed under the terms of the GNU General Public Licence (GPL) v3 or higher. See: https://www.gnu.org/licenses/gpl-3.0.en.html
- /RL -- RL agent related files.
- /blimp_env -- training environment of the RL agent.
- /path_planner -- waypoints assignment.
see: https://github.com/Ootang2019/airship_simulation/tree/abcdrl
This step enables ROS control on the firmware.
- In the firts terminal starts the firmware
cd ~/catkin_ws/src/airship_simulation/LibrePilot
./build/firmware/fw_simposix/fw_simposix.elf 0
- Start the GCS in the second terminal
cd ~/catkin_ws/src/airship_simulation/LibrePilot
./build/librepilot-gcs_release/bin/librepilot-gcs
- In "Tools" tab (top) --> "options" --> "Environment" --> "General" --> check "Expert Mode" --> restart
- Select "Connections" (bottom right) --> UDP: localhost --> Click "Connect"
- "Configuration" tab (bottom) --> "Input" tab (left) --> "Arming Setting" --> Change "Always Armed" to "Always Disarmed" --> Click "Apply"
- "HITL" tab --> click "Start" --> check "GCS Control". This will disarm the firmware and allow to save the configuration
- "Configuration" tab --> "Input" tab (left) --> "Flight Mode Switch Settings" --> Change "Flight Mode"/"Pos. 1" from "Manual" to "ROSControlled"
- "Configuration" tab --> "Input" tab (left) --> "Arming Setting" --> Change "Always Disarmed" to "Always Armed" --> Click "Save" --> Click "Apply"
- Confirm the change by restarting firmware, connecting via gcs, and checking if "Flight Mode"/"Pos. 1" is "ROSControlled"
In the same catkin_ws as airship_simulation:
- setup bimp_env
cd ~/catkin_ws/src
git init
git remote add origin https://github.com/robot-perception-group/robust_deep_residual_blimp.git
git fetch origin
git checkout origin/master -f
cd ~/catkin_ws/src/AutonomousBlimpDRL/blimp_env
pip install .
- setup RL agent
cd ~/catkin_ws/src/AutonomousBlimpDRL/RL
pip install .
- compile ROS packages
cd ~/catkin_ws
catkin_make
source ~/catkin_ws/devel/setup.bash
- (optional) export path to .bashrc
Sometimes it is not able to find the package because of the setuptools versions. In this case, we have to manually setup the environment path.
echo 'export PYTHONPATH=$PYTHONPATH:$HOME/catkin_ws/src/AutonomousBlimpDRL/blimp_env/:$HOME/catkin_ws/src/AutonomousBlimpDRL/RL/' >> ~/.bashrc
source ~/.bashrc
Open file in ~/catkin_ws/src/AutonomousBlimpDRL/RL/rl/rlyang_script/main.py, set PID to True if training with the PID controller, else set it to False.
One agent will be trained for one day. In terminal, start the training progress
python3 ~/catkin_ws/src/AutonomousBlimpDRL/RL/rl/rlyang_script/main.py
Viualize (Blimp Simulator)
- Gazebo. In new terminal, start gzcilent
gzcilent
- rviz. In new terminal, start rviz and load a configured rviz flie
rosrun rviz rviz -d ~/catkin_ws/src/AutonomousBlimpDRL/blimp_env/blimp_env/envs/rviz/planar_goal_env.rviz
To close the simulation
. ~/catkin_ws/src/AutonomousBlimpDRL/blimp_env/blimp_env/envs/script/cleanup.sh
python3 ~/catkin_ws/src/AutonomousBlimpDRL/RL/rl/rlyang_script/test.py
First start 8 TurtleSim simulators
roslaunch turtlebot multi.launch
Open a new terminal. Then train 12 agents using 3 seeds per group (group 1: PID, q=0; group 2: Hinf, q=0; group 3: PID, q ~ Normal(0, 1); group 4: Hinf, q ~ Normal(0, 1).)
python3 ~/catkin_ws/src/turtlebot/scripts/RL.py
python3 ~/catkin_ws/src/turtlebot/scripts/test.py
@ARTICLE{2022arXiv220305360T,
author = {{Tang Liu}, Yu and {Price}, Eric and {Black}, Michael J. and {Ahmad}, Aamir},
title = "{Deep Residual Reinforcement Learning based Autonomous Blimp Control}",
journal = {arXiv e-prints},
year = 2022,
}
previous work (git branch v1.0)
@article{Liu2021ABCDRL,
title={Autonomous Blimp Control using Deep Reinforcement Learning},
author={Yu Tang Liu, Eric Price, Pascal Goldschmid, Michael J. Black, Aamir Ahmad},
journal={arXiv preprint arXiv:2109.10719},
year={2021}
}