Skip to content

Sync minimal branch with upstream main#9

Open
BridgerB wants to merge 47 commits intocommaai:minimalfrom
BridgerB:sync-upstream-main
Open

Sync minimal branch with upstream main#9
BridgerB wants to merge 47 commits intocommaai:minimalfrom
BridgerB:sync-upstream-main

Conversation

@BridgerB
Copy link

Syncs with metadriverse/metadrive main branch.

Key changes from upstream:

  • macOS support fixes (skybox shaders, multisamples, OpenGL 4.1)
  • Python 3.12 compatibility improvements
  • Various bug fixes

Preserved minimal branch customizations:

  • Configurable anisotropic_filtering option
  • Reduced texture/model assets
  • Trimmed dependencies (no scipy, seaborn, pandas)
  • Removed tests and examples from wheel

QuanyiLi and others added 30 commits July 21, 2024 13:12
* sumo mpa support

* format

* add doc string

* format
…rse#746)

* use render for mixed traffic env

* fix edge net bug

* example of adding cars

* fix doc

* fix dependency

* add doc string

* format
* add on_broken_line_done

* fix

---------

Co-authored-by: pengzhenghao <pzh@cs.ucla.edu>
…nment (metadriverse#699)

* better way to handle U turn in Intersection

* INIT

* Revert "better way to handle U turn in Intersection"

This reverts commit d9bf4bb.

* add doc

* fix bug

* add docs

* If navigation_module is set to None, remove navigation in StateObservation. (I am not 100% sure if this is OK. Might cause error.)

* WIP: Implementing a navigation/goal manager

* Implemented goal / navigation managers

* adding a U-turn intersection block

* add assert in node_road_network

* fix potential bug

* Now the environment is running correctly! (but reset is broken)

* introduce observation

* format

* add more docs

* introduce a config to disable navigation arrows

* minor

* use varying dynamics agent in multi-goal env

* support use a list of types to control PG map; allow set map=None to disable shortcut config map.

* allow change radius of the intersection; set accident_prob=1.0

* 1) introduce goal-agnoistic info["obs/ego/*"], 2) rename keys in info dict

* optimize the reward structure, now:
===== timestep 220 =====
route completion:
	route_completion/goals/default: 0.92
	route_completion/goals/go_straight: 0.50
	route_completion/goals/left_turn: 0.46
	route_completion/goals/right_turn: 0.92
	route_completion/goals/u_turn: 0.53

reward:
	reward/default_reward: 1.27
	reward/goal_agnostic_reward: 0.05
	reward/goals/default: 1.27
	reward/goals/go_straight: 0.14
	reward/goals/left_turn: 0.06
	reward/goals/right_turn: 1.27
	reward/goals/u_turn: 0.01
=======================

* to follow setting, use lane_num=1

* format, ready to launch SB3 td3

* Remove varying dynamics

* lane_num=1

* allow do more visualization

* add default arrive_dest

* add some comments

* now we return full observation for different goals in info["obs/goals/xxx"]

* [DANGER] allow to generate sidewalk for "negative road". Not sure the affect of this commit in other cases. Might need further check.

* Add SIDEWALK to the side detector & the lane line detector.

* use 240line for sidedetector, remove vehicle/lane detector

* fix a bug

* Fix a severe bug that messes up observation

* introduce a penalty for wrong way

* When draw the line to next checkpoint, also draw the line from next ckpt to next next ckpt.

* Add crash_sidewalk_penalty for MetaDrive env, default crash_sidewalk_penalty=0

* Set on_continuous_line_done=False for multigoal env

* Add config "out_of_road_done" for MDEnv

* Remove U turn

* Set out_of_road_done=False

* Add penalty for out_of_route (this might be helpful in multigoal setting)

* Change reward scheme

* Change radius to 12

* remove goal_agnostic_reward

* add GOAL_DEPENDENT_STATE

* up

* change obs

* Add some randomness in map

* enable U turn

* WIP: Now support conventional RL env

* fix bug

* Fix a bug and use Customize Observation

* Better handle lidars' configs

* Remove those hyper diff from MetaDriveEnv

* fix

* Fix

* format

* remove a file

* Add an example notebook for multigoalintersection

* Setup FFpmeg in CI to support video gen in docs

* minor

* minor

* Add docs

* Fix test

* format

* try fix ffmpeg

* Fix test
* US Merge and splits for ramps

* Format

* Fix lines

* Format
* fix ramp rendering

* fix physics for ramp

* format

* fix test

* deprecate opendrive API as we now using SUMO netconverter

* format
To avoid a special case where the map is too large, adjust the scaling automatically in TopDownRenderer
* non-breaking change

* non-breaking change

* non-breaking changes: Introduce PedestrianBoundingBox

* non-breaking changes

* non-breaking changes

* Fix a bug in cyclist: The object shape is wrong.

* non-breaking changes: Introduce CyclistBoundingBox

* non-breaking changes: Introduce VaryingDynamicsBoundingBoxVehicle (TODO: Semantics.BUS.label is not used)

* non-breaking changes: Introduce drive_in_real_env_with_bounding_box.py (example file)

* Fix a bug in ReplayPolicy: The object is now set_static(True) so it won't be affected by gravity or collision.

* non-breaking change

* non-breaking changes: implement generate_distinct_rgb_values (for instance level colors?)

* Introduce config "use_bounding_box" in ScenarioEnv, impl the proper config postprocessing

* non-breaking changes: Introduce ScenarioAgentManager

* non-breaking changes: Update Instance Camera

* non-breaking changes: fix a bug

* Update scenario_traffic_manager.py: Use Cyc/PedBoundingBox, deal with use_bounding_box

* Update scenario_traffic_manager.py: add w/l/h info into vehicle_config before spawning it.

* non-breaking changes: Update scenario_map_manager.py, add w/l/h to vehicle config (traffic agent)

* Update get_vehicle_type, remove randomization of vehicle type in ScenarioEnv

* Default even_sample_vehicle_class=False. (remove randomization of veh type in ScenarioEnv)

* non-breaking change

* Create new car model with different scale and shape, if self.config['scale'] is set.

* Deprecate even_sample_vehicle_class in ScenarioEnv

* Allow to update the tire_scale if config['scale'] is set in ScenarioEnv

* Fix a bug in ScenarioMapManager: for Nuscene's data, the width / length is wrong (error from source data, not our problem).

* format

* Minor update: change API for camera.get_image
* revert the bug causing tire-scale code

* Hot fix the bug

* Allow to config "set_static", default to False to fix the bug of flickerring visualization.
* Introduce ScenarioOnlineDataManager and ScenarioOnlineEnv

* Prepare the ScenarioOnlineEnv

* revert the bug causing tire-scale code

* Hot fix the bug

* Allow to config "set_static", default to False to fix the bug of flickerring visualization.

* add a warning

* Introduce an example script

* Fix the map bug: in metadrive, all SD should be centralized.
* Update to 0.4.3

* Update to 0.4.3
Fix issue that car can't full stop if brake=-1
metadriverse#788)

Fix a bug caused by CUDA image caching: when setting new cam HPR/Pos, cuda image is not updated.
* Introduce a test script for determinism

* Introduce a test script for determinism

* Find a good test threshold for step=50 rollout
* Clean code

* clean README

* Add a simgen render notebook

* Add simgenrender example

* Up

* Fix

* update

* Fix

* Trying to fix test by using smaller depth image

* format
* upgrade to support mac

* upgrade to support mac

* upgrade to support mac

* fix semantic cam

* add an empty line to kick off test again

---------

Co-authored-by: Quanyi Li <quanyili0057@gmail.com>
Co-authored-by: pengzhenghao <pzh@cs.ucla.edu>
* Update README.md

* Update README.md

---------

Co-authored-by: Zhenghao Peng <pzh@cs.ucla.edu>
* a new depth camera is implemented to use the depth test!

* add installation trouble shooting

* add message

* use compute shader only for cuda

* new feature tested with cuda windows

* depth camera is tested on all platforms, let's restore the test

* update readme

* fix ramp bug

* format

* not run make video
* update fov config
add collect_sensors.py

* fix magic number

* camera mask for debugging drawer

* workable version

* revert camera fov

* add example

* delete debug example

* add test

* add point cloud to it

* update doc and readme

* fix simgen test

* remove check for duplicated sensor

* format

* don not test simgen

---------

Co-authored-by: Alan <fenglan18@outlook.com>
* allow large terrain

* adjust tex ratio

* by default 2048 terrain size

* support cross walk

* test map culling

* add perf count

* macos test

* new shader

* fix shading

* fix render pipe

* tex splatting

* fix

* final version

* format

* fix mac bug

* fix mac bug

* fix semantic

* allow show sensor

* format
* adjust shader for lane line rendering

* add multi sample

* use 1024 for scenarioEnv
* new traffic light implementation

* add test for checking lidar

* add test and test success

* format
metadriverse#807)

Update the multigoal environment: 1) remove visualization to native destination and waypoints, 2) migrate the "MultiGoalIntersectionEnvWrapped" into "MultiGoalIntersectionEnv"
* remove seaborn

* format

* Fix

* remove

* fix

* format

* Fix a test

* fix bug

* fix

---------

Co-authored-by: Maxime Desroches <desroches.maxime@gmail.com>
pengzhenghao and others added 16 commits February 2, 2025 09:10
* dont force pygame

* format

* fix test

* fix test

---------

Co-authored-by: Maxime Desroches <desroches.maxime@gmail.com>
…etadriverse#720) (metadriverse#811)

* support Python 3.12

* add matrix support for 3.12 python tests

* add workflow_dispatch

* pin ray 2.24.0

* pin ray=2.24.0

* cancel ray from requirement

* cancel ray installation from workflow

* remove useless distutil code

* redo the merge with main

* fix doc coverage

* sync ipynb to this repo

---------

Co-authored-by: BBBmau <alvarez.mauriciotm@gmail.com>
Co-authored-by: Quanyi Li <quanyili0057@gmail.com>
* Allow config['num_scenarios']=-1

* Allow config['num_scenarios']=-1
* Prepare a script to reproduce MultiGoal env wrong terrain

* format

* Add more stuff to be cleared when terrain.destroy() (suggested by Github copilot..)

* Minor fix

* Fix the terrain bug: we have an irresponsible assertion on the drivable_area

* Fix bug in terrain: if drivable area is not set, assume the whole region is drivable area and set Z to terrain height

* Finish test

* Format
* remove scipy in point cloud lidar

* format

---------

Co-authored-by: pengzhenghao <pzh@cs.ucla.edu>
…rse#754) (metadriverse#812)

* remove scipy

* Fix import to scipy, but just curious if that will impact efficiency of get_rgb_array_cpu in PointCloudLidar

---------

Co-authored-by: Maxime Desroches <desroches.maxime@gmail.com>
* remove upper bound of python

* fix bug of gltf

* remove panda3d-gltf-1.x
* Implemeted a basic traffic mode

* Format
* Implemented a variant of ReplayEgoCarPolicy called "WaypointPolicy", which allows on-line modification of position, heading, velocity, and angular velocity of the ego car.

* Formatted the files

* Update the after_step of MultiGoalIntersectionNavigationManager to take args and kwawrgs(without any actual effect though)

* Formatting

* Fix the argument passing by enforcing a method signature checker for BaseEngine.after_step(). Now, only managers whose "after_step()" takes args and kwargs will have those passed into.

* Formatting

* Revert certain changes

* format

* Waypoint policy in ego coordinates implemented.

* Updated formulation detail

* Test added

* Remove uneeded file

* Updated ExampleManager

* Formatted the files

* No cubic splint

* Formatted the files

* args, kwargs update

* args, kwargs update

* Maybe relax the mem leak a little bit?

* Remove not related code vectorized.py

* Roll back a memory leak test

* Reformat the waypoint policy unit test, and IT DOESN'T TEST THE CLOSED-LOOP YET!

* Implement the WaypointPolicy

* Revert some changes

* Finish the unit test for WaypointPolicy/Env

* Add some TODO. Please fix @Weizhen

* Fix bugs

* rename and fix

---------

Co-authored-by: pengzhenghao <pzh@cs.ucla.edu>
… for static fields (metadriverse#837)

Fix minor bug: Use class instead of instance for static fields

In `get_number_summary`, a few static fields and functions were being accessed from an instance of ScenarioDescription rather than the class.
* force set store_map=False for ScenarioOnlineEnv

* format
@BridgerB BridgerB closed this Feb 1, 2026
@BridgerB BridgerB reopened this Feb 1, 2026
@BridgerB BridgerB changed the base branch from main to minimal February 1, 2026 00:02
@BridgerB BridgerB mentioned this pull request Feb 1, 2026
@BridgerB BridgerB force-pushed the sync-upstream-main branch 5 times, most recently from 8b29950 to 57ff6b0 Compare February 1, 2026 00:48
Syncs with metadriverse/metadrive main branch (46 commits behind).

Key changes from upstream:
- macOS support fixes (skybox shaders, multisamples, OpenGL 4.1)
- Python 3.12 compatibility improvements
- Various bug fixes

Preserved minimal branch customizations:
- Configurable anisotropic_filtering option
- Reduced texture/model assets
- Trimmed dependencies (no scipy, seaborn, pandas)
- Removed tests and examples from wheel
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Comments