Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 4 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -31,5 +31,8 @@ compile_commands.json
# cloned pipelines
cpp/bindings/pipelines-src

# beads
# Beads / Dolt files (added by bd init)
.beads/
.dolt/
*.db
.beads-credential-key
21 changes: 4 additions & 17 deletions cpp/bindings/pipelines/lio_sam.h
Original file line number Diff line number Diff line change
Expand Up @@ -119,7 +119,7 @@ class LioSam: public ev::Pipeline {

// Getters
const std::map<std::string, std::vector<ev::Point>> map() override {
return ev::make_map("map", *lio_sam_->getMap());
return ev::make_map("features", *lio_sam_->getMap());
}

// Setters
Expand Down Expand Up @@ -150,38 +150,25 @@ class LioSam: public ev::Pipeline {
}

void add_imu(ev::ImuMeasurement mm) override {
std::cout << "EV: Adding IMU measurement at time " << mm.stamp.to_sec()
<< std::endl;
lio_sam_->addImuMeasurement(ev::convert<lio_sam::Imu>(mm));
std::cout << "EV: Finished adding IMU measurement at time "
<< mm.stamp.to_sec() << std::endl;
}

void add_lidar(ev::LidarMeasurement mm) override {
std::cout << "EV: Adding lidar measurement at time " << mm.stamp.to_sec()
<< std::endl;
// Set everything up
auto cloud =
ev::convert_iter<pcl::PointCloud<lio_sam::PointXYZIRT>>(mm.points)
// NOTE: This likely causes a copy, see if we can avoid that later
.makeShared();

// Run through pipeline
std::cout << "EV: Adding lidar measurement" << std::endl;
lio_sam_->addLidarMeasurement(mm.stamp.to_sec(), cloud);
std::cout << "EV: Finished adding lidar measurement" << std::endl;

// Save pose
// std::cout << "EV: Getting pose from LIO-SAM" << std::endl;
// const auto pose = ev::convert<ev::SE3>(lio_sam_->getPose()) * lidar_T_imu_;
// std::cout << "EV: Pose: " << pose.to_string() << std::endl;
// this->save(mm.stamp, pose);
// std::cout << "EV: Pose saved" << std::endl;
const auto pose = ev::convert<ev::SE3>(lio_sam_->getPose()) * lidar_T_imu_;
this->save(mm.stamp, pose);

// Save features
// std::cout << "EV: Getting most recent frame from LIO-SAM" << std::endl;
// this->save(mm.stamp, "features", *lio_sam_->getMostRecentFrame());
// std::cout << "EV: Most recent frame saved" << std::endl;
this->save(mm.stamp, "features", *lio_sam_->getMostRecentFrame());
}

private:
Expand Down
8 changes: 4 additions & 4 deletions cpp/setup_pipelines.sh
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ if [ ! -d "LIO-SAM" ]; then
fi
cd LIO-SAM
git stash
git checkout master
git checkout d35ce0606b6326377b631ae9cedd73c74066eacc
cd ..

# LOAM
Expand All @@ -31,7 +31,7 @@ if [ ! -d "loam" ]; then
fi
cd loam
git stash
git checkout main
git checkout 48fc3a8c05ec3ea19c57f9565f453292c36b9bdf
git apply ../../pipelines/loam.patch
cd ..

Expand Down Expand Up @@ -69,15 +69,15 @@ if [ ! -d "direct_lidar_inertial_odometry" ]; then
fi
cd direct_lidar_inertial_odometry
git stash
git checkout master
git checkout 5cda5f359a70174a98001256ffd7234cbfeccf38
cd ..

if [ ! -d "form" ]; then
git clone https://github.com/rpl-cmu/form.git
fi
cd form
git stash
git switch --detach main
git switch --detach v0.1.1
git apply ../../pipelines/form.patch
cd ..

Expand Down
Loading