Changeset 84:72d1a08cac55 in rrlib_localization


Ignore:
Timestamp:
18.02.2019 08:58:47 (8 months ago)
Author:
Max Reichardt <mreichardt@…>
Branch:
17.03
Children:
85:fe2a7d1868d2, 88:0fd3540c36c0
Parents:
83:1166b2d54386 (diff), 80:b8a8e974d5d5 (diff)
Note: this is a merge changeset, the changes displayed below correspond to the merge itself.
Use the (diff) links above to see all the changes relative to each parent.
Phase:
public
Message:

Merge with 14.08

Files:
4 edited

Legend:

Unmodified
Added
Removed
  • definitions.h

    r80 r84  
    6565using tAcceleration3D = tPosition < 3, TElement, si_units::tSIUnit < 1, 0, -2, 0, 0, 0, 0 >>; 
    6666 
     67template <typename TElement = double> 
     68using tAngularVelocities2D = tOrientationChange2D<TElement>; 
     69template <typename TElement = double> 
     70using tAngularVelocities3D = tOrientationChange3D<TElement>; 
     71 
    6772 
    6873/*! Tuple with (raw) data typically obtained from IMU 
  • rtti.cpp

    r80 r84  
    2626 * \date    2014-05-12 
    2727 * 
     28 * \brief   Contains Runtime Type Information initializations 
     29 * 
    2830 */ 
    2931//---------------------------------------------------------------------- 
     
    4143#include "rrlib/localization/definitions.h" 
    4244#include "rrlib/localization/tPose.h" 
     45#include "rrlib/localization/tUncertainPose.h" 
    4346 
    4447//---------------------------------------------------------------------- 
     
    5659//---------------------------------------------------------------------- 
    5760 
    58 static tDataType<tPose2D<>> init_type_pose_2d; 
    59 static tDataType<tPose3D<>> init_type_pose_3d; 
    60 //static tDataType<tPoseWithUncertainty2D<>> init_type_pose_with_uncertainty_2d; 
    61 //static tDataType<tPoseWithUncertainty3D<>> init_type_pose_with_uncertainty_3d; 
    62 static tDataType<tVelocity2D<>> init_type_velocity_2d("rrlib.localization.Velocity2D"); 
    63 static tDataType<tAcceleration2D<>> init_type_acceleration_2d("rrlib.localization.Acceleration2D"); 
     61tType cINIT_TYPES[] = 
     62{ 
     63  tDataType<tPose2D<>>("rrlib.localization.Pose2D").AddName("rrlib.localization.Pose<2u, double, rrlib.si_units.SIUnit<1, 0, 0, 0, 0, 0, 0>, rrlib.si_units.SIUnit<0, 0, 0, 0, 0, 0, 0>, rrlib.math.angle.Signed>"), 
     64  tDataType<tPose3D<>>("rrlib.localization.Pose3D").AddName("rrlib.localization.Pose<3u, double, rrlib.si_units.SIUnit<1, 0, 0, 0, 0, 0, 0>, rrlib.si_units.SIUnit<0, 0, 0, 0, 0, 0, 0>, rrlib.math.angle.Signed>"), 
     65  tDataType<tUncertainPose2D<>>("rrlib.localization.UncertainPose2D").AddName("rrlib.localization.UncertainPose<2u, double, rrlib.si_units.SIUnit<1, 0, 0, 0, 0, 0, 0>, rrlib.si_units.SIUnit<0, 0, 0, 0, 0, 0, 0>, rrlib.math.angle.Signed>"), 
     66  tDataType<tUncertainPose3D<>>("rrlib.localization.UncertainPose3D").AddName("rrlib.localization.UncertainPose<3u, double, rrlib.si_units.SIUnit<1, 0, 0, 0, 0, 0, 0>, rrlib.si_units.SIUnit<0, 0, 0, 0, 0, 0, 0>, rrlib.math.angle.Signed>"), 
     67  tDataType<tVelocity2D<>>("rrlib.localization.Velocity2D"), 
     68  tDataType<tAcceleration2D<>>("rrlib.localization.Acceleration2D"), 
     69  tDataType<tAngularVelocities2D<>>("rrlib.localization.AngularVelocities2D"), 
    6470 
    65  
    66 static tDataType<tTwist2D<>> init_type_twist_2d; 
    67 static tDataType<tTwist3D<>> init_type_twist_3d; 
    68 //static tDataType<tTwistWithUncertainty2D<>> init_type_twist_with_uncertainty_2d; 
    69 //static tDataType<tTwistWithUncertainty3D<>> init_type_twist_with_uncertainty_3d; 
    70 static tDataType<tVelocity3D<>> init_type_velocity_3d("rrlib.localization.Velocity3D"); 
    71 static tDataType<tAcceleration3D<>> init_type_acceleration_3d("rrlib.localization.Acceleration3D"); 
    72  
    73 static tDataType<tIMUData<>> init_type_imu_data("rrlib.localization.IMUData"); 
     71  tDataType<tTwist2D<>>("rrlib.localization.Twist2D").AddName("rrlib.localization.Pose<2u, double, rrlib.si_units.SIUnit<1, 0, -1, 0, 0, 0, 0>, rrlib.si_units.SIUnit<0, 0, -1, 0, 0, 0, 0>, rrlib.math.angle.NoWrap>"), 
     72  tDataType<tTwist3D<>>("rrlib.localization.Twist3D").AddName("rrlib.localization.Pose<3u, double, rrlib.si_units.SIUnit<1, 0, -1, 0, 0, 0, 0>, rrlib.si_units.SIUnit<0, 0, -1, 0, 0, 0, 0>, rrlib.math.angle.NoWrap>"), 
     73  tDataType<tUncertainTwist2D<>>("rrlib.localization.UncertainTwist2D").AddName("rrlib.localization.UncertainPose<2u, double, rrlib.si_units.SIUnit<1, 0, -1, 0, 0, 0, 0>, rrlib.si_units.SIUnit<0, 0, -1, 0, 0, 0, 0>, rrlib.math.angle.NoWrap>"), 
     74  tDataType<tUncertainTwist3D<>>("rrlib.localization.UncertainTwist3D").AddName("rrlib.localization.UncertainPose<3u, double, rrlib.si_units.SIUnit<1, 0, -1, 0, 0, 0, 0>, rrlib.si_units.SIUnit<0, 0, -1, 0, 0, 0, 0>, rrlib.math.angle.NoWrap>"), 
     75  tDataType<tVelocity3D<>>("rrlib.localization.Velocity3D"), 
     76  tDataType<tAcceleration3D<>>("rrlib.localization.Acceleration3D"), 
     77  tDataType<tAngularVelocities3D<>>("rrlib.localization.AngularVelocities3D"), 
     78  tDataType<tAcceleration3D<float>>("rrlib.localization.Acceleration3Df"), 
     79  tDataType<tAngularVelocities3D<float>>("rrlib.localization.AngularVelocities3Df"), 
     80  tDataType<tIMUData<>>().AddName("rrlib.localization.IMUData"), 
     81  tDataType<std::vector<tIMUData<>>>() 
     82}; 
    7483 
    7584#endif 
  • tPosition.h

    r80 r84  
    6060// Forward declarations / typedefs / enums 
    6161//---------------------------------------------------------------------- 
     62//! The position type is defined by a \ref math::tVector 
    6263template <unsigned int Tdimension, typename TElement, typename TSIUnit> 
    6364using tPosition = math::tVector<Tdimension, si_units::tQuantity<TSIUnit, TElement>>; 
    6465 
     66//! The standard position for the two dimensional case. 
    6567template <typename TElement = double> 
    6668using tPosition2D = tPosition<2, TElement, si_units::tMeter>; 
     69//! The standard change in position wrt time for the two dimensional case. 
    6770template <typename TElement = double> 
    6871using tPositionChange2D = tPosition < 2, TElement, si_units::tSIUnit < 1, 0, -1, 0, 0, 0, 0 >>; 
    6972 
     73//! The standard position for the three dimensional case. 
    7074template <typename TElement = double> 
    7175using tPosition3D = tPosition<3, TElement, si_units::tMeter>; 
     76//! The standard change in position wrt time for the three dimensional case. 
    7277template <typename TElement = double> 
    7378using tPositionChange3D = tPosition < 3, TElement, si_units::tSIUnit < 1, 0, -1, 0, 0, 0, 0 >>; 
     
    7681// Arithmetic operators 
    7782//---------------------------------------------------------------------- 
     83//! Operator to multiply a (maybe derived) 2D \ref tPosition with time (intergrate over time) 
    7884template <typename TElement, typename TSIUnit, typename TValue> 
    7985tPosition<2, decltype(TElement() * TValue()), typename si_units::operators::tProduct<TSIUnit, si_units::tSecond>::tResult> operator * (const tPosition<2, TElement, TSIUnit> &position, si_units::tTime<TValue> time) 
     
    8288  return tResult(position.X() * time, position.Y() * time); 
    8389} 
     90//! Operator to multiply time with a (maybe derived) 2D \ref tPosition (intergrate over time) 
    8491template <typename TElement, typename TSIUnit, typename TValue> 
    8592tPosition<2, decltype(TElement() * TValue()), typename si_units::operators::tProduct<TSIUnit, si_units::tSecond>::tResult> operator * (si_units::tTime<TValue> time, const tPosition<2, TElement, TSIUnit> &position) 
     
    8895} 
    8996 
     97//! Operator to multiply a (maybe derived) 3D \ref tPosition with time (intergrate over time) 
    9098template <typename TElement, typename TSIUnit, typename TValue> 
    9199tPosition<3, decltype(TElement() * TValue()), typename si_units::operators::tProduct<TSIUnit, si_units::tSecond>::tResult> operator * (const tPosition<3, TElement, TSIUnit> &position, si_units::tTime<TValue> time) 
     
    94102  return tResult(position.X() * time, position.Y() * time, position.Z() * time); 
    95103} 
     104//! Operator to multiply time with a (maybe derived) 3D \ref tPosition (intergrate over time) 
    96105template <typename TElement, typename TSIUnit, typename TValue> 
    97106tPosition<3, decltype(TElement() * TValue()), typename si_units::operators::tProduct<TSIUnit, si_units::tSecond>::tResult> operator * (si_units::tTime<TValue> time, const tPosition<3, TElement, TSIUnit> &position) 
     
    100109} 
    101110 
     111//! Operator to divide a (maybe derived) 2D \ref tPosition by time (differentiate by time) 
    102112template <typename TElement, typename TSIUnit, typename TValue> 
    103113tPosition < 2, decltype(TElement() / TValue()), typename si_units::operators::tQuotient<TSIUnit, si_units::tSecond>::tResult > operator / (const tPosition<2, TElement, TSIUnit> &position, si_units::tTime<TValue> time) 
     
    107117} 
    108118 
     119//! Operator to divide a (maybe derived) 3D \ref tPosition by time (differentiate by time) 
    109120template <typename TElement, typename TSIUnit, typename TValue> 
    110121tPosition < 3, decltype(TElement() / TValue()), typename si_units::operators::tQuotient<TSIUnit, si_units::tSecond>::tResult > operator / (const tPosition<3, TElement, TSIUnit> &position, si_units::tTime<TValue> time) 
  • tPosition.h

    r79 r84  
    7070template <typename TElement = double> 
    7171using tPositionChange2D = tPosition < 2, TElement, si_units::tSIUnit < 1, 0, -1, 0, 0, 0, 0 >>; 
    72 template <typename TElement = double> 
    73 using tVelocity2D = tPositionChange2D<TElement>; 
    74 template <typename TElement = double> 
    75 using tAcceleration2D = tPosition < 2, TElement, si_units::tSIUnit < 1, 0, -2, 0, 0, 0, 0 >>; 
    76  
    7772 
    7873//! The standard position for the three dimensional case. 
     
    8277template <typename TElement = double> 
    8378using tPositionChange3D = tPosition < 3, TElement, si_units::tSIUnit < 1, 0, -1, 0, 0, 0, 0 >>; 
    84 template <typename TElement = double> 
    85 using tVelocity3D = tPositionChange3D<TElement>; 
    86 template <typename TElement = double> 
    87 using tAcceleration3D = tPosition < 3, TElement, si_units::tSIUnit < 1, 0, -2, 0, 0, 0, 0 >>; 
    8879 
    8980//---------------------------------------------------------------------- 
Note: See TracChangeset for help on using the changeset viewer.