Skip to content

Commit c582b33

Browse files
committed
Extend REP 105 to support multiple maps for outdoor vehicles
1 parent d9f3057 commit c582b33

File tree

2 files changed

+418
-5
lines changed

2 files changed

+418
-5
lines changed

rep-0105.rst

+70-5
Original file line numberDiff line numberDiff line change
@@ -54,6 +54,8 @@ The ``map`` frame is useful as a long-term global reference, but
5454
discrete jumps make it a poor reference frame for local sensing and
5555
acting.
5656

57+
It is recommended to align the map with east and north for easier viewing,
58+
but is not required.
5759

5860
odom
5961
''''
@@ -81,9 +83,31 @@ The coordinate frame called ``base_link`` is rigidly attached to the
8183
mobile robot base. The ``base_link`` can be attached to the base in
8284
any arbitrary position or orientation; for every hardware platform
8385
there will be a different place on the base that provides an obvious
84-
point of reference. Note that REP 103 [1] specifies a preferred
86+
point of reference. Note that REP 103 [1]_ specifies a preferred
8587
orientation for frames.
8688

89+
earth
90+
'''''
91+
92+
The coordinate frame called ``earth`` is the origin of ECEF.
93+
94+
This frame is designed to allow the interaction of multiple robots in different map frames.
95+
If the application only needs one map the ``earth`` coordinate frame is not expected to be present.
96+
In the case of running with multiple maps simultaneously the ``map`` and ``odom`` and ``base_link`` frames will need to be customized for each robot.
97+
If running multiple robots and bridging data between them, the transform frame_ids can remain standard on each robot if the other robots_frame_ids are rewritten.
98+
99+
If the ``map`` frame is globally referenced the publisher from ``earth`` to ``map`` can be a static transform publisher.
100+
Otherwise the ``earth`` to ``map`` transform will usually need to be computed by taking the estimate of the current global position and subtracting the current estimated pose in the map to get the estimated pose of the origin of the map.
101+
102+
In case the ``map`` frame's absolute positon is unknown at the time of startup, it can remain detached until such time that the global position estimation can be adaquately evaluated.
103+
This will operate in the same way that a robot can operate in the ``odom`` frame before localization in the ``map`` frame is innitialized.
104+
105+
.. figure:: rep-0105/ECEF_ENU_Longitude_Latitude_relationships.svg
106+
:width: 640px
107+
:alt: Earth Centered Earth Fixed diagram
108+
109+
A visualization of Earth Centered Earth Fixed with a tangential ``map`` frame.
110+
87111

88112

89113
Relationship between Frames
@@ -94,14 +118,49 @@ in a robot system to each other. Therefore each coordinate frame has
94118
one parent coordinate frame, and any number of child coordinate
95119
frames. The frames described in this REP are attached as follows:
96120

97-
``map`` --> ``odom`` --> ``base_link``
121+
.. raw:: html
122+
123+
<div class="mermaid" style="font-family:'Lucida Console', monospace">
124+
%% Example diagram
125+
graph LR
126+
O(odom) --> B(base_link)
127+
M(map) --> O
128+
E(earth) --> M
129+
130+
</div>
131+
98132

99133
The ``map`` frame is the parent of ``odom``, and ``odom`` is the
100134
parent of ``base_link``. Although intuition would say that both
101135
``map`` and ``odom`` should be attached to ``base_link``, this is not
102136
allowed because each frame can only have one parent.
103137

104138

139+
Example of multi-robot tf graph using ECEF
140+
------------------------------------------
141+
142+
143+
.. raw:: html
144+
145+
<div class="mermaid" style="font-family:'Lucida Console', monospace">
146+
%% Example diagram
147+
graph TB
148+
odom_1(odom_1) --> base_link1(base_link1)
149+
map_1(map_1) --> odom_1
150+
earth(earth) --> map_1
151+
odom_2(odom_2) --> base_link2(base_link2)
152+
map_2(map_2) --> odom_2
153+
earth --> map_2
154+
</div>
155+
156+
This is an example of a tf tree with two robots using different maps for localization and having a common frame ``earth``.
157+
158+
The diagram above uses different frame ids for clarity.
159+
However for maximum reusability it is recommended to use the canonical frame ids on each robot and use a script to forward information off of the robot.
160+
When the information is forwarded the frame ids should be remapped to disambiguate which robot they are coming from and referencing.
161+
162+
163+
105164
Frame Authorities
106165
-----------------
107166

@@ -114,6 +173,12 @@ broadcast the transform from ``map`` to ``base_link``. Instead, it
114173
first receives the transform from ``odom`` to ``base_link``, and uses
115174
this information to broadcast the transform from ``map`` to ``odom``.
116175

176+
The transform from ``earth`` to ``map`` is statically published and
177+
configured by the choice of map frame. If not specifically configured
178+
a fallback position is to use the initial position of the vehicle as
179+
the origin of the map frame.
180+
If the map is not georeferenced so as to support a simple static transform the localization module can follow the same procedure as for publishing the estimated offset from the ``map` to the ``odom`` frame to publish the transform from ``earth`` to ``map`` frame.
181+
117182

118183
Exceptions
119184
----------
@@ -122,19 +187,19 @@ The scope of potential robotics software is too broad to require all
122187
ROS software to follow the guidelines of this REP. However, choosing
123188
different conventions should be well justified and well documented.
124189

125-
126-
127190
Compliance
128191
==========
129192

130-
This REP depends on and is compliant with REP 103 [1].
193+
This REP depends on and is compliant with REP 103 [1]_.
131194

132195
References
133196
==========
134197

135198
.. [1] REP 103, Standard Units of Measure and Coordinate Conventions
136199
(http://www.ros.org/reps/rep-0103.html)
137200
201+
.. [2] Earth Centered, Earth Fixed Wikipedia article (https://en.wikipedia.org/wiki/ECEF)
202+
138203
Copyright
139204
=========
140205

0 commit comments

Comments
 (0)