本文整理汇总了C++中Expression::appendRows方法的典型用法代码示例。如果您正苦于以下问题:C++ Expression::appendRows方法的具体用法?C++ Expression::appendRows怎么用?C++ Expression::appendRows使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类Expression
的用法示例。
在下文中一共展示了Expression::appendRows方法的3个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: rotAcc
KinVec rotAcc( const Frame & f ,
const Frame & wt ,
const Frame & ei ,
const Expression & q ,
const Expression & dq ,
const Expression & ddq ){
IntermediateState R = eye(3);
R = f.chain(R,wt,0);
IntermediateState J1=jacobian(R.getRow(2).transpose(),q);
IntermediateState J2=jacobian(R.getRow(0).transpose(),q);
IntermediateState J3=jacobian(R.getRow(1).transpose(),q);
Expression J;
J.appendRows(R.getRow(1)*J1);
J.appendRows(R.getRow(2)*J2);
J.appendRows(R.getRow(0)*J3);
J=wt.chain(J,ei,0);
//IntermediateState tempJ = jacobian( J*dq, q );
//IntermediateState acnst = tempJ*dq;
//IntermediateState tempJ = jacobian( J*dq, q );
IntermediateState acnst = (J*dq).ADforward(q,dq);
return KinVec( J*ddq+acnst, 0, ei, J, acnst, q, dq, ddq, -2 );
}
示例2: rotVel
KinVec rotVel( const Frame & f ,
const Frame & wt ,
const Frame & ei ,
const Expression & q ,
const Expression & dq ,
const Expression & ddq ){
IntermediateState R = eye(3);
R=f.chain(R,wt,0);
//Expression J;
//J << R.getRow(1)*jacobian(R.getRow(2).transpose(),q);
//J << R.getRow(2)*jacobian(R.getRow(0).transpose(),q);
//J << R.getRow(0)*jacobian(R.getRow(1).transpose(),q);
IntermediateState J1 = jacobian(R.getRow(2).transpose(),q);
IntermediateState J2 = jacobian(R.getRow(0).transpose(),q);
IntermediateState J3 = jacobian(R.getRow(1).transpose(),q);
Expression J;
J.appendRows(R.getRow(1)*J1);
J.appendRows(R.getRow(2)*J2);
J.appendRows(R.getRow(0)*J3);
J = wt.chain(J,ei,0);
return KinVec( J*dq, 0, ei, J, q, dq, ddq, -1 );
}
示例3: main
int main( ){
IntermediateState y0;
IntermediateState y1=y0*2+1;
output("sym1.txt",y1);
y0=4;
output("sym2.txt",y1);
y0=2;
output("sym3.txt",y1);
Expression E;
IntermediateState e1(1,3);e1(0)=1;e1(1)=2;e1(2)=3;
IntermediateState e2(1,3);e2(0)=-1;e2(1)=-2;e2(2)=-3;
// Thus doesn't work with DifferentialState e1(3);
E.appendRows(e1);
printf("Shape %d x %d\n",E.getNumRows(),E.getNumCols());
E.appendRows(e2);
output("sym4.txt",E);
return 0;
}