Guidance, Rendering and Type-Aware Agents/Off-roads#287
Open
nadarenator wants to merge 31 commits intogsp_devfrom
Open
Guidance, Rendering and Type-Aware Agents/Off-roads#287nadarenator wants to merge 31 commits intogsp_devfrom
nadarenator wants to merge 31 commits intogsp_devfrom
Conversation
Greptile OverviewGreptile SummaryThis PR implements guidance and type-aware agents for autonomous driving simulation. The main changes include:
Confidence Score: 4/5
Important Files Changed
Sequence DiagramsequenceDiagram
participant Config as drive.ini Config
participant Python as drive.py
participant Binding as binding.c
participant Core as drive.h
participant Network as drivenet.h
Config->>Binding: Load INI with use_guidance_observations
Python->>Binding: Initialize env with guidance params
Binding->>Core: Set guidance config + dynamics_model
alt use_guidance_observations=1
Core->>Core: ego_dim = base + GUIDANCE_OBS_SIZE (182)
else use_guidance_observations=0
Core->>Core: ego_dim = base only (8 or 11)
end
Core->>Core: compute_observations()
Core->>Core: Add type feature to ego obs
alt use_guidance_observations=1
Core->>Core: Transform 91 waypoints to egocentric
Core->>Core: Append to ego observations
end
Core->>Python: Return observations with correct size
Python->>Network: Policy forward with dynamic ego_dim
Network->>Python: Return actions
Python->>Core: Step environment with actions
alt use_guided_autonomy=1
Core->>Core: Compute guidance reward
Core->>Python: Return reward + guidance bonus
end
|
Comment on lines
+1999
to
+2002
| obs[10] = ego_entity->type / 3.0f; | ||
| } else { | ||
| obs[6] = (ego_entity->respawn_timestep != -1) ? 1 : 0; | ||
| obs[7] = ego_entity->type / 3.0f; |
There was a problem hiding this comment.
consider using a named constant like MAX_AGENT_TYPE instead of the hardcoded 3.0f for type normalization to improve maintainability
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!
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
No description provided.