Python API mode: set the weather from the YAML configuration
Nobody has claimed this yet.
Assessment
- Difficulty
- 2/5
- Estimated time
- 1-3 hours
- Newbie friendliness
- 38/100
- Issue type
- Feature
- Clarity
- Clearly specified
- Activity status
- Active
- Tech stack
- python
- Domain
- autonomous-driving
Research direction
Read utils/carla_world_generator.py and trace where the world is loaded from the simulation configuration. Check the CARLA quick start page for the documented Simulation keys. Done means the YAML weather preset and optional overrides are applied before metrics are recorded, so the metrics JSON reflects the configured weather.
Written by the indexing model from the issue text.
Description
Expected behavior
The experiment YAML should allow setting the weather, so experiments are reproducible and match the conditions used to train the model, e.g.:
Simulation:
Map: 'Town02'
Weather:
Preset: 'ClearNoon'
sun_altitude_angle: 90
cloudiness: 0
Actual behavior
The world starts with whatever weather the map or the server had. The recorded metrics store that weather, but it cannot be configured.
Steps to reproduce
Run any Python API config (e.g. default_carla_api.yml) and check the weather field in the metrics JSON: it is the map's weather (in my case cloudiness 60, precipitation 40, sun altitude 20).
Environment
Kubuntu 26.04.1 (Ubuntu base, X11 session), kernel 7.0, Intel i9-12900K, 32 GB RAM, NVIDIA RTX 5070 12 GB (driver 580.178.04), Python 3.10, CARLA 0.9.15 in Docker, Behavior Metrics noetic-devel (dec1502), Python API mode.
Possible cause
utils/carla_world_generator.py loads the map but never calls set_weather() from the configuration.
Possible solution
Right after sim_world = client.get_world(), read Simulation > Weather (a carla.WeatherParameters preset plus optional overrides) and apply it with set_weather(). It runs before ControllerCarla reads the weather, so the metrics JSON records the configured weather.
I have the patch ready (only utils/carla_world_generator.py), plus a documentation update for the Simulation key in the CARLA quick start page. The patch also applies cleanly on feature/carla-python-api-metrics, which changes the same file: happy to target whichever branch you prefer.
Related: #742 (external CARLA server in Python API mode, same test setup).
cc Daniel Guerrero (author of feature/carla-python-api-metrics)
- Dominant language
- Python
- Stars
- 65
- Forks
- 53
- Avg merge
- 7m
- Merged PRs (30d)
- 1
Getting set up
- No Dockerfile or Docker Compose file
- No pull request template
- Read the contributing guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
More from JdeRobot/BehaviorMetrics
-
Python API mode: lane keeping and steering stability metrics (right lane percentage, steering zero crossings)Possibly taken @amateusr claimed this 20 days ago. Open
Difficulty 4/5 3-5 days Newbie friendliness 25/100
JdeRobot/BehaviorMetrics#746 ·
-
Difficulty 4/5 3-5 days Newbie friendliness 45/100
JdeRobot/BehaviorMetrics#745 ·
-
Python API mode: allow using an external CARLA server (e.g. Docker) without killing itPossibly taken @amateusr claimed this 20 days ago. Open
Difficulty 3/5 1-2 days Newbie friendliness 30/100
JdeRobot/BehaviorMetrics#741 ·
-
Broken links in Quick start CARLA on BehaviorMetrics websitePossibly taken @canveo claimed this 293 days ago. Open
Difficulty 2/5 1-3 hours Newbie friendliness 42/100
JdeRobot/BehaviorMetrics#724 · 2 comments ·
-
Add reward-based metric for policy evaluation in CARLAMay be free again @Satyamgupta2365 claimed this 284 days ago, and no pull request is open. Open
Difficulty 5/5 Over a week Newbie friendliness 30/100
JdeRobot/BehaviorMetrics#723 · 4 comments ·
All issues in JdeRobot/BehaviorMetrics
Similar issues
-
Difficulty 2/5 1-3 hours Newbie friendliness 80/100
UKGovernmentBEIS/inspect_ai#6733 ·
Maintainers usually reply within 1 day
-
Difficulty 2/5 1-3 hours Newbie friendliness 62/100
ProyectoRespira/respira-webapp#334 ·
Maintainers usually reply within 1 day
-
bug security-alert
Difficulty 2/5 1-3 hours Newbie friendliness 62/100
spectrayan/carefold#391 ·
Maintainers usually reply within 1 day
-
Difficulty 1/5 Under an hour Newbie friendliness 88/100
Jakeschincariol/instagram-agent-skill#83 ·
Maintainers usually reply within 10 days
-
Difficulty 1/5 Under an hour Newbie friendliness 64/100