-
Notifications
You must be signed in to change notification settings - Fork 21
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
Add egocentric renderings #119
Conversation
src/sim.cpp
Outdated
@@ -387,8 +387,8 @@ inline void lidarSystem(Engine &ctx, Entity e, Lidar &lidar, | |||
float hit_t; | |||
Vector3 hit_normal; | |||
Entity hit_entity = | |||
bvh.traceRay(pos + 0.5f * math::up, ray_dir, &hit_t, | |||
&hit_normal, 200.f); | |||
bvh.traceRay(pos, ray_dir, &hit_t, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
What are these changes?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thats to trace the rays for lidar. This PR also has pygame lidar renderings. In madrona escape room the rays were being thrown from a bit higher up. The thing is our road objects do not have that much height and so it wont hit. So I throw the rays from 0 height to ensure it hits them.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Also I remove the normalization from the distObs because we dont use worldLength
src/sim.cpp
Outdated
@@ -387,8 +387,8 @@ inline void lidarSystem(Engine &ctx, Entity e, Lidar &lidar, | |||
float hit_t; | |||
Vector3 hit_normal; | |||
Entity hit_entity = | |||
bvh.traceRay(pos + 0.5f * math::up, ray_dir, &hit_t, | |||
&hit_normal, 200.f); | |||
bvh.traceRay(pos, ray_dir, &hit_t, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Also I remove the normalization from the distObs because we dont use worldLength
src/sim.cpp
Outdated
// if (idx < consts::numLidarSamples) { | ||
// traceRay(idx); | ||
// } | ||
while (idx < consts::numLidarSamples) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This change allows to run GPU optimized lidar for more number of lidar samles than 30.
* Add options for madrona render * Use enums and dataclass * Add camera entity * Use render config * Check controlled state safely * Revert headless * Add egocentric rendering support * Add bindings for KNN params * Compute egocentric map obs * Add lidar support * Working lidar * Multi world viz * draw map on every render * Update consts.hpp * revert sim * revert sim
This PR introduces egocentric renders for all agents.