Skip to content

Commit

Permalink
planning: add a test for stop for pedestrian on crosswalk
Browse files Browse the repository at this point in the history
  • Loading branch information
jmtao authored and ycool committed Jan 31, 2018
1 parent 531d425 commit 723e429
Show file tree
Hide file tree
Showing 6 changed files with 7,642 additions and 0 deletions.
17 changes: 17 additions & 0 deletions modules/planning/integration_tests/sunnyvale_big_loop_test.cc
Original file line number Diff line number Diff line change
Expand Up @@ -259,6 +259,23 @@ TEST_F(SunnyvaleBigLoopTest, stop_sign_06) {
RUN_GOLDEN_TEST(2);
}

/*
* crosswalk: pedestrian on crosswalk
* bag: 2018-01-29-17-22-46/2018-01-29-17-31-47_9.bag
* decision: STOP
*/
TEST_F(SunnyvaleBigLoopTest, crosswalk_01) {
FLAGS_enable_crosswalk = true;

std::string seq_num = "8";
FLAGS_test_routing_response_file = seq_num + "_routing.pb.txt";
FLAGS_test_prediction_file = seq_num + "_prediction.pb.txt";
FLAGS_test_localization_file = seq_num + "_localization.pb.txt";
FLAGS_test_chassis_file = seq_num + "_chassis.pb.txt";
PlanningTestBase::SetUp();
RUN_GOLDEN_TEST(0);
}

} // namespace planning
} // namespace apollo

Expand Down
47 changes: 47 additions & 0 deletions modules/planning/testdata/sunnyvale_big_loop_test/8_chassis.pb.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,47 @@
engine_started: true
engine_rpm: 0
speed_mps: 0
odometer_m: 0
fuel_range_m: 0
throttle_percentage: 15.239185
brake_percentage: 22.894636
steering_percentage: 0.021276595
steering_torque_nm: 0
parking_brake: false
driving_mode: COMPLETE_AUTO_DRIVE
error_code: NO_ERROR
gear_location: GEAR_DRIVE
header {
timestamp_sec: 1517275961.8623116
module_name: "chassis"
sequence_num: 201283
}
signal {
turn_signal: TURN_LEFT
horn: false
}
chassis_gps {
latitude: 37.41456
longitude: -122.02524799999999
gps_valid: true
year: 18
month: 1
day: 30
hours: 1
minutes: 32
seconds: 40
compass_direction: 180
pdop: 1.2000000000000002
is_gps_fault: false
is_inferred: false
altitude: 6
heading: 195.86
hdop: 0.60000000000000009
vdop: 1
quality: FIX_3D
num_satellites: 17
gps_speed: 0
}
engage_advice {
advice: READY_TO_ENGAGE
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,65 @@
header {
timestamp_sec: 1517275961.8598664
}
pose {
position {
x: 586262.64251440507
y: 4141308.3741691732
z: -29.81352601316631
}
orientation {
qx: 0.001167005435356113
qy: -0.015782307215408249
qz: 0.99177163160950887
qw: 0.12703774089570782
}
linear_velocity {
x: 0.018828198896773753
y: -0.0052751341978899682
z: 0.000489686582221475
}
linear_acceleration {
x: 0.044109589680881842
y: -0.032056572832605268
z: -0.0010498157610978609
}
angular_velocity {
x: -0.0005796063407488421
y: -0.0036692061628199354
z: -6.6643523946851378e-05
}
heading: -1.8256904359791966
linear_acceleration_vrf {
x: 0.011213123798370361
y: -0.2839602530002594
z: 9.79498028755188
}
angular_velocity_vrf {
x: -0.00036397401812166935
y: 0.0036970865699239661
z: 5.0324381926790291e-05
}
euler_angles {
x: -0.031013353033370043
y: -0.0063277881653632509
z: 2.8866985444054931
}
}
uncertainty {
position_std_dev {
x: 0.019469710646505416
y: 0.0074467842043342142
z: 0.012406912961059197
}
orientation_std_dev {
x: 0.069480386348483428
y: 0.092862468117193023
z: 0.051019288638959853
}
linear_velocity_std_dev {
x: 0.017741872599146422
y: 0.0097386079725148515
z: 0.0060955203235113845
}
}
measurement_time: 1517275961.832608
Loading

0 comments on commit 723e429

Please sign in to comment.