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

Scene plotter visualiztion features #134

Merged
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
24 commits
Select commit Hold shift + click to select a range
3f33f59
Added suggested wording updates to BLAME documentation.
Aug 8, 2023
d15c25a
Added the ability to specify face and edge colours for all agents in …
Aug 11, 2023
acb9f6b
Revert "Added suggested wording updates to BLAME documentation."
Aug 11, 2023
a90305a
Add docstrings to public methods of ScenePlotter and parameter valida…
Aug 15, 2023
4e4bcc0
Added OpenDRIVE map variables as kwargs to ScenePlotter.
Aug 15, 2023
ec75d3e
Fixed name error in kwarg validation.
Aug 15, 2023
688e977
Updated documentation and fixed data validation including open_drive …
Aug 23, 2023
d916d07
Added website documentation for Utils, ONLY for the ScenePlotter class.
Aug 23, 2023
2f9ee0c
Changed a few if statements to explicitly reference None case.
Aug 23, 2023
864027f
Merge branch 'develop' into scene_plotter_visualiztion_features
Aug 23, 2023
9ad33bd
Updates to ScenePlotter sphinx documentation.
Aug 23, 2023
4212e01
Updated sphinx documentation.
Aug 23, 2023
8e9d5b2
Further updates to sphinx documentation.
Aug 23, 2023
1705e0d
Changed members field to sphinx documentation.
Aug 23, 2023
54da6d6
Cleaned up the docstrings for ScenePlotter functions.
Aug 23, 2023
928a6da
Updated demos and README.md to use updated ScenePlotter parameters.
Aug 23, 2023
677545a
Fixed numbers parameter data type issue.
Sep 11, 2023
9cd9c22
Added functionality for left-hand coordinate maps as well as fixing d…
Sep 13, 2023
37e916f
Merged develop into branch
Jan 9, 2024
fd06597
Merge develop branch.
Mar 11, 2024
e1635a5
Updated documentation and other examples.
Mar 11, 2024
883630f
Merged in develop and made fixes.
KieranRatcliffeInvertedAI Jul 22, 2024
3bb9f77
Merged in develop branch.
KieranRatcliffeInvertedAI Aug 1, 2024
9ec2ea5
Fixed agent properties addition in scene plotter.
KieranRatcliffeInvertedAI Aug 1, 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
21 changes: 12 additions & 9 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -68,10 +68,12 @@ agent_attributes = response.agent_attributes # get dimension and other attribut

location_info_response = iai.location_info(location=location)
rendered_static_map = location_info_response.birdview_image.decode()
scene_plotter = iai.utils.ScenePlotter(rendered_static_map,
location_info_response.map_fov,
(location_info_response.map_center.x, location_info_response.map_center.y),
location_info_response.static_actors)
scene_plotter = iai.utils.ScenePlotter(
rendered_static_map,
location_info_response.map_fov,
(location_info_response.map_center.x, location_info_response.map_center.y),
location_info_response.static_actors
)
scene_plotter.initialize_recording(
agent_states=response.agent_states,
agent_attributes=agent_attributes,
Expand Down Expand Up @@ -163,10 +165,12 @@ iai_simulation = iai.BasicCosimulation( # instantiate a stateful wrapper for In

location_info_response = iai.location_info(location=location)
rendered_static_map = location_info_response.birdview_image.decode()
scene_plotter = iai.utils.ScenePlotter(rendered_static_map,
location_info_response.map_fov,
(location_info_response.map_center.x, location_info_response.map_center.y),
location_info_response.static_actors)
scene_plotter = iai.utils.ScenePlotter(
rendered_static_map,
location_info_response.map_fov,
(location_info_response.map_center.x, location_info_response.map_center.y),
location_info_response.static_actors
)
scene_plotter.initialize_recording(
agent_states=iai_simulation.agent_states,
agent_attributes=iai_simulation.agent_attributes,
Expand Down Expand Up @@ -196,7 +200,6 @@ scene_plotter.animate_scene(
plot_frame_number=True
)
print("Done")

```
To quickly check out how Inverted AI NPCs
behave, try our
Expand Down
1 change: 1 addition & 0 deletions docs/source/pythonapi/index.md
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,7 @@ sdk-location-info
sdk-common
sdk-simulation
sdk-env-var
sdk-utils.md
```


9 changes: 9 additions & 0 deletions docs/source/pythonapi/sdk-utils.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
# Utils


```{eval-rst}
.. autoclass:: invertedai.utils.ScenePlotter
:members:
:undoc-members:
```

8 changes: 4 additions & 4 deletions examples/large_map_example.py
Original file line number Diff line number Diff line change
Expand Up @@ -45,10 +45,10 @@ def main(args):
if args.save_sim_gif:
rendered_static_map = location_info_response.birdview_image.decode()
scene_plotter = iai.utils.ScenePlotter(
rendered_static_map,
args.fov,
map_center,
location_info_response.static_actors,
map_image=rendered_static_map,
fov=args.fov,
xy_offset=map_center,
static_actors=location_info_response.static_actors,
resolution=(2048,2048),
dpi=300
)
Expand Down
10 changes: 6 additions & 4 deletions examples/minimal_example.py
Original file line number Diff line number Diff line change
Expand Up @@ -25,10 +25,12 @@

location_info_response = iai.location_info(location=location)
rendered_static_map = location_info_response.birdview_image.decode()
scene_plotter = iai.utils.ScenePlotter(rendered_static_map,
location_info_response.map_fov,
(location_info_response.map_center.x, location_info_response.map_center.y),
location_info_response.static_actors)
scene_plotter = iai.utils.ScenePlotter(
rendered_static_map,
location_info_response.map_fov,
(location_info_response.map_center.x, location_info_response.map_center.y),
location_info_response.static_actors
)
scene_plotter.initialize_recording(
agent_states=response.agent_states,
agent_attributes=agent_attributes,
Expand Down
2 changes: 1 addition & 1 deletion invertedai/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -59,4 +59,4 @@
"async_initialize",
"async_drive",
"async_blame",
]
]
Loading
Loading