Giter VIP home page Giter VIP logo

waypoint_viewer's Introduction

navigation_manager

navigation2に対して、waypointを投げたり、特定の位置で停止したり、速度を指示したりします。

ビルド

依存パッケージとして以下のモジュールをインストールします。 pip install pynput

動作確認のため以下のパッケージをインストールします。

コードをワークスペースにクローンし、colcon build してください。

$ cd your/colcon_workspace/src
$ git clone https://github.com/CuboRex-Development/simple_commander_for_foxy.git
$ cd ../..
$ colcon build --symlink-install

Waypointの読み込み

waypointsディレクトリに'waypoint.csv'があるとcolcon build時に実行ディレクトリcolcon_ws/install/pkgs/shareにコピーされ読み込むことができます。 複数のWaypointを登録しておき、連続してNav2に対してWaypointを出力し続けます。 csvファイルの出力形式は以下のとおりです。 https://github.com/CuboRex-Development/simple_commander_for_foxy/blob/a68ba9bb90b2a786f25809ea7344bd2c528d50ac/waypoints/waypoints.csv#L1-L4

waypointはlaunchファイルで指定できます。
場所はsimple_commander_for_foxy/waypoints内に保存して、必ずcolcon buildしてください。ファイルがコピーされて読み込めるようになります。(まだシンボリックリンクではありません)
https://github.com/CuboRex-Development/simple_commander_for_foxy/blob/a68ba9bb90b2a786f25809ea7344bd2c528d50ac/launch/simple_commander_launch.py#L6-L8 'waypoint_flle'の名前を変更してcolcon buildをしてからlaunch.pyを実行してください。

実行

シミュレーション環境とNavigation2を起動します。実環境のロボットに使用する場合は不要です。

端末1

$ ros2 launch turtlebot3_gazebo turtlebot3_world.launch.py

端末2

$ ros2 launch turtlebot3_navigation2 navigation2.launch.py

端末3

推奨

$ ros2 launch navigation_manager navigation_manager_launch.py

デフォルト設定での起動

$ ros2 run navigation_manager navigation_manager

シミュレーション環境内で巡回を開始します。 Screenshot from 2023-10-04 10-06-28

設定できるフラグ

停止フラグ

csvの10列目のstop_flagを1に設定すると、そのwaypointに到着したあと、nキーが押されるまで次のwaypointを送信しません。人の指示があるまでその場で待ち続けます。 写真

スキップフラグ

csvの11列目のskip_flagを0に設定すると、そのwaypointに到着せずAbortした場合でも、その次のwaypointを目指さず、同じwaypointを目指します。 写真

waypoint_viewer's People

Contributors

abudori3939 avatar emiraykin avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.