{
struct timespec next;
int ret;
+ struct sched_param param;
+
+ param.sched_priority = THREAD_PRIO_TRAJ_FOLLOWER;
+ if (pthread_setschedparam(pthread_self(), SCHED_FIFO, ¶m) != 0)
+ perror("Warning: Cannot set RT priority for thread_prio_traj_follower()");
clock_gettime(CLOCK_REALTIME, &next);
int motion_control_init()
{
pthread_attr_t tattr;
- sched_param param;
pthread_mutexattr_t mattr;
int ret;
// Trajectory follower thread
sem_init(&measurement_received, 0, 0);
- pthread_attr_init (&tattr);
- pthread_attr_getschedparam (&tattr, ¶m);
- pthread_attr_setschedpolicy(&tattr, SCHED_FIFO);
- param.sched_priority = THREAD_PRIO_TRAJ_FOLLOWER;
- ret = pthread_attr_setschedparam (&tattr, ¶m);
- if(ret) {
- perror("move_init: pthread_attr_setschedparam(follower)");
- goto err;
- }
ret = pthread_create(&thr_trajectory_follower, &tattr, thread_trajectory_follower, NULL);
if(ret) {
perror("move_init: pthread_create");
#define THREAD_PRIO_TRAJ_FOLLOWER 90 /* As high as possible */
#define THREAD_PRIO_TRAJ_RECLAC 18
#define OBST_FORGETING_PRIO 17 /* Priority of the thread for forgeting detected obstacles. */
-#define THREAD_PRIO_DISP 15
-#define THREAD_PRIO_JOY 10
+
+
#endif /* ROBOT_H */