<feat> v0.8.0, compatible with odin1 firmware version 0.9.0

1. Update api lidar_get_version which now return a data structure for detailed device firmware version info. Allowed force exit when device firmware version is lower than required.
2. Removed custom_save_map parameter from config yaml to reduce confusion. Added description on how to use it properly instead.
3. Added print message on relocalization sucess, indicated by recieve LIDAR_DT_SLAM_ODOMETRY_TF data type from device
This commit is contained in:
mt-lifan
2026-01-19 17:21:59 +08:00
parent 7be813da89
commit e51cf98658
9 changed files with 266 additions and 36 deletions
+7 -1
View File
@@ -70,7 +70,7 @@ public:
// 拼接文件名
std::filesystem::path pcFile = root_dir_ / ("MT" + timestamp + ".olx");
// Create placeholder files
write_text_file(root_dir_ / "image" / "info.txt", "device=OdinOne\ncreated_at=" + std::string(buf) + "\n");
write_text_file(root_dir_ / "image" / "info.txt", "device=OdinOne\npointcloud=xyzrgbi\ncreated_at=" + std::string(buf) + "\n");
write_text_file(root_dir_ / "image" / "cam_in_ex.txt", "# camera intrinsics/extrinsics TBD\n");
// Init writers
@@ -78,6 +78,7 @@ public:
cloud_writer_ = std::make_unique<Writer>(pcFile, opts.batch_size);
//cloud_writer_ = std::make_unique<Writer>(root_dir_ / "OdinPointCloud.olx", opts.batch_size);
image_writer_ = std::make_unique<Writer>(root_dir_ / "OdinImage.bin", opts.batch_size);
roatation_writer_ = std::make_unique<Writer>(root_dir_ / "OdinRotate.bin", opts.batch_size);
}
~BinaryDataLogger() {
@@ -85,6 +86,7 @@ public:
if (pose_writer_) pose_writer_->shutdown();
if (cloud_writer_) cloud_writer_->shutdown();
if (image_writer_) image_writer_->shutdown();
if (roatation_writer_) roatation_writer_->shutdown();
}
const std::filesystem::path& root_dir() const { return root_dir_; }
@@ -99,6 +101,9 @@ public:
void enqueueImageFrame(std::vector<uint8_t>&& blob) {
if (image_writer_) image_writer_->enqueue(std::move(blob));
}
void enqueueRotateFrame(std::vector<uint8_t>&& blob) {
if (roatation_writer_) roatation_writer_->enqueue(std::move(blob));
}
private:
struct Writer {
@@ -188,4 +193,5 @@ private:
std::unique_ptr<Writer> pose_writer_;
std::unique_ptr<Writer> cloud_writer_;
std::unique_ptr<Writer> image_writer_;
std::unique_ptr<Writer> roatation_writer_;
};