\section{aversive\_\-10-03-12/modules/devices/robot/trajectory\_\-manager/trajectory\_\-manager.c File Reference}
\label{trajectory__manager_8c}\index{aversive\_\-10-03-12/modules/devices/robot/trajectory\_\-manager/trajectory\_\-manager.c@{aversive\_\-10-03-12/modules/devices/robot/trajectory\_\-manager/trajectory\_\-manager.c}}
{\tt \#include $<$string.h$>$}\par
{\tt \#include $<$stdlib.h$>$}\par
{\tt \#include $<$math.h$>$}\par
{\tt \#include $<$aversive.h$>$}\par
{\tt \#include $<$aversive/error.h$>$}\par
{\tt \#include $<$scheduler.h$>$}\par
{\tt \#include $<$vect2.h$>$}\par
{\tt \#include $<$position\_\-manager.h$>$}\par
{\tt \#include $<$robot\_\-system.h$>$}\par
{\tt \#include $<$control\_\-system\_\-manager.h$>$}\par
{\tt \#include $<$quadramp.h$>$}\par
{\tt \#include $<$trajectory\_\-manager.h$>$}\par
\subsection*{Defines}
\begin{CompactItemize}
\item 
\#define {\bf M\_\-2PI}~(2$\ast$M\_\-PI)
\item 
\#define {\bf DEG}(x)~((x) $\ast$ (180.0 / M\_\-PI))
\item 
\#define {\bf RAD}(x)~((x) $\ast$ (M\_\-PI / 180.0))
\item 
\#define {\bf UPDATE\_\-D}~1
\item 
\#define {\bf UPDATE\_\-A}~2
\item 
\#define {\bf RESET\_\-D}~4
\item 
\#define {\bf RESET\_\-A}~8
\end{CompactItemize}
\subsection*{Functions}
\begin{CompactItemize}
\item 
void {\bf trajectory\_\-init} (struct {\bf trajectory} $\ast$traj)
\item 
void {\bf trajectory\_\-set\_\-cs} (struct {\bf trajectory} $\ast$traj, struct {\bf cs} $\ast$cs\_\-d, struct {\bf cs} $\ast$cs\_\-a)
\item 
void {\bf trajectory\_\-set\_\-robot\_\-params} (struct {\bf trajectory} $\ast$traj, struct {\bf robot\_\-system} $\ast$rs, struct {\bf robot\_\-position} $\ast$pos)
\item 
void {\bf trajectory\_\-set\_\-speed} (struct {\bf trajectory} $\ast$traj, int16\_\-t d\_\-speed, int16\_\-t a\_\-speed)
\item 
void {\bf trajectory\_\-set\_\-windows} (struct {\bf trajectory} $\ast$traj, double d\_\-win, double a\_\-win\_\-deg, double a\_\-start\_\-deg)
\item 
void {\bf \_\-\_\-trajectory\_\-goto\_\-d\_\-a\_\-rel} (struct {\bf trajectory} $\ast$traj, double d\_\-cm, double a\_\-rad, uint8\_\-t flags)
\item 
void {\bf trajectory\_\-d\_\-rel} (struct {\bf trajectory} $\ast$traj, double d\_\-cm)
\item 
void {\bf trajectory\_\-only\_\-d\_\-rel} (struct {\bf trajectory} $\ast$traj, double d\_\-cm)
\item 
void {\bf trajectory\_\-a\_\-rel} (struct {\bf trajectory} $\ast$traj, double a\_\-deg\_\-rel)
\item 
void {\bf trajectory\_\-a\_\-abs} (struct {\bf trajectory} $\ast$traj, double a\_\-deg\_\-abs)
\item 
void {\bf trajectory\_\-turnto\_\-xy} (struct {\bf trajectory} $\ast$traj, double x\_\-abs\_\-cm, double y\_\-abs\_\-cm)
\item 
void {\bf trajectory\_\-turnto\_\-xy\_\-behind} (struct {\bf trajectory} $\ast$traj, double x\_\-abs\_\-cm, double y\_\-abs\_\-cm)
\item 
void {\bf trajectory\_\-only\_\-a\_\-rel} (struct {\bf trajectory} $\ast$traj, double a\_\-deg)
\item 
void {\bf trajectory\_\-d\_\-a\_\-rel} (struct {\bf trajectory} $\ast$traj, double d\_\-cm, double a\_\-deg)
\item 
void {\bf trajectory\_\-stop} (struct {\bf trajectory} $\ast$traj)
\item 
void {\bf trajectory\_\-hardstop} (struct {\bf trajectory} $\ast$traj)
\item 
void {\bf trajectory\_\-goto\_\-xy\_\-abs} (struct {\bf trajectory} $\ast$traj, double x, double y)
\item 
void {\bf trajectory\_\-goto\_\-forward\_\-xy\_\-abs} (struct {\bf trajectory} $\ast$traj, double x, double y)
\item 
void {\bf trajectory\_\-goto\_\-d\_\-a\_\-rel} (struct {\bf trajectory} $\ast$traj, double d, double {\bf a})
\item 
void {\bf trajectory\_\-goto\_\-xy\_\-rel} (struct {\bf trajectory} $\ast$traj, double x\_\-rel\_\-cm, double y\_\-rel\_\-cm)
\item 
uint8\_\-t {\bf trajectory\_\-finished} (struct {\bf trajectory} $\ast$traj)
\item 
uint8\_\-t {\bf trajectory\_\-in\_\-window} (struct {\bf trajectory} $\ast$traj, double d\_\-win, double a\_\-win\_\-rad)
\end{CompactItemize}


\subsection{Define Documentation}
\index{trajectory\_\-manager.c@{trajectory\_\-manager.c}!DEG@{DEG}}
\index{DEG@{DEG}!trajectory_manager.c@{trajectory\_\-manager.c}}
\subsubsection[DEG]{\setlength{\rightskip}{0pt plus 5cm}\#define DEG(x)~((x) $\ast$ (180.0 / M\_\-PI))}\label{trajectory__manager_8c_eb464535519c5a77c182ce60bb73d703}




Definition at line 42 of file trajectory\_\-manager.c.\index{trajectory\_\-manager.c@{trajectory\_\-manager.c}!M\_\-2PI@{M\_\-2PI}}
\index{M\_\-2PI@{M\_\-2PI}!trajectory_manager.c@{trajectory\_\-manager.c}}
\subsubsection[M\_\-2PI]{\setlength{\rightskip}{0pt plus 5cm}\#define M\_\-2PI~(2$\ast$M\_\-PI)}\label{trajectory__manager_8c_4aa2c43b09c1300c334821f5507d6f71}




Definition at line 40 of file trajectory\_\-manager.c.\index{trajectory\_\-manager.c@{trajectory\_\-manager.c}!RAD@{RAD}}
\index{RAD@{RAD}!trajectory_manager.c@{trajectory\_\-manager.c}}
\subsubsection[RAD]{\setlength{\rightskip}{0pt plus 5cm}\#define RAD(x)~((x) $\ast$ (M\_\-PI / 180.0))}\label{trajectory__manager_8c_e5ceb4cf0f37f9065e7979df13dee154}




Definition at line 43 of file trajectory\_\-manager.c.

Referenced by trajectory\_\-a\_\-abs(), trajectory\_\-a\_\-rel(), trajectory\_\-d\_\-a\_\-rel(), trajectory\_\-goto\_\-d\_\-a\_\-rel(), trajectory\_\-only\_\-a\_\-rel(), and trajectory\_\-set\_\-windows().\index{trajectory\_\-manager.c@{trajectory\_\-manager.c}!RESET\_\-A@{RESET\_\-A}}
\index{RESET\_\-A@{RESET\_\-A}!trajectory_manager.c@{trajectory\_\-manager.c}}
\subsubsection[RESET\_\-A]{\setlength{\rightskip}{0pt plus 5cm}\#define RESET\_\-A~8}\label{trajectory__manager_8c_a216d15cf025f22237f7661fbc8a855e}




Definition at line 220 of file trajectory\_\-manager.c.

Referenced by \_\-\_\-trajectory\_\-goto\_\-d\_\-a\_\-rel(), trajectory\_\-d\_\-rel(), trajectory\_\-hardstop(), and trajectory\_\-stop().\index{trajectory\_\-manager.c@{trajectory\_\-manager.c}!RESET\_\-D@{RESET\_\-D}}
\index{RESET\_\-D@{RESET\_\-D}!trajectory_manager.c@{trajectory\_\-manager.c}}
\subsubsection[RESET\_\-D]{\setlength{\rightskip}{0pt plus 5cm}\#define RESET\_\-D~4}\label{trajectory__manager_8c_25699e3ad2046c3746efc0d048ea4d1a}




Definition at line 219 of file trajectory\_\-manager.c.

Referenced by \_\-\_\-trajectory\_\-goto\_\-d\_\-a\_\-rel(), trajectory\_\-a\_\-abs(), trajectory\_\-a\_\-rel(), trajectory\_\-hardstop(), trajectory\_\-stop(), trajectory\_\-turnto\_\-xy(), and trajectory\_\-turnto\_\-xy\_\-behind().\index{trajectory\_\-manager.c@{trajectory\_\-manager.c}!UPDATE\_\-A@{UPDATE\_\-A}}
\index{UPDATE\_\-A@{UPDATE\_\-A}!trajectory_manager.c@{trajectory\_\-manager.c}}
\subsubsection[UPDATE\_\-A]{\setlength{\rightskip}{0pt plus 5cm}\#define UPDATE\_\-A~2}\label{trajectory__manager_8c_3fe35459a6ff6871f5f4edbb98b8d89f}




Definition at line 218 of file trajectory\_\-manager.c.

Referenced by \_\-\_\-trajectory\_\-goto\_\-d\_\-a\_\-rel(), trajectory\_\-a\_\-abs(), trajectory\_\-a\_\-rel(), trajectory\_\-d\_\-a\_\-rel(), trajectory\_\-d\_\-rel(), trajectory\_\-hardstop(), trajectory\_\-only\_\-a\_\-rel(), trajectory\_\-stop(), trajectory\_\-turnto\_\-xy(), and trajectory\_\-turnto\_\-xy\_\-behind().\index{trajectory\_\-manager.c@{trajectory\_\-manager.c}!UPDATE\_\-D@{UPDATE\_\-D}}
\index{UPDATE\_\-D@{UPDATE\_\-D}!trajectory_manager.c@{trajectory\_\-manager.c}}
\subsubsection[UPDATE\_\-D]{\setlength{\rightskip}{0pt plus 5cm}\#define UPDATE\_\-D~1}\label{trajectory__manager_8c_b4da4fe942b764346d1c5c4e17f950c1}




Definition at line 217 of file trajectory\_\-manager.c.

Referenced by \_\-\_\-trajectory\_\-goto\_\-d\_\-a\_\-rel(), trajectory\_\-a\_\-abs(), trajectory\_\-a\_\-rel(), trajectory\_\-d\_\-a\_\-rel(), trajectory\_\-d\_\-rel(), trajectory\_\-hardstop(), trajectory\_\-only\_\-d\_\-rel(), trajectory\_\-stop(), trajectory\_\-turnto\_\-xy(), and trajectory\_\-turnto\_\-xy\_\-behind().

\subsection{Function Documentation}
\index{trajectory\_\-manager.c@{trajectory\_\-manager.c}!\_\-\_\-trajectory\_\-goto\_\-d\_\-a\_\-rel@{\_\-\_\-trajectory\_\-goto\_\-d\_\-a\_\-rel}}
\index{\_\-\_\-trajectory\_\-goto\_\-d\_\-a\_\-rel@{\_\-\_\-trajectory\_\-goto\_\-d\_\-a\_\-rel}!trajectory_manager.c@{trajectory\_\-manager.c}}
\subsubsection[\_\-\_\-trajectory\_\-goto\_\-d\_\-a\_\-rel]{\setlength{\rightskip}{0pt plus 5cm}void \_\-\_\-trajectory\_\-goto\_\-d\_\-a\_\-rel (struct {\bf trajectory} $\ast$ {\em traj}, \/  double {\em d\_\-cm}, \/  double {\em a\_\-rad}, \/  uint8\_\-t {\em flags})}\label{trajectory__manager_8c_5701ac2b7940f63df850cdb6bd1680c8}


update angle and/or distance this function is not called directly by the user traj : pointer to the \doxyref{trajectory}{p.}{structtrajectory} structure d\_\-cm : distance in cm a\_\-rad : angle in radian flags : what to update (UPDATE\_\-A, UPDATE\_\-D) 

Definition at line 230 of file trajectory\_\-manager.c.

References rs\_\-polar::angle, cs\_\-set\_\-consign(), trajectory::csm\_\-angle, trajectory::csm\_\-distance, DEBUG, rs\_\-polar::distance, robot\_\-physical\_\-params::distance\_\-imp\_\-per\_\-cm, E\_\-TRAJECTORY, robot\_\-position::phys, trajectory::pol, trajectory::position, position\_\-get\_\-a\_\-rad\_\-double(), position\_\-get\_\-x\_\-double(), position\_\-get\_\-y\_\-double(), RESET\_\-A, RESET\_\-D, trajectory::robot, rs\_\-get\_\-angle(), rs\_\-get\_\-distance(), trajectory::target, robot\_\-physical\_\-params::track\_\-cm, UPDATE\_\-A, and UPDATE\_\-D.

Referenced by trajectory\_\-a\_\-abs(), trajectory\_\-a\_\-rel(), trajectory\_\-d\_\-a\_\-rel(), trajectory\_\-d\_\-rel(), trajectory\_\-hardstop(), trajectory\_\-only\_\-a\_\-rel(), trajectory\_\-only\_\-d\_\-rel(), trajectory\_\-stop(), trajectory\_\-turnto\_\-xy(), and trajectory\_\-turnto\_\-xy\_\-behind().\index{trajectory\_\-manager.c@{trajectory\_\-manager.c}!trajectory\_\-a\_\-abs@{trajectory\_\-a\_\-abs}}
\index{trajectory\_\-a\_\-abs@{trajectory\_\-a\_\-abs}!trajectory_manager.c@{trajectory\_\-manager.c}}
\subsubsection[trajectory\_\-a\_\-abs]{\setlength{\rightskip}{0pt plus 5cm}void trajectory\_\-a\_\-abs (struct {\bf trajectory} $\ast$ {\em traj}, \/  double {\em a\_\-deg\_\-abs})}\label{trajectory__manager_8c_d9051864bf42cd9504de397305f17159}


turn by 'a' degrees 

Definition at line 286 of file trajectory\_\-manager.c.

References \_\-\_\-trajectory\_\-goto\_\-d\_\-a\_\-rel(), trajectory::position, position\_\-get\_\-a\_\-rad\_\-double(), RAD, RESET\_\-D, RUNNING\_\-A, trajectory::state, UPDATE\_\-A, and UPDATE\_\-D.\index{trajectory\_\-manager.c@{trajectory\_\-manager.c}!trajectory\_\-a\_\-rel@{trajectory\_\-a\_\-rel}}
\index{trajectory\_\-a\_\-rel@{trajectory\_\-a\_\-rel}!trajectory_manager.c@{trajectory\_\-manager.c}}
\subsubsection[trajectory\_\-a\_\-rel]{\setlength{\rightskip}{0pt plus 5cm}void trajectory\_\-a\_\-rel (struct {\bf trajectory} $\ast$ {\em traj}, \/  double {\em a\_\-deg\_\-rel})}\label{trajectory__manager_8c_5255f359a8dea823c7ecba85a0773633}


turn by 'a' degrees 

Definition at line 279 of file trajectory\_\-manager.c.

References \_\-\_\-trajectory\_\-goto\_\-d\_\-a\_\-rel(), RAD, RESET\_\-D, RUNNING\_\-A, trajectory::state, UPDATE\_\-A, and UPDATE\_\-D.\index{trajectory\_\-manager.c@{trajectory\_\-manager.c}!trajectory\_\-d\_\-a\_\-rel@{trajectory\_\-d\_\-a\_\-rel}}
\index{trajectory\_\-d\_\-a\_\-rel@{trajectory\_\-d\_\-a\_\-rel}!trajectory_manager.c@{trajectory\_\-manager.c}}
\subsubsection[trajectory\_\-d\_\-a\_\-rel]{\setlength{\rightskip}{0pt plus 5cm}void trajectory\_\-d\_\-a\_\-rel (struct {\bf trajectory} $\ast$ {\em traj}, \/  double {\em d\_\-cm}, \/  double {\em a\_\-deg})}\label{trajectory__manager_8c_c54cc33740f9685c4b3a4df65289ead0}


turn by 'a' degrees 

Definition at line 333 of file trajectory\_\-manager.c.

References \_\-\_\-trajectory\_\-goto\_\-d\_\-a\_\-rel(), RAD, RUNNING\_\-AD, trajectory::state, UPDATE\_\-A, and UPDATE\_\-D.\index{trajectory\_\-manager.c@{trajectory\_\-manager.c}!trajectory\_\-d\_\-rel@{trajectory\_\-d\_\-rel}}
\index{trajectory\_\-d\_\-rel@{trajectory\_\-d\_\-rel}!trajectory_manager.c@{trajectory\_\-manager.c}}
\subsubsection[trajectory\_\-d\_\-rel]{\setlength{\rightskip}{0pt plus 5cm}void trajectory\_\-d\_\-rel (struct {\bf trajectory} $\ast$ {\em traj}, \/  double {\em d\_\-cm})}\label{trajectory__manager_8c_52694d610e18dd371abf0eb9ad85c708}


go straight forward (d is in cm) 

Definition at line 265 of file trajectory\_\-manager.c.

References \_\-\_\-trajectory\_\-goto\_\-d\_\-a\_\-rel(), RESET\_\-A, RUNNING\_\-D, trajectory::state, UPDATE\_\-A, and UPDATE\_\-D.\index{trajectory\_\-manager.c@{trajectory\_\-manager.c}!trajectory\_\-finished@{trajectory\_\-finished}}
\index{trajectory\_\-finished@{trajectory\_\-finished}!trajectory_manager.c@{trajectory\_\-manager.c}}
\subsubsection[trajectory\_\-finished]{\setlength{\rightskip}{0pt plus 5cm}uint8\_\-t trajectory\_\-finished (struct {\bf trajectory} $\ast$ {\em traj})}\label{trajectory__manager_8c_189293beb5b3e153e7abf6d397761dda}


return true if the position consign is equal to the filtered position consign (after quadramp filter), for angle and distance. 

Definition at line 442 of file trajectory\_\-manager.c.

References cs\_\-get\_\-consign(), cs\_\-get\_\-filtered\_\-consign(), trajectory::csm\_\-angle, and trajectory::csm\_\-distance.\index{trajectory\_\-manager.c@{trajectory\_\-manager.c}!trajectory\_\-goto\_\-d\_\-a\_\-rel@{trajectory\_\-goto\_\-d\_\-a\_\-rel}}
\index{trajectory\_\-goto\_\-d\_\-a\_\-rel@{trajectory\_\-goto\_\-d\_\-a\_\-rel}!trajectory_manager.c@{trajectory\_\-manager.c}}
\subsubsection[trajectory\_\-goto\_\-d\_\-a\_\-rel]{\setlength{\rightskip}{0pt plus 5cm}void trajectory\_\-goto\_\-d\_\-a\_\-rel (struct {\bf trajectory} $\ast$ {\em traj}, \/  double {\em d}, \/  double {\em a})}\label{trajectory__manager_8c_4694a3aaa119f2a45d1c8934d92255a2}


go forward to a d,a point, using a \doxyref{trajectory}{p.}{structtrajectory} event 

Definition at line 391 of file trajectory\_\-manager.c.

References trajectory::cart, DEBUG, E\_\-TRAJECTORY, gen\_\-regs::p, trajectory::position, position\_\-get\_\-a\_\-rad\_\-double(), position\_\-get\_\-x\_\-double(), position\_\-get\_\-y\_\-double(), \_\-vect2\_\-pol::r, RAD, RUNNING\_\-XY\_\-START, trajectory::state, trajectory::target, \_\-vect2\_\-pol::theta, vect2\_\-pol2cart(), \_\-vect2\_\-cart::x, and \_\-vect2\_\-cart::y.\index{trajectory\_\-manager.c@{trajectory\_\-manager.c}!trajectory\_\-goto\_\-forward\_\-xy\_\-abs@{trajectory\_\-goto\_\-forward\_\-xy\_\-abs}}
\index{trajectory\_\-goto\_\-forward\_\-xy\_\-abs@{trajectory\_\-goto\_\-forward\_\-xy\_\-abs}!trajectory_manager.c@{trajectory\_\-manager.c}}
\subsubsection[trajectory\_\-goto\_\-forward\_\-xy\_\-abs]{\setlength{\rightskip}{0pt plus 5cm}void trajectory\_\-goto\_\-forward\_\-xy\_\-abs (struct {\bf trajectory} $\ast$ {\em traj}, \/  double {\em x}, \/  double {\em y})}\label{trajectory__manager_8c_9dcb2db8a3f24c967a549b395e22b8e9}


go forward to a x,y point, using a \doxyref{trajectory}{p.}{structtrajectory} event 

Definition at line 379 of file trajectory\_\-manager.c.

References trajectory::cart, DEBUG, E\_\-TRAJECTORY, RUNNING\_\-XY\_\-F\_\-START, trajectory::state, trajectory::target, \_\-vect2\_\-cart::x, and \_\-vect2\_\-cart::y.\index{trajectory\_\-manager.c@{trajectory\_\-manager.c}!trajectory\_\-goto\_\-xy\_\-abs@{trajectory\_\-goto\_\-xy\_\-abs}}
\index{trajectory\_\-goto\_\-xy\_\-abs@{trajectory\_\-goto\_\-xy\_\-abs}!trajectory_manager.c@{trajectory\_\-manager.c}}
\subsubsection[trajectory\_\-goto\_\-xy\_\-abs]{\setlength{\rightskip}{0pt plus 5cm}void trajectory\_\-goto\_\-xy\_\-abs (struct {\bf trajectory} $\ast$ {\em traj}, \/  double {\em x}, \/  double {\em y})}\label{trajectory__manager_8c_82470a17885fd772a413b4fdbad15856}


goto a x,y point, using a \doxyref{trajectory}{p.}{structtrajectory} event 

Definition at line 367 of file trajectory\_\-manager.c.

References trajectory::cart, DEBUG, E\_\-TRAJECTORY, RUNNING\_\-XY\_\-START, trajectory::state, trajectory::target, \_\-vect2\_\-cart::x, and \_\-vect2\_\-cart::y.\index{trajectory\_\-manager.c@{trajectory\_\-manager.c}!trajectory\_\-goto\_\-xy\_\-rel@{trajectory\_\-goto\_\-xy\_\-rel}}
\index{trajectory\_\-goto\_\-xy\_\-rel@{trajectory\_\-goto\_\-xy\_\-rel}!trajectory_manager.c@{trajectory\_\-manager.c}}
\subsubsection[trajectory\_\-goto\_\-xy\_\-rel]{\setlength{\rightskip}{0pt plus 5cm}void trajectory\_\-goto\_\-xy\_\-rel (struct {\bf trajectory} $\ast$ {\em traj}, \/  double {\em x\_\-rel\_\-cm}, \/  double {\em y\_\-rel\_\-cm})}\label{trajectory__manager_8c_6422eeb6031313d379d590687d7e35ba}


go forward to a x,y relative point, using a \doxyref{trajectory}{p.}{structtrajectory} event 

Definition at line 412 of file trajectory\_\-manager.c.

References trajectory::cart, DEBUG, E\_\-TRAJECTORY, gen\_\-regs::p, trajectory::position, position\_\-get\_\-a\_\-rad\_\-double(), position\_\-get\_\-x\_\-double(), position\_\-get\_\-y\_\-double(), RUNNING\_\-XY\_\-START, trajectory::state, trajectory::target, \_\-vect2\_\-pol::theta, vect2\_\-cart2pol(), vect2\_\-pol2cart(), \_\-vect2\_\-cart::x, and \_\-vect2\_\-cart::y.\index{trajectory\_\-manager.c@{trajectory\_\-manager.c}!trajectory\_\-hardstop@{trajectory\_\-hardstop}}
\index{trajectory\_\-hardstop@{trajectory\_\-hardstop}!trajectory_manager.c@{trajectory\_\-manager.c}}
\subsubsection[trajectory\_\-hardstop]{\setlength{\rightskip}{0pt plus 5cm}void trajectory\_\-hardstop (struct {\bf trajectory} $\ast$ {\em traj})}\label{trajectory__manager_8c_b429b1fd844b589244ee7864df176c50}


set relative angle and distance consign to 0, and break any deceleration ramp in quadramp filter 

Definition at line 348 of file trajectory\_\-manager.c.

References \_\-\_\-trajectory\_\-goto\_\-d\_\-a\_\-rel(), cs::consign\_\-filter\_\-params, trajectory::csm\_\-angle, trajectory::csm\_\-distance, quadramp\_\-filter::previous\_\-out, quadramp\_\-filter::previous\_\-var, READY, RESET\_\-A, RESET\_\-D, trajectory::robot, rs\_\-get\_\-angle(), rs\_\-get\_\-distance(), trajectory::state, UPDATE\_\-A, and UPDATE\_\-D.\index{trajectory\_\-manager.c@{trajectory\_\-manager.c}!trajectory\_\-in\_\-window@{trajectory\_\-in\_\-window}}
\index{trajectory\_\-in\_\-window@{trajectory\_\-in\_\-window}!trajectory_manager.c@{trajectory\_\-manager.c}}
\subsubsection[trajectory\_\-in\_\-window]{\setlength{\rightskip}{0pt plus 5cm}uint8\_\-t trajectory\_\-in\_\-window (struct {\bf trajectory} $\ast$ {\em traj}, \/  double {\em d\_\-win}, \/  double {\em a\_\-win\_\-rad})}\label{trajectory__manager_8c_86528bcd44c26cc89d6ebc2d9f3054e5}


return true if traj is nearly finished 

Definition at line 449 of file trajectory\_\-manager.c.

References RUNNING\_\-A, RUNNING\_\-AD, RUNNING\_\-D, RUNNING\_\-XY\_\-ANGLE, RUNNING\_\-XY\_\-ANGLE\_\-OK, RUNNING\_\-XY\_\-F\_\-ANGLE, RUNNING\_\-XY\_\-F\_\-ANGLE\_\-OK, RUNNING\_\-XY\_\-F\_\-START, RUNNING\_\-XY\_\-START, and trajectory::state.\index{trajectory\_\-manager.c@{trajectory\_\-manager.c}!trajectory\_\-init@{trajectory\_\-init}}
\index{trajectory\_\-init@{trajectory\_\-init}!trajectory_manager.c@{trajectory\_\-manager.c}}
\subsubsection[trajectory\_\-init]{\setlength{\rightskip}{0pt plus 5cm}void trajectory\_\-init (struct {\bf trajectory} $\ast$ {\em traj})}\label{trajectory__manager_8c_e435dc36b32fb84621009784f0acf08a}


structure initialization 

Definition at line 50 of file trajectory\_\-manager.c.

References IRQ\_\-LOCK, IRQ\_\-UNLOCK, READY, trajectory::scheduler\_\-task, and trajectory::state.\index{trajectory\_\-manager.c@{trajectory\_\-manager.c}!trajectory\_\-only\_\-a\_\-rel@{trajectory\_\-only\_\-a\_\-rel}}
\index{trajectory\_\-only\_\-a\_\-rel@{trajectory\_\-only\_\-a\_\-rel}!trajectory_manager.c@{trajectory\_\-manager.c}}
\subsubsection[trajectory\_\-only\_\-a\_\-rel]{\setlength{\rightskip}{0pt plus 5cm}void trajectory\_\-only\_\-a\_\-rel (struct {\bf trajectory} $\ast$ {\em traj}, \/  double {\em a\_\-deg})}\label{trajectory__manager_8c_ae573d7c9151bc9576a8b3c782555c95}


update angle consign without changing distance consign 

Definition at line 326 of file trajectory\_\-manager.c.

References \_\-\_\-trajectory\_\-goto\_\-d\_\-a\_\-rel(), RAD, RUNNING\_\-A, trajectory::state, and UPDATE\_\-A.\index{trajectory\_\-manager.c@{trajectory\_\-manager.c}!trajectory\_\-only\_\-d\_\-rel@{trajectory\_\-only\_\-d\_\-rel}}
\index{trajectory\_\-only\_\-d\_\-rel@{trajectory\_\-only\_\-d\_\-rel}!trajectory_manager.c@{trajectory\_\-manager.c}}
\subsubsection[trajectory\_\-only\_\-d\_\-rel]{\setlength{\rightskip}{0pt plus 5cm}void trajectory\_\-only\_\-d\_\-rel (struct {\bf trajectory} $\ast$ {\em traj}, \/  double {\em d\_\-cm})}\label{trajectory__manager_8c_d4dde2e1d417cf0836c128c38e66630d}


update distance consign without changing angle consign 

Definition at line 272 of file trajectory\_\-manager.c.

References \_\-\_\-trajectory\_\-goto\_\-d\_\-a\_\-rel(), RUNNING\_\-D, trajectory::state, and UPDATE\_\-D.\index{trajectory\_\-manager.c@{trajectory\_\-manager.c}!trajectory\_\-set\_\-cs@{trajectory\_\-set\_\-cs}}
\index{trajectory\_\-set\_\-cs@{trajectory\_\-set\_\-cs}!trajectory_manager.c@{trajectory\_\-manager.c}}
\subsubsection[trajectory\_\-set\_\-cs]{\setlength{\rightskip}{0pt plus 5cm}void trajectory\_\-set\_\-cs (struct {\bf trajectory} $\ast$ {\em traj}, \/  struct {\bf cs} $\ast$ {\em cs\_\-d}, \/  struct {\bf cs} $\ast$ {\em cs\_\-a})}\label{trajectory__manager_8c_a2442561ecf545172caf356c9561ab25}


structure initialization 

Definition at line 62 of file trajectory\_\-manager.c.

References trajectory::csm\_\-angle, trajectory::csm\_\-distance, IRQ\_\-LOCK, and IRQ\_\-UNLOCK.\index{trajectory\_\-manager.c@{trajectory\_\-manager.c}!trajectory\_\-set\_\-robot\_\-params@{trajectory\_\-set\_\-robot\_\-params}}
\index{trajectory\_\-set\_\-robot\_\-params@{trajectory\_\-set\_\-robot\_\-params}!trajectory_manager.c@{trajectory\_\-manager.c}}
\subsubsection[trajectory\_\-set\_\-robot\_\-params]{\setlength{\rightskip}{0pt plus 5cm}void trajectory\_\-set\_\-robot\_\-params (struct {\bf trajectory} $\ast$ {\em traj}, \/  struct {\bf robot\_\-system} $\ast$ {\em rs}, \/  struct {\bf robot\_\-position} $\ast$ {\em pos})}\label{trajectory__manager_8c_d6adfd9de92bb26d5539060da5f5f53c}


structure initialization 

Definition at line 74 of file trajectory\_\-manager.c.

References IRQ\_\-LOCK, IRQ\_\-UNLOCK, trajectory::position, and trajectory::robot.\index{trajectory\_\-manager.c@{trajectory\_\-manager.c}!trajectory\_\-set\_\-speed@{trajectory\_\-set\_\-speed}}
\index{trajectory\_\-set\_\-speed@{trajectory\_\-set\_\-speed}!trajectory_manager.c@{trajectory\_\-manager.c}}
\subsubsection[trajectory\_\-set\_\-speed]{\setlength{\rightskip}{0pt plus 5cm}void trajectory\_\-set\_\-speed (struct {\bf trajectory} $\ast$ {\em traj}, \/  int16\_\-t {\em d\_\-speed}, \/  int16\_\-t {\em a\_\-speed})}\label{trajectory__manager_8c_faec3970b41522bf17eed20bec540252}


set speed consign 

Definition at line 86 of file trajectory\_\-manager.c.

References trajectory::a\_\-speed, trajectory::d\_\-speed, IRQ\_\-LOCK, and IRQ\_\-UNLOCK.\index{trajectory\_\-manager.c@{trajectory\_\-manager.c}!trajectory\_\-set\_\-windows@{trajectory\_\-set\_\-windows}}
\index{trajectory\_\-set\_\-windows@{trajectory\_\-set\_\-windows}!trajectory_manager.c@{trajectory\_\-manager.c}}
\subsubsection[trajectory\_\-set\_\-windows]{\setlength{\rightskip}{0pt plus 5cm}void trajectory\_\-set\_\-windows (struct {\bf trajectory} $\ast$ {\em traj}, \/  double {\em d\_\-win}, \/  double {\em a\_\-win\_\-deg}, \/  double {\em a\_\-start\_\-deg})}\label{trajectory__manager_8c_8465093decee2bc352dec57476f5cc60}


set windows for \doxyref{trajectory}{p.}{structtrajectory} 

Definition at line 96 of file trajectory\_\-manager.c.

References trajectory::a\_\-start\_\-rad, trajectory::a\_\-win\_\-rad, trajectory::d\_\-win, IRQ\_\-LOCK, IRQ\_\-UNLOCK, and RAD.\index{trajectory\_\-manager.c@{trajectory\_\-manager.c}!trajectory\_\-stop@{trajectory\_\-stop}}
\index{trajectory\_\-stop@{trajectory\_\-stop}!trajectory_manager.c@{trajectory\_\-manager.c}}
\subsubsection[trajectory\_\-stop]{\setlength{\rightskip}{0pt plus 5cm}void trajectory\_\-stop (struct {\bf trajectory} $\ast$ {\em traj})}\label{trajectory__manager_8c_cd05439a31cb01c51bbf7bcd94358e8a}


set relative angle and distance consign to 0 

Definition at line 340 of file trajectory\_\-manager.c.

References \_\-\_\-trajectory\_\-goto\_\-d\_\-a\_\-rel(), READY, RESET\_\-A, RESET\_\-D, trajectory::state, UPDATE\_\-A, and UPDATE\_\-D.\index{trajectory\_\-manager.c@{trajectory\_\-manager.c}!trajectory\_\-turnto\_\-xy@{trajectory\_\-turnto\_\-xy}}
\index{trajectory\_\-turnto\_\-xy@{trajectory\_\-turnto\_\-xy}!trajectory_manager.c@{trajectory\_\-manager.c}}
\subsubsection[trajectory\_\-turnto\_\-xy]{\setlength{\rightskip}{0pt plus 5cm}void trajectory\_\-turnto\_\-xy (struct {\bf trajectory} $\ast$ {\em traj}, \/  double {\em x\_\-abs\_\-cm}, \/  double {\em y\_\-abs\_\-cm})}\label{trajectory__manager_8c_f064851fb7e293d7d4bd1dda0c4ea2e7}


turn the robot until the point x,y is in front of us 

Definition at line 298 of file trajectory\_\-manager.c.

References \_\-\_\-trajectory\_\-goto\_\-d\_\-a\_\-rel(), DEBUG, E\_\-TRAJECTORY, trajectory::position, position\_\-get\_\-a\_\-rad\_\-double(), position\_\-get\_\-x\_\-double(), position\_\-get\_\-y\_\-double(), RESET\_\-D, RUNNING\_\-A, trajectory::state, UPDATE\_\-A, and UPDATE\_\-D.\index{trajectory\_\-manager.c@{trajectory\_\-manager.c}!trajectory\_\-turnto\_\-xy\_\-behind@{trajectory\_\-turnto\_\-xy\_\-behind}}
\index{trajectory\_\-turnto\_\-xy\_\-behind@{trajectory\_\-turnto\_\-xy\_\-behind}!trajectory_manager.c@{trajectory\_\-manager.c}}
\subsubsection[trajectory\_\-turnto\_\-xy\_\-behind]{\setlength{\rightskip}{0pt plus 5cm}void trajectory\_\-turnto\_\-xy\_\-behind (struct {\bf trajectory} $\ast$ {\em traj}, \/  double {\em x\_\-abs\_\-cm}, \/  double {\em y\_\-abs\_\-cm})}\label{trajectory__manager_8c_f9a3622560855ffb81597de1bf94e5bb}


turn the robot until the point x,y is behind us 

Definition at line 312 of file trajectory\_\-manager.c.

References \_\-\_\-trajectory\_\-goto\_\-d\_\-a\_\-rel(), DEBUG, E\_\-TRAJECTORY, trajectory::position, position\_\-get\_\-a\_\-rad\_\-double(), position\_\-get\_\-x\_\-double(), position\_\-get\_\-y\_\-double(), RESET\_\-D, RUNNING\_\-A, trajectory::state, UPDATE\_\-A, and UPDATE\_\-D.