Demo/visualize fixes and docs changes#273
Conversation
Greptile OverviewGreptile SummaryThis PR improves documentation for the PufferDrive simulator and visualizer with important clarifications and additions: Key Changes:
Issues Found:
Confidence Score: 4/5
Important Files Changed
Sequence DiagramsequenceDiagram
participant User
participant Docs as Documentation
participant Visualizer as visualize binary
participant Config as drive.ini
participant Simulator as PufferDrive Simulator
User->>Docs: Read simulator.md & visualizer.md
Note over Docs: Updated control mode naming<br/>control_wosac (not control_tracks_to_predict)
Note over Docs: Added agent dynamics section<br/>& init modes documentation
User->>Visualizer: Run ./visualize with CLI args
Visualizer->>Config: Read pufferlib/config/ocean/drive.ini
Config-->>Visualizer: Return control_mode, episode_length, etc.
Visualizer->>Simulator: Initialize environment with config
Note over Simulator: Apply control_mode:<br/>control_wosac for WOSAC eval<br/>control_vehicles for vehicles only
Simulator-->>Visualizer: Environment ready
Visualizer->>User: Render video output (agent/topdown views)
|
docs/src/simulator.md
Outdated
| - `control_sdc_only`: Self-driving car only | ||
|
|
||
| > [!NOTE] | ||
| > `control_vehicles` filters out agents marked as "expert" and those too close to their goal (<2m). For full WOMD evaluation, use `control_tracks_to_predict`. |
There was a problem hiding this comment.
Inconsistent control mode name - control_tracks_to_predict should be control_wosac
| > `control_vehicles` filters out agents marked as "expert" and those too close to their goal (<2m). For full WOMD evaluation, use `control_tracks_to_predict`. | |
| > `control_vehicles` filters out agents marked as "expert" and those too close to their goal (<2m). For full WOMD evaluation, use `control_wosac`. |
Prompt To Fix With AI
This is a comment left during a code review.
Path: docs/src/simulator.md
Line: 29:29
Comment:
Inconsistent control mode name - `control_tracks_to_predict` should be `control_wosac`
```suggestion
> `control_vehicles` filters out agents marked as "expert" and those too close to their goal (<2m). For full WOMD evaluation, use `control_wosac`.
```
How can I resolve this? If you propose a fix, please make it concise.
docs/src/visualizer.md
Outdated
|
|
||
| ## Arguments & Configuration | ||
|
|
||
| The `visualize` tool supports several CLI arguments to control the rendering output. It also reads the `pufferlib/config/ocean/drive.ini` file for default environment settings(For more details on these settings, refer to [Configuration](simulator.md#configuration)). |
There was a problem hiding this comment.
Missing space after "default" - add spacing for readability
| The `visualize` tool supports several CLI arguments to control the rendering output. It also reads the `pufferlib/config/ocean/drive.ini` file for default environment settings(For more details on these settings, refer to [Configuration](simulator.md#configuration)). | |
| The `visualize` tool supports several CLI arguments to control the rendering output. It also reads the `pufferlib/config/ocean/drive.ini` file for default environment settings (For more details on these settings, refer to [Configuration](simulator.md#configuration)). |
Note: If this suggestion doesn't match your team's coding style, reply to this and let me know. I'll remember it for next time!
Prompt To Fix With AI
This is a comment left during a code review.
Path: docs/src/visualizer.md
Line: 39:39
Comment:
Missing space after "default" - add spacing for readability
```suggestion
The `visualize` tool supports several CLI arguments to control the rendering output. It also reads the `pufferlib/config/ocean/drive.ini` file for default environment settings (For more details on these settings, refer to [Configuration](simulator.md#configuration)).
```
<sub>Note: If this suggestion doesn't match your team's coding style, reply to this and let me know. I'll remember it for next time!</sub>
How can I resolve this? If you propose a fix, please make it concise.There was a problem hiding this comment.
Pull request overview
This PR updates documentation for the PufferDrive visualizer and simulator, focusing on clarifying configuration options and control modes. The changes add comprehensive documentation for the visualizer's CLI arguments and update control mode terminology.
Changes:
- Added detailed documentation for visualizer CLI arguments, visualization flags, and configuration settings
- Updated control mode from
control_tracks_to_predicttocontrol_wosacfor WOSAC evaluation - Added new documentation sections explaining init modes and agent dynamics in the simulator
Reviewed changes
Copilot reviewed 6 out of 6 changed files in this pull request and generated 4 comments.
| File | Description |
|---|---|
| docs/src/visualizer.md | Expanded documentation with comprehensive CLI argument tables, visualization flags, and drive.ini settings reference |
| docs/src/simulator.md | Updated control mode terminology to control_wosac and added new sections on init modes and agent dynamics |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
| > 2. **Experts:** Stepped using ground-truth log trajectories. | ||
| > 3. **Static:** Remain frozen in place. | ||
| > | ||
| > In the simulator, agents not selected for policy control will be treated as **Static** by default. To make them follow their **Expert trajectories**, you must set `mark_as_expert=true` for those agents in the jsons. This is critical for `control_sdc_only` to ensure the environment behaves realistically around the policy-controlled agents. |
There was a problem hiding this comment.
The term "jsons" should be "JSON files" to maintain consistency with the rest of the documentation. Throughout the codebase, "JSON" is consistently capitalized (e.g., data.md:3, data.md:10, scene-editor.md:13). The phrase "in the jsons" should be replaced with "in the JSON files" for consistency.
238ddf3 to
26795f5
Compare
* Visualizer and control mode, init mode config description updates in docs * Fix Wrong names in control modes * add configs to drive.c, init_only_controlled and demo bug fixes, fix tables in docs * minor fix * Remove control_tracks_to_predict in another place
Added args parsing similar to visualize.c
Bug fixes: Resolved demo-related issues, init_only_controlled mode bug fix
Documentation updates: