Skip to content

std container for kindr::QuaternionsD #96

@depardo

Description

@depardo

Hi guys,

I'm porting my projects from Eigen to Kindr. I use std containers in some places, for example a map between strings and quaternions:

typedef std::map<std::string,Eigen::Quaternion<double>,std::less<std::string>, Eigen::aligned_allocator<std::pair<const std::string,Eigen::Quaternion<double>>>> QuaternionMap_t

I'm trying to do something similar with Kindr rotations :

typedef std::map<std::string,kindr::RotationQuaternion<double>,std::less<std::string>, std::allocator<std::pair<const std::string,kindr::RotationQuaternion<double>>>> QuaternionMap_t;

but when I try to use the map,

QuaternionMap_t Tn; kindr::RotationQuaternionD Tn_i; Tn["link_name"] = Tn_i;

it doesn't compile:

no match for ‘operator=’ (operand types are ‘std::map<std::basic_string, kindr::RotationQuaternion, std::less<std::basic_string >, std::allocator<std::pair<const std::basic_string, kindr::RotationQuaternion > > >::mapped_type {aka kindr::RotationQuaternion}’ and ‘kindr::RotationQuaternion::Scalar {aka double}’)

/kindr/rotations/RotationQuaternion.hpp:55:7: note: no known conversion for argument 1 from ‘kindr::RotationQuaternion::Scalar {aka double}’ to ‘kindr::RotationQuaternion&&’

I'll appreciate if you can give me some hint about this!

thanks,

Diego

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