This work is currently under review, and use of this code is permitted but requires citation.
Authors: Alexander Schperberg, Stephanie Tsuei, Stefano Soatto, and Dennis Hong
This is the catkin environment for the SABER project. It contains the SABER repository and XIVO ROS as submodules and the Hector Quadrotor packages as subtrees.
All development on the SABER project can and should be done after cloning this repository.
- Ubuntu 18.04
- ROS Melodic
apt install ros-melodic-desktop-full
- Other ROS Packages/Metapackages (Might be incomplete):
apt install python-rosdep python-rosinstall python-rosinstall-generator python-wstool build-essential
apt install ros-melodic-hardware-interface ros-melodic-controller-interface ros-melodic-gazebo-ros-pkgs ros-melodic-gazebo-ros-control
apt install ros-melodic-slam-gmapping
apt install ros-melodic-turtlebot3
apt install ros-melodic-geographic-msgs
- SABER repository
- XIVO ROS wrapper (requires installation of XIVO)
Clone all repositories (including submodules)
git clone --recursive git@github.com:stephanietsuei/SABER_build.git
Build:
cd /path/to/SABER_build
catkin_make
source devel/setup.bash
Pull changes, including those to submodules:
cd /path/to/SABER_build
git pull --recurse-submodules
cd /path/to/SABER_build/src/SABR/DQN_SABR_PREV/gym-dqnprev
pip install -e .
- From the directory
src/SABER
, use git to add and commit the files:
cd /path/to/SABER_build/src/SABER
git ...
- Leave the submodule and update the reference. The reference does not need to be updated at every single commit.
cd /path/to/SABER_build
git add src/SABER
git commit -m "update reference"
Just pretend the subtree is not actually there and work as usual. :)
Each command in a different terminal, from SABER_build
directory:
roscore
./play1.sh
rosrun sabr_pkg play2.py
- (After Terminal 3 is done)
rosrun sabr_pkg play3.py
Each command in a different terminal, from SABER_build
directory:
roscore
./play_drone.sh
If Gazebo hangs and you see something like this in the terminal:
AttributeError: 'NoneType' object has no attribute 'buff_size'
then you have encountered a race condition error that comes from launching too many nodes at once (or just the right number of nodes at any given time). Here is a way around it:
roscore
rosrun gazebo_ros gazebo world_name:="src/SABER/worlds/world_drone"
roslaunch hector_quadrotor_gazebo/launch/spawn_quadrotor_with_kinect_SABR.launch
cd /path/to/SABER_build/src/SABR/DQN_SABR_PREV/
- for training:
python dqn_main.py
- for testing: `python DQN_test.py'
cd /path/to/SABER_build/src/SABR/DQN_SABR_PREV/
- python rnn.py (note, the RNN code requires the data_collection directory including the collected datasets from SLAM. Collect data first, before running this code).
roscore
./play_uav_ugv.sh
rosrun sabr_pkg SABER.py