?? mappath.h
字號(hào):
//////////////////////////////////////////////////////////////////////
// MuRoS - Multi Robot Simulator
//
// Luiz Chaimowicz
// GRASP Lab. University of Pennsylvania
// VERLab - DCC - UFMG - Brasil
//
// MapPath.h: interface for the CMapPath class.
//
//////////////////////////////////////////////////////////////////////
#if !defined(MAPPATH_H)
#define MAPPATH_H
#include "Afxtempl.h"
#include "obstacle.h"
#if _MSC_VER > 1000
#pragma once
#endif // _MSC_VER > 1000
class CMapPath : public CObject
{
public:
DECLARE_SERIAL( CMapPath )
CMapPath();
CMapPath(BOOL computeMap);
CMapPath(const CMapPath *map, BOOL computeMap = FALSE);
virtual ~CMapPath();
void Serialize( CArchive& archive );
void DeleteContents();
void ComputePath();
void ComputeMap();
CPoint m_originReal;
CPoint m_goalReal;
CArray<CObstacle*, CObstacle*> m_obstacles; // array with te obstacles in the environment
CArray<CPoint, CPoint> m_path; // array of points with the computed path of the robot
BOOL m_isComputed; // True if the grassfire map is currently computed
BOOL m_computeMap; // True if the map should be computed (dynamic variables shoul be allocated)
// the path following must be improved*****
float **m_line; // lines to be followed by path follower controller based in the computed path
int m_lineSize; // size of this array
int m_currentLine; // current line that is been followed
double m_oldDist; // distance to the next line intersection
BOOL m_setVelocity; // flag to recompute robot's linear velocity.
float m_maxValue; // Maximum value in the grassfire map (used to compute the gray level of the pixels in the drwing)
float **m_map; // Computed Grassfire map
static int m_sizeX; // resolution of the grassfire map (matrix dimensions, etc)
static int m_sizeY;
static int m_resX;
static int m_resY;
static float m_cellDist;
private:
void AllocateMaps();
void FreeMaps();
void InitFreeSpace();
void GrassFire(float ** freespace, int freespaceX, int freespaceY, float distance, float ** navi);
float **m_freeSpace; // initial state of the Grassfire map
};
#endif
?? 快捷鍵說(shuō)明
復(fù)制代碼
Ctrl + C
搜索代碼
Ctrl + F
全屏模式
F11
切換主題
Ctrl + Shift + D
顯示快捷鍵
?
增大字號(hào)
Ctrl + =
減小字號(hào)
Ctrl + -