59 #include <sys/types.h> 64 #include "rnr/rnrconfig.h" 102 const double fPosition,
103 const double fVelocity,
104 const double fAcceleration)
157 void get(std::string &strName,
160 double &fAcceleration)
194 m_uTimeFromStart = 0;
237 return m_uTimeFromStart;
249 m_uTimeFromStart = uTimeFromStart;
259 return m_trajectory.size();
273 double fAcceleration=0.0)
275 KuonWheelTraj jointPoint(strName, fPosition, fVelocity, fAcceleration);
276 m_trajectory.push_back(jointPoint);
291 return m_trajectory[i];
299 m_trajectory.clear();
300 m_uTimeFromStart = 0;
322 static const int TRAJ_DESIRED = 0;
323 static const int TRAJ_ACTUAL = 1;
324 static const int TRAJ_NUMOF = 2;
338 for(
int i = 0; i< TRAJ_NUMOF; ++i)
340 m_trajectory[i] = src.m_trajectory[i];
361 for(
int i = 0; i< TRAJ_NUMOF; ++i)
363 m_trajectory[i] = rhs.m_trajectory[i];
375 return m_trajectory[TRAJ_DESIRED].getTimeFromStart();
385 return m_trajectory[TRAJ_DESIRED].getNumPoints();
397 return i < TRAJ_NUMOF? m_trajectory[i]: m_trajectory[TRAJ_DESIRED];
405 for(
int i = 0; i < TRAJ_NUMOF; ++i)
407 m_trajectory[i].clear();
417 #endif // _KUON_TRAJ_H ~KuonWheelTraj()
Destructor.
KuonWheelTraj operator=(const KuonWheelTraj &rhs)
Assignment operator.
~KuonWheelTrajectoryFeedback()
Destructor.
KuonWheelTraj(const std::string &strName, const double fPosition, const double fVelocity, const double fAcceleration)
Initialization constructor.
double m_fVelocity
wheel velocity (% of maximum)
std::vector< KuonWheelTraj > m_trajectory
trajectory
KuonWheelTrajectoryFeedback()
Default constructor.
std::string m_strName
wheel name
KuonWheelTraj()
Default constructor.
KuonWheelTrajectoryPoint operator=(const KuonWheelTrajectoryPoint &rhs)
Assignment operator.
size_t getNumPoints()
Get the number of wheel points in trajectory.
uint_t m_uTimeFromStart
duration
Wheel trajectory point class.
The <b><i>Kuon</i></b> namespace encapsulates all <b><i>Kuon</i></b> related constructs.
KuonWheelTrajectoryFeedback operator=(const KuonWheelTrajectoryFeedback &rhs)
Assignment operator.
void setTimeFromStart(uint_t uTimeFromStart)
Set time from start.
KuonWheelTrajectoryFeedback(const KuonWheelTrajectoryFeedback &src)
Copy constructor.
KuonWheelTrajectoryPoint()
Default constructor.
RoadNarrows Kuon robot top-level header file.
uint_t getTimeFromStart()
Get time from start of desired trajectory.
~KuonWheelTrajectoryPoint()
Destructor.
KuonWheelTraj(const KuonWheelTraj &src)
Copy constructor.
uint_t getTimeFromStart()
Get time from start.
KuonWheelTrajectoryPoint(const KuonWheelTrajectoryPoint &src)
Copy constructor.
size_t getNumPoints()
Get the number of wheel points in trajectory.
KuonWheelTrajectoryPoint & operator[](const size_t i)
Subscript operator to get reference to given trajectory.
double m_fPosition
wheel position (radians)
KuonWheelTraj & operator[](const size_t i)
Subscript operator to get reference to wheel point at the given index.
void append(const std::string &strName, double fPosition, double fVelocity, double fAcceleration=0.0)
Append wheel point to end of trajectory.
Wheel trajectory feedback class.
double m_fAcceleration
wheel acceleration (not used)