/usr/include/kdl/velocityprofile_spline.hpp is in liborocos-kdl-dev 1.3.0+dfsg-1.
This file is owned by root:root, with mode 0o644.
The actual contents of the file can be viewed below.
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 | #ifndef VELOCITYPROFILE_SPLINE_H
#define VELOCITYPROFILE_SPLINE_H
#include "velocityprofile.hpp"
namespace KDL
{
/**
* \brief A spline VelocityProfile trajectory interpolation.
* @ingroup Motion
*/
class VelocityProfile_Spline : public VelocityProfile
{
public:
VelocityProfile_Spline();
VelocityProfile_Spline(const VelocityProfile_Spline &p);
virtual ~VelocityProfile_Spline();
virtual void SetProfile(double pos1, double pos2);
/**
* Generate linear interpolation coeffcients.
*
* @param pos1 begin position.
* @param pos2 end position.
* @param duration duration of the profile.
*/
virtual void SetProfileDuration(
double pos1, double pos2, double duration);
/**
* Generate cubic spline interpolation coeffcients.
*
* @param pos1 begin position.
* @param vel1 begin velocity.
* @param pos2 end position.
* @param vel2 end velocity.
* @param duration duration of the profile.
*/
virtual void SetProfileDuration(
double pos1, double vel1, double pos2, double vel2, double duration);
/**
* Generate quintic spline interpolation coeffcients.
*
* @param pos1 begin position.
* @param vel1 begin velocity.
* @param acc1 begin acceleration
* @param pos2 end position.
* @param vel2 end velocity.
* @param acc2 end acceleration.
* @param duration duration of the profile.
*/
virtual void SetProfileDuration(double pos1, double vel1, double acc1, double pos2, double vel2, double acc2, double duration);
virtual double Duration() const;
virtual double Pos(double time) const;
virtual double Vel(double time) const;
virtual double Acc(double time) const;
virtual void Write(std::ostream& os) const;
virtual VelocityProfile* Clone() const;
private:
double coeff_[6];
double duration_;
};
}
#endif // VELOCITYPROFILE_CUBICSPLINE_H
|