Skip to content
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
acornacorn:acorn_fix_robot_interaction_fix2
Feb 20, 2014
Merged

Improve RobotInteraction thread safety#422
sachinchitta merged 13 commits intomoveit:hydro-develfrom
acornacorn:acorn_fix_robot_interaction_fix2

Conversation

@acornacorn
Copy link
Copy Markdown

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).

Acorn Pooley 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.
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

What does the callback return? How are the arguments used?

Copy link
Copy Markdown
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Good point -- will add comments

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants