本プロジェクトでは、ROS・Gazebo環境でのロボット走行データ収集、深層学習モデルによる学習・評価を行います。
- 目的:目標経路上にロボットを配置して、画像と角速度を取得
- 保存先:
img/
:画像(命名例:lane{lane}_{img_type}_{save_img_no}.jpg
)ang/
:角速度
- 実行コマンド:
roslaunch nav_cloning nav_cloning_sim.launch script:=set_collect.py use_waypoint_nav:=false use_cmd_vel:=false
-
目的:3カメラまたは9カメラを使って走行中にデータ取得
-
実行コマンド(例:3カメラ):
roslaunch nav_cloning nav_cloning_sim.launch script:=run_collect_3cam.py use_waypoint_nav:=true
※ 9cam版はスクリプト名を変更して使用してください。
学習用スクリプト内で以下の変数を適切に設定してください:
self.pro
:使用するデータフォルダ名self.data
:データ数(例:616)
roscd nav_cloning/sh
./learning.sh
roscd nav_cloning/sh
./learning_run_3cam.sh
roscd nav_cloning/sh
./model_test
roslaunch nav_cloning nav_cloning_sim.launch script:=model_test.py use_waypoint_nav:=true use_cmd_vel:=false model_num:=1
経路周辺に移動するためのpath.csvがない場合、以下で作成
roslaunch nav_cloning nav_cloning_sim.launch script:=path_collector.py
経路復帰性能を評価
roscd nav_cloning/sh
./path_recovery_evaluator.sh
※ 上記コマンドにより、経路から逸脱した際の復帰挙動も確認可能
-
環境 ubuntu20.04, ros noetic
-
ワークスペースの用意
mkdir -p ~/catkin_ws/src
cd ~/catkin_ws/src
catkin_init_workspace
cd ../
catkin build
- nav_cloningの用意
cd ~/catkin_ws/src
wget https://raw.githubusercontent.com/KOYAMA-Yuya/nav_cloning_offline/master/nav_cloning.install
wstool init
wstool merge nav_cloning.install
wstool up
- 依存パッケージのインストール
cd ~/catkin_ws/src
rosdep init
rosdep install --from-paths . --ignore-src --rosdistro $ROS_DISTRO -y
cd ../
catkin build
- 共通
pip3 install scikit-image
pip3 install tensorboard
- <CPU のみ>
pip3 install torch torchvision torchaudio --extra-index-url https://download.pytorch.org/whl/cpu
- <GPU 使用>使用しているデバイスを確認し,セットアップします
- nvidia driver
- CUDA
- cuDNN その後インストールしたCUDAのバージョンに対応したPytorchのバージョンを下記からダウンロードします https://pytorch.org/get-started/locally/
作成次第追加