add slam_gmapping

This commit is contained in:
X-lanni
2025-06-06 16:15:07 +08:00
parent 9187b9fb85
commit a7b75c31cb
141 changed files with 15992 additions and 0 deletions
@@ -0,0 +1,17 @@
#ifndef CONFIGURATION_H
#define CONFIGURATION_H
#include <istream>
#include <gmapping/sensor/sensor_base/sensor.h>
namespace GMapping {
class Configuration{
public:
virtual ~Configuration();
virtual SensorMap computeSensorMap() const=0;
};
};
#endif
@@ -0,0 +1,29 @@
#ifndef SENSORLOG_H
#define SENSORLOG_H
#include <list>
#include <istream>
#include <gmapping/sensor/sensor_base/sensorreading.h>
#include <gmapping/sensor/sensor_odometry/odometrysensor.h>
#include <gmapping/sensor/sensor_range/rangesensor.h>
#include <gmapping/sensor/sensor_odometry/odometryreading.h>
#include <gmapping/sensor/sensor_range/rangereading.h>
#include "configuration.h"
namespace GMapping {
class SensorLog : public std::list<SensorReading*>{
public:
SensorLog(const SensorMap&);
~SensorLog();
std::istream& load(std::istream& is);
OrientedPoint boundingBox(double& xmin, double& ymin, double& xmax, double& ymax) const;
protected:
const SensorMap& m_sensorMap;
OdometryReading* parseOdometry(std::istream& is, const OdometrySensor* ) const;
RangeReading* parseRange(std::istream& is, const RangeSensor* ) const;
};
};
#endif