20 #include <OpenKarto/Mapper.h> 39 pDataset->
Add(pLaserRangeFinder);
48 std::vector<kt_double> readings;
49 for (
int i=0; i<361; i++)
51 readings.push_back(3.0);
60 pMapper->
Process(pLocalizedRangeScan);
64 pDataset->
Add(pLocalizedRangeScan);
74 pMapper->
Process(pLocalizedRangeScan);
78 pDataset->
Add(pLocalizedRangeScan);
88 pMapper->
Process(pLocalizedRangeScan);
92 pDataset->
Add(pLocalizedRangeScan);
102 std::cout <<
"Generating map..." << std::endl;
107 return pOccupancyGrid;
115 if (pOccupancyGrid != NULL)
122 std::cout <<
"width = " << width <<
", height = " << height <<
", scale = " << pOccupancyGrid->
GetCoordinateConverter()->
GetScale() <<
", offset: " << offset.
GetX() <<
", " << offset.
GetY() << std::endl;
145 std::cout << std::endl;
147 std::cout << std::endl;
177 delete pOccupancyGrid;
kt_int32s GetHeight() const
const Pose2 & GetOdometricPose() const
virtual kt_bool Process(LocalizedRangeScan *pScan)
void SetRangeThreshold(kt_double rangeThreshold)
kt_double DegreesToRadians(kt_double degrees)
karto::OccupancyGrid * CreateOccupancyGrid(karto::Mapper *pMapper, kt_double resolution)
kt_int32s GetWidth() const
void SetOffsetPose(const Pose2 &rPose)
karto::Dataset * CreateMap(karto::Mapper *pMapper)
void SetAngularResolution(kt_double angularResolution)
void Add(Object *pObject)
void PrintOccupancyGrid(karto::OccupancyGrid *pOccupancyGrid)
static OccupancyGrid * CreateFromScans(const LocalizedRangeScanVector &rScans, kt_double resolution)
void SetScanSolver(ScanSolver *pSolver)
virtual const LocalizedRangeScanVector GetAllProcessedScans() const
void SetOdometricPose(const Pose2 &rPose)
static LaserRangeFinder * CreateLaserRangeFinder(LaserRangeFinderType type, const Name &rName)
const Vector2< kt_double > & GetOffset() const
CoordinateConverter * GetCoordinateConverter() const
void SetCorrectedPose(const Pose2 &rPose)
T GetValue(const Vector2< kt_int32s > &rGrid) const
kt_double GetScale() const
const Pose2 & GetCorrectedPose() const