Drake
loader.h
Go to the documentation of this file.
1 #pragma once
2
3 #include <memory>
4 #include <string>
5
7
8 namespace drake {
9 namespace maliput {
10
11 namespace api {
12 class RoadGeometry;
13 }
14
15 namespace multilane {
16
17 /// @file
18 /// Loader for serialized multilane road networks.
19 ///
20 /// The serialization is a fairly straightforward mapping of the BuilderBase
21 /// interface onto YAML. See (TBD) for more detail of the format.
22 ///
23 /// The basic idea is, however:
24 /// - general parameters (i.e., lane_width, elevation bounds, linear and
25 /// angular tolerance)
26 /// - a collection of named 'points', which are specifications of explicitly
27 /// named Endpoints
28 /// - a collection of named 'connections', whose start Endpoints are specified
29 /// by reference to either a named Endpoint or the start or end of
30 /// a named Connection
31 /// - a collection of named 'groups', specified by sequences of named
32 /// Connections
33 ///
34 /// Parsing will fail if there is no way to concretely resolve all of the
35 /// Endpoint references, e.g., if a document specifies that Connection-A
36 /// is an arc starting at the end of Connection-B and that Connection-B
37 /// is an arc starting at the end of Connection-A. All referential chains
38 /// must bottom out in explicitly-named Endpoints.
39 // TODO(maddog@tri.global) Describe complete format somewhere.
40
41 /// Loads the input string as a maliput_multilane_builder document using the
42 /// provided builder_factory.
43 ///
44 /// Application code must use a BuilderFactory reference. It is provided so that
45 /// the Builder to be created can be mocked and code can be tested.
46 std::unique_ptr<const api::RoadGeometry> Load(
47  const BuilderFactoryBase& builder_factory, const std::string& input);
48
49 /// Loads the named file as a maliput_multilane_builder document using the
50 /// provided builder_factory.
51 ///
52 ///
53 /// Application code must use a BuilderFactory reference. It is provided so that
54 /// the Builder to be created can be mocked and code can be tested.
55 std::unique_ptr<const api::RoadGeometry> LoadFile(
56  const BuilderFactoryBase& builder_factory, const std::string& filename);
57
58 } // namespace multilane
59 } // namespace maliput
60 } // namespace drake
Definition: automotive_demo.cc:90
Definition: arc_road_curve.cc:11
std::unique_ptr< const api::RoadGeometry > LoadFile(const std::string &filename)
Loads the named file as a maliput_monolane_builder document.
Definition: loader.cc:235
std::unique_ptr< const api::RoadGeometry > Load(const std::string &input)
Loads the input string as a maliput_monolane_builder document.
Definition: loader.cc:230