From 4d7b49c9ac3df5e809f0ba6a00f224f608932f2e Mon Sep 17 00:00:00 2001 From: YazawaKenichi Date: Mon, 27 Nov 2023 08:00:30 +0900 Subject: [PATCH] =?UTF-8?q?=E3=81=9F=E3=81=BE=E3=83=81=E3=83=BC=E3=83=A0?= =?UTF-8?q?=E3=81=AE=E8=84=B3=E6=AD=BB=E3=82=B3=E3=83=9E=E3=83=B3=E3=83=89?= =?UTF-8?q?=E3=83=89=E3=82=AD=E3=83=A5=E3=83=A1=E3=83=B3=E3=83=88=E3=82=92?= =?UTF-8?q?=E8=BF=BD=E5=8A=A0?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- docs/document/real_machine/dead_brain/tama.md | 103 ++++++++++++++++++ mkdocs.yml | 2 + 2 files changed, 105 insertions(+) create mode 100644 docs/document/real_machine/dead_brain/tama.md diff --git a/docs/document/real_machine/dead_brain/tama.md b/docs/document/real_machine/dead_brain/tama.md new file mode 100644 index 0000000..b176ddd --- /dev/null +++ b/docs/document/real_machine/dead_brain/tama.md @@ -0,0 +1,103 @@ +# SSH でキャットにつなぐ(有線 LAN ) +``` +source ~/.bashrc +ssh ubuntu@$ETHERNET_IP +``` + +## USB 指し直しが必要 + +# キャリブレーション +``` +ros2 launch imu_calibration_data imu_c_data_launch.py +``` + +# マップをとる +Raspberry Piで実行 +``` +ros2 launch raspicat raspicat.launch.py +``` +``` +ros2 service call /motor_power std_srvs/SetBool '{data: true}' +``` +``` +ros2 launch raspicat_bringup teleop.launch.py teleop:=joy +``` +``` +ros2 bag record -a +``` + +## 取得したrosbagをノートPCに移動(PC側)(無線Ver) +``` +sudo scp -r ubuntu@192.168.12.1:~/取ったrosbagのディレクトリ名 ~/ +``` + +#### USBで別のPCに + +# マップ作成(別のPC) +``` +ros2 launch raspicat_slam raspicat_slam_toolbox.launch.py +``` +``` +ros2 bag play -r 1 --clock 100 取ったrosbagのディレクトリ名 +``` +``` +ros2 run nav2_map_server map_saver_cli -f ~/つけたいマップの名前 +``` + +## マップ加工 + +USBでマップをナビゲーションをするPC持って来る + +# 複数マップを使う準備 +ノートPCで実行 +``` +cd ~/raspicat2/src/raspicat_slam_navigation +git switch feat/localization-and-navigation-map +``` + +## マップの保存先 +`~/raspicat2/src/raspicat_slam_navigation/raspicat_slam/config/maps` + +`.yaml` と `.pgm` を一緒に入れる。 + +## 二種類のマップを設定 +`~/raspicat2/src/raspicat_slam_navigation/raspicat_navigation/config/param/nav2.param.yaml` +``` +navigation_map_server: + ros__parameters: + use_sim_time: False + # ↓ を修正(絶対パスで!) + yaml_filename: "/home/USER/raspicat2/src/raspicat_slam_navigation/raspicat_slam/config/maps/NAME.yaml" + +localization_map_server: + ros__parameters: + use_sim_time: False + # ↓ を修正(絶対パスで!) + yaml_filename: "/home/USER/raspicat2/src/raspicat_slam_navigation/raspicat_slam/config/maps/NAME.yaml" +``` + +## ビルド +ノートPCで実行 + +``` +cd ~/raspicat2 +colcon build --packages-select raspicat_description emcl2 raspicat_setup_scripts raspicat_slam raspicat_speak2 raspicat_bringup raspicat_navigation raspicat raspicat_gazebo nav2_waypoint_follower nav2_rviz_plugins nav2_msgs raspimouse_msgs teleop_twist_joy +. install/setup.bash +``` + +# ナビゲーション + +!!! Info + キャリブレーションした??? + +Raspberry Piで実行 +``` +ros2 launch raspicat raspicat.launch.py +``` + +ノートPCで実行 +``` +ros2 service call /motor_power std_srvs/SetBool '{data: true}' +ros2 launch raspicat_navigation raspicat_nav2.launch.py +``` + diff --git a/mkdocs.yml b/mkdocs.yml index 302c5c6..2b5f3ec 100644 --- a/mkdocs.yml +++ b/mkdocs.yml @@ -103,6 +103,8 @@ nav: - Navigation: - ナビゲーション: document/real_machine/navigation/navigation.md - ウェイポイント ナビゲーション: document/real_machine/navigation/waypoint_navigation.md + - Dead Brain: + - たまチーム: document/real_machine/dead_brain/tama.md - Repository: - Raspberry Pi Cat関連のリポジトリ: repository/repository.md