Skip to content

Commit

Permalink
constant position xyz model
Browse files Browse the repository at this point in the history
  • Loading branch information
jorgenfj committed Nov 16, 2024
1 parent 6088856 commit 9192a0c
Showing 1 changed file with 6 additions and 9 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -103,10 +103,10 @@ class ConstantPosition : public interface::DynamicModelLTV<2, UNUSED, 2> {
};

/** (Nearly) Constant Pose model.
* State x = [position, position, position, orientation, orientation, orientation]
* State x = [position, position, position]
*/
class ConstantPose : public interface::DynamicModelLTV<6, UNUSED, 6> {
using Parent = interface::DynamicModelLTV<6, UNUSED, 6>;
class ConstantPose : public interface::DynamicModelLTV<3, UNUSED, 3> {
using Parent = interface::DynamicModelLTV<3, UNUSED, 3>;

public:
static constexpr int N_DIM_x = Parent::N_DIM_x;
Expand All @@ -116,12 +116,11 @@ class ConstantPose : public interface::DynamicModelLTV<6, UNUSED, 6> {
using T = Types_xuv<N_DIM_x, N_DIM_u, N_DIM_v>;

/** Constant Pose Model
* x = [x, y, z, theta_x, theta_y, theta_z]
* x = [x, y, z]
* @param std_pos Standard deviation of position
* @param std_orient Standard deviation of orientation
*/
ConstantPose(double std_pos, double std_orient)
: std_pos_(std_pos), std_orient_(std_orient)
ConstantPose(double std_pos)
: std_pos_(std_pos)
{
}

Expand Down Expand Up @@ -152,13 +151,11 @@ class ConstantPose : public interface::DynamicModelLTV<6, UNUSED, 6> {
T::Mat_vv Q_d(double /*dt*/, const T::Vec_x& /*x*/ = T::Vec_x::Zero()) const override {
T::Mat_vv Q = T::Mat_vv::Zero();
Q.block<3, 3>(0, 0) = Eigen::Matrix3d::Identity() * std_pos_ * std_pos_;
Q.block<3, 3>(3, 3) = Eigen::Matrix3d::Identity() * std_orient_ * std_orient_;
return Q;
}

private:
double std_pos_;
double std_orient_;
};

/** (Nearly) Constant Velocity Model.
Expand Down

0 comments on commit 9192a0c

Please sign in to comment.