Apollo 10.0
自动驾驶开放平台
|
This is a major component of the Simulation backend, which maintains a SimulationWorld object and keeps updating it. 更多...
#include <simulation_world_service.h>
Public 成员函数 | |
SimulationWorldService (const MapService *map_service, bool routing_from_file=false) | |
Constructor of SimulationWorldService. | |
const SimulationWorld & | world () const |
Get a read-only view of the SimulationWorld. | |
nlohmann::json | GetUpdateAsJson (double radius) const |
Returns the json representation of the SimulationWorld object. | |
void | GetWireFormatString (double radius, std::string *sim_world, std::string *sim_world_with_planning_data) |
Returns the binary representation of the SimulationWorld object. | |
nlohmann::json | GetMapElements (double radius) const |
Returns the json representation of the map element Ids and hash within the given radius from the car. | |
void | Update () |
The function Update() is periodically called to check for updates from the external messages. | |
void | SetToClear () |
Sets the flag to clear the owned simulation world object. | |
bool | ReadyToPush () const |
Check whether the SimulationWorld object has enough information. | |
void | PublishMonitorMessage (apollo::common::monitor::MonitorMessageItem::LogLevel log_level, const std::string &msg) |
Publish message to the monitor | |
void | PublishNavigationInfo (const std::shared_ptr< apollo::relative_map::NavigationInfo > &) |
void | PublishLaneFollowCommand (const std::shared_ptr< apollo::external_command::LaneFollowCommand > &) |
void | PublishValetParkingCommand (const std::shared_ptr< apollo::external_command::ValetParkingCommand > &) |
void | PublishActionCommand (const std::shared_ptr< apollo::external_command::ActionCommand > &) |
void | PublishTask (const std::shared_ptr< apollo::task_manager::Task > &) |
void | GetMapElementIds (double radius, MapElementIds *ids) const |
const apollo::hdmap::Map & | GetRelativeMap () const |
nlohmann::json | GetRoutePathAsJson () const |
void | DumpMessages () |
SimulationWorldService (const MapService *map_service, bool routing_from_file=false) | |
Constructor of SimulationWorldService. | |
const SimulationWorld & | world () const |
Get a read-only view of the SimulationWorld. | |
nlohmann::json | GetUpdateAsJson (double radius) const |
Returns the json representation of the SimulationWorld object. | |
void | GetWireFormatString (double radius, std::string *sim_world_with_planning_data) |
Returns the binary representation of the SimulationWorld object. | |
nlohmann::json | GetMapElements (double radius) const |
Returns the json representation of the map element Ids and hash within the given radius from the car. | |
void | Update () |
The function Update() is periodically called to check for updates from the external messages. | |
bool | ReadyToPush () const |
Check whether the SimulationWorld object has enough information. | |
void | PublishMonitorMessage (apollo::common::monitor::MonitorMessageItem::LogLevel log_level, const std::string &msg) |
Publish message to the monitor | |
void | PublishNavigationInfo (const std::shared_ptr< apollo::relative_map::NavigationInfo > &) |
void | PublishLaneFollowCommand (const std::shared_ptr< apollo::external_command::LaneFollowCommand > &) |
void | PublishValetParkingCommand (const std::shared_ptr< apollo::external_command::ValetParkingCommand > &) |
void | PublishActionCommand (const std::shared_ptr< apollo::external_command::ActionCommand > &) |
void | PublishTask (const std::shared_ptr< apollo::task_manager::Task > &) |
void | GetMapElementIds (double radius, MapElementIds *ids) const |
const apollo::hdmap::Map & | GetRelativeMap () const |
nlohmann::json | GetRoutePathAsJson () const |
void | DumpMessages () |
void | UpdateVehicleParam () |
template<> | |
void | UpdateSimulationWorld (const LocalizationEstimate &localization) |
template<> | |
void | UpdateSimulationWorld (const Gps &gps) |
template<> | |
void | UpdateSimulationWorld (const Chassis &chassis) |
template<> | |
void | UpdateSimulationWorld (const Stories &stories) |
template<> | |
void | UpdateSimulationWorld (const AudioDetection &audio_detection) |
template<> | |
void | UpdateSimulationWorld (const PerceptionObstacles &obstacles) |
template<> | |
void | UpdateSimulationWorld (const TrafficLightDetection &traffic_light_detection) |
template<> | |
void | UpdateSimulationWorld (const ADCTrajectory &trajectory) |
template<> | |
void | UpdateSimulationWorld (const PredictionObstacles &obstacles) |
template<> | |
void | UpdateSimulationWorld (const PlanningCommand &planning_command) |
template<> | |
void | UpdateSimulationWorld (const ControlCommand &control_command) |
template<> | |
void | UpdateSimulationWorld (const NavigationInfo &navigation_info) |
template<> | |
void | UpdateSimulationWorld (const MapMsg &map_msg) |
template<> | |
void | UpdateSimulationWorld (const MonitorMessage &monitor_msg) |
template<> | |
void | UpdateSimulationWorld (const LocalizationEstimate &localization) |
template<> | |
void | UpdateSimulationWorld (const Gps &gps) |
template<> | |
void | UpdateSimulationWorld (const Chassis &chassis) |
template<> | |
void | UpdateSimulationWorld (const Stories &stories) |
template<> | |
void | UpdateSimulationWorld (const AudioDetection &audio_detection) |
template<> | |
void | UpdateSimulationWorld (const PerceptionObstacles &obstacles) |
template<> | |
void | UpdateSimulationWorld (const TrafficLightDetection &traffic_light_detection) |
template<> | |
void | UpdateSimulationWorld (const ADCTrajectory &trajectory) |
template<> | |
void | UpdateSimulationWorld (const PredictionObstacles &obstacles) |
template<> | |
void | UpdateSimulationWorld (const PlanningCommand &planning_command) |
template<> | |
void | UpdateSimulationWorld (const ControlCommand &control_command) |
template<> | |
void | UpdateSimulationWorld (const NavigationInfo &navigation_info) |
template<> | |
void | UpdateSimulationWorld (const MapMsg &map_msg) |
template<> | |
void | UpdateSimulationWorld (const MonitorMessage &monitor_msg) |
静态 Public 成员函数 | |
static void | SetToClear () |
Sets the flag to clear the owned simulation world object. | |
静态 Public 属性 | |
static constexpr int | kMaxMonitorItems = 30 |
This is a major component of the Simulation backend, which maintains a SimulationWorld object and keeps updating it.
The SimulationWorld represents the most up-to-date information about all the objects in the emulated world, including the car, the planning trajectory, etc. NOTE: This class is not thread-safe.
在文件 simulation_world_service.h 第 79 行定义.
apollo::dreamview::SimulationWorldService::SimulationWorldService | ( | const MapService * | map_service, |
bool | routing_from_file = false |
||
) |
Constructor of SimulationWorldService.
map_service | the pointer of MapService. |
routing_from_file | whether to read initial routing from file. |
在文件 simulation_world_service.cc 第 305 行定义.
apollo::dreamview::SimulationWorldService::SimulationWorldService | ( | const MapService * | map_service, |
bool | routing_from_file = false |
||
) |
Constructor of SimulationWorldService.
map_service | the pointer of MapService. |
routing_from_file | whether to read initial routing from file. |
void apollo::dreamview::SimulationWorldService::DumpMessages | ( | ) |
在文件 simulation_world_service.cc 第 1412 行定义.
void apollo::dreamview::SimulationWorldService::DumpMessages | ( | ) |
void apollo::dreamview::SimulationWorldService::GetMapElementIds | ( | double | radius, |
MapElementIds * | ids | ||
) | const |
在文件 simulation_world_service.cc 第 494 行定义.
void apollo::dreamview::SimulationWorldService::GetMapElementIds | ( | double | radius, |
MapElementIds * | ids | ||
) | const |
nlohmann::json apollo::dreamview::SimulationWorldService::GetMapElements | ( | double | radius | ) | const |
Returns the json representation of the map element Ids and hash within the given radius from the car.
radius | the search distance from the current car location |
nlohmann::json apollo::dreamview::SimulationWorldService::GetMapElements | ( | double | radius | ) | const |
Returns the json representation of the map element Ids and hash within the given radius from the car.
radius | the search distance from the current car location |
const Map & apollo::dreamview::SimulationWorldService::GetRelativeMap | ( | ) | const |
在文件 simulation_world_service.cc 第 511 行定义.
const apollo::hdmap::Map & apollo::dreamview::SimulationWorldService::GetRelativeMap | ( | ) | const |
Json apollo::dreamview::SimulationWorldService::GetRoutePathAsJson | ( | ) | const |
在文件 simulation_world_service.cc 第 1263 行定义.
nlohmann::json apollo::dreamview::SimulationWorldService::GetRoutePathAsJson | ( | ) | const |
Json apollo::dreamview::SimulationWorldService::GetUpdateAsJson | ( | double | radius | ) | const |
Returns the json representation of the SimulationWorld object.
This is a public API used by offline dreamview.
radius | the search distance from the current car location |
在文件 simulation_world_service.cc 第 482 行定义.
nlohmann::json apollo::dreamview::SimulationWorldService::GetUpdateAsJson | ( | double | radius | ) | const |
Returns the json representation of the SimulationWorld object.
This is a public API used by offline dreamview.
radius | the search distance from the current car location |
void apollo::dreamview::SimulationWorldService::GetWireFormatString | ( | double | radius, |
std::string * | sim_world, | ||
std::string * | sim_world_with_planning_data | ||
) |
Returns the binary representation of the SimulationWorld object.
radius | the search distance from the current car location. |
sim_world | output of binary format sim_world string. |
sim_world_with_planning_data | output of binary format sim_world string with planning_data. |
在文件 simulation_world_service.cc 第 471 行定义.
void apollo::dreamview::SimulationWorldService::GetWireFormatString | ( | double | radius, |
std::string * | sim_world_with_planning_data | ||
) |
Returns the binary representation of the SimulationWorld object.
radius | the search distance from the current car location. |
sim_world | output of binary format sim_world string. |
sim_world_with_planning_data | output of binary format sim_world string with planning_data. |
在文件 simulation_world_service.cc 第 473 行定义.
void apollo::dreamview::SimulationWorldService::PublishActionCommand | ( | const std::shared_ptr< apollo::external_command::ActionCommand > & | ) |
void apollo::dreamview::SimulationWorldService::PublishActionCommand | ( | const std::shared_ptr< apollo::external_command::ActionCommand > & | ) |
void apollo::dreamview::SimulationWorldService::PublishLaneFollowCommand | ( | const std::shared_ptr< apollo::external_command::LaneFollowCommand > & | ) |
void apollo::dreamview::SimulationWorldService::PublishLaneFollowCommand | ( | const std::shared_ptr< apollo::external_command::LaneFollowCommand > & | ) |
void apollo::dreamview::SimulationWorldService::PublishMonitorMessage | ( | apollo::common::monitor::MonitorMessageItem::LogLevel | log_level, |
const std::string & | msg | ||
) |
Publish message to the monitor
msg | the string to send to monitor |
log_level | defined in modules/common/monitor_log/proto/monitor_log.proto |
在文件 simulation_world_service.cc 第 1455 行定义.
void apollo::dreamview::SimulationWorldService::PublishMonitorMessage | ( | apollo::common::monitor::MonitorMessageItem::LogLevel | log_level, |
const std::string & | msg | ||
) |
Publish message to the monitor
msg | the string to send to monitor |
log_level | defined in modules/common/monitor_log/proto/monitor_log.proto |
void apollo::dreamview::SimulationWorldService::PublishNavigationInfo | ( | const std::shared_ptr< apollo::relative_map::NavigationInfo > & | ) |
void apollo::dreamview::SimulationWorldService::PublishNavigationInfo | ( | const std::shared_ptr< apollo::relative_map::NavigationInfo > & | ) |
void apollo::dreamview::SimulationWorldService::PublishTask | ( | const std::shared_ptr< apollo::task_manager::Task > & | ) |
void apollo::dreamview::SimulationWorldService::PublishTask | ( | const std::shared_ptr< apollo::task_manager::Task > & | ) |
void apollo::dreamview::SimulationWorldService::PublishValetParkingCommand | ( | const std::shared_ptr< apollo::external_command::ValetParkingCommand > & | ) |
void apollo::dreamview::SimulationWorldService::PublishValetParkingCommand | ( | const std::shared_ptr< apollo::external_command::ValetParkingCommand > & | ) |
|
inline |
Check whether the SimulationWorld object has enough information.
The backend won't push the SimulationWorld to frontend if it is not ready.
在文件 simulation_world_service.h 第 142 行定义.
|
inline |
Check whether the SimulationWorld object has enough information.
The backend won't push the SimulationWorld to frontend if it is not ready.
在文件 simulation_world_service.h 第 142 行定义.
|
inline |
Sets the flag to clear the owned simulation world object.
在文件 simulation_world_service.h 第 135 行定义.
|
inlinestatic |
Sets the flag to clear the owned simulation world object.
在文件 simulation_world_service.h 第 135 行定义.
void apollo::dreamview::SimulationWorldService::Update | ( | ) |
The function Update() is periodically called to check for updates from the external messages.
All the updates will be written to the SimulationWorld object to reflect the latest status.
在文件 simulation_world_service.cc 第 393 行定义.
void apollo::dreamview::SimulationWorldService::Update | ( | ) |
The function Update() is periodically called to check for updates from the external messages.
All the updates will be written to the SimulationWorld object to reflect the latest status.
void apollo::dreamview::SimulationWorldService::UpdateSimulationWorld | ( | const ADCTrajectory & | trajectory | ) |
在文件 simulation_world_service.cc 第 1137 行定义.
void apollo::dreamview::SimulationWorldService::UpdateSimulationWorld | ( | const ADCTrajectory & | trajectory | ) |
在文件 simulation_world_service.cc 第 1135 行定义.
void apollo::dreamview::SimulationWorldService::UpdateSimulationWorld | ( | const AudioDetection & | audio_detection | ) |
在文件 simulation_world_service.cc 第 620 行定义.
void apollo::dreamview::SimulationWorldService::UpdateSimulationWorld | ( | const AudioDetection & | audio_detection | ) |
在文件 simulation_world_service.cc 第 618 行定义.
void apollo::dreamview::SimulationWorldService::UpdateSimulationWorld | ( | const Chassis & | chassis | ) |
在文件 simulation_world_service.cc 第 567 行定义.
void apollo::dreamview::SimulationWorldService::UpdateSimulationWorld | ( | const Chassis & | chassis | ) |
在文件 simulation_world_service.cc 第 565 行定义.
void apollo::dreamview::SimulationWorldService::UpdateSimulationWorld | ( | const ControlCommand & | control_command | ) |
在文件 simulation_world_service.cc 第 1305 行定义.
void apollo::dreamview::SimulationWorldService::UpdateSimulationWorld | ( | const ControlCommand & | control_command | ) |
在文件 simulation_world_service.cc 第 1303 行定义.
void apollo::dreamview::SimulationWorldService::UpdateSimulationWorld | ( | const Gps & | gps | ) |
在文件 simulation_world_service.cc 第 540 行定义.
void apollo::dreamview::SimulationWorldService::UpdateSimulationWorld | ( | const Gps & | gps | ) |
在文件 simulation_world_service.cc 第 538 行定义.
void apollo::dreamview::SimulationWorldService::UpdateSimulationWorld | ( | const LocalizationEstimate & | localization | ) |
在文件 simulation_world_service.cc 第 516 行定义.
void apollo::dreamview::SimulationWorldService::UpdateSimulationWorld | ( | const LocalizationEstimate & | localization | ) |
在文件 simulation_world_service.cc 第 514 行定义.
void apollo::dreamview::SimulationWorldService::UpdateSimulationWorld | ( | const MapMsg & | map_msg | ) |
在文件 simulation_world_service.cc 第 1361 行定义.
void apollo::dreamview::SimulationWorldService::UpdateSimulationWorld | ( | const MapMsg & | map_msg | ) |
在文件 simulation_world_service.cc 第 1359 行定义.
void apollo::dreamview::SimulationWorldService::UpdateSimulationWorld | ( | const MonitorMessage & | monitor_msg | ) |
在文件 simulation_world_service.cc 第 1379 行定义.
void apollo::dreamview::SimulationWorldService::UpdateSimulationWorld | ( | const MonitorMessage & | monitor_msg | ) |
在文件 simulation_world_service.cc 第 1377 行定义.
void apollo::dreamview::SimulationWorldService::UpdateSimulationWorld | ( | const NavigationInfo & | navigation_info | ) |
在文件 simulation_world_service.cc 第 1350 行定义.
void apollo::dreamview::SimulationWorldService::UpdateSimulationWorld | ( | const NavigationInfo & | navigation_info | ) |
在文件 simulation_world_service.cc 第 1348 行定义.
void apollo::dreamview::SimulationWorldService::UpdateSimulationWorld | ( | const PerceptionObstacles & | obstacles | ) |
在文件 simulation_world_service.cc 第 726 行定义.
void apollo::dreamview::SimulationWorldService::UpdateSimulationWorld | ( | const PerceptionObstacles & | obstacles | ) |
在文件 simulation_world_service.cc 第 724 行定义.
void apollo::dreamview::SimulationWorldService::UpdateSimulationWorld | ( | const PlanningCommand & | planning_command | ) |
在文件 simulation_world_service.cc 第 1216 行定义.
void apollo::dreamview::SimulationWorldService::UpdateSimulationWorld | ( | const PlanningCommand & | planning_command | ) |
在文件 simulation_world_service.cc 第 1214 行定义.
void apollo::dreamview::SimulationWorldService::UpdateSimulationWorld | ( | const PredictionObstacles & | obstacles | ) |
在文件 simulation_world_service.cc 第 1188 行定义.
void apollo::dreamview::SimulationWorldService::UpdateSimulationWorld | ( | const PredictionObstacles & | obstacles | ) |
在文件 simulation_world_service.cc 第 1186 行定义.
void apollo::dreamview::SimulationWorldService::UpdateSimulationWorld | ( | const Stories & | stories | ) |
在文件 simulation_world_service.cc 第 604 行定义.
void apollo::dreamview::SimulationWorldService::UpdateSimulationWorld | ( | const Stories & | stories | ) |
在文件 simulation_world_service.cc 第 602 行定义.
void apollo::dreamview::SimulationWorldService::UpdateSimulationWorld | ( | const TrafficLightDetection & | traffic_light_detection | ) |
在文件 simulation_world_service.cc 第 742 行定义.
void apollo::dreamview::SimulationWorldService::UpdateSimulationWorld | ( | const TrafficLightDetection & | traffic_light_detection | ) |
在文件 simulation_world_service.cc 第 740 行定义.
void apollo::dreamview::SimulationWorldService::UpdateVehicleParam | ( | ) |
在文件 simulation_world_service.cc 第 1460 行定义.
|
inline |
Get a read-only view of the SimulationWorld.
在文件 simulation_world_service.h 第 97 行定义.
|
inline |
Get a read-only view of the SimulationWorld.
在文件 simulation_world_service.h 第 97 行定义.
|
staticconstexpr |
在文件 simulation_world_service.h 第 83 行定义.