Drake
automotive_demo.cc File Reference
Include dependency graph for automotive_demo.cc:

Namespaces

 drake
 
 drake::automotive
 

Enumerations

enum  RoadNetworkType { flat = 0, dragway = 1, onramp = 2 }
 

Functions

 DEFINE_int32 (num_simple_car, 0,"Number of SimpleCar vehicles. The cars are ""named \"0\", \"1\", \"2\", etc. If this option is provided, ""simple_car_names must not be provided.")
 
 DEFINE_string (simple_car_names,"","A comma-separated list that specifies the number of SimpleCar ""models to instantiate, their names, and the names of the LCM ""channels to which they subscribe (e.g., 'Russ,Jeremy,Liang' ""would spawn 3 cars subscribed to DRIVING_COMMAND_Russ, ""DRIVING_COMMAND_Jeremy, and DRIVING_COMMAND_Liang). If this ""option is provided, num_simple_car must not be provided.")
 
 DEFINE_int32 (num_mobil_car, 0,"Number of MOBIL-controlled SimpleCar vehicles. This option is ""currently only applied when the road network is a dragway. ""MOBIL-controlled vehicles are placed behind any idm-controlled ""railcars and any fixed-speed railcars.")
 
 DEFINE_int32 (num_trajectory_car, 0,"Number of TrajectoryCar vehicles. This ""option is currently only applied when the road network is a flat ""plane or a dragway.")
 
 DEFINE_int32 (num_idm_controlled_maliput_railcar, 0,"Number of IDM-controlled ""MaliputRailcar vehicles. This option is currently only applied ""when the road network is a dragway. These cars are added after ""the trajectory cars are added but before the fixed-speed ""railcars are added. They are initialized to be behind the ""fixed-speed railcars, if any.")
 
 DEFINE_int32 (num_maliput_railcar, 0,"Number of fixed-speed MaliputRailcar ""vehicles. This option is currently only applied when the road ""network is a dragway or merge. The speed is derived based on the ""road's base speed and speed delta. The railcars are added after ""the IDM-controlled railcars are added and are positioned in ""front of the IDM-controlled railcars.")
 
 DEFINE_double (target_realtime_rate, 1.0,"Playback speed. See documentation for ""Simulator::set_target_realtime_rate() for details.")
 
 DEFINE_double (simulation_sec, std::numeric_limits< double >::infinity(),"Number of seconds to simulate.")
 
 DEFINE_int32 (num_dragway_lanes, 0,"The number of lanes on the dragway. The number of lanes is by ""default zero to disable the dragway. A dragway road network is ""only enabled when the user specifies a number of lanes greater ""than zero. Only one road network can be enabled. Thus if this ""option is enabled, no other road network can be enabled.")
 
 DEFINE_double (dragway_length, 100,"The length of the dragway.")
 
 DEFINE_double (dragway_lane_width, 3.7,"The dragway lane width.")
 
 DEFINE_double (dragway_shoulder_width, 3.0,"The dragway's shoulder width.")
 
 DEFINE_double (dragway_base_speed, 4.0,"The speed of the vehicles on the right-most lane of the ""dragway.")
 
 DEFINE_double (dragway_lane_speed_delta, 2,"The change in vehicle speed in the left-adjacent lane. For ""example, suppose the dragway has 3 lanes. Vehicles in the ""right-most lane will travel at dragway_base_speed m/s. ""Vehicles in the middle lane will travel at ""dragway_base_speed + dragway_lane_speed_delta m/s. Finally, ""vehicles in the left-most lane will travel at ""dragway_base_speed + 2 * dragway_lane_speed_delta m/s.")
 
 DEFINE_double (dragway_vehicle_spacing, 10,"The initial spacing (in meters) between consecutive vehicles ""traveling on a lane.")
 
 DEFINE_bool (with_onramp, false,"Loads the onramp road network. Only one road ""network can be enabled. Thus, if this option is enabled, no other ""road network can be enabled.")
 
 DEFINE_double (onramp_base_speed, 25,"The speed of the vehicles added to the ""onramp.")
 
 DEFINE_bool (onramp_swap_start, false,"Whether to swap the starting lanes of ""the vehicles on the onramp.")
 
 DEFINE_bool (with_stalled_cars, false,"Places a stalled vehicle at the end of ""each lane of a dragway. This option is only enabled when the ""road is a dragway.")
 
int main (int argc, char *argv[])
 

Enumeration Type Documentation

enum RoadNetworkType
strong

Function Documentation

DEFINE_bool ( with_onramp  ,
false  ,
"Loads the onramp road network. Only one road ""network can be enabled.  Thus,
if this option is  enabled,
no other""road network can be enabled."   
)
DEFINE_bool ( onramp_swap_start  ,
false  ,
"Whether to swap the starting lanes of ""the vehicles on the onramp."   
)
DEFINE_bool ( with_stalled_cars  ,
false  ,
"Places a stalled vehicle at the end of ""each lane of a dragway. This option is only enabled when the ""road is a dragway."   
)
DEFINE_double ( target_realtime_rate  ,
1.  0,
"Playback speed. See documentation for ""Simulator::set_target_realtime_rate() for details."   
)
DEFINE_double ( simulation_sec  ,
std::numeric_limits< double ::infinity(),
"Number of seconds to simulate."   
)
DEFINE_double ( dragway_length  ,
100  ,
"The length of the dragway."   
)
DEFINE_double ( dragway_lane_width  ,
3.  7,
"The dragway lane width."   
)
DEFINE_double ( dragway_shoulder_width  ,
3.  0,
"The dragway's shoulder width."   
)
DEFINE_double ( dragway_base_speed  ,
4.  0,
"The speed of the vehicles on the right-most lane of the ""dragway."   
)
DEFINE_double ( dragway_lane_speed_delta  ,
,
"The change in vehicle speed in the left-adjacent lane. For ""  example,
suppose the dragway has 3 lanes.Vehicles in the""right-most lane will travel at dragway_base_speed m/s.""Vehicles in the middle lane will travel at""dragway_base_speed+dragway_lane_speed_delta m/s.  Finally,
""vehicles in the left-most lane will travel at""dragway_base_speed+2 *dragway_lane_speed_delta m/s."   
)
DEFINE_double ( dragway_vehicle_spacing  ,
10  ,
"The initial spacing (in meters) between consecutive vehicles ""traveling on a lane."   
)
DEFINE_double ( onramp_base_speed  ,
25  ,
"The speed of the vehicles added to the ""onramp."   
)
DEFINE_int32 ( num_simple_car  ,
,
"Number of SimpleCar vehicles. The cars are ""named \"0\"  ,
\"1\"  ,
\"2\"  ,
etc.If this option is  provided,
""simple_car_names must not be provided."   
)
DEFINE_int32 ( num_mobil_car  ,
,
"Number of MOBIL-controlled SimpleCar vehicles. This option is ""currently only applied when the road network is a dragway. ""MOBIL-controlled vehicles are placed behind any idm-controlled ""railcars and any fixed-speed railcars."   
)
DEFINE_int32 ( num_trajectory_car  ,
,
"Number of TrajectoryCar vehicles. This ""option is currently only applied when the road network is a flat ""plane or a dragway."   
)
DEFINE_int32 ( num_idm_controlled_maliput_railcar  ,
,
"Number of IDM-controlled ""MaliputRailcar vehicles. This option is currently only applied ""when the road network is a dragway. These cars are added after ""the trajectory cars are added but before the fixed-speed ""railcars are added. They are initialized to be behind the ""fixed-speed  railcars,
if any."   
)
DEFINE_int32 ( num_maliput_railcar  ,
,
"Number of fixed-speed MaliputRailcar ""vehicles. This option is currently only applied when the road ""network is a dragway or merge. The speed is derived based on the ""road's base speed and speed delta. The railcars are added after ""the IDM-controlled railcars are added and are positioned in ""front of the IDM-controlled railcars."   
)
DEFINE_int32 ( num_dragway_lanes  ,
,
"The number of lanes on the dragway. The number of lanes is by ""default zero to disable the dragway. A dragway road network is ""only enabled when the user specifies a number of lanes greater ""than zero. Only one road network can be enabled. Thus if this ""option is  enabled,
no other road network can be enabled."   
)
DEFINE_string ( simple_car_names  ,
""  ,
"A comma-separated list that specifies the number of SimpleCar ""models to  instantiate,
their  names,
and the names of the LCM""channels to which they subscribe(e.g., 'Russ, Jeremy, Liang'""would spawn 3 cars subscribed to DRIVING_COMMAND_Russ,""DRIVING_COMMAND_Jeremy, and DRIVING_COMMAND_Liang).If this""option is  provided,
num_simple_car must not be provided."   
)
int main ( int  argc,
char *  argv[] 
)