1. Go to the `modules/localization` directory, and create a `foo` directory. In the `foo` directory, implement the class `FooLocalization` by following the code in the `RTKLocalization` class in the `rtk` directory. `FooLocalization` has to be a subclass of `LocalizationBase`. Also create a file `foo/BUILD` by following the file `rtk/BUILD`.
1. You need to register the `FooLocalizatoin` class in the function `Localization::RegisterLocalizationMethods()`, which is located in the C++ file `localization.cc`. You can register it by inserting the following code at the end of the function:
1. You need to register the `FooLocalization` class in the function `Localization::RegisterLocalizationMethods()`, which is located in the C++ file `localization.cc`. You can register it by inserting the following code at the end of the function:
```
localization_factory_.Register(LocalizationConfing::FOO, []()->LocalizationBase* { return new FooLocalization(); });
localization_factory_.Register(LocalizationConfig::FOO, []()->LocalizationBase* { return new FooLocalization(); });
```
Make sure your code compiles by including the header files that defines class `FooLocalization`.
Relative map module is a middle layer connects HDMap/Perception module and planning module. This module generates real-time relative map in the body coordinate system (FLU) and a reference line for planning. The inputs for relative map module have two parts: offline and online. The offline part is navigation line (human driving path) and the HDMap information on and near navigation line. And the online part is the traffic sign related information from perception module, e.g., lane marker, corsswalk, traffice light and etc. The generation of relative map leverages both online and offline part. It also works with either online or offline part only.
Relative map module is a middle layer connecting HDMap/Perception module and planning module. This module generates real-time relative map in the body coordinate system (FLU) and a reference line for planning. The inputs for relative map module have two parts: offline and online. The offline part is navigation line (human driving path) and the HDMap information on and near navigation line. And the online part is the traffic sign related information from perception module, e.g., lane marker, crosswalk, traffic light etc. The generation of relative map can leverage both online and offline parts. It also works with either online or offline part only.