z1_controller/include/trajectory/EndCircleTraj.h

38 lines
1.1 KiB
C
Raw Normal View History

2022-07-20 11:11:38 +08:00
#ifndef ENDCIRCLETRAJ_H
#define ENDCIRCLETRAJ_H
#include "model/ArmDynKineModel.h"
#include "trajectory/EndHomoTraj.h"
class EndCircleTraj: public EndHomoTraj{
public:
EndCircleTraj(CtrlComponents *ctrlComp);
EndCircleTraj(ArmDynKineModel *armModel);
~EndCircleTraj(){}
void setEndRoundTraj(HomoMat startHomo, Vec3 axisPointFromInit,
Vec3 axisDirection, double maxSpeed, double angle,
bool keepOrientation = true);
void setEndRoundTraj(std::string stateName, Vec3 axisPointFromInit,
Vec3 axisDirection, double maxSpeed, double angle,
bool keepOrientation = true);
2022-09-13 19:53:15 +08:00
void setEndRoundTraj(Vec6 startP, Vec6 middleP, Vec6 endP,
double maxSpeed);
2022-07-20 11:11:38 +08:00
private:
2022-09-13 19:53:15 +08:00
void _centerCircle(Vec3 p1, Vec3 p2, Vec3 p3);
2022-07-20 11:11:38 +08:00
bool _getEndTraj(HomoMat &homo, Vec6 &twist);
Vec3 _center;
double _radius;
2022-09-13 19:53:15 +08:00
Vec6 _middlePosture;
Vec6 _middleQ;
HomoMat _middleHomo;
2022-07-20 11:11:38 +08:00
HomoMat _centerHomo;
HomoMat _initHomoToCenter;
RotMat _initOri;
double _maxSpeed, _goalAngle, _speed, _angle;
Vec3 _omegaAxis;
bool _keepOrientation;
};
#endif // ENDCIRCLETRAJ_H