-
Notifications
You must be signed in to change notification settings - Fork 41
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
Ray intersection simulation feature #641
Ray intersection simulation feature #641
Conversation
fd9a295
to
a040032
Compare
@ahcorde Comments have been addressed. Thank you for the review! |
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.
Thanks for the contribution! Definitely a nice feature to have.
It's a shame that the ode collision detector doesn't support this since that's the default for Gazebo. Do you by any chance know if this would be straight forward to implement for the bullet-featherstone physics engine plugin (not collision detector). I ask because we've been making improvements to the plugin and it might become the default engine for Gazebo at some point.
Thanks for your feedback, @azeey. I'm not familiar with Bullet featherstone, however, it seems that this feature can be implemented for that plugin by creating a simulation feature that casts the world and calls the Bullet raycasting methods directly, e.g.: const auto worldInfo = this->ReferenceInterface<WorldInfo>(_worldID);
const auto btFrom = convertVec(Eigen::Vector3d(0,0,0));
const auto btTo = convertVec(Eigen::Vector3d(1,1,1));
btCollisionWorld::ClosestRayResultCallback closestResults(btFrom, btTo);
auto collisionWorld = worldInfo->world->getCollisionWorld();
collisionWorld->rayTest(btFrom, btTo, closestResults); |
967f433
to
ecfcca7
Compare
ecfcca7
to
d3e0788
Compare
Signed-off-by: Rômulo Cerqueira <romulogcerqueira@gmail.com>
…mulation step Signed-off-by: Rômulo Cerqueira <romulogcerqueira@gmail.com>
Signed-off-by: Rômulo Cerqueira <romulogcerqueira@gmail.com>
Signed-off-by: Rômulo Cerqueira <romulogcerqueira@gmail.com>
Signed-off-by: Rômulo Cerqueira <romulogcerqueira@gmail.com>
Signed-off-by: Rômulo Cerqueira <romulogcerqueira@gmail.com>
d3e0788
to
292e5db
Compare
Signed-off-by: Rômulo Cerqueira <romulogcerqueira@gmail.com>
@azeey All comments have been addressed. |
Signed-off-by: Rômulo Cerqueira <romulogcerqueira@gmail.com>
9e16c04
to
fa07ec8
Compare
@rakeshv24 PTAL |
Thanks, @azeey. Any idea when this might be released? |
Hmm, Gazebo Classic also reported name of the collision that was hit. That was super useful for some scenarios, or e.g. for reporting laser retro/fiducial of the hit collision. Do you think it could be added? |
Release is pending #659. If we do add this, it should be done soon since modifying |
That would be the quickest thinkable solution. I briefly looked into dart and the colliding body names should be available, so the implementation should be quite easy. |
I guess "entity number (ID) of the collision" would be better than the name of the collision. |
🎉 New feature
Related to gazebosim/gz-sensors#26
Summary
dartsim does support ray-based collisions via Bullet backend, which is also supported by
gz-physics
.This PR creates a simulation feature to compute and retrieve ray castings. Also, it updates dartsim version >= 6.10, which fixes the issues when no ray hit.
This addition is useful for range-based applications (e.g. laser, altimeter etc.).
Test it
Checklist
codecheck
passed (See contributing)Note to maintainers: Remember to use Squash-Merge and edit the commit message to match the pull request summary while retaining
Signed-off-by
messages.