going_further.rst 3.6 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980
  1. .. Copyright 2018 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. Going further
  13. =============
  14. Cartographer is not only a great SLAM algorithm, it also comes with a fully-featured implementation that brings lots of "extra" features.
  15. This page lists some of those less known functionalities.
  16. More input
  17. ==========
  18. If you have a source of odometry (such as a wheel encoder) publishing on a ``nav_msgs/Odometry`` topic and want to use it to improve Cartographer's localization, you can add an input to your ``.lua`` configuration files:
  19. .. code-block:: lua
  20. use_odometry = true
  21. The messages will be expected on the ``odom`` topic.
  22. A GPS publishing on a ``sensor_msgs/NavSatFix`` topic named ``fix`` can improve the global SLAM:
  23. .. code-block:: lua
  24. use_nav_sat = true
  25. For landmarks publishing on a ``cartographer_ros_msgs/LandmarkList`` (`message defined in cartographer_ros`_) topic named ``landmark``:
  26. .. code-block:: lua
  27. use_landmarks = true
  28. .. _message defined in cartographer_ros: https://github.com/googlecartographer/cartographer_ros/blob/4b39ee68c7a4d518bf8d01a509331e2bc1f514a0/cartographer_ros_msgs/msg/LandmarkList.msg
  29. Localization only
  30. =================
  31. If you have a map you are happy with and want to reduce computations, you can use the localization-only mode of Cartographer which will run SLAM against the existing map and won't build a new one.
  32. This is enabled by running ``cartographer_node`` with a ``-load_state_filename`` argument and by defining the following line in your lua config:
  33. .. code-block:: lua
  34. TRAJECTORY_BUILDER.pure_localization_trimmer = {
  35. max_submaps_to_keep = 3,
  36. }
  37. IMU Calibration
  38. ===============
  39. When performing the global optimization, Ceres tries to improve the pose between your IMU and range finding sensors.
  40. A well chosen acquisition with lots of loop closure constraints (for instance if your robot goes on a straight line and then back) can improve the quality of those corrections and become a reliable source of pose correction.
  41. You can then use Cartographer as part of your calibration process to improve the quality of your robot's extrinsic calibration.
  42. Multi-trajectories SLAM
  43. =======================
  44. Cartographer can perform SLAM from multiple robots emiting data in parallel.
  45. The global SLAM is able to detect shared paths and will merge the maps built by the different robots as soon as it becomes possible.
  46. This is achieved through the usage of two ROS services ``start_trajectory`` and ``finish_trajectory``. (refer to the ROS API reference documentation for more details on their usage)
  47. Cloud integration with gRPC
  48. ===========================
  49. Cartographer is built around Protobuf messages which make it very flexible and interoperable.
  50. One of the advantages of that architecture is that it is easy to distribute on machines spread over the Internet.
  51. The typical use case would be a fleet of robots navigating on a known map, they could have their SLAM algorithm run on a remote powerful centralized localization server running a multi-trajectories Cartographer instance.
  52. **TODO**: Instructions on how to get started with a gRPC Cartographer instance