z1_controller/include/trajectory/JointSpaceTraj.h

33 lines
928 B
C
Raw Normal View History

2022-07-20 11:11:38 +08:00
#ifndef JOINTSPACETRAJ_H
#define JOINTSPACETRAJ_H
#include <vector>
#include <trajectory/Trajectory.h>
#include <string>
#include "control/CtrlComponents.h"
2022-09-13 19:53:15 +08:00
#include "trajectory/SCurve.h"
2022-07-20 11:11:38 +08:00
2022-12-14 20:29:47 +08:00
2022-07-20 11:11:38 +08:00
class JointSpaceTraj : public Trajectory{
public:
JointSpaceTraj(CtrlComponents *ctrlComp);
~JointSpaceTraj(){}
bool getJointCmd(Vec6 &q, Vec6 &qd);
bool getJointCmd(Vec6 &q, Vec6 &qd, double &gripperQ, double &gripperQd);
2022-11-11 19:49:41 +08:00
void setGripper(double startQ, double endQ, double speed = M_PI);
2022-07-20 11:11:38 +08:00
void setJointTraj(Vec6 startQ, Vec6 endQ, double speed);
2022-09-13 19:53:15 +08:00
bool setJointTraj(Vec6 startQ, std::string endName, double speed);
2022-11-11 19:49:41 +08:00
bool setJointTraj(std::string startName, std::string endName, double speed);
2022-07-20 11:11:38 +08:00
private:
2022-12-14 20:29:47 +08:00
void _generateA345(double pathTime);
SCurve _jointCurve;
const double ddQMax = 15.0;
const double dddQMax = 30.0;
2022-12-14 20:29:47 +08:00
double _a3, _a4, _a5, _s, _sDot;
2022-07-20 11:11:38 +08:00
};
#endif // JOINTSPACETRAJ_H