In addition to Weibo, there is also WeChat
Please pay attention
WeChat public account
Shulou
2025-01-19 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Servers >
Share
Shulou(Shulou.com)05/31 Report--
Today, the editor will share with you the relevant knowledge points about how to achieve the apollo Can bus and positioning module. The content is detailed and the logic is clear. I believe most people still know too much about this knowledge, so share this article for your reference. I hope you can get something after reading this article. Let's take a look at it.
Brief introduction of Can bus
The Can bus receives and executes commands from the control module, collects the status information of the vehicle chassis and feeds back to the control module.
Input
Control command
Output
Chassis statu
Message status of each part of chassis
Realize
The Canbus module mainly includes the following parts:
Vehicle: the vehicle itself, including the vehicle controller and message manager
CAN client-the CAN client has been moved to the / modules/drivers/canbus directory because it has been shared by different sensors using the canbus protocol.
By inheriting the CanClient class, you can implement your own CAN client in the folder can_client.
Note:
Don't forget to register your own CAN client in the 'CanClientFactory' (Can client factory) class.
Under the folder vehicle, you can also inherit VehicleController
The MessageManager class implements its own vehicle controller and message manager.
Note:
Don't forget to register your vehicle in the `VehicleFactory` class.
Brief introduction of Positioning Module
The module provides location services. The following two methods are provided in the positioning module:
Based on the method of RTK (Real Time Kinematic), this method combines the information of GPS and IMU (Inertial Measurement Unit).
Multi-sensor fusion method, which uses the information of GPS,IMU and lidar.
Input
In the RTK-based positioning method, there are two inputs:
GPS-Global Geographic Information Positioning system
IMU-Inertial Measurement Unit
In the location method of multi-sensor fusion, there are three inputs as follows:
GPS-Global Geographic Information Positioning system
IMU-Inertial Measurement Unit
LiDAR-lidar sensor
Output
The output is an object instance LocalizationEstimate defined by the Protobuf format, which can be found in the localization/proto/localization.proto file.
Implementation of Positioning Module
Currently, RTK-based location methods are implemented by the RTKLocalization class. If you are implementing a new location algorithm, such as FooLocalization, you may need to perform the following steps:
1. In proto/localization_config.
In the proto file, add an enumerated type with a value of FOO to the LocalizationType.
two。 Change to the modules/localization directory and create a folder called foo. In the foo folder, refer to the code of the RTKLocalization class in the rtk directory to implement your own location algorithm class FooLocalization. FooLocalization must be a subclass of LocalizationBase. In addition, refer to the rtk/BUILD file to create a file called Also foo/BUILD.
3. You need to register your new class FooLocalization in the function Localization::RegisterLocalizationMethods (), which is implemented in the file localization.cc. You can register the class you added by inserting the following code at the end of the function:
Localization_factory_.Register (LocalizationConfig::FOO, [] ()-> LocalizationBase* {return new FooLocalization ();})
4. Make sure your code compiles with the header file FooLocalization that defines the FooLocalization class.
5. Now you can go back to the root directory of apollo and compile your code using the bash apollo.sh build command.
These are all the contents of the article "how to realize the apollo Can bus and Positioning Module". Thank you for reading! I believe you will gain a lot after reading this article. The editor will update different knowledge for you every day. If you want to learn more knowledge, please pay attention to the industry information channel.
Welcome to subscribe "Shulou Technology Information " to get latest news, interesting things and hot topics in the IT industry, and controls the hottest and latest Internet news, technology news and IT industry trends.
Views: 0
*The comments in the above article only represent the author's personal views and do not represent the views and positions of this website. If you have more insights, please feel free to contribute and share.
Continue with the installation of the previous hadoop.First, install zookooper1. Decompress zookoope
"Every 5-10 years, there's a rare product, a really special, very unusual product that's the most un
© 2024 shulou.com SLNews company. All rights reserved.