Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

SimGen-related code #777

Merged
merged 35 commits into from
Dec 3, 2024
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
Show all changes
35 commits
Select commit Hold shift + click to select a range
d4ddc16
non-breaking change
pengzhenghao Dec 2, 2024
469b8e3
non-breaking change
pengzhenghao Dec 2, 2024
daf32ee
non-breaking changes: Introduce PedestrianBoundingBox
pengzhenghao Dec 2, 2024
4484493
non-breaking changes
pengzhenghao Dec 2, 2024
a70b33b
non-breaking changes
pengzhenghao Dec 2, 2024
174f563
Fix a bug in cyclist: The object shape is wrong.
pengzhenghao Dec 2, 2024
3fbfb7c
non-breaking changes: Introduce CyclistBoundingBox
pengzhenghao Dec 2, 2024
0f666d2
non-breaking changes: Introduce VaryingDynamicsBoundingBoxVehicle (TO…
pengzhenghao Dec 2, 2024
59ed20b
non-breaking changes: Introduce drive_in_real_env_with_bounding_box.p…
pengzhenghao Dec 2, 2024
607c9ca
Fix a bug in ReplayPolicy: The object is now set_static(True) so it w…
pengzhenghao Dec 2, 2024
9ffeb75
non-breaking change
pengzhenghao Dec 2, 2024
56b80c4
non-breaking changes: implement generate_distinct_rgb_values (for ins…
pengzhenghao Dec 2, 2024
452882f
Introduce config "use_bounding_box" in ScenarioEnv, impl the proper c…
pengzhenghao Dec 2, 2024
0d15259
non-breaking changes: Introduce ScenarioAgentManager
pengzhenghao Dec 2, 2024
ddd4b09
non-breaking changes: Update Instance Camera
pengzhenghao Dec 2, 2024
27c2b4f
non-breaking changes: fix a bug
pengzhenghao Dec 2, 2024
142f1fd
Update scenario_traffic_manager.py: Use Cyc/PedBoundingBox, deal with…
pengzhenghao Dec 2, 2024
5159555
Update scenario_traffic_manager.py: add w/l/h info into vehicle_confi…
pengzhenghao Dec 2, 2024
0e90824
non-breaking changes: Update scenario_map_manager.py, add w/l/h to ve…
pengzhenghao Dec 2, 2024
32a92f9
Update get_vehicle_type, remove randomization of vehicle type in Scen…
pengzhenghao Dec 2, 2024
00ffe37
Default even_sample_vehicle_class=False. (remove randomization of veh…
pengzhenghao Dec 2, 2024
00ff59e
non-breaking change
pengzhenghao Dec 2, 2024
541cfbb
Create new car model with different scale and shape, if self.config['…
pengzhenghao Dec 2, 2024
96faef4
Deprecate even_sample_vehicle_class in ScenarioEnv
pengzhenghao Dec 2, 2024
e03d742
Allow to update the tire_scale if config['scale'] is set in ScenarioEnv
pengzhenghao Dec 2, 2024
30a89f5
Fix a bug in ScenarioMapManager: for Nuscene's data, the width / leng…
pengzhenghao Dec 2, 2024
501a2f4
format
pengzhenghao Dec 2, 2024
d4f50c8
Minor update: change API for camera.get_image
pengzhenghao Dec 2, 2024
f7226dc
WIP: Trying to fix instance cam test
pengzhenghao Dec 3, 2024
a179976
WIP: Trying to fix instance cam issue
pengzhenghao Dec 3, 2024
492a3fa
Fix bug in Instance Cam
pengzhenghao Dec 3, 2024
e0512c7
Since we 1) fix Nuscenes wrong width/length, 2) disable vehicle type …
pengzhenghao Dec 3, 2024
dcedf52
Fix bug in export_scenario test: Ped and Cyc don't record width/lengt…
pengzhenghao Dec 3, 2024
5e6dde3
format
pengzhenghao Dec 3, 2024
749586a
Fix issues in scenario export
pengzhenghao Dec 3, 2024
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
Since we 1) fix Nuscenes wrong width/length, 2) disable vehicle type …
…randomization, the GT nuscene OBS should be updated to fix test
  • Loading branch information
pengzhenghao committed Dec 3, 2024
commit e0512c7621b3a359fb775b8aae2985440258ceb2
3 changes: 2 additions & 1 deletion metadrive/manager/scenario_traffic_manager.py
Original file line number Diff line number Diff line change
Expand Up @@ -229,7 +229,8 @@ def spawn_vehicle(self, v_id, track):

# Add z to make it stick to the ground:
assert len(position) == 2
position.append(state['height'] / 2)
if use_bounding_box:
position.append(state['height'] / 2)

v = self.spawn_object(
vehicle_class, position=position, heading=state["heading"], vehicle_config=v_cfg, name=obj_name
Expand Down
246 changes: 123 additions & 123 deletions metadrive/tests/test_component/test_lane_line_detector.py
Original file line number Diff line number Diff line change
Expand Up @@ -484,131 +484,131 @@ def test_pg_map(render=False):
]
nuscenes_gt_2 = [
1.0,
0.7808130979537964,
0.4014144241809845,
0.497048556804657,
0.21977420151233673,
0.1833307445049286,
0.2741309106349945,
0.24397589266300201,
0.22296150028705597,
0.20816059410572052,
0.19839195907115936,
0.19227449595928192,
0.18942095339298248,
0.1900409460067749,
0.19369441270828247,
0.20063060522079468,
0.1172584742307663,
0.12590330839157104,
0.13827820122241974,
0.15608078241348267,
0.18244224786758423,
0.2237718254327774,
0.2953447997570038,
0.4444361925125122,
0.9753275513648987,
0.11675211787223816,
0.04168549180030823,
0.038301981985569,
0.035907551646232605,
0.034303370863199234,
0.033339571207761765,
0.03293364867568016,
0.03305203467607498,
0.035654980689287186,
0.0451875701546669,
0.06304079294204712,
1.0,
0.9279412627220154,
0.47582244873046875,
0.3268144130706787,
0.25280630588531494,
0.20891083776950836,
0.18038643896579742,
0.16094817221164703,
0.1473899632692337,
0.1379445493221283,
0.1312660276889801,
0.1269902139902115,
0.12537911534309387,
0.1267208307981491,
0.3988616168498993,
0.39293304085731506,
0.779081404209137,
0.4008123576641083,
0.4965006411075592,
0.2193922996520996,
0.1830165535211563,
0.27383944392204285,
0.243718221783638,
0.22272785007953644,
0.20793406665325165,
0.19818702340126038,
0.19207695126533508,
0.1892271488904953,
0.18984796106815338,
0.1934981793165207,
0.20042887330055237,
0.11704640090465546,
0.1256762593984604,
0.1380302459001541,
0.15554210543632507,
0.1821221262216568,
0.22327348589897156,
0.294590562582016,
0.4437068700790405,
0.9753552079200745,
0.12470095604658127,
0.04193984344601631,
0.03848263621330261,
0.03607578203082085,
0.034464310854673386,
0.03349597752094269,
0.03308868035674095,
0.033208273351192474,
0.03570190817117691,
0.04525022581219673,
0.06312886625528336,
1.0,
0.9281278848648071,
0.4757794439792633,
0.326820969581604,
0.2528233230113983,
0.2089240849018097,
0.1803993582725525,
0.16096088290214539,
0.1474027931690216,
0.1379578709602356,
0.13127265870571136,
0.12699860334396362,
0.12540613114833832,
0.1267486810684204,
0.39884063601493835,
0.39179351925849915,
0.5,
0.5,
0.5,
0.00011851061572087929,
1.0,
0.7808130979537964,
0.4014144241809845,
0.497048556804657,
0.21977420151233673,
0.1833307445049286,
0.2741309106349945,
0.24397589266300201,
0.22296150028705597,
0.20816059410572052,
0.19839195907115936,
0.19227449595928192,
0.18942095339298248,
0.1900409460067749,
0.19369441270828247,
0.20063060522079468,
0.1172584742307663,
0.12590330839157104,
0.13827820122241974,
0.15608078241348267,
0.18244224786758423,
0.2237718254327774,
0.2953447997570038,
0.4444361925125122,
0.9753275513648987,
0.11675211787223816,
0.04168549180030823,
0.038301981985569,
0.035907551646232605,
0.034303370863199234,
0.033339571207761765,
0.03293364867568016,
0.03305203467607498,
0.035654980689287186,
0.0451875701546669,
0.06304079294204712,
1.0,
0.9279412627220154,
0.47582244873046875,
0.3268144130706787,
0.25280630588531494,
0.20891083776950836,
0.18038643896579742,
0.16094817221164703,
0.1473899632692337,
0.1379445493221283,
0.1312660276889801,
0.1269902139902115,
0.12537911534309387,
0.1267208307981491,
0.4396708011627197,
0.4396708011627197,
0.4618304371833801,
0.4618304371833801,
0.483804315328598,
0.483804315328598,
0.505452036857605,
0.505452036857605,
0.5266749858856201,
0.5266749858856201,
0.547338604927063,
0.547338604927063,
0.5673576593399048,
0.5673576593399048,
0.5866857767105103,
0.5866857767105103,
0.6053164601325989,
0.6053164601325989,
2.9294713385752402e-05,
1.0,
0.779081404209137,
0.176986426115036,
0.4965006411075592,
0.2193922996520996,
0.1830165535211563,
0.27383944392204285,
0.243718221783638,
0.22272785007953644,
0.20793406665325165,
0.19818702340126038,
0.19207695126533508,
0.1892271488904953,
0.18984796106815338,
0.1934981793165207,
0.20042887330055237,
0.11704640090465546,
0.1256762593984604,
0.1380302459001541,
0.15554210543632507,
0.1821221262216568,
0.22327348589897156,
0.294590562582016,
0.4437068700790405,
0.9753552079200745,
0.12470095604658127,
0.04193984344601631,
0.03848263621330261,
0.03607578203082085,
0.034464310854673386,
0.03349597752094269,
0.03308868035674095,
0.033208273351192474,
0.03570190817117691,
0.04525022581219673,
0.06312886625528336,
1.0,
0.9281278848648071,
0.4757794439792633,
0.326820969581604,
0.2528233230113983,
0.2089240849018097,
0.1803993582725525,
0.16096088290214539,
0.1474027931690216,
0.1379578709602356,
0.13127265870571136,
0.12699860334396362,
0.12540613114833832,
0.1267486810684204,
0.4397680163383484,
0.4397680163383484,
0.46192362904548645,
0.46192362904548645,
0.48389288783073425,
0.48389288783073425,
0.5055355429649353,
0.5055355429649353,
0.5267529487609863,
0.5267529487609863,
0.5474106073379517,
0.5474106073379517,
0.5674235820770264,
0.5674235820770264,
0.5867453813552856,
0.5867453813552856,
0.6053695678710938,
0.6053695678710938,
0.0,
0.46758297085762024,
0.46757614612579346,
0.0,
0.0,
1.0,
Expand Down Expand Up @@ -679,5 +679,5 @@ def test_nuscenes(render=False):


if __name__ == '__main__':
# test_nuscenes(True)
test_pg_map(False)
test_nuscenes(False)
# test_pg_map(False)
Loading