1#ifndef WaypointRefGenTracker_h__
2#define WaypointRefGenTracker_h__
9#include <Eigen/StdVector>
13#ifdef FH_VISUALIZATION
14 #include "sfh/ogre/C3DLine.h"
21 EIGEN_MAKE_ALIGNED_OPERATOR_NEW;
24 const double * DesiredPosition(
const double T,
const double*
const X);
25 const double * DesiredVelocity(
const double T,
const double *
const X);
26 const double * DesiredHeading(
const double T,
const double *
const X);
27 const double * DesiredYawRate(
const double T,
const double *
const X);
29 void OdeFcn(
const double T,
const double *
const X,
double *
const XDot,
const bool IsMajorTimeStep);
31 void InitialConditionSetup(
const double T,
const double *
const currentIC,
double*
const updatedIC, ISimObjectCreator*
const creator);
33 std::vector<Eigen::Vector3d,Eigen::aligned_allocator<Eigen::Vector3d> > m_waypoints;
34 std::vector<Eigen::Vector3d,Eigen::aligned_allocator<Eigen::Vector3d> > straightStart;
35 std::vector<Eigen::Vector3d,Eigen::aligned_allocator<Eigen::Vector3d> > straightEnd;
37 std::vector<Eigen::Vector3d,Eigen::aligned_allocator<Eigen::Vector3d> > circleCenter;
38 std::vector<double> circleRadius;
39 std::vector<double> circleArcRadians;
41 std::vector<double> cummulativeLength;
42 std::vector<double> segmentLength;
43 std::vector<double> straightSegmentSpeed;
45 unsigned int GetSegmentNumber(
const double T,
const double *
const X)
const;
47 Eigen::Vector3d GetCurrentTrackDirection(
const double T,
const double *
const X)
const;
48 Eigen::Vector3d GetCurrentTrackNormal(
const double T,
const double *
const X)
const;
49 double GetCurrentYawDesired(
const double T,
const double *
const X)
const;
50 double GetCurrentYawRateDesired(
const double T,
const double *
const X)
const;
52 Eigen::Vector3d GetCurrentTargetPoint(
const double T,
const double *
const X)
const;
54 ISignalPort *m_currentPosition;
55 ISignalPort *m_currentVelocity;
57 double m_desiredPosition[3];
58 double m_desiredHeading;
59 double m_desiedVelocity;
60 double m_desiredYawRate;
62 unsigned int m_trackState;
63 double m_lookaheadDistance;
65 int circleNoFromSegmentNo(
int no)
const {
return no/2-1;}
66 int straightNoFromSegmentNo(
int no)
const {
return (no-1)/2;}
68 #ifdef FH_VISUALIZATION
74 C3DLine *removedlines;
76 Ogre::SceneNode ** m_legNodes;
77 Ogre::SceneNode ** m_circleNodes;
78 Ogre::SceneNode *m_targetNode;
79 void RenderInit(Ogre::Root*
const ogreRoot, ISimObjectCreator*
const creator);
80 void RenderUpdate(
const double T,
const double*
const X);
Definition: WaypointRefGenTracker.h:18
Simple waypoint object.
Definition: CableAttach.h:16