#include "motion-control.h"
#include <hokuyo.h>
#include <ul_log.h>
+#include "../pathplan/aalgorithm.h"
UL_LOG_CUST(ulogd_fsmmove); /* Log domain name = ulogd + name of the file */
if (m > 19 && m < min)
min = m;
}
- return min/1000.0 - HOKUYO_CENTER_OFFSET_M;;
+ return min/1000.0 - (ROBOT_AXIS_TO_FRONT_M - HOKUYO_CENTER_OFFSET_M);
}
static bool obstackle_in_front_if_turn(Trajectory *t)
FSM_STATE(init)
{
if (FSM_EVENT == EV_ENTRY) {
+ init_aalgorithm();
FSM_TRANSITION(wait_for_command);
}
}
FSM_TRANSITION(wait_for_command);
break;
case EV_OBSTACLE:
+ stop();
switch (recalculate_trajectory()) {
// We can go to the target:
case TARGET_OK: break;