This repository was archived by the owner on Nov 13, 2017. It is now read-only.
Improve RobotInteraction thread safety#422
Merged
sachinchitta merged 13 commits intomoveit:hydro-develfrom Feb 20, 2014
Merged
Conversation
added 5 commits
February 14, 2014 13:34
The Generic, EndEffector, and Joint structures complicate the core of RobotInteraction. Pull them out to simplify the code. This will also help with future plans to make the core of RobotInteraction more generic and flexible.
KinematicOptions contains the parameters needed to call RobotState::setFromIK. KinematicOptionsMap contains a map of string->KinematicOptions a default KinematicOptions. These are useful in RobotInteraction with the group name as the key.
Fixes threading issues. Separate the handling of kinematics options into a separate object which enforces thread safe access.
Fix a number of thread safety violations.
Contributor
There was a problem hiding this comment.
What does the callback return? How are the arguments used?
Author
There was a problem hiding this comment.
Good point -- will add comments
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to subscribe to this conversation on GitHub.
Already have an account?
Sign in.
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 attempts to simplify RobotInteraction and improve thread safety.
These changes focus on InteractionHandler. Some of the functionality is pulled out into helper classes (LockedRobotState and KinematicOptionsMap) so that the intent of InteractionHandler is more clear.
All non-const members are now protected with internal locks.
The locking scheme is documented in comments.
The state update is simplified, removing the need for condition variables. Instead in-place updates are done using callback functions with the modifyState method (inherited by RobotInteraction from LockedRobotState).