39 p_ = VectorXd::Zero(dim);
40 v_ = VectorXd::Zero(dim);
41 a_ = VectorXd::Zero(dim);
64 case kPos:
return p_;
break;
65 case kVel:
return v_;
break;
66 case kAcc:
return a_;
break;
67 default:
throw std::runtime_error(
"[StateLinXd::GetByIndex] derivative not part of state");
75 case kPos:
return p_;
break;
76 case kVel:
return v_;
break;
77 case kAcc:
return a_;
break;
78 default:
throw std::runtime_error(
"[StateLinXd::GetByIndex] derivative not part of state");
105 h_xd.segment(
AX, 3) = ang.w;
106 h_xd.segment(
LX, 3) = lin.v_;
114 h_xdd.segment(
AX, 3) = ang.wd;
115 h_xdd.segment(
LX, 3) = lin.a_;
Vector6d Get6dVel() const
Represents position, velocity and acceleration in x-dimensions.
const VectorXd GetByIndex(MotionDerivative deriv) const
Read either position, velocity of acceleration by index.
VectorXd a_
position, velocity and acceleration
static constexpr int kDim2d
StateLin2d Get2D() const
Extracts only the 2-dimensional part (x,y) from this 3-D state.
int kNumDim
the number of dimenions this state represents.
Eigen::Matrix< double, 6, 1 > Vector6d
Vector6d Get6dAcc() const
StateLinXd(int _dim=0)
Constructs an object of dimensions _dim.