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

[Feature] Camera rendering configuration #2137

Merged
merged 120 commits into from
Feb 5, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
120 commits
Select commit Hold shift + click to select a range
a883083
Add an initial set of masking utilities.
Gamenot Jul 18, 2023
7a7e93e
Add an initial set of masking utilities.
Gamenot Jul 18, 2023
f7e99fe
Merge branch 'tucker/occlusion_tests' of https://github.com/huawei-no…
Gamenot Aug 22, 2023
5ffedbd
Push background improvements
Gamenot Aug 22, 2023
97d4a61
Demonstrate more of observation conversion
Gamenot Aug 24, 2023
6b9af72
Fix heightfield.py
Gamenot Aug 24, 2023
1c444dd
Improve performance of kernel
Gamenot Aug 25, 2023
f65f7d2
Format
Gamenot Aug 25, 2023
dae00d0
Add edge generation file.
Gamenot Aug 25, 2023
ce31381
Show minicity.
Gamenot Aug 25, 2023
b0d920d
Update bitmap
Gamenot Aug 28, 2023
56e4f57
Improve kernel padding.
Gamenot Aug 28, 2023
2badd94
Remove default padding from mesh2bitmap.
Gamenot Aug 28, 2023
e7eec62
Fix perlin generator.
Gamenot Aug 28, 2023
8099205
Update perlin with shift.
Gamenot Aug 28, 2023
6d4a96a
Rename perlin bitmap tool.
Gamenot Aug 28, 2023
d1ffbb7
Constrain perlin tool table cache.
Gamenot Aug 28, 2023
03cbd53
Move graphics tools to sstudio.graphics.
Gamenot Aug 28, 2023
4a6ea80
Update terminology
Gamenot Aug 29, 2023
4d0e304
Warn if map source cannot be resolved.
Gamenot Aug 31, 2023
359da0a
Rename method to clarify use.
Gamenot Aug 31, 2023
53a15ef
Fix observation issues.
Gamenot Sep 6, 2023
e1a2a86
Updated changes.
Gamenot Sep 26, 2023
72e9100
Add offroad noise.
Gamenot Sep 26, 2023
5d4b56b
Add loop driving example.
Gamenot Sep 26, 2023
cae52c5
Initial gpu texture generation.
Gamenot Oct 3, 2023
7a3fe6c
Update shaders.
Gamenot Oct 24, 2023
ffa89a0
Prepare geometry for base solution.
Gamenot Oct 25, 2023
0c5ec91
Add headless display back to options.
Gamenot Oct 25, 2023
d4a1453
Update faq.
Gamenot Oct 25, 2023
fb43695
Investigate offscreen cameras.
Gamenot Oct 25, 2023
06b45c2
Update configuration.
Gamenot Oct 30, 2023
49a3690
Update
Gamenot Oct 31, 2023
1cd48e8
Update shader step with padding information.
Gamenot Nov 15, 2023
fe9e669
Update.
Gamenot Nov 28, 2023
a61858b
Fix logical errors.
Gamenot Dec 6, 2023
535ca5c
Fix missing observation and style issues.
Gamenot Dec 11, 2023
2948d08
Update observations.
Gamenot Dec 12, 2023
f5f7baf
Hook up variable custom render dependencies.
Gamenot Dec 14, 2023
552c941
Change blank space to green.
Gamenot Dec 14, 2023
203bb7e
Scale simplex noise in simplex shader.
Gamenot Dec 14, 2023
e95c1f4
Fix formatting.
Gamenot Dec 14, 2023
95dc748
Optimize waypoint conversion.
Gamenot Dec 14, 2023
8c0b775
Formatting and cleanup.
Gamenot Dec 20, 2023
18f9079
Merge branch 'master' into tucker/feature-gpu-images
Gamenot Jan 9, 2024
8194ddb
Fix math utility function.
Gamenot Jan 9, 2024
beed8ef
Fix type return error with interpolate_waypoints.
Gamenot Jan 9, 2024
cd87f66
Remove redundant method.
Gamenot Jan 9, 2024
6ffe7f6
Fix type checking.
Gamenot Jan 10, 2024
7fac0be
Remove cpu version of perlin noise generator.
Gamenot Jan 10, 2024
c8fd1bd
Fix broken import.
Gamenot Jan 10, 2024
8672fe5
Fix more types issues.
Gamenot Jan 10, 2024
13367fb
Switch on engine debug mode.
Gamenot Jan 10, 2024
99133cb
Fix bug with configuration utility.
Gamenot Jan 10, 2024
907acae
make format
Gamenot Jan 10, 2024
5559f9b
Add buffer configuration options.
Gamenot Jan 10, 2024
1353e14
Pass buffer dependencies.
Gamenot Jan 10, 2024
c7bbbe3
Plan next change.
Gamenot Jan 10, 2024
1858cb6
Add types information to sensor.
Gamenot Jan 10, 2024
e75b09e
Add the current render look.
Gamenot Jan 10, 2024
8a876fd
Solve some docs errors.
Gamenot Jan 10, 2024
626584a
Update mask example to use constant dependency.
Gamenot Jan 10, 2024
501ccae
Reduce lidar array allocations.
Gamenot Jan 11, 2024
fd471d9
Remove rogue print.
Gamenot Jan 11, 2024
33a5d5e
Determine shader input types.
Gamenot Jan 11, 2024
9f0f4f1
Fix bug with rendering on smarts reset.
Gamenot Jan 12, 2024
413ffce
Embed pybullet frequency default.
Gamenot Jan 12, 2024
b6db527
Generalize offscreen camera update signature.
Gamenot Jan 12, 2024
06d92a2
Add updating buffers.
Gamenot Jan 12, 2024
1306186
Force low dimension observations to use standard
Gamenot Jan 15, 2024
6a52eb1
Fix renderer test.
Gamenot Jan 16, 2024
64d3d55
Ensure waypoint types types are exact.
Gamenot Jan 16, 2024
d788ba5
Add remaining observation buffers.
Gamenot Jan 16, 2024
2a8aa10
Send only observation buffers that are in use.
Gamenot Jan 16, 2024
408a853
Update mask.py.
Gamenot Jan 16, 2024
cfec9f3
Update shader file names.
Gamenot Jan 17, 2024
3e30a9c
Add shader uniforms test.
Gamenot Jan 18, 2024
479c628
Update engine configuration documentation.
Gamenot Jan 26, 2024
e35caa8
Further update documenation
Gamenot Jan 26, 2024
ce124a7
Fix benchmark examples.
Gamenot Jan 26, 2024
9b72537
Remove rendundant utilities
Gamenot Jan 26, 2024
9c23c71
Fix test
Gamenot Jan 26, 2024
56df137
Update agent documentation.
Gamenot Jan 26, 2024
a27664f
Add missing uniform to test.
Gamenot Jan 26, 2024
d36d402
Rename to fix variable names.
Gamenot Jan 26, 2024
afc36b2
Remove unused graphics.
Gamenot Jan 30, 2024
b731d8e
Fix tuple addition.
Gamenot Jan 30, 2024
14452d0
Fix test failure.
Gamenot Jan 30, 2024
77e0708
Close in on release.
Gamenot Jan 30, 2024
1170218
Fix doc.
Gamenot Jan 30, 2024
e87718d
Fix type check in renderer.
Gamenot Jan 30, 2024
9758080
Fix type errors.
Gamenot Jan 30, 2024
6a57d0a
Fix docs tests.
Gamenot Jan 30, 2024
b862a4b
Add missing docstring.
Gamenot Jan 30, 2024
2b55825
Fix final type issues.
Gamenot Jan 30, 2024
ecce9dc
Fix point distance check.
Gamenot Jan 30, 2024
34cb2b3
Fix shutdown test.
Gamenot Jan 30, 2024
52e303e
Run renderer test.
Gamenot Jan 31, 2024
655ae47
Update dockerfiles to add renderer dockerfile.
Gamenot Feb 1, 2024
471ecb3
Update install options.
Gamenot Feb 1, 2024
a37cfe5
Log renderer backend.
Gamenot Feb 1, 2024
080c375
Restore renderer test.
Gamenot Feb 1, 2024
7d7f419
Enable model caching.
Gamenot Feb 1, 2024
00094dc
Use software render for tests.
Gamenot Feb 1, 2024
6aab53b
Debug rendering.
Gamenot Feb 1, 2024
83f0805
Update dockerfiles.
Gamenot Feb 4, 2024
16cbaef
Remove unused files.
Gamenot Feb 4, 2024
641601f
Try running xorg in earlier step.
Gamenot Feb 4, 2024
e950082
Add test duration information to pytest commands.
Gamenot Feb 4, 2024
799c4b0
Remove model cache optimization.
Gamenot Feb 4, 2024
2969742
Fix ray and parallel sensor resolvers.
Gamenot Feb 4, 2024
fb09fd6
Update faq.
Gamenot Feb 4, 2024
9c075f5
Update engine configuration.
Gamenot Feb 4, 2024
60d1c81
Fix broken configuration.
Gamenot Feb 5, 2024
5e0af76
Make final changes.
Gamenot Feb 5, 2024
87bc37d
Add missing details to changelog.
Gamenot Feb 5, 2024
bcdb43f
Fix docs test.
Gamenot Feb 5, 2024
268b165
Remove document reference.
Gamenot Feb 5, 2024
4f9de72
Fix sensor assignment bug.
Gamenot Feb 5, 2024
b7fff6d
Merge branch 'master' into tucker/feature-gpu-images
Gamenot Feb 5, 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
4 changes: 3 additions & 1 deletion .dockerignore
Original file line number Diff line number Diff line change
Expand Up @@ -34,12 +34,14 @@
**/.mypy_cache/
**/nosetests.xml
**/OpEn_build/
**/.panda3d_cache
**/pip-delete-this-directory.txt
**/pip-log.txt
**/pip-wheel-metadata/
**/__pycache__
**/.pytest_cache
**/.python-version
**/.pytype
**/*.rou.alt.xml
**/*.rou.xml
**/*.sif
Expand All @@ -54,7 +56,7 @@
**/.tox/
**/traffic_histories.pkl
**/*.trips.xml
**/.venv
**/.venv*
**/.vscode
**/wheels/
**/xdummy.log
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/ci-auto-commit-linux.yml
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@ jobs:
. ${{env.venv_dir}}/bin/activate
pip install --upgrade pip
pip install wheel==0.38.4
pip install .[camera_obs,rllib,test,torch,train]
pip install .[camera-obs,rllib,test,torch,train]
- name: Update requirements
run: |
. ${{env.venv_dir}}/bin/activate
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/ci-auto-commit-mac.yml
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ jobs:
. ${{env.venv_dir}}/bin/activate
pip install --upgrade pip
pip install wheel==0.38.4
pip install .[camera_obs,rllib,test,torch,train]
pip install .[camera-obs,rllib,test,torch,train]
pip freeze | grep -v 'smarts' | grep -v 'pkg-resources==0.0.0' > utils/setup/mac_requirements.txt
- name: Commit changes
uses: EndBug/add-and-commit@v7
Expand Down
10 changes: 6 additions & 4 deletions .github/workflows/ci-base-tests-linux.yml
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ jobs:
base-tests:
runs-on: ubuntu-20.04
if: github.event_name == 'push' || github.event.pull_request.head.repo.full_name != github.repository
container: ghcr.io/smarts-project/smarts:v0.6.1-minimal
container: ghcr.io/smarts-project/smarts:v2.0.0-software_render
strategy:
matrix:
tests:
Expand All @@ -30,10 +30,11 @@ jobs:
. ${{env.venv_dir}}/bin/activate
pip install --upgrade pip
pip install wheel==0.38.4
pip install -e .[camera_obs,opendrive,test,test_notebook,torch,train,gif_recorder,gymnasium,argoverse,envision,sumo]
pip install -e .[camera-obs,opendrive,test,test-notebook,torch,train,gif-recorder,gymnasium,argoverse,envision,sumo]
if echo ${{matrix.tests}} | grep -q -e "test_rllib_hiway_env.py"; then pip install -e .[rllib]; fi
if echo ${{matrix.tests}} | grep -q -e "test_examples.py"; then pip install -e .[examples,rllib]; fi
if echo ${{matrix.tests}} | grep -q -e "/smarts/ray"; then pip install -e .[ray]; fi
if echo ${{matrix.tests}} | grep -q -e "/smarts/core"; then (/usr/bin/Xorg -noreset +extension GLX +extension RANDR +extension RENDER -logfile ./xdummy.log -config /etc/X11/xorg.conf -novtswitch :1 &); fi
- name: Build scenarios
run: |
. ${{env.venv_dir}}/bin/activate
Expand All @@ -55,6 +56,7 @@ jobs:
--doctest-modules \
--forked \
--dist=no \
--durations=10 \
-n auto \
--ignore-glob="**/ros.py" \
--ignore-glob="**/waymo_map.py" \
Expand Down Expand Up @@ -85,7 +87,7 @@ jobs:
. ${{env.venv_dir}}/bin/activate
pip install --upgrade pip
pip install wheel==0.38.4
pip install -e ./../../.[camera_obs,argoverse,sumo,test]
pip install -e ./../../.[camera-obs,argoverse,sumo,test]
pip install -e ./inference/
- name: Run smoke tests
run: |
Expand Down Expand Up @@ -117,7 +119,7 @@ jobs:
. ${{env.venv_dir}}/bin/activate
pip install --upgrade pip
pip install wheel==0.38.4
pip install -e .[camera_obs,argoverse,test,ray,sumo]
pip install -e .[camera-obs,argoverse,test,ray,sumo]
scl zoo install examples/${{matrix.tests}}/inference
- name: Run smoke tests
run: |
Expand Down
4 changes: 2 additions & 2 deletions .github/workflows/ci-base-tests-mac.yml
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ jobs:
- ./examples/tests --ignore=./examples/tests/test_learning.py
- ./smarts/sstudio
- ./smarts/env/tests/test_rllib_hiway_env.py
- ./smarts/core --nb-exec-timeout 65536 --ignore=./smarts/core/tests/test_notebook.py
- ./smarts/core --nb-exec-timeout 65536 --ignore=./smarts/core/tests/test_notebook.py --ignore=./smarts/core/tests/test_renderers.py::test_custom_shader_pass_buffers
- ./smarts/env --ignore=./smarts/env/tests/test_rllib_hiway_env.py
- ./smarts/ray
steps:
Expand All @@ -46,7 +46,7 @@ jobs:
pip install --upgrade pip
pip install wheel==0.38.4
pip install -r utils/setup/mac_requirements.txt
pip install -e .[camera_obs,opendrive,rllib,test,test_notebook,torch,train,argoverse,envision,sumo]
pip install -e .[camera-obs,opendrive,rllib,test,test-notebook,torch,train,argoverse,envision,sumo]
if echo ${{matrix.tests}} | grep -q -e "/env"; then pip install -e .[rllib]; fi
if echo ${{matrix.tests}} | grep -q -e "/examples"; then pip install -e .[examples,rllib]; fi
if echo ${{matrix.tests}} | grep -q "/ray"; then pip install -e .[ray]; fi
Expand Down
4 changes: 2 additions & 2 deletions .github/workflows/ci-format.yml
Original file line number Diff line number Diff line change
Expand Up @@ -59,7 +59,7 @@ jobs:
python3.8 -m venv ${{env.venv_dir}}
. ${{env.venv_dir}}/bin/activate
pip install wheel==0.38.4
pip install -e .[dev,camera_obs,train,test]
pip install -e .[dev,camera-obs,train,test]
- name: Get changed files on branch since branching
id: changed-files
shell: bash
Expand Down Expand Up @@ -98,7 +98,7 @@ jobs:
. ${{env.venv_dir}}/bin/activate
pip install --upgrade pip "setuptools<58.3.0"
pip install wheel==0.38.4
pip install .[camera_obs,doc,train,ray,envision,argoverse,opendrive,waymo,sumo]
pip install .[camera-obs,doc,train,ray,envision,argoverse,opendrive,waymo,sumo]
cd ${GITHUB_WORKSPACE}/docs
make html SPHINXOPTS="-W -T -E -n --keep-going -b spelling -b linkcheck"
- name: Check build output
Expand Down
4 changes: 2 additions & 2 deletions .github/workflows/ci-pull-request.yml
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ jobs:
. ${{env.venv_dir}}/bin/activate
pip install --upgrade pip
pip install wheel==0.38.4
pip install .[camera_obs,rllib,test,torch,train]
pip install .[camera-obs,rllib,test,torch,train]
- name: SMARTS benchmark
run: |
cd $GITHUB_WORKSPACE
Expand All @@ -32,6 +32,6 @@ jobs:
scl scenario build-all --clean ./scenarios
pytest --benchmark-save=previous --benchmark-min-rounds=10 --benchmark-timer=time.process_time ./smarts/env/tests/test_benchmark.py
git checkout -
pip install .[camera_obs,rllib,test,torch,train]
pip install .[camera-obs,rllib,test,torch,train]
scl scenario build-all --clean ./scenarios
pytest --benchmark-compare=0001_previous --benchmark-compare-fail=mean:10% --benchmark-min-rounds=10 --benchmark-timer=time.process_time ./smarts/env/tests/test_benchmark.py
2 changes: 1 addition & 1 deletion .github/workflows/ci-python-version-test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -27,4 +27,4 @@ jobs:
. ${{env.venv_dir}}/bin/activate
pip install --upgrade pip
pip install wheel==0.38.4
pip install .[camera_obs,rllib,sumo,test,torch,train]
pip install .[camera-obs,rllib,sumo,test,torch,train]
2 changes: 1 addition & 1 deletion .github/workflows/ci-test-learning.yml
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ jobs:
. ${{env.venv_dir}}/bin/activate
pip install --upgrade pip
pip install wheel==0.38.4
pip install .[camera_obs,rllib,test,torch,train]
pip install .[camera-obs,rllib,test,torch,train]
- name: Verify learning
run: |
cd $GITHUB_WORKSPACE
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/ci-test-long-determinism.yml
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ jobs:
python3.8 -m venv ${{env.venv_dir}}
. ${{env.venv_dir}}/bin/activate
pip install --upgrade pip
pip install .[camera_obs,rllib,test,torch,train]
pip install .[camera-obs,rllib,test,torch,train]
- name: Verify long determinism
run: |
cd $GITHUB_WORKSPACE
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/ci-test-memory-growth.yml
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ jobs:
pip install --upgrade pip
pip install wheel==0.38.4
pip install pympler
pip install .[camera_obs,rllib,test,torch,train]
pip install .[camera-obs,rllib,test,torch,train]
- name: Test memory growth
run: |
cd $GITHUB_WORKSPACE
Expand Down
6 changes: 5 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -66,6 +66,9 @@ target/
# VSCode
.vscode

# panda3d
.panda3d_cache

# pyenv
.python-version

Expand Down Expand Up @@ -153,4 +156,5 @@ collected_observations/
**/diagnostic/reports/*

# Experiments
outputs/
outputs/
vaw/
2 changes: 1 addition & 1 deletion .readthedocs.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ python:
- method: pip
path: .
extra_requirements:
- camera_obs
- camera-obs
- doc
- train
- ray
Expand Down
12 changes: 12 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,8 @@ Copy and pasting the git commit messages is __NOT__ enough.
- The following methods now exist explicitly `Vehicle.{add_sensor|detach_sensor|subscribed_to|sensor_property|}`.
- Resources loaded with `load_yaml_config_with_substitution()` now substitute in SMARTS configuration with single squiggle bracket `${}` syntax. This is currently restricted to environment variable names prefixed with `"SMARTS_"`. This extends to benchmark configuration and vehicle configuration.
- Default vehicle definitions can be now modified using `assets:default_vehicle_definitions_list`/`SMARTS_ASSSETS_DEFAULT_VEHICLE_DEFINITIONS_LIST` or by providing a `vehicle_definitions_list.yaml` in the scenario. These vehicle types are related to the `AgentInterface.vehicle_type` attribute.
- New `CustomRender` agent interface option added. This allows using `glsl` fragment scripts to generate images from camera textures and simulation buffers.
- New `ObfuscationMap` agent interface option added. This uses the `OccupancyGridMap` to help generate an image of ground viewable area from the ego vehicle's perspective.
- There is now a centralized `TraCI` server mananger that can be used to prevent port collisions. It can be run using `python smarts.core.utils.sumo_server` and the use of the server can be enabled with `SMARTS_SUMO_TRACI_SERVE_MODE="central"`.
### Changed
- `VehicleIndex.build_agent_vehicle()` no longer has `filename` and `surface_patches` parameters.
Expand All @@ -30,6 +32,12 @@ Copy and pasting the git commit messages is __NOT__ enough.
- `Vehicle.build_agent_vehicle()` and `Vehicle.build_social_vehicle()` moved to `VehicleIndex`.
- `smarts.core.configuration.Configuration.get_settings()` now uses the `PyYAML` default instead of forcefully casting to `str`.
- Added `AgentInterface.vehicle_class` which allows selection of a dynamics vehicle from the vehicle definitions list file.
- Waypoints now have a `position` property (which will eventually replace `pos`).
- You must now implement `act()` for any agent inheriting from `smarts.core.agent.Agent`.
- `FunctionAgent` is now no longer dynamically defined.
- `Vias.hit_via_points` is now a property.
- `ViaPoint` now has an attribute `hit` which determines if the point has been "collected".
- Dependencies switched back to using `-` instead of `_` (e.g. "camera-obs").
### Deprecated
- Module `smarts.core.models` is now deprecated in favour of `smarts.assets`.
- Deprecated a few things related to vehicles in the `Scenario` class, including the `vehicle_filepath`, `tire_parameters_filepath`, and `controller_parameters_filepath`. The functionality is now handled through the vehicle definitions.
Expand Down Expand Up @@ -57,6 +65,8 @@ Copy and pasting the git commit messages is __NOT__ enough.
- The via sensor and trip meter sensor now work without a mission.
- Fixed a bug with `VehicleIndex.attach_sensors_to_vehicle()` that would generate an invalid plan.
- Fixed a bug where vehicle sensor meta attributes would reference the wrong vehicle.
- Resolved issue with road waypoints not showing waypoints if the horizon was larger than the start of the lane.
- Fixed an issue where `SMARTS.reset()` would be unable to render cameras.
- Squashed TraCI "retrying" stdout messages.
### Removed
### Security
Expand Down Expand Up @@ -126,6 +136,8 @@ Copy and pasting the git commit messages is __NOT__ enough.
- Interest vehicles now show up in Envision.
- Seed of `hiway-v1` env can be retrieved through a new property `seed`.
- Added `TrafficEngineActor` to describe a scenario studio defined actor that is controlled by a traffic engine.
- Docker images from now on out base from ``ubuntu:focal``.
- A new Docker image has been added for software rendering for use cases where there is no display and GPU.
### Changed
- Changed waypoints in sumo maps to use more incoming lanes into junctions.
- Increased the cutoff radius for filtering out waypoints that are too far away in junctions in sumo maps.
Expand Down
4 changes: 3 additions & 1 deletion Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@ test: build-all-scenarios
--doctest-modules \
--forked \
--dist=loadscope \
--durations=0 \
-n `expr \( \`nproc\` \/ 2 \& \`nproc\` \> 3 \) \| 2` \
--nb-exec-timeout 65536 \
./examples/tests ./smarts/env ./envision ./smarts/core ./smarts/sstudio \
Expand Down Expand Up @@ -48,6 +49,7 @@ test-long-determinism:
scl scenario build --clean scenarios/sumo/minicity
PYTHONHASHSEED=42 pytest -v \
--forked \
--durations=0 \
./smarts/env/tests/test_determinism.py::test_long_determinism

.PHONY: test-memory-growth
Expand All @@ -63,7 +65,7 @@ test-memory-growth: build-all-scenarios

.PHONY: benchmark
benchmark: build-all-scenarios
pytest -v ./smarts/env/tests/test_benchmark.py
pytest -v --durations=0 ./smarts/env/tests/test_benchmark.py

.PHONY: test-zoo
test-zoo: build-all-scenarios
Expand Down
4 changes: 2 additions & 2 deletions docs/benchmarks/driving_smarts_2023_1.rst
Original file line number Diff line number Diff line change
Expand Up @@ -256,7 +256,7 @@ Train
$ source ./.venv/bin/activate
$ pip install --upgrade pip
$ pip install wheel==0.38.4
$ pip install -e ./../../.[camera_obs,argoverse,envision,sumo]
$ pip install -e ./../../.[camera-obs,argoverse,envision,sumo]
$ pip install -e ./inference/

+ Train locally without visualization
Expand Down Expand Up @@ -307,7 +307,7 @@ Evaluate
$ source ./.venv/bin/activate
$ pip install --upgrade pip
$ pip install wheel==0.38.4
$ pip install -e .[camera_obs,argoverse,envision,sumo]
$ pip install -e .[camera-obs,argoverse,envision,sumo]
$ scl zoo install examples/e10_drive/inference
# For Driving SMARTS 2023.1
$ scl benchmark run driving_smarts_2023_1 examples.e10_drive.inference:contrib-agent-v0 --auto-install
Expand Down
4 changes: 2 additions & 2 deletions docs/benchmarks/driving_smarts_2023_3.rst
Original file line number Diff line number Diff line change
Expand Up @@ -234,7 +234,7 @@ Train
$ source ./.venv/bin/activate
$ pip install --upgrade pip
$ pip install wheel==0.38.4
$ pip install -e ./../../.[camera_obs,argoverse,envision,sumo]
$ pip install -e ./../../.[camera-obs,argoverse,envision,sumo]
$ pip install -e ./inference/

+ Train locally without visualization
Expand Down Expand Up @@ -285,7 +285,7 @@ Evaluate
$ source ./.venv/bin/activate
$ pip install --upgrade pip
$ pip install wheel==0.38.4
$ pip install -e .[camera_obs,argoverse,envision,sumo]
$ pip install -e .[camera-obs,argoverse,envision,sumo]
$ scl zoo install examples/e11_platoon/inference
$ scl benchmark run driving_smarts_2023_3 examples.e11_platoon.inference:contrib-agent-v0 --auto-install

Expand Down
4 changes: 3 additions & 1 deletion docs/conf.py
Original file line number Diff line number Diff line change
Expand Up @@ -60,7 +60,6 @@
"%s",
),
}

# Configuring automated generation of api documentation.
# See: https://github.com/sphinx-contrib/apidoc
apidoc_module_dir = ".."
Expand All @@ -72,6 +71,8 @@
"scenarios",
"smarts/ros",
"zoo/policies/interaction_aware_motion_prediction",
"smarts/waymo/waymo_open_dataset/protos",
"zoo/evaluation/metrics",
]
apidoc_extra_args = [
"--force",
Expand Down Expand Up @@ -126,6 +127,7 @@
("py:class", "ObsType"),
("py:class", "smarts.env.gymnasium.wrappers.metric.utils.T"),
("py:class", "enum.Enum"),
("py:class", "bc.BulletClient"),
}
nitpick_ignore_regex = {
(r"py:.*", r"av2\..*"),
Expand Down
30 changes: 22 additions & 8 deletions docs/resources/faq.rst
Original file line number Diff line number Diff line change
Expand Up @@ -11,19 +11,33 @@ This is a list of frequently asked questions. Feel free to suggest new entries!
2. Where can I find debug logs?
In most cases SMARTS debug logs are located at ``~/.smarts``. These can be helpful to diagnose problems.

3. Exception: Could not open window.
This may be due to some old dependencies of ``Panda3D``. Try the following instructions to solve it.
3. Exception: Could not open display. (Ubuntu)
This may be due to needing a display to render with a ``GL`` renderer backend setting. Try the following instructions to solve it.

.. code-block:: bash

# Set DISPLAY
$ vim ~/.bashrc
$ export DISPLAY=":1"
# Set DISPLAY, can be as needed
$ echo export DISPLAY=":1" >> ~/.bashrc
$ source ~/.bashrc

# Set xorg server
# Do once: Install x11 dummy which allows creating a fake display
$ sudo apt-get install -y xserver-xorg-video-dummy x11-apps
# Potentially the following if you need software rendering:
# sudo apt-get install -y mesa-utils

# Do once: set xorg server
$ sudo wget -O /etc/X11/xorg.conf http://xpra.org/xorg.conf
$ sudo /usr/bin/Xorg -noreset +extension GLX +extension RANDR +extension RENDER -logfile ./xdummy.log -config /etc/X11/xorg.conf $DISPLAY & 0

4. The simulation keeps crashing on connection in ``SumoTrafficSimulation``. How do I fix this?
# Do as needed:
$ sudo /usr/bin/Xorg -noreset +extension GLX +extension RANDR +extension RENDER -logfile ./xdummy.log -config /etc/X11/xorg.conf $DISPLAY &


Note that ``mesa-utils`` installs ``llvm``, which is one option out of several that emulate ``OpenGL`` using software. ``llvm`` is not needed if a GPU is available.

4. Custom rendering and Obfuscation maps show completely blank. (Ubuntu)
This is due to needing ``OpenGL`` to render using scripts. If you have a GPU make sure ``OpenGL`` is installed and the GPU has the necessary drivers for rendering.

See the previous question if you need software rendering.

5. The simulation keeps crashing on connection in ``SumoTrafficSimulation``. How do I fix this?
This is likely due to using large scale parallelization. You will want to use the centralized management server. See :ref:`centralized_traci_management`.
6 changes: 3 additions & 3 deletions docs/setup.rst
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@ This includes SMARTS but none of the examples.
$ bash utils/setup/install_deps.sh

# This should install the latest version of SMARTS from package index (generally PyPI).
$ pip install 'smarts[camera_obs,sumo,example]'
$ pip install 'smarts[camera-obs,sumo,example]'


Development
Expand Down Expand Up @@ -79,13 +79,13 @@ Run the following commands to setup the SMARTS simulator.
$ pip install --upgrade pip

# Install smarts with extras as needed. Extras include the following:
# `camera_obs` - needed for rendering camera observations, and for testing.
# `camera-obs` - needed for rendering camera observations, and for testing.
# `sumo` - needed for using SUMO scenarios.
# `test` - needed for running tests.
# `example` - needed for running examples.
# `--config-settings editable_mode=strict` - may be needed depending on version of setuptools.
# See https://github.com/huawei-noah/SMARTS/issues/2090.
$ pip install -e '.[camera_obs,sumo,test,example]' --config-settings editable_mode=strict
$ pip install -e '.[camera-obs,sumo,test,example]' --config-settings editable_mode=strict

# Run sanity-test and verify they are passing.
# If tests fail, check './sanity_test_result.xml' for test report.
Expand Down
Loading
Loading