For now there are two branches in this repo.
- Main -- the origin agile flight repo (unchanged)
- vitfly -- the vitfly runable code
the same with agile flight and in the main branch.
cd # or wherever you'd like to install this code
export ROS_VERSION=noetic
export CATKIN_WS=./icra22_competition_ws
mkdir -p $CATKIN_WS/src
cd $CATKIN_WS
catkin init
catkin config --extend /opt/ros/$ROS_VERSION
catkin config --merge-devel
catkin config --cmake-args -DCMAKE_BUILD_TYPE=Release -DCMAKE_CXX_FLAGS=-fdiagnostics-color
cd src
git clone git@github.com:LuNa-shi/DroneSimTest.git agile_flight
cd agile_flight
in agile_flight folder
./setup_ros.bash
catkin build
- install anaconda
- (optional) download cuda
- create env
conda create -n vitfly conda activate vitfly- use pip to install requirement packages:matplotlib, numpy, pandas, pytorch, uniplot rospkg pyyaml scipy opencv-python
- maybe you can use this command to to install everything (EXCEPT pytorch)
pip install matplotlib numpy pandas uniplot rospkg pyyaml scipy opencv-python
git checkout vitfly
- /envtest/ros/evaluation_node,run_competition,user_code
- /models (with pretrained models)
- launch_evaluation.bash (most important for automatic)
- open one terminal, enter icra workspace and
source devel/setup.bash, recommand write in .bashrc - run
roslaunch envsim visionenv_sim.launch render:=True gui:=False rviz:=True - this code may fail because unity, try it again when every thing is killed
- when you see two windows(rviz and unity), you succeed
- open another terminal
conda activate vitfly- in the agile_flight folder, run
bash launch_evaluation.bash (N) - N is optional for running loops
- you can check /envtest/ros/train_set for data gathered in the running process.
If you meet some problem, check out notebook for simExperiment, or ask me.
take astar for an example.
git checkout -b astar
revise user_code, run_competition ... copy the launch_evaluation.bash in your branch.
- launch the scene
roslaunch envsim visionenv_sim.launch render:=True gui:=False rviz:=True - enable the drone(4 commands)
rostopic pub /kingfisher/dodgeros_pilot/off std_msgs/Empty "{}" --once
rostopic pub /kingfisher/dodgeros_pilot/reset_sim std_msgs/Empty "{}" --once
rostopic pub /kingfisher/dodgeros_pilot/enable std_msgs/Bool "data: true" --once
rostopic pub /kingfisher/dodgeros_pilot/start std_msgs/Empty "{}" --once
- use your own algorithm