《Learning High-Speed Flight in the Wild》代码学习记录

Git: https://github.com/uzh-rpg/agile_autonomy
论文: Learning High-Speed Flight in the Wild

训练自己的网络+测试

  1. 收集数据集

打开一个终端运行下列程序

cd agile_autonomy_ws
source catkin_aa/devel/setup.bash
roslaunch agile_autonomy simulation.launch

打开另外一个终端运行

cd agile_autonomy_ws
source catkin_aa/devel/setup.bash
conda activate tf_24
python dagger_training.py --settings_file=config/dagger_settings.yaml

程序会多次进行仿真并将参考轨迹(reference_trajectory.csv)、点云信息(pointcloud-unity.ply)、测试过程中飞机各个位置的飞行姿态(odometry.csv)、全局规划后的轨迹(ellipsoid_trajectory.csv),飞行过程中相机收集的图像(img)、优化后的轨迹(trajectories)存储到/planner_learning/data/train文件中,该部分会作为B部分网络的各个输入。

《Learning High-Speed Flight in the Wild》代码学习记录_第1张图片

      2.训练自己的网络

在/planner_learning/data文件夹中将刚刚训练收集的数据集分成两个部分 train(训练集)、val(测试集)

《Learning High-Speed Flight in the Wild》代码学习记录_第2张图片

运行下列代码进行训练

cd agile_autonomy_ws
source catkin_aa/devel/setup.bash
conda activate tf_24
python train.py --settings_file=config/train_settings.yaml

相关的一些可配置的选项

(1)学习率

plan_learner.py中

《Learning High-Speed Flight in the Wild》代码学习记录_第3张图片

 

(2)模型存储路径

train_settings.yaml中log_dir

(3)训练次数

train_settings.yaml中max_training_epochs

(4)train_settings.yaml中batch_size

训练结果:

《Learning High-Speed Flight in the Wild》代码学习记录_第4张图片

《Learning High-Speed Flight in the Wild》代码学习记录_第5张图片

         3.测试训练好的网络

选择一个训练好的模型存放到models文件夹下,并更改test_settings.yaml文件中resume_file参数

运行

python test_trajectories.py --settings_file=config/test_settings.yaml

对网络进行测试

测试结果:

《Learning High-Speed Flight in the Wild》代码学习记录_第6张图片

 《Learning High-Speed Flight in the Wild》代码学习记录_第7张图片

 

你可能感兴趣的:(学习)