[eigen] Quaternion initialization from Block/segment (Eigen 3 beta 1) |
[ Thread Index |
Date Index
| More lists.tuxfamily.org/eigen Archives
]
- To: eigen <eigen@xxxxxxxxxxxxxxxxxxx>
- Subject: [eigen] Quaternion initialization from Block/segment (Eigen 3 beta 1)
- From: Jens Andersen <jens.andersen@xxxxxxxxx>
- Date: Thu, 22 Jul 2010 18:33:26 +0200
- Dkim-signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:received:received:from:content-type :content-transfer-encoding:subject:date:message-id:to:mime-version :x-mailer; bh=5eScuIh24CPW2+I6n4hoFRezk6aVhgzfMcHzUS9D/W4=; b=pm2pRIh558EOfulXsmX9D6h+ogiaDUiM/930cAhSoUobr+DecsjtM+dPNkR8YfSwZS hQvJdGhGtpIIkPDTTiPvnB8wY92C4bJiqWadiSVedEUUSjP0ZE6NtPF135CJa01HDHmW Z5GWDl4M7uZmxEMpkWj2OngwCFUVrZYSHni8M=
- Domainkey-signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=from:content-type:content-transfer-encoding:subject:date:message-id :to:mime-version:x-mailer; b=uFSUaKKJJK6oeZtPhONUgS5zS4epRaOAQQGxI2K4ngo/f/a+UKxXvBROZqrAmUIFJo 2tLtZL7piqUyWNd2Btc5SRd7Y9Ei1bL7VNFg9GwAl/MXyHPXTsJzxSoelvR902wXRRK7 obn3wbK3of2i2Hkzhjt3ZG1WmdplCq5BD1KZI=
Hi from a long time lurker, one-time poster
I'm trying to use eigen to efficiently work with a quaternion stored inside an Eigen::VectorXd (a state vector in an EKF-based SLAM)
I have attempted to do the following:
Eigen::VectorXd myvector;
Eigen::Quaternion q(myvector.segment(3,4));
I'm not sure whether this method avoids the copy?
This doesn't work however, and gives the following error:
/some/path/SLAM/src/Eigen/src/Geometry/Quaternion.h:443:0
/some/path/SLAM/src/Eigen/src/Geometry/Quaternion.h:443: error: incomplete type 'Eigen::ei_quaternionbase_assign_impl<Eigen::Block<Eigen::Matrix<double, -0x00000000000000001, 1, 0, -0x00000000000000001, 1>, -0x00000000000000001, 1, true>, -0x00000000000000001, 1>' used in nested name specifier
To me, this makes me think that Quaternion doesn't understand Eigen::Block. Is this the case or am I doing something wrong?
I can "work-around" it by doing
Eigen::Quaternion q(Eigen::Vector4d(myvector.segment(3,4)));
but this seems sort of unclean (And presumably requires more copying?)
Thanks,
-Jens