Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Makes franka::Error trivially copyable #88

Open
wants to merge 2 commits into
base: master
Choose a base branch
from

Conversation

samzapo
Copy link

@samzapo samzapo commented Dec 9, 2020

Using a std::atomic<franka::RobotState> can permit users users to communicate a robot's state efficiently between threads. Trivially copyable is a special property required by values stored in std::atomic, but it requires that all copy assignment and constructors for an object and all of its members be defined as default. The franka::RobotState struct is very close to meeting this requirement, all of its members are trivially copyable except for Error- which can readily meet the requirement.

This PR makes the necessary changes for std::atomic to hold a franka::RobotState.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant