state-observation 1.7.0
Loading...
Searching...
No Matches
kinetics-observer.hpp
Go to the documentation of this file.
1
12#ifndef KINETICSOBSERVER_HPP
13#define KINETICSOBSERVER_HPP
14
15#include <set>
16
17#include <boost/utility.hpp>
18
19#include <state-observation/api.h>
27
28namespace stateObservation
29{
30
33
39
41class STATE_OBSERVATION_DLLAPI KineticsObserver : protected DynamicalSystemFunctorBase, protected StateVectorArithmetics
42{
43public:
47
48 // ////////////////////////////////////////////////////////////
50 // ///////////////////////////////////////////////////////////
52
59 KineticsObserver(unsigned maxContacts = 4, unsigned maxNumberOfIMU = 1);
60
64
66
67 // ////////////////////////////////////////////////////////////
71 // ///////////////////////////////////////////////////////////
72
74
78 double getSamplingTime() const;
79
82 void setSamplingTime(double);
83
91 void setWithUnmodeledWrench(bool b = true);
92
99 void setWithAccelerationEstimation(bool b = true);
100
105
110 void setWithGyroBias(bool b = true);
111
115 void setMass(double);
116
120 double getMass() const;
121
126
131
136
141
146
151
156
161
163
164 // ///////////////////////////////////////////////////////////
169
171
188 Index setIMU(const Vector3 & accelero,
189 const Vector3 & gyrometer,
190 const Kinematics & userImuKinematics,
191 Index num = -1);
192
200 Index setIMU(const Vector3 & accelero,
201 const Vector3 & gyrometer,
202 const Matrix3 & acceleroCov,
203 const Matrix3 & gyroCov,
204 const Kinematics & userImuKinematics,
205 Index num = -1);
206
212 void setIMUDefaultCovarianceMatrix(const Matrix3 & acceleroCov, const Matrix3 & gyroCov);
213
220 void setAbsolutePoseSensor(const Kinematics & measurement);
221
227 void setAbsolutePoseSensor(const Kinematics & measurement, const Matrix6 & CovarianceMatrix);
228
232
237 void setAbsoluteOriSensor(const Orientation & measurement);
238
244 void setAbsoluteOriSensor(const Orientation & measurement, const Matrix3 & CovarianceMatrix);
245
249
251
252 // ///////////////////////////////////////////////////////////
257 // ///////////////////////////////////////////////////////////
259
284 const Matrix12 & initialCovarianceMatrix,
285 const Matrix12 & processCovarianceMatrix,
286 Index contactNumber = -1,
287 const Matrix3 & linearStiffness = Matrix3::Constant(-1),
288 const Matrix3 & linearDamping = Matrix3::Constant(-1),
289 const Matrix3 & angularStiffness = Matrix3::Constant(-1),
290 const Matrix3 & angularDamping = Matrix3::Constant(-1));
291
308 Index contactNumber = -1,
309 const Matrix3 & linearStiffness = Matrix3::Constant(-1),
310 const Matrix3 & linearDamping = Matrix3::Constant(-1),
311 const Matrix3 & angularStiffness = Matrix3::Constant(-1),
312 const Matrix3 & angularDamping = Matrix3::Constant(-1));
313
317 void removeContact(Index contactnbr);
318
321
326
330 std::vector<Index> getListOfContacts() const;
331
333
334 // ///////////////////////////////////////////////////////////
341 // //////////////////////////////////////////////////////////
343
349 void updateContactWithNoSensor(const Kinematics & localKine, unsigned contactNumber);
350
355 void updateContactWithWrenchSensor(const Vector6 & wrenchMeasurement,
356 const Kinematics & localKine,
357 unsigned contactNumber);
358
364 void updateContactWithWrenchSensor(const Vector6 & wrenchMeasurement,
365 const Matrix6 & wrenchCovMatrix,
366 const Kinematics & localKine,
367 unsigned contactNumber);
368
373
375
376 // /////////////////////////////////////////////
380
387 void setCenterOfMass(const Vector3 & com, const Vector3 & com_dot, const Vector3 & com_dot_dot);
388
394 void setCenterOfMass(const Vector3 & com, const Vector3 & com_dot);
395
400 void setCenterOfMass(const Vector3 & com);
401
406 void setCoMInertiaMatrix(const Matrix3 & I, const Matrix3 & I_dot);
407
414
420 void setCoMInertiaMatrix(const Vector6 & I, const Vector6 & I_dot);
421
428
433 void setCoMAngularMomentum(const Vector3 & sigma, const Vector3 & sigma_dot);
434
439 void setCoMAngularMomentum(const Vector3 & sigma);
440
447 void setAdditionalWrench(const Vector3 & force, const Vector3 & torque);
448
450
451 // ///////////////////////////////////////////////////////////
455
459
466 const Vector & update();
467
470
474 void convertWrenchFromUserToCentroid(const Vector3 & forceUserFrame,
475 const Vector3 & momentUserFrame,
476 Vector3 & forceCentroidFrame,
477 Vector3 & momentCentroidFrame);
478
487
495
502
508
514 Kinematics getGlobalKinematicsOf(const Kinematics & userBodyKin) const;
515
518
524 Vector6 getContactWrench(Index contactNbr) const;
525
535
543
547 // /////////////////////////////////////////////////////////
548
557 bool resetContactWrenches = true,
558 bool resetCovariance = true);
559
566 void setWorldCentroidStateKinematics(const Kinematics & kine, bool resetCovariance = true);
567
576 Kinematics worldContactRestPose,
577 const Vector6 & wrench,
578 bool resetCovariance = true);
579
580 // TODO
581 // void setVelocityGuess(const Kinematics)
582
589 void setGyroBias(const Vector3 &, unsigned numberOfIMU = 1, bool resetCovariance = true);
590
597 void setStateUnmodeledWrench(const Vector6 &, bool resetCovariance = true);
598
600
601 // /////////////////////////////////////////////////////////////
604 // /////////////////////////////////////////////////////////////
606
610
614
615 // /////////////////////////////////////////////////////////////
617 // /////////////////////////////////////////////////////////////
619
624 const Matrix3 & P_ori,
625 const Matrix3 & P_linVel,
626 const Matrix3 & P_angVel);
627
630
635
639 void setContactInitCovMatDefault(const Matrix12 & contactCovMat);
640
643
648 void setGyroBiasStateCovariance(const Matrix3 & covMat, unsigned imuNumber);
649
653 void setUnmodeledWrenchStateCovMat(const Matrix6 & newCovMat);
654
659 void setContactStateCovMat(Index contactNbr, const Matrix12 & contactCovMat);
660
663
666 const Matrix3 & P_ori,
667 const Matrix3 & P_linVel,
668 const Matrix3 & P_angVel);
669
672
675
678
681
686 void setGyroBiasProcessCovariance(const Matrix3 & covMat, unsigned imuNumber);
687
691 void setUnmodeledWrenchProcessCovMat(const Matrix6 & processCovMat);
692
697 void setContactProcessCovMat(Index contactNbr, const Matrix12 & contactCovMat);
698
706
714
715 // /////////////////////////////////////////////////////////////
721 // /////////////////////////////////////////////////////////////
722
726
732
738
743
748
754
759
763
768
774
777 void setInitWorldCentroidStateVector(const Vector & initStateVector);
778
784 void setStateVector(const Vector & newvalue, bool resetCovariance = true);
785
790
794
798 inline Index kineIndex() const;
799
803 inline Index posIndex() const;
804
808 inline Index oriIndex() const;
809
813 inline Index linVelIndex() const;
814
818 inline Index angVelIndex() const;
819
823 inline Index gyroBiasIndex(Index IMUNumber) const;
824
829
834
839
843 inline Index contactsIndex() const;
844
849 inline Index contactIndex(Index contactNbr) const;
850
855 inline Index contactKineIndex(Index contactNbr) const;
856
861 inline Index contactPosIndex(Index contactNbr) const;
862
867 inline Index contactOriIndex(Index contactNbr) const;
868
873 inline Index contactForceIndex(Index contactNbr) const;
874
879 inline Index contactTorqueIndex(Index contactNbr) const;
880
885 inline Index contactWrenchIndex(Index contactNbr) const;
886
887 // ///////////////////////////////////////////////////////////
890
894 inline Index kineIndexTangent() const;
895
899 inline Index posIndexTangent() const;
900
904 inline Index oriIndexTangent() const;
905
909 inline Index linVelIndexTangent() const;
910
914 inline Index angVelIndexTangent() const;
915
919 inline Index gyroBiasIndexTangent(Index IMUNumber) const;
920
925
930
935
940
945 inline Index contactIndexTangent(Index contactNbr) const;
946
951 inline Index contactKineIndexTangent(Index contactNbr) const;
952
957 inline Index contactPosIndexTangent(Index contactNbr) const;
958
963 inline Index contactOriIndexTangent(Index contactNbr) const;
964
969 inline Index contactForceIndexTangent(Index contactNbr) const;
970
975 inline Index contactTorqueIndexTangent(Index contactNbr) const;
976
981 inline Index contactWrenchIndexTangent(Index contactNbr) const;
982
984
985 // /////////////////////////////////////////////////////////////
987 // /////////////////////////////////////////////////////////////
989
992
997
998protected:
999 struct Sensor
1000 {
1001 Sensor(Index signalSize) : measIndex(-1), measIndexTangent(-1), size(signalSize), time(0) {}
1007
1009 {
1010 return v.segment(size, measIndex);
1011 }
1012 };
1013
1014 struct IMU : public Sensor
1015 {
1016 ~IMU() {}
1017 IMU() : Sensor(sizeIMUSignal) {}
1018
1019 Kinematics userImuKinematics; // the kinematics of the IMU in the user's frame
1020 LocalKinematics centroidImuKinematics; // the kinematics of the IMU in the IMU's frame
1024
1027
1028 EIGEN_MAKE_ALIGNED_OPERATOR_NEW
1029 };
1030
1031 typedef std::vector<IMU, Eigen::aligned_allocator<IMU>> VectorIMU;
1032 typedef VectorIMU::iterator VectorIMUIterator;
1033 typedef VectorIMU::const_iterator VectorIMUConstIterator;
1034
1035 struct Contact : public Sensor
1036 {
1037 Contact() : Sensor(sizeWrench), isSet(false), withRealSensor(false), stateIndex(-1), stateIndexTangent(-1)
1038 {
1039 worldRestPose.angVel = worldRestPose.linVel = Vector3::Zero();
1040 }
1042
1044 Kinematics worldRestPose; // the rest pose of the contact in the world frame
1045
1048
1053
1058
1060
1061 bool isSet;
1065
1066 static const Kinematics::Flags::Byte contactKineFlags =
1067 Kinematics::Flags::position | Kinematics::Flags::orientation | Kinematics::Flags::linVel
1068 | Kinematics::Flags::angVel;
1069
1070 EIGEN_MAKE_ALIGNED_OPERATOR_NEW
1071 };
1072
1073 typedef std::vector<Contact, Eigen::aligned_allocator<Contact>> VectorContact;
1074 typedef VectorContact::iterator VectorContactIterator;
1075 typedef VectorContact::const_iterator VectorContactConstIterator;
1076
1078 {
1080
1082 static const Kinematics::Flags::Byte poseFlags = Kinematics::Flags::position | Kinematics::Flags::orientation;
1084 };
1085
1093
1094protected:
1102 virtual Vector stateDynamics(const Vector & x, const Vector & u, TimeIndex k);
1103
1110 virtual Vector measureDynamics(const Vector & x, const Vector & u, TimeIndex k);
1111
1116 void addUnmodeledAndContactWrench_(const Vector & centroidStateVector, Vector3 & force, Vector3 & torque);
1117
1122 void addUnmodeledWrench_(const Vector & centroidStateVector, Vector3 & force, Vector3 & torque);
1123
1132 void addContactWrench_(const Kinematics & centroidContactKine,
1133 const Vector3 & centroidContactForce,
1134 const Vector3 & centroidContactTorque,
1135 Vector3 & totalCentroidForce,
1136 Vector3 & totalCentroidTorque);
1137
1148
1150 const Vector3 & totalForceLocal,
1151 const Vector3 & totalMomentLocal,
1152 Vector3 & linAcc,
1153 Vector3 & angAcc);
1154
1162 LocalKinematics & worldCentroidStateKinematics,
1163 Kinematics & worldRestContactPose,
1164 Vector3 & contactForce,
1165 Vector3 & contactTorque);
1166
1173 void computeContactForces_(LocalKinematics & worldCentroidStateKinematics,
1174 Vector3 & contactForce,
1175 Vector3 & contactTorque);
1176
1179
1181 virtual void resetProcessNoise();
1183 virtual NoiseBase * getProcessNoise() const;
1184
1191
1193 virtual Index getInputSize() const;
1194
1195public:
1200
1205
1210
1214
1218
1224
1226
1228
1232
1234
1240 inline Vector stateSum(const Vector & stateVector, const Vector & tangentVector);
1241
1245 virtual void stateSum(const Vector & stateVector, const Vector & tangentVector, Vector & sum);
1246
1253 inline Vector stateDifference(const Vector & stateVector1, const Vector & stateVector2);
1254
1258 virtual void stateDifference(const Vector & stateVector1, const Vector & stateVector2, Vector & difference);
1259
1267 virtual void measurementDifference(const Vector & measureVector1, const Vector & measureVector2, Vector & difference);
1268
1272 virtual void useFiniteDifferencesJacobians(bool b = true);
1273
1277 virtual void setFiniteDifferenceStep(const Vector & dx);
1278
1280
1282
1284 void computeLocalAccelerations(const Vector & x, Vector & acceleration);
1285
1289 int errcode,
1290 double relativeErrorThreshold,
1291 double threshold); // declared out of namespace state-observation
1292
1297 int errcode,
1298 double relativeErrorThreshold,
1299 double threshold); // declared out of namespace state-observation
1300
1302 int errcode,
1303 double relativeErrorThreshold,
1304 double threshold); // declared out of namespace state-observation
1305
1309 int errcode,
1310 double relativeErrorThreshold,
1311 double threshold); // declared out of namespace state-observation
1313
1314protected:
1316
1320
1323
1324protected:
1327
1332
1337
1341
1344
1347
1348 Vector3 initTotalCentroidForce_; // Initial total force used in the state prediction
1349 Vector3 initTotalCentroidTorque_; // Initial total torque used in the state prediction
1350
1353
1359
1360 IndexedVector3 com_, comd_, comdd_;
1363
1364 TimeIndex k_est_; // time index of the last estimation
1365 TimeIndex k_data_; // time index of the current measurements
1366
1367 double mass_;
1368
1369 double dt_;
1370
1373
1376
1381
1388
1389 void convertUserToCentroidFrame_(const Kinematics & userKine, Kinematics & centroidKine, TimeIndex k_data);
1390
1395
1397
1399
1402
1410
1419
1420public:
1421 inline static constexpr Index sizeAcceleroSignal = 3;
1422 inline static constexpr Index sizeGyroSignal = 3;
1423 inline static constexpr Index sizeIMUSignal = sizeAcceleroSignal + sizeGyroSignal;
1424
1425 inline static constexpr Index sizePos = 3;
1426 inline static constexpr Index sizePosTangent = 3;
1427 inline static constexpr Index sizeOri = 4;
1428 inline static constexpr Index sizeOriTangent = 3;
1429 inline static constexpr Index sizeLinVel = sizePos;
1430 inline static constexpr Index sizeLinVelTangent = sizeLinVel;
1431 inline static constexpr Index sizeLinAccTangent = sizeLinVelTangent;
1432 inline static constexpr Index sizeAngVel = sizeOriTangent;
1433 inline static constexpr Index sizeAngVelTangent = sizeAngVel;
1434 inline static constexpr Index sizeGyroBias = sizeGyroSignal;
1435 inline static constexpr Index sizeGyroBiasTangent = sizeGyroBias;
1436
1437 inline static constexpr Index sizeForce = 3;
1438 inline static constexpr Index sizeForceTangent = sizeForce;
1439 inline static constexpr Index sizeTorque = 3;
1440 inline static constexpr Index sizeTorqueTangent = sizeTorque;
1441
1442 inline static constexpr Index sizeWrench = sizeForce + sizeTorque;
1443
1444 inline static constexpr Index sizeStateKine = sizePos + sizeOri + sizeLinVel + sizeAngVel;
1445 inline static constexpr Index sizeStateBase = sizeStateKine + sizeForce + sizeTorque;
1446 inline static constexpr Index sizeStateKineTangent = sizePos + sizeOriTangent + sizeLinVel + sizeAngVel;
1447 inline static constexpr Index sizeStateTangentBase = sizeStateKineTangent + sizeForce + sizeTorque;
1448
1449 inline static constexpr Index sizePose = sizePos + sizeOri;
1450 inline static constexpr Index sizePoseTangent = sizePos + sizeOriTangent;
1451
1452 inline static constexpr Index sizeContactKine = sizePose;
1453 inline static constexpr Index sizeContactKineTangent = sizePoseTangent;
1454
1455 inline static constexpr Index sizeContact = sizeContactKine + sizeWrench;
1456 inline static constexpr Index sizeContactTangent = sizeContactKineTangent + sizeWrench;
1457
1458 inline static constexpr Kinematics::Flags::Byte flagsStateKine =
1459 Kinematics::Flags::position | Kinematics::Flags::orientation | Kinematics::Flags::linVel
1460 | Kinematics::Flags::angVel;
1461
1462 inline static constexpr Kinematics::Flags::Byte flagsContactKine =
1463 Kinematics::Flags::position | Kinematics::Flags::orientation;
1464
1465 inline static constexpr Kinematics::Flags::Byte flagsPoseKine =
1466 Kinematics::Flags::position | Kinematics::Flags::orientation;
1467
1468 inline static constexpr Kinematics::Flags::Byte flagsPosKine = Kinematics::Flags::position;
1469
1470 inline static constexpr Kinematics::Flags::Byte flagsIMUKine =
1471 Kinematics::Flags::position | Kinematics::Flags::orientation | Kinematics::Flags::linVel
1472 | Kinematics::Flags::angVel | Kinematics::Flags::linAcc | Kinematics::Flags::angAcc;
1473
1475 static const double defaultMass;
1476
1477 static const double statePoseInitVarianceDefault;
1478 static const double stateOriInitVarianceDefault;
1481 static const double gyroBiasInitVarianceDefault;
1485
1496
1497 static const double acceleroVarianceDefault;
1498 static const double gyroVarianceDefault;
1499 static const double forceSensorVarianceDefault;
1500 static const double torqueSensorVarianceDefault;
1503
1504 static const double linearStiffnessDefault;
1505 static const double angularStiffnessDefault;
1506 static const double linearDampingDefault;
1507 static const double angularDampingDefault;
1508
1510
1511 bool nanDetected_ = false;
1512 EIGEN_MAKE_ALIGNED_OPERATOR_NEW
1513
1514protected:
1520
1527
1535
1547
1550
1552 static const double defaultdx;
1553
1555 struct Opt
1556 {
1557 Opt() : locKine(locKine1), ori(locKine.orientation), ori1(locKine1.orientation), ori2(locKine2.orientation) {}
1558
1564 } opt_;
1565
1566private:
1567 Index setIMU(const Vector3 & accelero,
1568 const Vector3 & gyrometer,
1569 const Kinematics & userImuKinematics,
1570 Index num,
1571 const Matrix3 * acceleroCov,
1572 const Matrix3 * gyroCov);
1573};
1574
1575#include <state-observation/dynamics-estimators/kinetics-observer.hxx>
1576
1577} // namespace stateObservation
1578
1579#endif
Implements the accelerometer-gyrometer inertial measuremen.
This is the base class of any functor that describes the dynamics of the state and the measurement....
Definition dynamical-system-functor-base.hpp:33
Definition extended-kalman-filter.hpp:43
This observer estimates the kinematics, the external forces, the bias on the gyrometers measurements,...
Definition kinetics-observer.hpp:42
virtual void measurementDifference(const Vector &measureVector1, const Vector &measureVector2, Vector &difference)
the difference operator for the measurement statevector1 ⊖ statevector2
Index getIMUMeasIndexByNum(Index num) const
Get the measurement index of the required IMU : allows to access its corresponding measurements in th...
static const double contactForceInitVarianceDefault
Definition kinetics-observer.hpp:1483
LocalKinematics getLocalCentroidKinematics() const
Get the estimated local Kinematics of the centroid frame in the world frame (local,...
static const double stateAngVelInitVarianceDefault
Definition kinetics-observer.hpp:1480
Vector6 getCentroidContactWrench(Index numContact) const
Returns the wrench exerted at the contact, expressed in the frame of the centroid.
Kinematics getContactPosition(Index contactNbr) const
Get the Contact 6D pose n in the global frame.
void setKinematicsProcessCovarianceDefault(const Matrix3 &P_pos, const Matrix3 &P_ori, const Matrix3 &P_linVel, const Matrix3 &P_angVel)
Set the default Kinematics Process Covariance.
static const double gyroVarianceDefault
Definition kinetics-observer.hpp:1498
friend int testAccelerationsJacobians(KineticsObserver &ko, int errcode, double relativeErrorThreshold, double threshold)
Comparison between the Jacobians of the linear and angular accelerations with respect to the state,...
static const double contactPositionProcessVarianceDefault
Definition kinetics-observer.hpp:1492
Index getStateTangentSize() const
Get the State Vector Tangent Size.
Matrix6 unmodeledWrenchInitCovMat_
Definition kinetics-observer.hpp:1533
Kinematics getGlobalKinematicsOf(const Kinematics &userBodyKin) const
Get the global kinematics of a given frame (in the user frame) in the centroid frame.
Index contactForceIndexTangent(Index contactNbr) const
Get the index of the linear force of a specific contact in the tangent sate vector.
void setStateVector(const Vector &newvalue, bool resetCovariance=true)
Set a value of the state x_k provided from another source.
Vector getMeasurementVector()
Get the Measurement Vector.
Index kineIndexTangent() const
Get the kinematics index of the tangent state vector.
Index linVelIndex() const
Get the linear velocity index of the state vector.
Index posIndex() const
Get the position index of the state vector.
void setUnmodeledWrenchInitCovMatDefault(const Matrix6 &initCovMat)
Set the default value for init Unmodeled Wrench covariance matrix.
void setAbsoluteOriSensorDefaultCovarianceMatrix(const Matrix3 &covMat)
Set the Absolute Orientation Sensor Default Covariance Matrix.
static const double linearStiffnessDefault
Definition kinetics-observer.hpp:1504
void setStateCovarianceMat(const Matrix &P)
Set the State Covariance Matrix This is useful in case of a setting a guess on a whole state vect9or.
void setCoMAngularMomentum(const Vector3 &sigma, const Vector3 &sigma_dot)
Set the Angular Momentum around the CoM and its derviative expressed in the user frame.
Matrix3 contactForceProcessCovMat_
Definition kinetics-observer.hpp:1544
Index contactIndex(VectorContactConstIterator i) const
Matrix3 gyroBiasInitCovMat_
Definition kinetics-observer.hpp:1532
Index gyroBiasIndex(Index IMUNumber) const
Get the gyro bias index of the state vector.
static const double unmodeledWrenchInitVarianceDefault
Definition kinetics-observer.hpp:1482
virtual Vector measureDynamics(const Vector &x, const Vector &u, TimeIndex k)
Applies the measurement model to the given state vector using the given input to predict the sensor m...
double dt_
Definition kinetics-observer.hpp:1369
static const double stateOriInitVarianceDefault
Definition kinetics-observer.hpp:1478
Kinematics getUserContactInputPose(Index numContact) const
Returns the pose of the contact in the user frame, given as an input when updating the contact.
void computeLocalAccelerations(const Vector &x, Vector &acceleration)
computes the local acceleration from the given state vector
void updateMeasurements()
Updates the measurements.
double getMass() const
Returns the mass of the robot.
void resetSensorsDefaultCovMats()
Reset the default values for the sensors covariance matrices.
void setKinematicsInitCovarianceDefault(const Matrix3 &P_pos, const Matrix3 &P_ori, const Matrix3 &P_linVel, const Matrix3 &P_angVel)
Set the Default value for Kinematics Init Covariance.
Vector6 getContactWrench(Index contactNbr) const
Get the Estimated Contact Wrench This is useful in the case of uncertain wrench sensors or when conta...
void updateContactWithWrenchSensor(const Vector6 &wrenchMeasurement, const Kinematics &localKine, unsigned contactNumber)
Update the contact when it is equipped with wrench sensor.
Matrix3 stateOriProcessCovMat_
Definition kinetics-observer.hpp:1537
static const double contactForceProcessVarianceDefault
Definition kinetics-observer.hpp:1494
void resetStateContactCovMat(Index contactNbr)
Index contactWrenchIndexTangent(VectorContactConstIterator i) const
Index contactIndexTangent(VectorContactConstIterator i) const
Getters for the indexes of the state Vector using private types.
Index contactPosIndexTangent(Index contactNbr) const
Get the index of the position of a specific contact in the tangent sate vector.
Index unmodeledTorqueIndex() const
Get the unmodeled external torque force index of the state vector.
static const double positionSensorVarianceDefault
Definition kinetics-observer.hpp:1501
Vector6 getUnmodeledWrench() const
Get the Unmodeled External Wrench (requires setWithUnmodeledWrench() to true before to update())
void setCenterOfMass(const Vector3 &com)
Set the Center Of Mass kinematics expressed in the user frame.
Index currentIMUSensorNumber_
Definition kinetics-observer.hpp:1375
void setGyroBiasProcessCovariance(const Matrix3 &covMat, unsigned imuNumber)
Set the Gyro Bias Process Covariance.
const IndexedMatrix3 & getInertiaMatrix() const
Returns the global inertia matrix of the robot at the center of mass.
Matrix3 contactPositionProcessCovMat_
Definition kinetics-observer.hpp:1542
const Vector & update()
Runs the estimation.
VectorContact contacts_
Definition kinetics-observer.hpp:1330
Vector worldCentroidStateVectorDx_
Definition kinetics-observer.hpp:1339
Index contactForceIndexTangent(VectorContactConstIterator i) const
void setCenterOfMass(const Vector3 &com, const Vector3 &com_dot)
Set the Center Of Mass kinematics expressed in the user frame.
virtual void resetProcessNoise()
Removes the process noise.
Vector3 additionalTorque_
Definition kinetics-observer.hpp:1346
NoiseBase * measurementNoise_
Definition kinetics-observer.hpp:1372
Index contactsIndex() const
Get the index for the contact segment in the state vector.
void updateContactWithWrenchSensor(const Vector6 &wrenchMeasurement, const Matrix6 &wrenchCovMatrix, const Kinematics &localKine, unsigned contactNumber)
Update the contact when it is equipped with wrench sensor.
void setGyroBiasInitCovarianceDefault(const Matrix3 &covMat)
Set the Default value for Gyro Bias Init Covariance.
static const double statePoseInitVarianceDefault
Definition kinetics-observer.hpp:1477
virtual void setMeasurementNoise(NoiseBase *)
Sets a noise which disturbs the measurements.
virtual void setFiniteDifferenceStep(const Vector &dx)
Set the Finite Difference time step.
Index numberOfContactRealSensors_
Definition kinetics-observer.hpp:1374
virtual void useFiniteDifferencesJacobians(bool b=true)
Define if we use dinite differences Jacobian or analytic.
Kinematics getContactStateRestKinematics(Index numContact) const
Returns the estimated rest pose of the contact in the world frame.
Vector stateDifference(const Vector &stateVector1, const Vector &stateVector2)
the difference operator for the state statevector1 ⊖ statevector2
void setUnmodeledWrenchProcessCovarianceDefault(const Matrix6 &covMat)
Set the default Unmodeled Wrench Process Covariance.
IndexedMatrix3 I_
Definition kinetics-observer.hpp:1362
Vector3 initTotalCentroidForce_
Definition kinetics-observer.hpp:1348
void setContactStateCovMat(Index contactNbr, const Matrix12 &contactCovMat)
Set the Contact State Covariance Matrix.
void setKinematicsProcessCovarianceDefault(const Matrix12 &)
Set the default Kinematics Process Covariance.
Matrix3 stateLinVelInitCovMat_
Definition kinetics-observer.hpp:1530
void setAbsoluteOriSensor(const Orientation &measurement)
Set an Absolute Orientation Sensor measurement The measurement is the orientation of the observed fra...
Index contactOriIndexTangent(Index contactNbr) const
Get the index of the orientation of a specific contact in the tangent sate vector.
const IndexedMatrix3 & getInertiaMatrixDot() const
Returns the derivative of the global inertia matrix of the robot at the center of mass.
void addUnmodeledAndContactWrench_(const Vector &centroidStateVector, Vector3 &force, Vector3 &torque)
Adds the unmodeled and contact wrenches from the state to the given wrench.
Index contactForceIndex(VectorContactConstIterator i) const
void setKinematicsProcessCovariance(const Matrix12 &)
Set the Kinematics Process Covariance.
Index contactKineIndexTangent(VectorContactConstIterator i) const
LocalKinematics estimateAccelerations()
gets the Kinematics that include the linear and angular accelerations.
Index angVelIndex() const
Get the angular velocity index of the state vector.
static const double acceleroVarianceDefault
Definition kinetics-observer.hpp:1497
Matrix3 statePosProcessCovMat_
Definition kinetics-observer.hpp:1536
Index posIndexTangent() const
Get the position index of the tangent state vector.
Vector oldWorldCentroidStateVector_
Definition kinetics-observer.hpp:1340
friend int testAnalyticalCJacobianVsFD(KineticsObserver &ko, int errcode, double relativeErrorThreshold, double threshold)
AbsoluteOriSensor absOriSensor_
Definition kinetics-observer.hpp:1329
bool getWithAccelerationEstimation() const
Returns if the estimation computes also the accelerations.
Vector stateSum(const Vector &stateVector, const Vector &tangentVector)
the sum operator for the state vector
void setInitWorldCentroidStateVector(const Vector &initStateVector)
Initializes the state vector.
static const double contactTorqueInitVarianceDefault
Definition kinetics-observer.hpp:1484
Vector worldCentroidStateVector_
Definition kinetics-observer.hpp:1338
void updateContactWithNoSensor(const Kinematics &localKine, unsigned contactNumber)
Update the contact when it is NOT equipped with wrench sensor.
Index getNumberOfSetContacts() const
Get the Current Number Of Contacts.
Index setIMU(const Vector3 &accelero, const Vector3 &gyrometer, const Matrix3 &acceleroCov, const Matrix3 &gyroCov, const Kinematics &userImuKinematics, Index num=-1)
Provides also the associated covariance matrices
Index oriIndex() const
Get the orientation index of the state vector.
Index angVelIndexTangent() const
Get the angular velocity index of the tangent state vector.
Matrix3 stateAngVelProcessCovMat_
Definition kinetics-observer.hpp:1539
void setContactWrenchSensorDefaultCovarianceMatrix(const Matrix6 &wrenchSensorCovMat)
Set the Contact Wrench Sensor Default Covariance Matrix.
const IndexedVector3 & getCenterOfMassDot() const
Returns the linear velocity of the CoM of the robot in the user frame.
VectorContact::iterator VectorContactIterator
Definition kinetics-observer.hpp:1074
virtual void setProcessNoise(NoiseBase *)
Sets a noise which disturbs the state dynamics.
const ExtendedKalmanFilter & getEKF() const
Gets a const reference on the extended Kalman filter.
Matrix6 absPoseSensorCovMatDefault_
Definition kinetics-observer.hpp:1525
const IndexedVector3 & getAngularMomentumDot() const
Returns the derivative of the angular momentum of the robot at the center of mass.
Matrix3 stateAngVelInitCovMat_
Definition kinetics-observer.hpp:1531
void setKinematicsInitCovarianceDefault(const Matrix &)
Set the Default value for Kinematics Init Covariance.
Kinematics getCentroidContactInputPose(Index numContact) const
Returns the pose of the contact in the centroid frame, given as an input when updating the contact (o...
Index setIMU(const Vector3 &accelero, const Vector3 &gyrometer, const Kinematics &userImuKinematics, Index num=-1)
Set the measurements of an IMU and give the Kinematic of the IMU in the user frame.
Matrix3 contactTorqueProcessCovMat_
Definition kinetics-observer.hpp:1545
Index measurementTangentSize_
Definition kinetics-observer.hpp:1336
static const double gyroBiasProcessVarianceDefault
Definition kinetics-observer.hpp:1490
void resetInputs()
reset all the sensor inputs and provided contact information but keeps the contacts themselves
static const double stateLinVelProcessVarianceDefault
Definition kinetics-observer.hpp:1488
Index kineIndex() const
Get the kinematics index of the state vector.
Index contactOriIndexTangent(VectorContactConstIterator i) const
void updateLocalKineAndContacts_()
update of the state kinematics worldCentroidStateKinematics_ and of the contacts pose with the newly ...
static const double statePoseProcessVarianceDefault
Definition kinetics-observer.hpp:1486
void setAbsoluteOriSensor(const Orientation &measurement, const Matrix3 &CovarianceMatrix)
Set an Absolute Orientation Sensor measurement The measurement is the orientation of the observed fra...
void setWithGyroBias(bool b=true)
Set if the gyrometers bias is computed or not. This parameter is global for all the IMUs.
IndexedVector3 com_
Definition kinetics-observer.hpp:1360
Index contactIndexTangent(Index contactNbr) const
Get the index of a specific contact in the tangent sate vector.
Index unmodeledWrenchIndex() const
Get the unmodeled external wrench index of the state vector.
void setStateUnmodeledWrench(const Vector6 &, bool resetCovariance=true)
Set the State Unmodeled Wrench.
Index contactOriIndex(VectorContactConstIterator i) const
void setWorldCentroidStateKinematics(const LocalKinematics &localKine, bool resetContactWrenches=true, bool resetCovariance=true)
Set the State Kinematics.
void convertWrenchFromUserToCentroid(const Vector3 &forceUserFrame, const Vector3 &momentUserFrame, Vector3 &forceCentroidFrame, Vector3 &momentCentroidFrame)
Returns the predicted Kinematics object of the centroid in the world frame at the time of the measure...
void setStateContact(Index index, Kinematics worldContactRestPose, const Vector6 &wrench, bool resetCovariance=true)
Set the state contact kinematics and wrench.
TimeIndex k_data_
Definition kinetics-observer.hpp:1365
VectorIMU::const_iterator VectorIMUConstIterator
Definition kinetics-observer.hpp:1033
LocalKinematics worldCentroidStateKinematics_
Definition kinetics-observer.hpp:1342
void setAbsolutePoseSensorDefaultCovarianceMatrix(const Matrix6 &covMat)
Set the Absolute Pose Sensor Default Covariance Matrix.
VectorContact::const_iterator VectorContactConstIterator
Definition kinetics-observer.hpp:1075
Matrix3 stateOriInitCovMat_
Definition kinetics-observer.hpp:1529
void setAbsolutePoseSensor(const Kinematics &measurement)
Set an Absolute Pose Sensor measurement The measurement is the kinematics namely position and orienta...
friend int testOrientationsJacobians(KineticsObserver &ko, int errcode, double relativeErrorThreshold, double threshold)
Comparison between the Jacobians of orientation integration with respect to an increment vector delta...
static const double torqueSensorVarianceDefault
Definition kinetics-observer.hpp:1500
bool getContactIsSetByNum(Index num) const
virtual Index getInputSize() const
Gets the input size.
double mass_
Definition kinetics-observer.hpp:1367
static const double unmodeledWrenchProcessVarianceDefault
Definition kinetics-observer.hpp:1491
static const double stateOriProcessVarianceDefault
Definition kinetics-observer.hpp:1487
bool finiteDifferencesJacobians_
Definition kinetics-observer.hpp:1355
void clearContacts()
remove all the contacts
Index getStateSize() const
Get the State Vector Size.
Index stateSize_
Definition kinetics-observer.hpp:1333
Matrix3 linearStiffnessMatDefault_
Default Stiffness and damping.
Definition kinetics-observer.hpp:1516
TimeIndex getStateVectorTimeIndex() const
Get the State Vector Internal Time Index This is for advanced use but may be used to check how many s...
Kinematics convertUserToCentroidFrame_(const Kinematics &userKine, TimeIndex k_data)
Converts a Kinematics object from the user's frame to the centroid's frame, which is used for most of...
void addUnmodeledWrench_(const Vector &centroidStateVector, Vector3 &force, Vector3 &torque)
Adds the unmodeled wrench from the state to the given wrench.
void computeContactForces_(LocalKinematics &worldCentroidStateKinematics, Vector3 &contactForce, Vector3 &contactTorque)
Computes the force exerted at a contact using the visco-elastic model on the given state vector....
void setGyroBiasProcessCovarianceDefault(const Matrix3 &covMat)
Set the default Gyro Bias Process Covariance.
virtual void stateDifference(const Vector &stateVector1, const Vector &stateVector2, Vector &difference)
the difference operator for the state statevector1 ⊖ statevector2 This version prevents a nwe vecto...
void setWithAccelerationEstimation(bool b=true)
Sets if the estimation computes also the accelerations.
Matrix3 absOriSensorCovMatDefault_
Definition kinetics-observer.hpp:1526
void computeLocalAccelerations_(LocalKinematics &localStateKine, const Vector3 &totalForceLocal, const Vector3 &totalMomentLocal, Vector3 &linAcc, Vector3 &angAcc)
Computes the local accelerations of the centroid frame in the world frame and adds them to its local ...
Index unmodeledForceIndexTangent() const
Get the unmodeled external linear force index of the tangent state vector.
void resetStateCovarianceMat()
Resets the covariance matrices to their original values.
void setGyroBiasStateCovariance(const Matrix3 &covMat, unsigned imuNumber)
Set the Gyro Bias State Covariance.
Vector6 getAdditionalWrench() const
Returns the input additional wrench, expressed in the centroid frame.
Index getContactMeasIndexByNum(Index num) const
Matrix12 contactProcessCovMatDefault_
Definition kinetics-observer.hpp:1546
std::vector< Contact, Eigen::aligned_allocator< Contact > > VectorContact
Definition kinetics-observer.hpp:1073
void setMass(double)
Set the total mass of the robot. This can be changed online.
void setCoMInertiaMatrix(const Matrix3 &I)
Set the 3x3 inertia matrix expressed in the user frame.
Kinematics getWorldContactPoseFromCentroid(Index numContact) const
Returns the pose of the contact in the world frame, obtained from the state pose of the centroid in t...
ExtendedKalmanFilter & getEKF()
Index unmodeledWrenchIndexTangent() const
Get the unmodeled external wrench index of the tangent state vector.
Index contactPosIndexTangent(VectorContactConstIterator i) const
void setCoMInertiaMatrix(const Matrix3 &I, const Matrix3 &I_dot)
Set the 3x3 inertia matrix and its derivative expressed in the user frame.
void setProcessNoiseCovarianceMat(const Matrix &Q)
Set the covariance matrices for the process noises.
bool withGyroBias_
Definition kinetics-observer.hpp:1356
Index contactTorqueIndex(VectorContactConstIterator i) const
Index contactPosIndex(Index contactNbr) const
Get the index of the position of a specific contact in the sate vector.
Index getMeasurementSize() const
Get the Measurement vector Size.
bool withAccelerationEstimation_
Definition kinetics-observer.hpp:1358
TimeIndex k_est_
Definition kinetics-observer.hpp:1364
Vector measurementVector_
Definition kinetics-observer.hpp:1351
Index addContact(const Kinematics &pose, Index contactNumber=-1, const Matrix3 &linearStiffness=Matrix3::Constant(-1), const Matrix3 &linearDamping=Matrix3::Constant(-1), const Matrix3 &angularStiffness=Matrix3::Constant(-1), const Matrix3 &angularDamping=Matrix3::Constant(-1))
Set a new contact with the environment (use default covariance matrices)
static const double contactTorqueProcessVarianceDefault
Definition kinetics-observer.hpp:1495
Matrix3 gyroBiasProcessCovMat_
Definition kinetics-observer.hpp:1540
virtual void resetMeasurementNoise()
Removes the measurement noise.
void setGyroBias(const Vector3 &, unsigned numberOfIMU=1, bool resetCovariance=true)
Set the Gyro Bias Allows to initializa the value of the gyro bias of the IMU corresponding to the num...
static const double forceSensorVarianceDefault
Definition kinetics-observer.hpp:1499
kine::LocalKinematics LocalKinematics
Definition kinetics-observer.hpp:45
static const double angularStiffnessDefault
Definition kinetics-observer.hpp:1505
void removeContact(Index contactnbr)
Remove a contact.
Index unmodeledForceIndex() const
Get the unmodeled external linear force index of the state vector.
Index contactPosIndex(VectorContactConstIterator i) const
void computeContactForce_(VectorContactIterator i, LocalKinematics &worldCentroidStateKinematics, Kinematics &worldRestContactPose, Vector3 &contactForce, Vector3 &contactTorque)
Computes the force exerted at a contact using the visco-elastic model on the given state vector.
void setUnmodeledWrenchStateCovMat(const Matrix6 &newCovMat)
Set the Unmodeled Wrench State Cov Mat.
Matrix3 stateLinVelProcessCovMat_
Definition kinetics-observer.hpp:1538
Index measurementSize_
Definition kinetics-observer.hpp:1335
void setContactProcessCovMat(Index contactNbr, const Matrix12 &contactCovMat)
Set the Contact Process Covariance Matrix.
virtual Vector stateDynamics(const Vector &x, const Vector &u, TimeIndex k)
Applies the state-transition model to the given state vector using the given input to predict the fut...
Matrix getStateCovarianceMat() const
Get the State Covariance matrix.
void setAbsolutePoseSensor(const Kinematics &measurement, const Matrix6 &CovarianceMatrix)
Set an Absolute Pose Sensor measurement The measurement is the kinematics namely position and orienta...
LocalKinematics getLocalKinematicsOf(const Kinematics &userBodyKine)
Get the local kinematics of a given frame (in the user frame) in the centroid frame.
stateObservation::ExtendedKalmanFilter ekf_
Definition kinetics-observer.hpp:1354
kine::Kinematics Kinematics
Definition kinetics-observer.hpp:44
Matrix12 contactInitCovMatDefault_
Definition kinetics-observer.hpp:1534
Kinematics getGlobalCentroidKinematics() const
Get the estimated Kinematics of the centroid frame in the world frame.
Matrix3 angularStiffnessMatDefault_
Definition kinetics-observer.hpp:1517
kine::Orientation Orientation
Definition kinetics-observer.hpp:46
Matrix6 unmodeledWrenchProcessCovMat_
Definition kinetics-observer.hpp:1541
Matrix3 gyroCovMatDefault_
Definition kinetics-observer.hpp:1523
void setContactProcessCovarianceDefault(const Matrix12 &covMat)
Set the default contact Process Covariance.
Matrix3 statePosInitCovMat_
Definition kinetics-observer.hpp:1528
Index contactsIndexTangent() const
Get the index for the contact segment in the tangent state vector.
Kinematics worldCentroidKinematics_
Definition kinetics-observer.hpp:1343
static const double stateAngVelProcessVarianceDefault
Definition kinetics-observer.hpp:1489
virtual ~KineticsObserver()
Destroy the Kinetics Observer.
Index contactIndex(Index contactNbr) const
Get the index of a specific contact in the sate vector.
static const double gyroBiasInitVarianceDefault
Definition kinetics-observer.hpp:1481
Index gyroBiasIndexTangent(Index IMUNumber) const
Get the gyro bias index of the tangent state vector.
const IndexedVector3 & getAngularMomentum() const
Returns the angular momentum of the robot at the center of mass.
Index linVelIndexTangent() const
Get the linear velocity index of the tangent state vector.
Matrix measurementCovMatrix_
Definition kinetics-observer.hpp:1352
void setCoMInertiaMatrix(const Vector6 &I, const Vector6 &I_dot)
Set the inertia matrix and its derivative as a Vector6 expressed in the user frame.
const IndexedVector3 & getCenterOfMassDotDot() const
Returns the linear acceleration of the CoM of the robot in the user frame.
void setCoMAngularMomentum(const Vector3 &sigma)
Set the Angular Momentum around the CoM expressed in the user frame.
void setSamplingTime(double)
Set the Sampling Time.
Index contactForceIndex(Index contactNbr) const
Get the index of the linear force of a specific contact in the sate vector.
virtual void stateSum(const Vector &stateVector, const Vector &tangentVector, Vector &sum)
the sum operator for the state vector This version does not allocate a new vector
Matrix3 linearDampingMatDefault_
Definition kinetics-observer.hpp:1518
NoiseBase * processNoise_
Definition kinetics-observer.hpp:1371
void updateGlobalKine_()
updates the global kinematics of the centroid from the local ones, that can be more interpretable
void resetProcessContactCovMat(Index contactNbr)
AbsolutePoseSensor absPoseSensor_
Definition kinetics-observer.hpp:1328
void setWorldCentroidStateKinematics(const Kinematics &kine, bool resetCovariance=true)
Set the State Kinematics.
Index contactWrenchIndex(VectorContactConstIterator i) const
void convertUserToCentroidFrame_(const Kinematics &userKine, Kinematics &centroidKine, TimeIndex k_data)
Converts a LocalKinematics object from the user's frame to the centroid's frame, which is used for mo...
std::vector< IMU, Eigen::aligned_allocator< IMU > > VectorIMU
Definition kinetics-observer.hpp:1031
static const double angularDampingDefault
Definition kinetics-observer.hpp:1507
Index contactKineIndex(VectorContactConstIterator i) const
Index stateTangentSize_
Definition kinetics-observer.hpp:1334
Index contactKineIndex(Index contactNbr) const
Get the index of the kinematics of a specific contact in the sate vector.
void setCoMInertiaMatrix(const Vector6 &I)
Set the inertia matrix as a Vector6 expressed in the user frame.
bool withUnmodeledWrench_
Definition kinetics-observer.hpp:1357
Vector3 initTotalCentroidTorque_
Definition kinetics-observer.hpp:1349
Index contactTorqueIndexTangent(Index contactNbr) const
Get the index of the toraue of a specific contact in the tangent sate vector.
virtual NoiseBase * getMeasurementNoise() const
Gets a pointer on the measurement noise.
void setContactInitCovMatDefault(const Matrix12 &contactCovMat)
Set the default valut for the Initial Covariance Matrix of the contact in the state.
Index gyroBiasIndexTangent(VectorIMUConstIterator i) const
Matrix6 contactWrenchSensorCovMatDefault_
Definition kinetics-observer.hpp:1524
Index contactTorqueIndex(Index contactNbr) const
Get the index of the toraue of a specific contact in the sate vector.
static const double defaultdx
default derivation steps
Definition kinetics-observer.hpp:1552
void setUnmodeledWrenchProcessCovMat(const Matrix6 &processCovMat)
Set the Unmodeled Wrench Process Covariance Mattix.
void setWithUnmodeledWrench(bool b=true)
Set if the unmodeled and unmeasured external wrench should be estimated.
static const double orientationSensorVarianceDefault
Definition kinetics-observer.hpp:1502
friend int testAnalyticalAJacobianVsFD(KineticsObserver &ko, int errcode, double relativeErrorThreshold, double threshold)
Comparison between the analytical Jacobian matrix A and the one obtained by finite differences....
Matrix12 stateKinematicsProcessCovMat_
Definition kinetics-observer.hpp:1549
Index gyroBiasIndex(VectorIMUConstIterator i) const
Getters for the indexes of the state Vector using private types.
Index contactTorqueIndexTangent(VectorContactConstIterator i) const
const IndexedVector3 & getCenterOfMass() const
Returns the position of the CoM of the robot in the user frame.
Matrix3 contactOrientationProcessCovMat_
Definition kinetics-observer.hpp:1543
unsigned maxImuNumber_
Definition kinetics-observer.hpp:1326
static const double defaultMass
Definition kinetics-observer.hpp:1475
unsigned maxContacts_
Definition kinetics-observer.hpp:1325
std::vector< Index > getListOfContacts() const
Get the List Of Contact ids.
Index unmodeledTorqueIndexTangent() const
Get the unmodeled external torque force index of the tangent state vector.
void setIMUDefaultCovarianceMatrix(const Matrix3 &acceleroCov, const Matrix3 &gyroCov)
set the default covariance matrix for IMU.
Vector3 additionalForce_
Definition kinetics-observer.hpp:1345
void setKinematicsStateCovariance(const Matrix &)
Set the Kinematics State Covariance.
Matrix12 stateKinematicsInitCovMat_
Definition kinetics-observer.hpp:1548
static const double stateLinVelInitVarianceDefault
Definition kinetics-observer.hpp:1479
void setAdditionalWrench(const Vector3 &force, const Vector3 &torque)
Set any Additional resultant known wrench (e.g. measured external forces and moments but no contact o...
static const double linearDampingDefault
Definition kinetics-observer.hpp:1506
VectorIMU::iterator VectorIMUIterator
Definition kinetics-observer.hpp:1032
KineticsObserver(unsigned maxContacts=4, unsigned maxNumberOfIMU=1)
Construct a new Kinetics Observer.
void addContactWrench_(const Kinematics &centroidContactKine, const Vector3 &centroidContactForce, const Vector3 &centroidContactTorque, Vector3 &totalCentroidForce, Vector3 &totalCentroidTorque)
adds the contribution of a contact wrench at the centroid to the total wrench
const Vector & getCurrentStateVector() const
Gets the current value of the state estimation in the form of a state vector .
Index contactWrenchIndex(Index contactNbr) const
Get the index of the wrench of a specific contact in the sate vector.
VectorIMU imuSensors_
Definition kinetics-observer.hpp:1331
Index addContact(const Kinematics &pose, const Matrix12 &initialCovarianceMatrix, const Matrix12 &processCovarianceMatrix, Index contactNumber=-1, const Matrix3 &linearStiffness=Matrix3::Constant(-1), const Matrix3 &linearDamping=Matrix3::Constant(-1), const Matrix3 &angularStiffness=Matrix3::Constant(-1), const Matrix3 &angularDamping=Matrix3::Constant(-1))
Set a new contact with the environment.
Index contactKineIndexTangent(Index contactNbr) const
Get the index of the kinematics of a specific contact in the tangent sate vector.
Index contactWrenchIndexTangent(Index contactNbr) const
Get the index of the wrench of a specific contact in the sate tangent vector.
static const double contactOrientationProcessVarianceDefault
Definition kinetics-observer.hpp:1493
Matrix3 acceleroCovMatDefault_
Definition kinetics-observer.hpp:1522
Matrix3 angularDampingMatDefault_
Definition kinetics-observer.hpp:1519
virtual NoiseBase * getProcessNoise() const
Gets the process noise.
void setCenterOfMass(const Vector3 &com, const Vector3 &com_dot, const Vector3 &com_dot_dot)
Set the Center Of Mass kinematics expressed in the user frame.
IndexedVector3 sigma_
Definition kinetics-observer.hpp:1361
double getSamplingTime() const
Get the Sampling Time.
Index oriIndexTangent() const
Get the orientation index of the tangent state vector.
Index contactOriIndex(Index contactNbr) const
Get the index of the orientation of a specific contact in the sate vector.
Definition noise-base.hpp:29
This class is used to customize the way the difference between measurements, the state update functio...
Definition state-vector-arithmetics.hpp:28
Definition rigid-body-kinematics.hpp:355
Definitions of types and some structures.
Definition bidim-elastic-inv-pendulum-dyn-sys.hpp:21
long int TimeIndex
Definition definitions.hpp:139
Eigen::Vector3d Vector3
3D vector
Definition definitions.hpp:85
Eigen::Matrix3d Matrix3
3x3 Scalar Matrix
Definition definitions.hpp:109
Eigen::MatrixXd Matrix
Dynamic sized Matrix.
Definition definitions.hpp:100
Eigen::Matrix< double, 6, 1 > Vector6
6D vector
Definition definitions.hpp:97
Eigen::Matrix< double, 6, 6 > Matrix6
6x6 Scalar Matrix
Definition definitions.hpp:121
Eigen::Index Index
Definition definitions.hpp:138
Eigen::Matrix< double, 12, 12 > Matrix12
12x12 scalar Matrix
Definition definitions.hpp:124
Eigen::VectorXd Vector
Dynamic sized scalar vector.
Definition definitions.hpp:76
Implements integrators for the kinematics, in terms or rotations and translations.
Definition kinetics-observer.hpp:1087
Orientation ori
Definition kinetics-observer.hpp:1090
AbsoluteOriSensor()
Definition kinetics-observer.hpp:1088
CheckedMatrix3 covMatrix
Definition kinetics-observer.hpp:1091
Definition kinetics-observer.hpp:1078
Kinematics pose
Definition kinetics-observer.hpp:1081
CheckedMatrix6 covMatrix
Definition kinetics-observer.hpp:1083
AbsolutePoseSensor()
Definition kinetics-observer.hpp:1079
Definition kinetics-observer.hpp:1036
~Contact()
Definition kinetics-observer.hpp:1041
Index stateIndexTangent
Definition kinetics-observer.hpp:1064
bool withRealSensor
Definition kinetics-observer.hpp:1062
Matrix3 angularStiffness
linear damping associated to the contact, used in the visco-elastic model
Definition kinetics-observer.hpp:1056
Matrix3 linearDamping
linear stiffness associated to the contact, used in the visco-elastic model
Definition kinetics-observer.hpp:1055
Contact()
Definition kinetics-observer.hpp:1037
Matrix3 linearStiffness
measurement covariance matrix of the wrench sensor attached to the contact.
Definition kinetics-observer.hpp:1054
Index stateIndex
Definition kinetics-observer.hpp:1063
Kinematics worldRestPose
State ///.
Definition kinetics-observer.hpp:1044
Matrix3 angularDamping
angular stiffness associated to the contact, used in the visco-elastic model
Definition kinetics-observer.hpp:1057
bool isSet
angular damping associated to the contact, used in the visco-elastic model
Definition kinetics-observer.hpp:1061
CheckedMatrix6 sensorCovMatrix
Describes the kinematics of the contact point in the centroid's frame.
Definition kinetics-observer.hpp:1052
Vector6 wrenchMeasurement
Measurements ///.
Definition kinetics-observer.hpp:1047
Kinematics userContactKine
Describes the measured wrench (forces + torques) at the contact in the sensor's frame.
Definition kinetics-observer.hpp:1050
Kinematics centroidContactKine
Describes the kinematics of the contact point in the centroid's frame.
Definition kinetics-observer.hpp:1051
Definition kinetics-observer.hpp:1015
LocalKinematics centroidImuKinematics
Definition kinetics-observer.hpp:1020
Vector6 acceleroGyro
Definition kinetics-observer.hpp:1021
Matrix3 covMatrixAccelero
Definition kinetics-observer.hpp:1022
Index stateIndex
Definition kinetics-observer.hpp:1025
Index stateIndexTangent
Definition kinetics-observer.hpp:1026
~IMU()
Definition kinetics-observer.hpp:1016
Kinematics userImuKinematics
Definition kinetics-observer.hpp:1019
Matrix3 covMatrixGyro
Definition kinetics-observer.hpp:1023
IMU()
Definition kinetics-observer.hpp:1017
a structure to optimize computations
Definition kinetics-observer.hpp:1556
Orientation & ori2
Definition kinetics-observer.hpp:1563
LocalKinematics & locKine
Definition kinetics-observer.hpp:1560
Orientation & ori
Definition kinetics-observer.hpp:1561
Opt()
Definition kinetics-observer.hpp:1557
LocalKinematics locKine1
Definition kinetics-observer.hpp:1559
Orientation & ori1
Definition kinetics-observer.hpp:1562
Definition kinetics-observer.hpp:1000
Sensor(Index signalSize)
Definition kinetics-observer.hpp:1001
Vector extractFromVector(const Vector &v)
Definition kinetics-observer.hpp:1008
Index measIndexTangent
Definition kinetics-observer.hpp:1004
Index size
Definition kinetics-observer.hpp:1005
~Sensor()
Definition kinetics-observer.hpp:1002
Index measIndex
Definition kinetics-observer.hpp:1003
TimeIndex time
Definition kinetics-observer.hpp:1006
Class facilitating the manipulation of the kinematics of a frame within another and the associated op...
Definition rigid-body-kinematics.hpp:585
Class facilitating the manipulation of the local kinematics of a frame within another and the associa...
Definition rigid-body-kinematics.hpp:678