RoboticaUtnFrba/create_autonomyのリポジトリにおいてルンバのROS1のgazebo環境が提供されていたが、ROS2はサポートされていないため、代替としてturtlebot3のシミュレーション環境を使用する。
- DockerDesktopをインストールする。
- Tiryoh氏のdocker-ros2-desktop-vnc のQuick Startに従ってUbuntu Desktop + ROS2 Humble環境を起動する。
- 以下のパッケージをインストールする
sudo apt update sudo apt -y install ros-humble-gazebo-ros-pkgs sudo apt -y install ros-humble-dynamixel-sdk sudo apt -y install ros-humble-turtlebot3-msgs sudo apt -y install ros-humble-turtlebot3
- turtlebot3のシミュレーション環境を設定する。
mkdir -p ~/colcon_ws/src cd ~/colcon_ws/src/ git clone -b humble-devel https://github.com/ROBOTIS-GIT/turtlebot3_simulations.git cd ~/colcon_ws && colcon build --symlink-install
- bashrcを設定する。
echo "source ~/colcon_ws/install/local_setup.bash" >> ~/.bashrc echo "export TURTLEBOT3_MODEL=burger" >> ~/.bashrc source ~/.bashrc
- 新たにターミナルを起動して以下のコマンドを入力する。
ros2 launch turtlebot3_gazebo empty_world.launch.py
- もう一つターミナルを起動(右クリックで画面分割ができる)して以下のコマンドを入力する。
ros2 run turtlebot3_teleop teleop_keyboard
- キーボードでシミュレータのturtlebot(Roomba)がコントロールできることを確認する。
Robotis e-manual turtlebot3
https://emanual.robotis.com/docs/en/platform/turtlebot3/overview/
RoboticaUtnFrba/create_autonomy
https://github.com/RoboticaUtnFrba/create_autonomy