28VehicleConfig VehicleConfigHelper::vehicle_config_;
29bool VehicleConfigHelper::is_init_ =
false;
31VehicleConfigHelper::VehicleConfigHelper() {}
38 <<
"Unable to parse vehicle config file " << config_file;
43 vehicle_config_ = vehicle_params;
51 return vehicle_config_;
56 double lat_edge_to_center =
57 std::max(param.left_edge_to_center(), param.right_edge_to_center());
58 double lon_edge_to_center =
59 std::max(param.front_edge_to_center(), param.back_edge_to_center());
60 return std::sqrt((lat_edge_to_center + param.min_turn_radius()) *
61 (lat_edge_to_center + param.min_turn_radius()) +
62 lon_edge_to_center * lon_edge_to_center);
70 point, path_point.
theta(), vehicle_param.front_edge_to_center(),
71 vehicle_param.back_edge_to_center(), vehicle_param.width());
static double MinSafeTurnRadius()
Get the safe turning radius when the vehicle is turning with maximum steering angle.
static void Init()
Initialize vehicle configurations with default configuration file pointed by gflags FLAGS_vehicle_con...
static common::math::Box2d GetBoundingBox(const common::PathPoint &path_point)
Get the box (four corners: ABCD) of the vehicle.
static const VehicleConfig & GetConfig()
Get the current vehicle configuration.
Rectangular (undirected) bounding box in 2-D.
Implements a class of 2-dimensional vectors.
bool GetProtoFromFile(const std::string &file_name, google::protobuf::Message *message)
Parses the content of the file specified by the file_name as a representation of protobufs,...
optional VehicleParam vehicle_param