Skip to content

たまチームの脳死コマンドドキュメントを追加 #85

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 6 commits into
base: main
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
@@ -0,0 +1,112 @@
# 変数の設定
PCとRaspberry Pi Catを有線LANで接続した状態で以下のコマンドを実行
```
export ETHERNET_IP=$(sudo arp-scan -l -I $ET_NIC_NAME | awk 'NR==4{print $1}')
```

# SSHでキャットにつなぐ(有線LAN)
```
source ~/.bashrc
ssh ubuntu@$ETHERNET_IP
```

## USB指し直しが必要

# キャリブレーション
Raspberry Piで実行

[raspimouse2リポジトリのfeat/imu-yaw-estimationブランチ](https://github.com/CIT-Autonomous-Robot-Lab/raspimouse2/tree/feat/imu-yaw-estimation)にあるキャリブレーション用Launchファイルの実行
```
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
```

3 changes: 3 additions & 0 deletions mkdocs.yml
Original file line number Diff line number Diff line change
Expand Up @@ -103,6 +103,9 @@ nav:
- Navigation:
- ナビゲーション: document/real_machine/navigation/navigation.md
- ウェイポイント ナビゲーション: document/real_machine/navigation/waypoint_navigation.md
- TSUKUBA CHALLENGE:
- Brain Death Manual:
- たまチーム: document/real_machine/tsukuba_challenge/brain_death_manual/tama.md

- Repository:
- Raspberry Pi Cat関連のリポジトリ: repository/repository.md
Expand Down