Export render and depth tensors#78
Merged
Merged
Conversation
| add_executable(viewer viewer.cpp) | ||
| target_link_libraries(viewer PRIVATE | ||
| madrona_mw_core gpudrive_mgr madrona_viz) | ||
| madrona_mw_core gpudrive_mgr madrona_viz nlohmann_json::nlohmann_json) |
Contributor
There was a problem hiding this comment.
@SamanKazemkhani I vaguely remember a comment about this elsewhere too?
| trajectory.positions[i] = Vector2{.x = agentInit.position[i].x - ctx.data().mean.x + length, .y = agentInit.position[i].y - ctx.data().mean.y + width}; | ||
| trajectory.velocities[i] = Vector2{.x = agentInit.velocity[i].x, .y = agentInit.velocity[i].y}; | ||
| trajectory.headings[i] = toRadians(agentInit.heading[i]); | ||
| trajectory.headings[i] = toRadians(agentInit.heading[i]) - M_PI_2; |
Contributor
There was a problem hiding this comment.
This is a big thing. Why do we think this is right?
Collaborator
Author
There was a problem hiding this comment.
This change crept in :) Will remove that.
| (math::Quat::angleAxis(0, math::up) * | ||
| math::Quat::angleAxis(-math::pi / 2.f, math::right)).normalize(); | ||
|
|
||
| std::string path = "/home/aarav/gpudrive/nocturne_data"; |
Contributor
There was a problem hiding this comment.
avoid hardcoding if possible. Maybe we can assume a relative path?
eugenevinitsky
approved these changes
May 2, 2024
eugenevinitsky
left a comment
Contributor
There was a problem hiding this comment.
I am approving but I would prefer we not merge until we address the two comments
wangbingke0
pushed a commit
to wangbingke0/gpudrive
that referenced
this pull request
Feb 13, 2026
* Update mgr.cpp * Fix viewer * Fix padding agent values on reset * Render padding agents too * Export valid state * Fix mean calculations (Emerge-Lab#84) * Local rendering (Emerge-Lab#79) * Add scale to road observations (Emerge-Lab#83) * Fix scale road issue * save progress * Looking good * Add json for viewer * Remove M_PI sub * Reintroduce means * Remove floor plane --------- Co-authored-by: SamanKazemkhani <skazemkhani@gmail.com>
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.
This PR fixes the rendering using madrona.
mgr::step()function.PS - This is rebased over #80 as without that fix, the sim just segfaults.