Skip to content

Commit

Permalink
base odom publisher was added
Browse files Browse the repository at this point in the history
  • Loading branch information
amirhosein-vedadi committed Aug 26, 2022
1 parent 584f2d3 commit aeb9db7
Show file tree
Hide file tree
Showing 4 changed files with 32 additions and 1 deletion.
3 changes: 3 additions & 0 deletions trajectory_planner/include/trajectory_planner/LieEKF.h
Original file line number Diff line number Diff line change
Expand Up @@ -42,6 +42,9 @@ class LieEKF {

void runFilter(Vector3d gyro, Vector3d acc, Vector3d lfpmeasured, Vector3d rfpmeasured, Matrix3d lfrot, Matrix3d rfrot, int* contact, bool update_enaled);

Vector3d getGBasePose();
Vector3d getGBaseVel();
Quaterniond getGBaseQuat();

private:
Vector3d GLeftFootPos_;
Expand Down
5 changes: 4 additions & 1 deletion trajectory_planner/include/trajectory_planner/QuatEKF.h
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,10 @@ class QuatEKF {

void runFilter(Vector3d gyro, Vector3d acc, Vector3d lfpmeasured, Vector3d rfpmeasured, Matrix3d lfrot, Matrix3d rfrot, int* contact, bool update_enaled);


Vector3d getGBasePose();
Vector3d getGBaseVel();
Quaterniond getGBaseQuat();

private:
Vector3d GLeftFootPos_;
Vector3d GRightFootPos_;
Expand Down
13 changes: 13 additions & 0 deletions trajectory_planner/src/LieEKF.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -52,6 +52,19 @@ LieEKF::LieEKF(){

LieEKF::~LieEKF(){}

Vector3d LieEKF::getGBasePose(){
return GBasePos_;
}

Vector3d LieEKF::getGBaseVel(){
return GBaseVel_;
}

Quaterniond LieEKF::getGBaseQuat(){
Quaterniond q(GBaseRot_);
return q;
}

void LieEKF::initializeStates(Matrix3d R, Vector3d base_vel, Vector3d base_pos, Vector3d lf_pos,
Vector3d rf_pos, Vector3d gyro_bias, Vector3d acc_bias){
GBaseRot_ = R;
Expand Down
12 changes: 12 additions & 0 deletions trajectory_planner/src/QuatEKF.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -66,6 +66,18 @@ QuatEKF::~QuatEKF() {

}

Vector3d QuatEKF::getGBasePose(){
return GBasePos_;
}

Vector3d QuatEKF::getGBaseVel(){
return GBaseVel_;
}

Quaterniond QuatEKF::getGBaseQuat(){
return GBaseQuat_;
}

void QuatEKF::initializeStates(Quaterniond q, Vector3d base_vel, Vector3d base_pos, Vector3d lf_pos,
Vector3d rf_pos, Vector3d gyro_bias, Vector3d acc_bias){
GBaseQuat_ = q;
Expand Down

0 comments on commit aeb9db7

Please sign in to comment.