LoginSignup
0
0

More than 1 year has passed since last update.

備忘録 navigation2 シミュレーションの環境構築

Last updated at Posted at 2023-05-02

環境

 ROS 2
 Ubuntu 22.0.4

これ通り

自分の場合

ROS 2 Humble、navigation2を環境構築済みのため、実行方法を以下の通りに変更

export GAZEBO_MODEL_PATH=$GAZEBO_MODEL_PATH:/opt/ros/humble/share/turtlebot3_gazebo/models
export TURTLEBOT3_MODEL=waffle
ros2 launch nav2_bringup bringup_launch.py use_sim_time:=True map:=/opt/ros/humble/share/nav2_bringup/maps/turtlebot3_world.yaml default_bt_xml_filename:=$HOME/ubuntu/btdata/sample.xml
ros2 run nav2_test_utils clicked_point_to_pose
ros2 run rviz2 rviz2 -d $(ros2 pkg prefix nav2_bringup)/share/nav2_bringup/rviz/nav2_default_view.rviz

今後webアプリから動かせるように

ROS Bridgeのインストール

sudo apt-get install ros-<distro>-rosbridge-server

部は自分のROS ディストリビューションに合わせる
(例)

sudo apt-get install ros-humble-rosbridge-server

ROS Brigdgeの実行

ros2 launch rosbridge_server rosbridge_websocket_launch.xml

webブラウザから以下にアクセス
http://localhost:9090

0
0
0

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
0
0