Collision Checking Performance Improvement #15
Merged
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
This change is significant in how collision checking will be handled going forwards. The current implementation will create a collision manager every time a collision check is requested. This is very expensive computationally during trajectory planning. This was required to provide a const method for making collision requests.
The new approach moves away from providing collision methods at the environment class but provides a method for requesting a collision manager which is copy of the existing environment at that point in time. This is usually all that is needed for trajectory planning, but I may add the ability to provided a callback when requesting the collision manager to be notified if the environment changes (Open to sugesstions).
In providing this you can know perform multiple collision checks without recreating the manager each time. Although for multi-threaded application you will need to use the clone method for every thread because the manager is not thread safe. The reasoning behind this is in most cases you will perform significantly more collision checks versus threads.
Current testing shows about 2x improvement when comparing to existing ROS motion planning environments.
Next Step: