demos.rst 5.2 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126
  1. .. Copyright 2016 The Cartographer Authors
  2. .. Licensed under the Apache License, Version 2.0 (the "License");
  3. you may not use this file except in compliance with the License.
  4. You may obtain a copy of the License at
  5. .. http://www.apache.org/licenses/LICENSE-2.0
  6. .. Unless required by applicable law or agreed to in writing, software
  7. distributed under the License is distributed on an "AS IS" BASIS,
  8. WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
  9. See the License for the specific language governing permissions and
  10. limitations under the License.
  11. ======================================
  12. Running Cartographer ROS on a demo bag
  13. ======================================
  14. Now that Cartographer and Cartographer's ROS integration are installed, you can
  15. download example bags (e.g. 2D and 3D backpack collections of the
  16. `Deutsches Museum <https://en.wikipedia.org/wiki/Deutsches_Museum>`_) to a
  17. known location, in this case ``~/Downloads``, and use ``roslaunch`` to bring up
  18. the demo.
  19. The launch files will bring up ``roscore`` and ``rviz`` automatically.
  20. .. warning:: When you want to run cartographer_ros, you might need to source your ROS environment by running ``source install_isolated/setup.bash`` first (replace bash with zsh if your shell is zsh)
  21. Deutsches Museum
  22. ================
  23. Download and launch the 2D backpack demo:
  24. .. code-block:: bash
  25. wget -P ~/Downloads https://storage.googleapis.com/cartographer-public-data/bags/backpack_2d/cartographer_paper_deutsches_museum.bag
  26. roslaunch cartographer_ros demo_backpack_2d.launch bag_filename:=${HOME}/Downloads/cartographer_paper_deutsches_museum.bag
  27. Download and launch the 3D backpack demo:
  28. .. code-block:: bash
  29. wget -P ~/Downloads https://storage.googleapis.com/cartographer-public-data/bags/backpack_3d/with_intensities/b3-2016-04-05-14-14-00.bag
  30. roslaunch cartographer_ros demo_backpack_3d.launch bag_filename:=${HOME}/Downloads/b3-2016-04-05-14-14-00.bag
  31. Pure localization
  32. =================
  33. Pure localization uses 2 different bags. The first one is used to generate the map, the second to run pure localization.
  34. Download the 2D bags from the Deutsche Museum:
  35. .. code-block:: bash
  36. wget -P ~/Downloads https://storage.googleapis.com/cartographer-public-data/bags/backpack_2d/b2-2016-04-05-14-44-52.bag
  37. wget -P ~/Downloads https://storage.googleapis.com/cartographer-public-data/bags/backpack_2d/b2-2016-04-27-12-31-41.bag
  38. Generate the map (wait until cartographer_offline_node finishes) and then run pure localization:
  39. .. code-block:: bash
  40. roslaunch cartographer_ros offline_backpack_2d.launch bag_filenames:=${HOME}/Downloads/b2-2016-04-05-14-44-52.bag
  41. roslaunch cartographer_ros demo_backpack_2d_localization.launch \
  42. load_state_filename:=${HOME}/Downloads/b2-2016-04-05-14-44-52.bag.pbstream \
  43. bag_filename:=${HOME}/Downloads/b2-2016-04-27-12-31-41.bag
  44. Download the 3D bags from the Deutsche Museum:
  45. .. code-block:: bash
  46. wget -P ~/Downloads https://storage.googleapis.com/cartographer-public-data/bags/backpack_3d/b3-2016-04-05-13-54-42.bag
  47. wget -P ~/Downloads https://storage.googleapis.com/cartographer-public-data/bags/backpack_3d/b3-2016-04-05-15-52-20.bag
  48. Generate the map (wait until cartographer_offline_node finishes) and then run pure localization:
  49. .. code-block:: bash
  50. roslaunch cartographer_ros offline_backpack_3d.launch bag_filenames:=${HOME}/Downloads/b3-2016-04-05-13-54-42.bag
  51. roslaunch cartographer_ros demo_backpack_3d_localization.launch \
  52. load_state_filename:=${HOME}/Downloads/b3-2016-04-05-13-54-42.bag.pbstream \
  53. bag_filename:=${HOME}/Downloads/b3-2016-04-05-15-52-20.bag
  54. Static landmarks
  55. ================
  56. .. raw:: html
  57. <iframe width="560" height="315" src="https://www.youtube.com/embed/E2-OD-ycivc" frameborder="0" allowfullscreen></iframe>
  58. .. code-block:: bash
  59. # Download the landmarks example bag.
  60. wget -P ~/Downloads https://storage.googleapis.com/cartographer-public-data/bags/mir/landmarks_demo_uncalibrated.bag
  61. # Launch the landmarks demo.
  62. roslaunch cartographer_mir offline_mir_100_rviz.launch bag_filename:=${HOME}/Downloads/landmarks_demo_uncalibrated.bag
  63. Revo LDS
  64. ========
  65. Download and launch an example bag captured from a low-cost Revo Laser Distance Sensor from Neato Robotics vacuum cleaners:
  66. .. code-block:: bash
  67. wget -P ~/Downloads https://storage.googleapis.com/cartographer-public-data/bags/revo_lds/cartographer_paper_revo_lds.bag
  68. roslaunch cartographer_ros demo_revo_lds.launch bag_filename:=${HOME}/Downloads/cartographer_paper_revo_lds.bag
  69. PR2
  70. ===
  71. Download and launch an example bag captured from a PR2 R&D humanoid robot from Willow Garage:
  72. .. code-block:: bash
  73. wget -P ~/Downloads https://storage.googleapis.com/cartographer-public-data/bags/pr2/2011-09-15-08-32-46.bag
  74. roslaunch cartographer_ros demo_pr2.launch bag_filename:=${HOME}/Downloads/2011-09-15-08-32-46.bag
  75. Taurob Tracker
  76. ==============
  77. Download and launch an example bag captured from a Taurob Tracker teleoperation robot:
  78. .. code-block:: bash
  79. wget -P ~/Downloads https://storage.googleapis.com/cartographer-public-data/bags/taurob_tracker/taurob_tracker_simulation.bag
  80. roslaunch cartographer_ros demo_taurob_tracker.launch bag_filename:=${HOME}/Downloads/taurob_tracker_simulation.bag