Skip to content

Commit

Permalink
[skip ci] publish latest
Browse files Browse the repository at this point in the history
Signed-off-by: navigation2-ci <[email protected]>
  • Loading branch information
navigation2-ci committed May 17, 2024
1 parent a5ed524 commit 20a965b
Show file tree
Hide file tree
Showing 3 changed files with 15 additions and 13 deletions.
13 changes: 7 additions & 6 deletions _sources/tutorials/docs/navigation2_with_gps.rst.txt
Original file line number Diff line number Diff line change
Expand Up @@ -30,10 +30,11 @@ It is assumed ROS2 and Nav2 dependent packages are installed or built locally. A

.. code-block:: bash
sudo apt install ros-<ros2-distro>-robot-localization
sudo apt install ros-<ros2-distro>-mapviz
sudo apt install ros-<ros2-distro>-mapviz-plugins
sudo apt install ros-<ros2-distro>-tile-map
source /opt/ros/<ros2-distro>/setup.bash
sudo apt install ros-$ROS_DISTRO-robot-localization
sudo apt install ros-$ROS_DISTRO-mapviz
sudo apt install ros-$ROS_DISTRO-mapviz-plugins
sudo apt install ros-$ROS_DISTRO-tile-map
The code for this tutorial is hosted on `nav2_gps_waypoint_follower_demo <https://github.com/ros-planning/navigation2_tutorials/tree/master/nav2_gps_waypoint_follower_demo>`_. Though we will go through the most important steps of the setup, it's highly recommended that you clone and build the package when setting up your dev environment.

Expand Down Expand Up @@ -66,7 +67,7 @@ To cope with this, geodesy proposes several planar projection systems for locali

In the real world GPS sensors can be noisy: With standalone GPSs you should expect accuracies of 1-2 meters under excellent conditions and up to 10 meters, and frequent jumps in the position as the GPS sensor picks up less or more satellites, which can degrade the quality of navigation significantly. Several positioning augmentation technologies exists to reduce the error of GPS measurements, one of the most common ones is called `RTK <https://en.wikipedia.org/wiki/Real-time_kinematic_positioning>`_ (Real Time Kinematic Positioning), which can bring the accuracy of receivers down to 1cm. If accuracy matters in your application this technology is highly recommended; though this requires the deployment of a second fixed GPS called base, most of the US and Europe are already covered with public free to use bases that you can connect to. You can read more about RTK and how to get started `here <https://learn.sparkfun.com/tutorials/setting-up-a-rover-base-rtk-system>`_. In this tutorial we assume the robot's GPS produces an accurate and smooth estimation of the robot's position.

Additionally, to fully describe a robot's localization we need to know its heading as well, however standalone GPS sensors do not provide orientation measurements, only position measurements. In this tutorial we will refer as 'absolute heading' to a yaw measurement which is given w.r.t. a cardinal direction (e.g, the east), in contrast to relative heading, which is given w.r.t. the angle the robot is turned on or any other reference that cannot be directly mapped to a cardinal direction.
Additionally, to fully describe a robot's localization we need to know its heading as well, however standalone GPS sensors do not provide orientation measurements, only position measurements. In this tutorial we will refer to 'absolute heading' as a yaw measurement which is given w.r.t. a cardinal direction (e.g, the east), in contrast to relative heading, which is given w.r.t. the angle the robot is turned on or any other reference that cannot be directly mapped to a cardinal direction.

When using robot_localization with GPS, measuring absolute orientation is mandatory. There are several strategies for getting absolute orientation data, like IMUs with magnetometers, dual GPS systems or matching techniques over a known map; in this tutorial we assume the robot is equipped with an IMU that can accurately measure absolute orientation following the ENU convention, meaning it will output zero yaw when facing east and +90 degrees when facing north.

Expand All @@ -88,7 +89,7 @@ Tutorial Steps
0- Setup Gazebo World
---------------------

To navigate using GPS we first need to create an outdoors Gazebo world with a robot having a GPS sensor to setup for navigation. For this tutorial we will be using the `Sonoma Raceway <https://dev.px4.io/v1.11_noredirect/en/simulation/gazebo_worlds.html#sonoma-raceway>`_ because its aligned with the real location. A sample world has been setup `here <https://github.com/ros-planning/navigation2_tutorials/tree/master/nav2_gps_waypoint_follower_demo/worlds/sonoma_raceway.world>`_ using gazebo's spherical coordinates plugin, which creates a local tangent plane centered in the set geographic origin and provides latitude, longitude and altitude coordinates for each point in the world:
To navigate using GPS we first need to create an outdoors Gazebo world with a robot having a GPS sensor to setup for navigation. For this tutorial we will be using the `Sonoma Raceway <https://docs.px4.io/v1.12/en/simulation/gazebo_worlds.html#sonoma-raceway>`_ because its aligned with the real location. A sample world has been setup `here <https://github.com/ros-planning/navigation2_tutorials/tree/master/nav2_gps_waypoint_follower_demo/worlds/sonoma_raceway.world>`_ using gazebo's spherical coordinates plugin, which creates a local tangent plane centered in the set geographic origin and provides latitude, longitude and altitude coordinates for each point in the world:

.. code-block:: xml
Expand Down
2 changes: 1 addition & 1 deletion searchindex.js

Large diffs are not rendered by default.

13 changes: 7 additions & 6 deletions tutorials/docs/navigation2_with_gps.html
Original file line number Diff line number Diff line change
Expand Up @@ -1075,10 +1075,11 @@ <h2>Overview<a class="headerlink" href="#overview" title="Permalink to this head
<h2>Requirements<a class="headerlink" href="#requirements" title="Permalink to this headline"></a></h2>
<p>It is assumed ROS2 and Nav2 dependent packages are installed or built locally. Additionally you will have to install robot_localization and mapviz:</p>
<blockquote>
<div><div class="highlight-bash notranslate"><div class="highlight"><pre><span></span>sudo<span class="w"> </span>apt<span class="w"> </span>install<span class="w"> </span>ros-&lt;ros2-distro&gt;-robot-localization
sudo<span class="w"> </span>apt<span class="w"> </span>install<span class="w"> </span>ros-&lt;ros2-distro&gt;-mapviz
sudo<span class="w"> </span>apt<span class="w"> </span>install<span class="w"> </span>ros-&lt;ros2-distro&gt;-mapviz-plugins
sudo<span class="w"> </span>apt<span class="w"> </span>install<span class="w"> </span>ros-&lt;ros2-distro&gt;-tile-map
<div><div class="highlight-bash notranslate"><div class="highlight"><pre><span></span><span class="nb">source</span><span class="w"> </span>/opt/ros/&lt;ros2-distro&gt;/setup.bash
sudo<span class="w"> </span>apt<span class="w"> </span>install<span class="w"> </span>ros-<span class="nv">$ROS_DISTRO</span>-robot-localization
sudo<span class="w"> </span>apt<span class="w"> </span>install<span class="w"> </span>ros-<span class="nv">$ROS_DISTRO</span>-mapviz
sudo<span class="w"> </span>apt<span class="w"> </span>install<span class="w"> </span>ros-<span class="nv">$ROS_DISTRO</span>-mapviz-plugins
sudo<span class="w"> </span>apt<span class="w"> </span>install<span class="w"> </span>ros-<span class="nv">$ROS_DISTRO</span>-tile-map
</pre></div>
</div>
</div></blockquote>
Expand All @@ -1098,7 +1099,7 @@ <h2>GPS Localization Overview<a class="headerlink" href="#gps-localization-overv
<a class="reference internal image-reference" href="../../_images/South-America-UTM-zones.png"><img alt="UTM grid zones in South America" class="align-center" src="../../_images/South-America-UTM-zones.png" style="width: 520px;" /></a>
<p><a class="reference external" href="http://docs.ros.org/en/noetic/api/robot_localization/html/index.html">robot_localization</a> uses this projection system to transform GPS measurements in the WGS84 reference system to a cartesian system, which centered on the origin of the grid zone where the GPS is at. This is achieved through the <a class="reference external" href="http://docs.ros.org/en/jade/api/robot_localization/html/navsat_transform_node.html">navsat_transform node</a>. This node complies with the ENU convention in <a class="reference external" href="https://www.ros.org/reps/rep-0103.html">REP 103</a>, meaning that the <code class="docutils literal notranslate"><span class="pre">+x</span></code> axis of the <code class="docutils literal notranslate"><span class="pre">utm</span></code> coordinate system faces east, the <code class="docutils literal notranslate"><span class="pre">+y</span></code> faces north and the <code class="docutils literal notranslate"><span class="pre">+z</span></code> axis points up.</p>
<p>In the real world GPS sensors can be noisy: With standalone GPSs you should expect accuracies of 1-2 meters under excellent conditions and up to 10 meters, and frequent jumps in the position as the GPS sensor picks up less or more satellites, which can degrade the quality of navigation significantly. Several positioning augmentation technologies exists to reduce the error of GPS measurements, one of the most common ones is called <a class="reference external" href="https://en.wikipedia.org/wiki/Real-time_kinematic_positioning">RTK</a> (Real Time Kinematic Positioning), which can bring the accuracy of receivers down to 1cm. If accuracy matters in your application this technology is highly recommended; though this requires the deployment of a second fixed GPS called base, most of the US and Europe are already covered with public free to use bases that you can connect to. You can read more about RTK and how to get started <a class="reference external" href="https://learn.sparkfun.com/tutorials/setting-up-a-rover-base-rtk-system">here</a>. In this tutorial we assume the robot’s GPS produces an accurate and smooth estimation of the robot’s position.</p>
<p>Additionally, to fully describe a robot’s localization we need to know its heading as well, however standalone GPS sensors do not provide orientation measurements, only position measurements. In this tutorial we will refer as ‘absolute heading’ to a yaw measurement which is given w.r.t. a cardinal direction (e.g, the east), in contrast to relative heading, which is given w.r.t. the angle the robot is turned on or any other reference that cannot be directly mapped to a cardinal direction.</p>
<p>Additionally, to fully describe a robot’s localization we need to know its heading as well, however standalone GPS sensors do not provide orientation measurements, only position measurements. In this tutorial we will refer to ‘absolute heading’ as a yaw measurement which is given w.r.t. a cardinal direction (e.g, the east), in contrast to relative heading, which is given w.r.t. the angle the robot is turned on or any other reference that cannot be directly mapped to a cardinal direction.</p>
<p>When using robot_localization with GPS, measuring absolute orientation is mandatory. There are several strategies for getting absolute orientation data, like IMUs with magnetometers, dual GPS systems or matching techniques over a known map; in this tutorial we assume the robot is equipped with an IMU that can accurately measure absolute orientation following the ENU convention, meaning it will output zero yaw when facing east and +90 degrees when facing north.</p>
<p>Despite the above assumption, in the real world commercial grade IMU’s mounted in actual robots will often not produce accurate absolute heading measurements because:</p>
<ol class="arabic simple">
Expand All @@ -1113,7 +1114,7 @@ <h2>GPS Localization Overview<a class="headerlink" href="#gps-localization-overv
<h2>Tutorial Steps<a class="headerlink" href="#tutorial-steps" title="Permalink to this headline"></a></h2>
<div class="section" id="setup-gazebo-world">
<h3>0- Setup Gazebo World<a class="headerlink" href="#setup-gazebo-world" title="Permalink to this headline"></a></h3>
<p>To navigate using GPS we first need to create an outdoors Gazebo world with a robot having a GPS sensor to setup for navigation. For this tutorial we will be using the <a class="reference external" href="https://dev.px4.io/v1.11_noredirect/en/simulation/gazebo_worlds.html#sonoma-raceway">Sonoma Raceway</a> because its aligned with the real location. A sample world has been setup <a class="reference external" href="https://github.com/ros-planning/navigation2_tutorials/tree/master/nav2_gps_waypoint_follower_demo/worlds/sonoma_raceway.world">here</a> using gazebo’s spherical coordinates plugin, which creates a local tangent plane centered in the set geographic origin and provides latitude, longitude and altitude coordinates for each point in the world:</p>
<p>To navigate using GPS we first need to create an outdoors Gazebo world with a robot having a GPS sensor to setup for navigation. For this tutorial we will be using the <a class="reference external" href="https://docs.px4.io/v1.12/en/simulation/gazebo_worlds.html#sonoma-raceway">Sonoma Raceway</a> because its aligned with the real location. A sample world has been setup <a class="reference external" href="https://github.com/ros-planning/navigation2_tutorials/tree/master/nav2_gps_waypoint_follower_demo/worlds/sonoma_raceway.world">here</a> using gazebo’s spherical coordinates plugin, which creates a local tangent plane centered in the set geographic origin and provides latitude, longitude and altitude coordinates for each point in the world:</p>
<div class="highlight-xml notranslate"><div class="highlight"><pre><span></span><span class="nt">&lt;spherical_coordinates&gt;</span>
<span class="w"> </span><span class="cm">&lt;!-- currently gazebo has a bug: instead of outputting lat, long, altitude in ENU</span>
<span class="cm"> (x = East, y = North and z = Up) as the default configurations, it&#39;s outputting (-E)(-N)U,</span>
Expand Down

0 comments on commit 20a965b

Please sign in to comment.