]> rtime.felk.cvut.cz Git - eurobot/public.git/blob - src/robofsm/motion-control.h
robofsm: Separation of homologation, calibration and competition states.
[eurobot/public.git] / src / robofsm / motion-control.h
1 /**
2  * @file   motion-control.h
3  * @author Michal Sojka <sojkam1@fel.cvut.cz>, Petr Beneš
4  * @date   Fri Mar 20 10:35:22 2009
5  * 
6  * @brief  Interface between fsmmove and motion controller
7  */
8
9 #ifndef MOTION_CONTROL_H
10 #define MOTION_CONTROL_H
11
12 #if !defined(FSM_MOTION) && !defined(MOTION_CONTROL) && !defined(MOTION_CONTROL_INIT_ONLY)
13 #error This file should only be included from fsmmove.cc
14 #endif
15
16 #ifdef __cplusplus
17 extern "C" {
18 #endif /* __cplusplus */
19
20 int motion_control_init(void);
21 void motion_control_done(void);
22
23 #ifndef MOTION_CONTROL_INIT_ONLY
24 /* TODO: Make this interface as small as possible, and avoid the
25  * following global variables. */
26 extern sem_t recalculation_not_running;
27 extern sem_t measurement_received;
28
29 void go(Trajectory *t, double append_time);
30 void get_future_pos(double rel_time_sec, Pos &pos, double &switch_time);
31 void stop();
32 //void switch_trajectory_at(Trajectory *t, double time);
33 #endif /* MOTION_CONTROL_INIT_ONLY */
34
35 #ifdef __cplusplus
36 }
37 #endif /* __cplusplus */
38
39 #endif