Apollo 10.0
自动驾驶开放平台
apollo::v2x 命名空间参考

命名空间

namespace  ft
 
namespace  obu
 
namespace  utils
 

struct  AbnormalInformation
 
struct  CarStatus
 
struct  Connection
 
class  GrpcClientImpl
 
class  GrpcServerImpl
 
struct  Id
 
class  InternalData
 
struct  Intersection
 
struct  IntersectionState
 
struct  IntersectionTrafficLightData
 
struct  Junction
 
struct  Lane
 
struct  Map
 
struct  MiniAreaMap
 
struct  ObuAlarm
 
class  ObuInterFaceBase
 
class  ObuInterFaceGrpcImpl
 
class  OsInterFace
 
struct  Phase
 
struct  Point
 
struct  PolicyData
 
struct  Position2D
 
class  ProtoAdapter
 
struct  Road
 
struct  RoadTrafficLight
 
struct  RsiMsg
 
struct  RsiPoint
 
struct  SingleTrafficLight
 
struct  Spat
 
struct  V2XInformation
 
struct  V2XObstacle
 
struct  V2XObstacles
 
class  V2xProxy
 

类型定义

using OSLightColor = ::apollo::v2x::SingleTrafficLight_Color
 
using OSLightype = ::apollo::v2x::SingleTrafficLight_Type
 
using ObuLightype = ::apollo::v2x::obu::SingleTrafficLight_Type
 
using OSLight = ::apollo::v2x::IntersectionTrafficLightData
 
using ObuLight = ::apollo::v2x::obu::ObuTrafficLight
 
using OSLocation = ::apollo::localization::LocalizationEstimate
 
using OSRsi = ::apollo::v2x::RsiMsg
 
using ObuRsi = ::apollo::v2x::obu::ObuRsi
 
using HDJunction = ::apollo::hdmap::JunctionInfoConstPtr
 
using ObuJunction = ::apollo::v2x::Junction
 

枚举

enum  ErrorCode {
  LTEV = 500 , NET = 501 , CPU = 502 , MEM = 503 ,
  GPS = 504 , MAP = 510 , SPAT = 511 , OBUID = 999
}
 
enum  RsiAlterType {
  SPEED_LIMIT = 85 , SPEED_LIMIT_BRIDGE = 8 , SPEED_LIMIT_TUNNEL = 21 , CONSTRUCTION_AHEAD = 38 ,
  BUS_LANE = 123 , TIDAL_LANE = 41 , TRAFFIC_JAM = 47 , TRAFFIC_ACCIDENT = 244 ,
  NO_HONKING = 80 , SLOW_DOWN_SECTION = 35 , ACCIDENT_PRONE = 34 , OVERSPEED_VEHICLE = 801 ,
  EMERGENCY_BRAKING = 802 , ANTIDROMIC_VEHICLE = 803 , ZOMBIES_VEHICLE = 804 , CONTROLLOSS_VEHICLE = 1000 ,
  SPECIAL_VEHICLE = 2000
}
 

函数

 DEFINE_string (grpc_client_host, "127.0.0.1", "grpc client host ip")
 
 DEFINE_string (grpc_server_host, "127.0.0.1", "grpc server host ip")
 
 DEFINE_string (grpc_client_port, "50100", "grpc client port")
 
 DEFINE_string (grpc_server_port, "50101", "grpc server port")
 
 DEFINE_string (grpc_debug_server_port, "50102", "grpc server debug port")
 
 DEFINE_int64 (x2v_traffic_light_timer_frequency, 10, "x2v traffic_light timer frequency")
 
 DEFINE_int64 (v2x_car_status_timer_frequency, 10, "v2x car_status timer frequency")
 
 DEFINE_double (traffic_light_distance, 250.0, "traffic light distance in m")
 
 DEFINE_double (heading_difference, 30.0/180.0, "max heading difference in rad")
 
 DEFINE_int64 (list_size, 6, "size of list which stores the traffic light data")
 
 DEFINE_int64 (msg_timeout, 250, "timeout value which getting the msg from OBU")
 
 DEFINE_int64 (sim_sending_num, 10, "the max sending times")
 
 DEFINE_bool (use_nearest_flag, true, "use the hdmap interface get_forward_nearest_signals_on_lane flag")
 
 DEFINE_int64 (spat_period, 150, "SPAT message period in ms")
 
 DEFINE_double (check_time, 0.5, "SPAT message period in s")
 
 DEFINE_int64 (rsu_whitelist_period, 3 *1000, "get whitelist period in ms")
 
 DEFINE_string (rsu_whitelist_name, "modules/v2x/conf/rsu_whitelist.txt", "file name for RSU whitelist")
 
 DECLARE_string (grpc_client_host)
 
 DECLARE_string (grpc_server_host)
 
 DECLARE_string (grpc_client_port)
 
 DECLARE_string (grpc_server_port)
 
 DECLARE_string (grpc_debug_server_port)
 
 DECLARE_int64 (x2v_traffic_light_timer_frequency)
 
 DECLARE_int64 (v2x_car_status_timer_frequency)
 
 DECLARE_double (traffic_light_distance)
 
 DECLARE_double (heading_difference)
 
 DECLARE_int64 (list_size)
 
 DECLARE_int64 (msg_timeout)
 
 DECLARE_int64 (sim_sending_num)
 
 DECLARE_bool (use_nearest_flag)
 
 DECLARE_int64 (spat_period)
 
 DECLARE_double (check_time)
 
 DECLARE_int64 (rsu_whitelist_period)
 
 DECLARE_string (rsu_whitelist_name)
 
bool IsRushHour ()
 
double cal_distance (const ::apollo::common::PointENU &p1, const ::apollo::common::PointENU &p2)
 

变量

const char *const kUnknownJunctionId = "unknown"
 

类型定义说明

◆ HDJunction

◆ ObuJunction

在文件 proto_adapter.h62 行定义.

◆ ObuLight

◆ ObuLightype

using apollo::v2x::ObuLightype = typedef ::apollo::v2x::obu::SingleTrafficLight_Type

在文件 proto_adapter.h55 行定义.

◆ ObuRsi

在文件 proto_adapter.h60 行定义.

◆ OSLight

◆ OSLightColor

using apollo::v2x::OSLightColor = typedef ::apollo::v2x::SingleTrafficLight_Color

在文件 proto_adapter.h53 行定义.

◆ OSLightype

using apollo::v2x::OSLightype = typedef ::apollo::v2x::SingleTrafficLight_Type

在文件 proto_adapter.h54 行定义.

◆ OSLocation

◆ OSRsi

在文件 proto_adapter.h59 行定义.

枚举类型说明

◆ ErrorCode

枚举值
LTEV 
NET 
CPU 
MEM 
GPS 
MAP 
SPAT 
OBUID 

在文件 v2x_monitor.proto5 行定义.

5 {
6 LTEV = 500;
7 NET = 501;
8 CPU = 502;
9 MEM = 503;
10 GPS = 504;
11 MAP = 510;
12 SPAT = 511;
13 OBUID = 999;
14}

◆ RsiAlterType

枚举值
SPEED_LIMIT 
SPEED_LIMIT_BRIDGE 
SPEED_LIMIT_TUNNEL 
CONSTRUCTION_AHEAD 
BUS_LANE 
TIDAL_LANE 
TRAFFIC_JAM 
TRAFFIC_ACCIDENT 
NO_HONKING 
SLOW_DOWN_SECTION 
ACCIDENT_PRONE 
OVERSPEED_VEHICLE 
EMERGENCY_BRAKING 
ANTIDROMIC_VEHICLE 
ZOMBIES_VEHICLE 
CONTROLLOSS_VEHICLE 
SPECIAL_VEHICLE 

在文件 proto_adapter.h33 行定义.

33 {
34 SPEED_LIMIT = 85,
38 BUS_LANE = 123,
39 TIDAL_LANE = 41,
40 TRAFFIC_JAM = 47,
41 TRAFFIC_ACCIDENT = 244,
42 NO_HONKING = 80,
44 ACCIDENT_PRONE = 34,
48 ZOMBIES_VEHICLE = 804,
50 SPECIAL_VEHICLE = 2000,
51};

函数说明

◆ cal_distance()

double apollo::v2x::cal_distance ( const ::apollo::common::PointENU p1,
const ::apollo::common::PointENU p2 
)

在文件 v2x_proxy.cc172 行定义.

173 {
174 double x = p1.x() - p2.x();
175 double y = p1.y() - p2.y();
176 return std::sqrt(x * x + y * y);
177}

◆ DECLARE_bool()

apollo::v2x::DECLARE_bool ( use_nearest_flag  )

◆ DECLARE_double() [1/3]

apollo::v2x::DECLARE_double ( check_time  )

◆ DECLARE_double() [2/3]

apollo::v2x::DECLARE_double ( heading_difference  )

◆ DECLARE_double() [3/3]

apollo::v2x::DECLARE_double ( traffic_light_distance  )

◆ DECLARE_int64() [1/7]

apollo::v2x::DECLARE_int64 ( list_size  )

◆ DECLARE_int64() [2/7]

apollo::v2x::DECLARE_int64 ( msg_timeout  )

◆ DECLARE_int64() [3/7]

apollo::v2x::DECLARE_int64 ( rsu_whitelist_period  )

◆ DECLARE_int64() [4/7]

apollo::v2x::DECLARE_int64 ( sim_sending_num  )

◆ DECLARE_int64() [5/7]

apollo::v2x::DECLARE_int64 ( spat_period  )

◆ DECLARE_int64() [6/7]

apollo::v2x::DECLARE_int64 ( v2x_car_status_timer_frequency  )

◆ DECLARE_int64() [7/7]

apollo::v2x::DECLARE_int64 ( x2v_traffic_light_timer_frequency  )

◆ DECLARE_string() [1/6]

apollo::v2x::DECLARE_string ( grpc_client_host  )

◆ DECLARE_string() [2/6]

apollo::v2x::DECLARE_string ( grpc_client_port  )

◆ DECLARE_string() [3/6]

apollo::v2x::DECLARE_string ( grpc_debug_server_port  )

◆ DECLARE_string() [4/6]

apollo::v2x::DECLARE_string ( grpc_server_host  )

◆ DECLARE_string() [5/6]

apollo::v2x::DECLARE_string ( grpc_server_port  )

◆ DECLARE_string() [6/6]

apollo::v2x::DECLARE_string ( rsu_whitelist_name  )

◆ DEFINE_bool()

apollo::v2x::DEFINE_bool ( use_nearest_flag  ,
true  ,
"use the hdmap interface get_forward_nearest_signals_on_lane flag"   
)

◆ DEFINE_double() [1/3]

apollo::v2x::DEFINE_double ( check_time  ,
0.  5,
"SPAT message period in s"   
)

◆ DEFINE_double() [2/3]

apollo::v2x::DEFINE_double ( heading_difference  ,
30.0/180.  0,
"max heading difference in rad"   
)

◆ DEFINE_double() [3/3]

apollo::v2x::DEFINE_double ( traffic_light_distance  ,
250.  0,
"traffic light distance in m"   
)

◆ DEFINE_int64() [1/7]

apollo::v2x::DEFINE_int64 ( list_size  ,
,
"size of list which stores the traffic light data"   
)

◆ DEFINE_int64() [2/7]

apollo::v2x::DEFINE_int64 ( msg_timeout  ,
250  ,
"timeout value which getting the msg from OBU"   
)

◆ DEFINE_int64() [3/7]

apollo::v2x::DEFINE_int64 ( rsu_whitelist_period  ,
3 *  1000,
"get whitelist period in ms"   
)

◆ DEFINE_int64() [4/7]

apollo::v2x::DEFINE_int64 ( sim_sending_num  ,
10  ,
"the max sending times"   
)

◆ DEFINE_int64() [5/7]

apollo::v2x::DEFINE_int64 ( spat_period  ,
150  ,
"SPAT message period in ms"   
)

◆ DEFINE_int64() [6/7]

apollo::v2x::DEFINE_int64 ( v2x_car_status_timer_frequency  ,
10  ,
"v2x car_status timer frequency"   
)

◆ DEFINE_int64() [7/7]

apollo::v2x::DEFINE_int64 ( x2v_traffic_light_timer_frequency  ,
10  ,
"x2v traffic_light timer frequency"   
)

◆ DEFINE_string() [1/6]

apollo::v2x::DEFINE_string ( grpc_client_host  ,
"127.0.0.1"  ,
"grpc client host ip"   
)

◆ DEFINE_string() [2/6]

apollo::v2x::DEFINE_string ( grpc_client_port  ,
"50100"  ,
"grpc client port"   
)

◆ DEFINE_string() [3/6]

apollo::v2x::DEFINE_string ( grpc_debug_server_port  ,
"50102"  ,
"grpc server debug port"   
)

◆ DEFINE_string() [4/6]

apollo::v2x::DEFINE_string ( grpc_server_host  ,
"127.0.0.1"  ,
"grpc server host ip"   
)

◆ DEFINE_string() [5/6]

apollo::v2x::DEFINE_string ( grpc_server_port  ,
"50101"  ,
"grpc server port"   
)

◆ DEFINE_string() [6/6]

apollo::v2x::DEFINE_string ( rsu_whitelist_name  ,
"modules/v2x/conf/rsu_whitelist.txt"  ,
"file name for RSU whitelist"   
)

◆ IsRushHour()

bool apollo::v2x::IsRushHour ( )

在文件 utils.cc110 行定义.

110 {
111 std::time_t local = std::time(nullptr);
112 std::tm now = {};
113 localtime_r(&local, &now);
114 return now.tm_hour > 16;
115}

变量说明

◆ kUnknownJunctionId

const char* const apollo::v2x::kUnknownJunctionId = "unknown"

在文件 utils.h40 行定义.