maliput_integration
maliput_derive_lane_s_routes.cc File Reference

Detailed Description

Builds an api::RoadGeometry and returns a set of LaneSRoute objects that go from the start waypoint to end one. Possible backends are dragway, multilane and malidrive.

Note
  1. Allows to load a road geometry from different road geometry implementations. The maliput_backend flag will determine the backend to be used.
    • "dragway": The following flags are supported to use in order to create dragway road geometry: -num_lanes, -length, -lane_width, -shoulder_width, -maximum_height.
    • "multilane": yaml file path must be provided: -yaml_file.
    • "malidrive": xodr file path must be provided, tolerance and rule file paths are optional: -xodr_file_path -linear_tolerance -road_rule_book_file -traffic_light_book_file -phase_ring_book_file -intersection_book_file
  2. Comments about the config_file: i - It should have a valid xodr_file only when malidrive backend is selected. ii - If a xodr_file_path(gflag) is provided then the xodr file path described in the config_file is discarded.
  3. The level of the logger could be setted by: -log_level.
#include <cmath>
#include <iostream>
#include <memory>
#include <sstream>
#include <string>
#include <vector>
#include <gflags/gflags.h>
#include <maliput/api/lane_data.h>
#include <maliput/api/regions.h>
#include <maliput/api/road_geometry.h>
#include <maliput/api/road_network.h>
#include <maliput/common/logger.h>
#include <maliput/routing/derive_lane_s_routes.h>
#include <maliput/utility/generate_string.h>
#include <yaml-cpp/yaml.h>
#include "integration/tools.h"
#include "maliput_gflags.h"
Include dependency graph for maliput_derive_lane_s_routes.cc:

Namespaces

 YAML
 
 maliput
 
 maliput::integration
 

Functions

 COMMON_PROPERTIES_FLAGS ()
 
 MULTILANE_PROPERTIES_FLAGS ()
 
 DRAGWAY_PROPERTIES_FLAGS ()
 
 MALIDRIVE_PROPERTIES_FLAGS ()
 
 MALIPUT_OSM_PROPERTIES_FLAGS ()
 
 MALIPUT_APPLICATION_DEFINE_LOG_LEVEL_FLAG ()
 
 DEFINE_string (maliput_backend, "malidrive", "Whether to use <dragway>, <multilane> or <malidrive>. Default is malidrive.")
 
 DEFINE_string (config_file, "", "YAML file that defines XODR file path, route max length, and start/end waypoints.")
 
 DEFINE_double (max_length, 1000, "Maximum length of the intermediate lanes between start and end waypoints.[m]")
 
 DEFINE_string (start_waypoint, "", "Start waypoint to calculate the routing from. Expected format: '{x0, y0, z0}' ")
 
 DEFINE_string (end_waypoint, "", "End waypoint to calculate the routing to. Expected format: '{x1, y1, z1}' ")
 
int main (int argc, char *argv[])
 

Function Documentation

◆ COMMON_PROPERTIES_FLAGS()

COMMON_PROPERTIES_FLAGS ( )

◆ DEFINE_double()

DEFINE_double ( max_length  ,
1000  ,
"Maximum length of the intermediate lanes between start and end waypoints."  [m] 
)

◆ DEFINE_string() [1/4]

DEFINE_string ( config_file  ,
""  ,
"YAML file that defines XODR file  path,
route max  length,
and start/end waypoints."   
)

◆ DEFINE_string() [2/4]

DEFINE_string ( end_waypoint  ,
""  ,
"End waypoint to calculate the routing to. Expected format: '{x1, y1, z1}' "   
)

◆ DEFINE_string() [3/4]

DEFINE_string ( maliput_backend  ,
"malidrive"  ,
"Whether to use <dragway>  ,
< multilane > or< malidrive >. Default is malidrive."   
)

◆ DEFINE_string() [4/4]

DEFINE_string ( start_waypoint  ,
""  ,
"Start waypoint to calculate the routing from. Expected format: '{x0, y0, z0}' "   
)

◆ DRAGWAY_PROPERTIES_FLAGS()

DRAGWAY_PROPERTIES_FLAGS ( )

◆ main()

int main ( int  argc,
char *  argv[] 
)

◆ MALIDRIVE_PROPERTIES_FLAGS()

MALIDRIVE_PROPERTIES_FLAGS ( )

◆ MALIPUT_APPLICATION_DEFINE_LOG_LEVEL_FLAG()

MALIPUT_APPLICATION_DEFINE_LOG_LEVEL_FLAG ( )

◆ MALIPUT_OSM_PROPERTIES_FLAGS()

MALIPUT_OSM_PROPERTIES_FLAGS ( )

◆ MULTILANE_PROPERTIES_FLAGS()

MULTILANE_PROPERTIES_FLAGS ( )