// Trajectory recalculation
sem_t start_recalculation;
sem_t recalculation_not_running;
- //static pthread_mutex_t switch_to_trajectory_lock = PTHREAD_MUTEX_INITIALIZER;
- //static Trajectory *switch_to_trajectory;
- //static double switch_time;
+ sem_t measurement_received;
-static pthread_mutex_t switch_to_trajectory_lock = PTHREAD_MUTEX_INITIALIZER;
-static Trajectory *switch_to_trajectory;
-static double switch_time;
+
+ /**
+ * Determines way of thread_trajectory_follower() operation:
+ * - 0 measurement doesn't work, controller invocation based on time (formerly CONFIG_OPEN_LOOP)
+ * - 2 measurement works, controller invocation based on sem_post
+ * - 1 measurement doesn't work and stop() was called
+ */
+ int measurement_ok = 0;
+
+
static void delete_actual_trajectory()
{
* following global variables. */
extern sem_t start_recalculation;
extern sem_t recalculation_not_running;
+ extern sem_t measurement_received;
-void go(Trajectory *t);
+void go(Trajectory *t, double append_time);
void get_future_pos(double rel_time_sec, Pos &pos, double &switch_time);
void stop();
--void switch_trajectory_at(Trajectory *t, double time);
++//void switch_trajectory_at(Trajectory *t, double time);
#endif /* MOTION_CONTROL_INIT_ONLY */
#ifdef __cplusplus