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

Update composite instruction user data to align with gazebo user data #391

Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion .github/workflows/ubuntu.yml
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ jobs:
REGISTRY: ghcr.io
IMAGE_NAME: ${{ github.repository }}
PUSH_DOCKER_IMAGE: ${{ github.ref == 'refs/heads/master' || github.event_name == 'release' }}
TESSERACT_VERSION: 0.20
TESSERACT_VERSION: '0.20'
steps:
- name: Checkout repository
uses: actions/checkout@v1
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -71,8 +71,17 @@ class CompositeInstruction
EIGEN_MAKE_ALIGNED_OPERATOR_NEW
// LCOV_EXCL_STOP

/** User Data */
using UserDataVariant = std::variant<double, long, std::size_t, std::string, tesseract_common::AnyPoly>;
/**
* @brief Alias for a variant that can hold various types of data.
* @details The first type of the variant is std::monostate in order to prevent
* default-constructed variants from holding a type (a default-constructed
* variant is returned when a user calls CompositeInstruction::UserData with a key that
* doesn't exist for the CompositeInstruction. In this case, since the key doesn't
* exist, the variant that is returned shouldn't hold any types - an
* "empty variant" should be returned for keys that don't exist)
*/
using UserDataVariant =
std::variant<std::monostate, int, long, float, double, std::string, bool, std::size_t, tesseract_common::AnyPoly>;
using UserData = std::unordered_map<std::string, UserDataVariant>;

/** value_type */
Expand Down
Loading