Skip to content

Commit

Permalink
Data structures for handling imu lidar msgs
Browse files Browse the repository at this point in the history
  • Loading branch information
AhmedBaza1 committed Apr 18, 2024
1 parent 27c6ec9 commit 3d53f9c
Show file tree
Hide file tree
Showing 2 changed files with 57 additions and 3 deletions.
3 changes: 2 additions & 1 deletion src/inertial/filter_lidar_inertial.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,8 @@ FilterLidarInertial::~FilterLidarInerial()

}

void FilterLidarInertial::read_observations()
void FilterLidarInertial::read_observations(InertialData LaodingData)
{
this-> Data = LaodingData;
// fill in the function and change the heather.
}
57 changes: 55 additions & 2 deletions src/inertial/mrob/filter_lidar_inertial.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -32,18 +32,71 @@

namespace mrob
{
struct orientation {
double x;
double y;
double z;
double w;
};
struct angular_vel {
double x;
double y;
double z;
};

struct linear_acc {
double x;
double y;
double z;
};
struct Imu_msg {
double stamp;
orientation orientation;
angular_vel angular_velocity;
linear_acc linear_acceleration;

Mat19 orientation_covariance;
Mat19 angular_velocity_covariance;
Mat19 linear_acceleration_covariance;
};

struct LidarPoint
{
LidarPoint() // constructor
{
point(0,0) = 0.0;
point(1,0) = 0.0;
point(2,0) = 0.0;
stamp = 0.0;
intensity = 0.0 ;
};
Mat31 point;
float stamp; // time in nanosec
float intensity;
};

struct InertialData
{
InertialData()
{

};
std::vector<Imu_msg> imu_buffer;
std::vector<LidarPoint> pointcloud;
};
class FilterLidarInertial
{
private:
InertialData Data;
public:
// Here constructor shou,d have all covariances values and hyperparams.
FilterLidarInertial();
~FilterLidarInertial();

void read_observations();
void read_observations(InertialData LaodingData);
void solve();

};

}//namespace


Expand Down

0 comments on commit 3d53f9c

Please sign in to comment.