Skip to content

Backwards assignments #113

@mcamurri

Description

@mcamurri

Apologies for the maybe dumb/replicated question (couldn't find a satisfying reply).

How can I assign an Eigen data structure to a kindr one?
I know I can do the opposite by calling the toImplementation() function, but since kindr data structures inherits from Eigen the compiler prevents me from assigning a super class to an inherited one.

Is it legit to do something like the following?:

kindr::Vector3D kindr_v3;
Eigen::Vector3d eigen_v3;
kindr_v3.toImplementation() = eigen_v3;

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions