Commit f35d62df authored by Justin Carpentier's avatar Justin Carpentier

data: fix bug with Eigen 3.3.4

parent 82c36842
...@@ -216,7 +216,7 @@ namespace pinocchio ...@@ -216,7 +216,7 @@ namespace pinocchio
bool operator==(const DataTpl<Scalar,Options,JointCollectionTpl> & data1, bool operator==(const DataTpl<Scalar,Options,JointCollectionTpl> & data1,
const DataTpl<Scalar,Options,JointCollectionTpl> & data2) const DataTpl<Scalar,Options,JointCollectionTpl> & data2)
{ {
return bool value =
data1.joints == data2.joints data1.joints == data2.joints
&& data1.a == data2.a && data1.a == data2.a
&& data1.oa == data2.oa && data1.oa == data2.oa
...@@ -294,9 +294,16 @@ namespace pinocchio ...@@ -294,9 +294,16 @@ namespace pinocchio
&& data1.staticRegressor == data2.staticRegressor && data1.staticRegressor == data2.staticRegressor
&& data1.bodyRegressor == data2.bodyRegressor && data1.bodyRegressor == data2.bodyRegressor
&& data1.jointTorqueRegressor == data2.jointTorqueRegressor && data1.jointTorqueRegressor == data2.jointTorqueRegressor
&& data1.kinematic_hessians == data2.kinematic_hessians
; ;
// operator== for Eigen::Tensor provides an Expression which might be not evaluated as a boolean
typedef DataTpl<Scalar,Options,JointCollectionTpl> Data;
typedef Eigen::Map<const typename Data::VectorXs> MapVectorXs;
value &=
MapVectorXs(data1.kinematic_hessians.data(),data1.kinematic_hessians.size())
== MapVectorXs(data2.kinematic_hessians.data(),data2.kinematic_hessians.size());
return value;
} }
template<typename Scalar, int Options, template<typename,int> class JointCollectionTpl> template<typename Scalar, int Options, template<typename,int> class JointCollectionTpl>
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment