You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository has been archived by the owner on Feb 3, 2025. It is now read-only.
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:
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.
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.
The text was updated successfully, but these errors were encountered:
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:
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.
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.
The text was updated successfully, but these errors were encountered: