📄 mhbase.h
字号:
/****************************************************************************** File Name: MH/MHBase.h Description: Multi-hypothesis map matching, abstract class******************************************************************************//****************************************************************************** Author: alfred.liushu@gmail.com Upadate: 2008/09/19 File founded Copyright 2008-2009 Robot Lab., Dept.of Automation, Tsinghua University******************************************************************************/#ifndef __MHBASE_H__#define __MHBASE_H__#include "../MH/MultiHypo.h"/****************************** Operations of multi-hypothesis matching ***************************************************//*Dynamic parameters*/const DATATYPE StopVel = DATATYPE(1); /*Stopping velocity limit for dynamic determination*/const DATATYPE StopAngVel = DATATYPE(0.05); /*Stopping angular velocity limit for dynamic determination*/const DATATYPE RunVel = DATATYPE(5); /*Running velocity limit for dynamic determination*/const DATATYPE RunAngVel = DATATYPE(0.20); /*Running angular velocity limit for dynamic determination*//*Generation parameters*/const DATATYPE InitialDisSq = DATATYPE(2500); /*GPS distance square limit for Initialization*/const DATATYPE MaxDisError = DATATYPE(0.30); /*Maximum error of odometry, in proportion*/const DATATYPE MaxDisOffset = DATATYPE(20); /*Maximum offset error of odometry, in meters*/const DATATYPE MaxAngleError = DATATYPE(1.00); /*Maximum angle error in turn hypothesis generation*//*Multi-hypothesis map matching class*/typedef class MHBase : public MultiHypo{protected: COORD coord; /*Current GPS position*/ bool gpsAvail; /*GPS availability label*/ DynType dynamic; /*Dynamic of the current step*/ DATATYPE runDis; /*Distance run in the current step*/ DATATYPE turnAngle; /*Distance run in the current step*/ /*Preliminary functions*/ RETCHECK DynamicStat(void* sensors[], TIME time); /*Calculate dynamic status according to sensor measurements*/ virtual DATATYPE Weigh(const HypoNode& hypoOld, const HypoNode& hypoNew)=0;/*Weigh hypotheses (after new hypothesis generated)*/ /*Hypothesis generation functions*/ RETCHECK GenInitialHypos(TIME time); /*Generate initial hypotheses (after dynamics calculated)*/ RETCHECK UpdateHypos(TIME time); /*Update hypotheses after a move (after dynamics calculated)*/public: MHBase(); /*Default constructor*/ ~MHBase()=0; /*Default destructor*/ RETCHECK Update(void* sensors[], TIME time); /*Update with sensor measurements*/}MHBase;#endif /*__MHBASE_H__*/
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -