Changeset 79:d130ef868b2b in rrlib_localization


Ignore:
Timestamp:
11.01.2019 18:13:30 (6 days ago)
Author:
Max Reichardt <max.reichardt@…>
Branch:
17.03
Parents:
75:5ec26ac66b3b (diff), 78:ba2bc7ca2d65 (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
  • rtti.cpp

    r73 r79  
    6464  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>"), 
    6565  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>"), 
     66  tDataType<tVelocity2D<>>("rrlib.localization.Velocity2D"), 
     67  tDataType<tAcceleration2D<>>("rrlib.localization.Acceleration2D"), 
    6668 
    6769  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>"), 
    6870  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>"), 
    6971  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>"), 
    70   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>") 
     72  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>"), 
     73  tDataType<tVelocity3D<>>("rrlib.localization.Velocity3D"), 
     74  tDataType<tAcceleration3D<>>("rrlib.localization.Acceleration3D") 
    7175}; 
     76 
    7277 
    7378#endif 
  • rtti.cpp

    r77 r79  
    2626 * \date    2014-05-12 
    2727 * 
     28 * \brief   Contains Runtime Type Information initializations 
     29 * 
    2830 */ 
    2931//---------------------------------------------------------------------- 
     
    4042//---------------------------------------------------------------------- 
    4143#include "rrlib/localization/tPose.h" 
     44#include "rrlib/localization/tUncertainPose.h" 
    4245 
    4346//---------------------------------------------------------------------- 
     
    5558//---------------------------------------------------------------------- 
    5659 
    57 static tDataType<tPose2D<>> init_type_pose_2d; 
    58 static tDataType<tPose3D<>> init_type_pose_3d; 
    59 //static tDataType<tPoseWithUncertainty2D<>> init_type_pose_with_uncertainty_2d; 
    60 //static tDataType<tPoseWithUncertainty3D<>> init_type_pose_with_uncertainty_3d; 
    61 static tDataType<tVelocity2D<>> init_type_velocity_2d("rrlib.localization.Velocity2D"); 
    62 static tDataType<tAcceleration2D<>> init_type_acceleration_2d("rrlib.localization.Acceleration2D"); 
     60tType cINIT_TYPES[] = 
     61{ 
     62  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>"), 
     63  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>"), 
     64  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>"), 
     65  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>"), 
     66  tDataType<tVelocity2D<>>("rrlib.localization.Velocity2D"), 
     67  tDataType<tAcceleration2D<>>("rrlib.localization.Acceleration2D"), 
    6368 
     69  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>"), 
     70  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>"), 
     71  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>"), 
     72  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>"), 
     73  tDataType<tVelocity3D<>>("rrlib.localization.Velocity3D"), 
     74  tDataType<tAcceleration3D<>>("rrlib.localization.Acceleration3D") 
     75}; 
    6476 
    65 static tDataType<tTwist2D<>> init_type_twist_2d; 
    66 static tDataType<tTwist3D<>> init_type_twist_3d; 
    67 //static tDataType<tTwistWithUncertainty2D<>> init_type_twist_with_uncertainty_2d; 
    68 //static tDataType<tTwistWithUncertainty3D<>> init_type_twist_with_uncertainty_3d; 
    69 static tDataType<tVelocity3D<>> init_type_velocity_3d("rrlib.localization.Velocity3D"); 
    70 static tDataType<tAcceleration3D<>> init_type_acceleration_3d("rrlib.localization.Acceleration3D"); 
    7177 
    7278#endif 
  • tPosition.h

    r63 r79  
    7070template <typename TElement = double> 
    7171using tPositionChange2D = tPosition < 2, TElement, si_units::tSIUnit < 1, 0, -1, 0, 0, 0, 0 >>; 
     72template <typename TElement = double> 
     73using tVelocity2D = tPositionChange2D<TElement>; 
     74template <typename TElement = double> 
     75using tAcceleration2D = tPosition < 2, TElement, si_units::tSIUnit < 1, 0, -2, 0, 0, 0, 0 >>; 
     76 
    7277 
    7378//! The standard position for the three dimensional case. 
     
    7782template <typename TElement = double> 
    7883using tPositionChange3D = tPosition < 3, TElement, si_units::tSIUnit < 1, 0, -1, 0, 0, 0, 0 >>; 
     84template <typename TElement = double> 
     85using tVelocity3D = tPositionChange3D<TElement>; 
     86template <typename TElement = double> 
     87using tAcceleration3D = tPosition < 3, TElement, si_units::tSIUnit < 1, 0, -2, 0, 0, 0, 0 >>; 
    7988 
    8089//---------------------------------------------------------------------- 
  • tPosition.h

    r77 r79  
    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 >>; 
     
    7376 
    7477 
     78//! The standard position for the three dimensional case. 
    7579template <typename TElement = double> 
    7680using tPosition3D = tPosition<3, TElement, si_units::tMeter>; 
     81//! The standard change in position wrt time for the three dimensional case. 
    7782template <typename TElement = double> 
    7883using tPositionChange3D = tPosition < 3, TElement, si_units::tSIUnit < 1, 0, -1, 0, 0, 0, 0 >>; 
     
    8590// Arithmetic operators 
    8691//---------------------------------------------------------------------- 
     92//! Operator to multiply a (maybe derived) 2D \ref tPosition with time (intergrate over time) 
    8793template <typename TElement, typename TSIUnit, typename TValue> 
    8894tPosition<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) 
     
    9197  return tResult(position.X() * time, position.Y() * time); 
    9298} 
     99//! Operator to multiply time with a (maybe derived) 2D \ref tPosition (intergrate over time) 
    93100template <typename TElement, typename TSIUnit, typename TValue> 
    94101tPosition<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) 
     
    97104} 
    98105 
     106//! Operator to multiply a (maybe derived) 3D \ref tPosition with time (intergrate over time) 
    99107template <typename TElement, typename TSIUnit, typename TValue> 
    100108tPosition<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) 
     
    103111  return tResult(position.X() * time, position.Y() * time, position.Z() * time); 
    104112} 
     113//! Operator to multiply time with a (maybe derived) 3D \ref tPosition (intergrate over time) 
    105114template <typename TElement, typename TSIUnit, typename TValue> 
    106115tPosition<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) 
     
    109118} 
    110119 
     120//! Operator to divide a (maybe derived) 2D \ref tPosition by time (differentiate by time) 
    111121template <typename TElement, typename TSIUnit, typename TValue> 
    112122tPosition < 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) 
     
    116126} 
    117127 
     128//! Operator to divide a (maybe derived) 3D \ref tPosition by time (differentiate by time) 
    118129template <typename TElement, typename TSIUnit, typename TValue> 
    119130tPosition < 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) 
Note: See TracChangeset for help on using the changeset viewer.