-
Notifications
You must be signed in to change notification settings - Fork 2
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Feature create raspicat simulation world (#77)
* Fix branch name * Feature create_raspicat_simulation_world
- Loading branch information
Showing
3 changed files
with
65 additions
and
1 deletion.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,7 +1,7 @@ | ||
on: | ||
push: | ||
branches: | ||
- master | ||
- main | ||
jobs: | ||
deploy: | ||
runs-on: ubuntu-latest | ||
|
63 changes: 63 additions & 0 deletions
63
docs/document/simulator/create_raspicat_simulation_world.md
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,63 @@ | ||
## 概要 | ||
地図からGazeboのシミュレータ環境を作成し、Raspberry Pi Catを動かす方法について説明します。 | ||
|
||
## 必要な物 | ||
| Software | Version | | ||
| ---------------- | -------------------------------------------- | | ||
| ノートPC(Dockerインストール済み) | Ubuntu 22.04(ROS 2 Humble) | | ||
|
||
## パッケージのビルド&インストール | ||
|
||
```sh | ||
mkdir -p raspicat_map2gazebo_ws/src && cd raspicat_map2gazebo_ws | ||
git clone https://github.com/CIT-Autonomous-Robot-Lab/raspicat_map2gazebo.git src/raspicat_map2gazebo | ||
vcs import src < src/raspicat_map2gazebo/raspicat_map2gazebo.repos --debug | ||
rosdep update | ||
rosdep install -y --from-paths src --ignore-src --rosdistro $ROS_DISTRO | ||
colcon build --symlink-install | ||
source $HOME/.bashrc | ||
``` | ||
|
||
## シミュレータ環境の作成 | ||
`map_yaml`、`map_pgm`、`config_dir`は、絶対パスを入力してください。 | ||
`world_name`、`author_name`、`email`は、任意の名前を入力してください。 | ||
|
||
``` | ||
ros2 launch raspicat_map2gazebo map2gazebo.launch.xml \ | ||
map_yaml:=$(ros2 pkg prefix --share raspicat_map2gazebo)/config/map/map_tsudanuma_2_19.yaml \ | ||
map_pgm:=$(ros2 pkg prefix --share raspicat_map2gazebo)/config/map/map_tsudanuma_2_19.pgm \ | ||
config_dir:=$(ros2 pkg prefix --share raspicat_map2gazebo)/config \ | ||
world_name:=tsudanuma_2_19 \ | ||
author_name:=hoge \ | ||
email:=hoge.com | ||
``` | ||
|
||
## シミュレータ環境のチェック | ||
**シミュレータ環境の作成**で入力した同じ`world_name`を入力してください。 | ||
生成したモデルを読み込むために`colcon build`を実行する必要があります。 | ||
``` | ||
cd raspicat_map2gazebo_ws | ||
colcon build --symlink-install | ||
ros2 launch raspicat_map2gazebo check_gazebo_world.launch.xml \ | ||
world_name:=tsudanuma_2_19 | ||
``` | ||
|
||
[![Image from Gyazo](https://i.gyazo.com/e63309d74a689ba7f740d74e3c03d436.png)](https://gyazo.com/e63309d74a689ba7f740d74e3c03d436) | ||
|
||
## シミュレータ環境の実行 | ||
* 環境の立ち上げ | ||
``` | ||
cd raspicat_map2gazebo_ws | ||
colcon build --symlink-install | ||
ros2 launch raspicat_map2gazebo raspicat_tsudanuma_2_19_world.launch \ | ||
x_pose:=0.0 \ | ||
y_pose:=0.0 | ||
``` | ||
|
||
* ジョイスティックコントローラ操作 | ||
``` | ||
ros2 service call /motor_power std_srvs/SetBool '{data: true}' | ||
ros2 launch raspicat_bringup teleop.launch.py teleop:=joy | ||
``` | ||
|
||
[![Image from Gyazo](https://i.gyazo.com/ee6f2b936329faaac3a8cc28f169c10e.png)](https://gyazo.com/ee6f2b936329faaac3a8cc28f169c10e) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters