Skip to content
This repository has been archived by the owner on Feb 3, 2025. It is now read-only.

Contact sensor refactor #244

Closed
osrf-migration opened this issue Nov 21, 2012 · 3 comments
Closed

Contact sensor refactor #244

osrf-migration opened this issue Nov 21, 2012 · 3 comments
Labels
all bug Something isn't working critical

Comments

@osrf-migration
Copy link

Original report (archived issue) by Nate Koenig (Bitbucket: Nathan Koenig).


From Thomas Koletschka, in reference to clearing the contact map in ContactSensor::UpdateImpl.

I'm not sure whether the approach of clearing the contacts map at every time step works out well in the long run and it might actually introduce new bugs:

  1. The public interface for getting information about contacts will fail most of the time, unless you're lucky and the function call gets through between the calls to OnContact() and UpdateImpl(). The functions GetCollision* and GetContacts make use of the contacts map which is empty after clearing it at the end of UpdateImpl so all the calls will result in "Contact Sensor [...] has no collision [...]" errors as the contacts map has a high chance of being empty even though a contact exists.

  2. It certainly doesn't matter when you only have a few contact sensors but for example the iRobot hands have about 102 contact sensors each which results in hundreds of constructor and destructor calls every update while manipulating with both hands, which might affect performance a little I think.

I'm not sure what the best way around this would be but as (1) indicates clearing the contacts map probably does not go well unless you remove the public interface (the ros fuerte bumper plugin used it to get all the contacts) and only use the messages published by UpdateImpl. A callback indicating the loss of contact would probably allow for the most unproblematic solution but I don't know whether ODE allows for that.

Other Notes

As Thomas mentions there is potentially many constructor and destructors for contact generation. A more streamlined approach is necessary.

@osrf-migration
Copy link
Author

Original comment by Nate Koenig (Bitbucket: Nathan Koenig).


  • changed state from "new" to "resolved"

Resolved in pull request #151

@osrf-migration
Copy link
Author

Original comment by Nate Koenig (Bitbucket: Nathan Koenig).


  • set version to "all"

@osrf-migration
Copy link
Author

Original comment by Nate Koenig (Bitbucket: Nathan Koenig).


  • changed state from "resolved" to "closed"

@osrf-migration osrf-migration added critical bug Something isn't working all labels Apr 19, 2020
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
all bug Something isn't working critical
Projects
None yet
Development

No branches or pull requests

1 participant