-
Notifications
You must be signed in to change notification settings - Fork 532
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
Eliminate ability to keep multiple collision detectors updated #364
Eliminate ability to keep multiple collision detectors updated #364
Conversation
As mentioned in the linked comment, this is probably a vestigial feature that (close to) no one uses, but you never know. It's easy to project your own view here. Have you tested that |
7ffa2a6
to
bb14f47
Compare
Well, some testing for that is built in. Also, FCL is the only collision detector type available in MoveIt2 for now, so there is not much point in switching to anything else and it would be hard to test doing so. I expect all tests to pass now! There is still a bit more testing and cleanup I would like to do before unmarking WIP. |
Codecov Report
@@ Coverage Diff @@
## main #364 +/- ##
==========================================
- Coverage 53.23% 53.22% -0.00%
==========================================
Files 209 209
Lines 18849 18805 -44
==========================================
- Hits 10032 10007 -25
+ Misses 8817 8798 -19
Continue to review full report at Codecov.
|
@AndyZe I'm not sure I follow the motivation of why this should be removed. It seems like a major API change that doesn't bring a lot of upsides besides less code to maintain (which could be a strong argument for it). Someone must have used this feature at some point, otherwise it wouldn't be there. Maintaining multiple planning scenes just for running multiple collision detectors seems like a regression to the current approach. I also don't really follow why it shouldn't be used for custom collision detectors that are currently not open source. In general, I'm not really against this change, but we should get some more opinions on this by other maintainers. |
Besides making the code more readable, there will be a bit of a performance benefit. A lot of this type of iteration got eliminated:
And you can still use whatever custom collision detector you want. You just can't keep it running in the background while another one is active. (As it currently stands, only one can be ACTIVE. The others just update in the background.) |
adf51fc
to
459fb53
Compare
I've tested with the moveit_cpp and Servo demos now, so I'm going to remove WIP. |
9bf5bf3
to
d3f3f25
Compare
I added a basic unit test for switching collision detector types. For now, it just switches from one FCL to another FCL detector, but it's better than nothing. |
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.
@AndyZe I approve these changes in general. When testing this with the run_moveit_cpp
demo the collision check actually fails, so there is still something broken in here.
Thanks for catching that. The bug comes from deleting a line in |
Fixed! |
Since there is no it.second->parent_ anymore, this block of code is not relevant
e34d16b
to
71dce2d
Compare
71dce2d
to
c92ce88
Compare
272fa2d
to
81c5475
Compare
81c5475
to
1491956
Compare
1491956
to
71d2ad0
Compare
Great, thanks! I'll update the branch and merge it if it succeeds CI. |
MoveIt1 had the ability to keep multiple Collision Detectors updated simultaneously. One was the
active_collision_
and they were all stored in a std::map<std::string, CollisionDetectorPtr>. The string in the std::map was a name which (currently) is either "FCL" or "Bullet".This PR deletes
active_collision_
and the std::map. Now, there is only one collision detector active at any time.I think this should be removed because:
setCollisionDetector()
function. It will just take a little longer because the new collision detector needs to be allocated. In other words, the only downside of this PR is a bit of delay when switching collision detectors at runtime.I have not tested this yet but I will soon. Obviously it needs a lot of testing and I'm curious to see if CI passes. But, I would be glad to hear feedback now.