269 virtual public armarx::LaserScannerSelfLocalisationInterface
280 return "LaserScannerSelfLocalisation";
312 setAbsolutePose(Ice::Float
x, Ice::Float y, Ice::Float theta,
const Ice::Current&)
override;
313 LineSegment2DSeq
getMap(
const Ice::Current&)
override;
317 const std::string& name,
318 const LaserScan& scan,
320 const Ice::Current&)
override;
326 const Ice::Current&)
override;
330 const Ice::Current&)
override;
336 void updateLocalisation();
340 void resetKalmanFilter(
const Eigen::Vector3f& pose);
341 Eigen::Vector3f filterPose(
const Eigen::Vector3f& pose);
345 std::string reportTopicName;
346 std::string robotStateComponentName;
347 std::string platformName;
348 std::string laserScannerUnitName;
349 std::string workingMemoryName;
350 std::string longtermMemoryName;
351 std::string mapFilename;
352 std::string agentName;
353 std::string robotRootFrame;
355 std::string emergencyStopMasterName;
356 std::string debugObserverName;
357 float workingMemoryUpdateFrequency;
358 float longtermMemoryUpdateFrequency;
359 float robotPositionZ = 0.0f;
360 float maximalLaserScannerDelay = 0.1f;
362 std::mutex propertyMutex;
363 int propSmoothFrameSize;
364 int propSmoothMergeDistance;
365 float propMatchingMaxDistance;
366 float propMatchingMinPoints;
367 float propMatchingCorrectionFactor;
368 float propEdgeMaxDistance;
369 float propEdgeMaxDeltaAngle;
370 float propEdgePointAddingThreshold;
372 int propEdgeMinPoints;
373 bool propReportPoints;
374 bool propReportEdges;
375 bool propUseOdometry;
376 bool propUseMapCorrection;
377 float propSensorStdDev;
378 float propVelSensorStdDev;
379 std::string propLoggingFilePath;
380 bool propRecordData =
false;
382 std::atomic<bool> useOdometry;
384 std::vector<LineSegment2Df> map;
387 LaserScannerUnitInterfacePrx laserScannerUnit;
388 LaserScannerSelfLocalisationListenerPrx reportTopic;
389 PlatformUnitListenerPrx platformUnitTopic;
391 GlobalRobotPoseLocalizationListenerPrx globalRobotPoseTopic;
394 memoryx::WorkingMemoryInterfacePrx workingMemory;
395 memoryx::AgentInstancesSegmentBasePrx agentsMemory;
397 bool updateWorkingMemory =
false;
398 memoryx::LongtermMemoryInterfacePrx longtermMemory;
399 memoryx::PersistentEntitySegmentBasePrx selfLocalisationSegment;
400 std::string poseEntityId;
402 std::vector<LaserScanData> scanData;
404 std::mutex setPoseMutex;
405 std::optional<Eigen::Vector3f> setPose;
407 std::mutex odometryMutex;
408 std::vector<ReportedVelocity> reportedVelocities;
409 Eigen::Vector3f lastVelocity;
410 IceUtil::Time lastVelocityUpdate;
412 Eigen::Vector3f estimatedPose;
414 Eigen::Vector2f platformRectMin{0, 0};
415 Eigen::Vector2f platformRectMax{0, 0};
421 std::mutex kalmanMutex;
424 struct LaserScannerFileLoggingData
426 std::mutex loggingMutex;
427 std::string filePath;
429 std::map<IceUtil::Time, std::vector<LaserScanData>> scanDataHistory;
432 std::unique_ptr<LaserScannerFileLoggingData> laserScannerFileLoggingData;