[324] | 1 | // %flair:license{
|
---|
| 2 | // This file is part of the Flair framework distributed under the
|
---|
| 3 | // CECILL-C License, Version 1.0.
|
---|
| 4 | // %flair:license}
|
---|
| 5 | /*!
|
---|
| 6 | * \file TrajectoryGenerator1D_impl.h
|
---|
| 7 | * \brief Class generating a trajectory in 1D
|
---|
| 8 | * \author Guillaume Sanahuja, Copyright Heudiasyc UMR UTC/CNRS 7253
|
---|
| 9 | * \date 2011/05/01
|
---|
| 10 | * \version 4.0
|
---|
| 11 | */
|
---|
| 12 |
|
---|
| 13 | #ifndef TRAJECTORYGENERATOR1D_IMPL_H
|
---|
| 14 | #define TRAJECTORYGENERATOR1D_IMPL_H
|
---|
| 15 |
|
---|
| 16 | namespace flair {
|
---|
| 17 | namespace core {
|
---|
| 18 | class Matrix;
|
---|
| 19 | }
|
---|
| 20 | namespace gui {
|
---|
| 21 | class LayoutPosition;
|
---|
| 22 | class DoubleSpinBox;
|
---|
| 23 | }
|
---|
| 24 | }
|
---|
| 25 |
|
---|
| 26 | /*! \class TrajectoryGenerator1D_impl
|
---|
| 27 | * \brief Class generating a trajectory in 1D
|
---|
| 28 | */
|
---|
| 29 | class TrajectoryGenerator1D_impl {
|
---|
| 30 |
|
---|
| 31 | public:
|
---|
| 32 | TrajectoryGenerator1D_impl(flair::filter::TrajectoryGenerator1D *self,
|
---|
| 33 | const flair::gui::LayoutPosition *position,
|
---|
| 34 | std::string name, std::string unit);
|
---|
| 35 | ~TrajectoryGenerator1D_impl();
|
---|
| 36 | void Update(flair::core::Time time);
|
---|
| 37 | void StartTraj(float start_pos, float end_pos,float startVelocity);
|
---|
| 38 | void StopTraj(void);
|
---|
| 39 | void Reset(void);
|
---|
| 40 | float GetPercentageOfCompletion(void) const;
|
---|
| 41 | flair::core::Matrix *output;
|
---|
| 42 | float pos_off, vel_off;
|
---|
| 43 | bool is_finished, is_started;
|
---|
| 44 |
|
---|
| 45 | private:
|
---|
| 46 | float start_pos,end_pos;
|
---|
| 47 | float pos, v, acc;
|
---|
| 48 | flair::core::Time previous_time;
|
---|
| 49 | bool first_update;
|
---|
| 50 | flair::gui::DoubleSpinBox *T, *max_veloctity, *acceleration;
|
---|
| 51 | };
|
---|
| 52 |
|
---|
| 53 | #endif // TRAJECTORYGENERATOR1D_IMPL_H
|
---|