From c64aa23e5b78f4a1241d47c423af8339001755e4 Mon Sep 17 00:00:00 2001 From: Tran Duy Khanh Date: Sat, 3 May 2008 06:05:31 +0200 Subject: [PATCH] fsmmove: update competition program. --- src/common/can_msg_def.h | 3 ++- src/robofsm/eb2008/fsmmain.cc | 2 +- src/robofsm/eb2008/fsmmove.cc | 2 +- 3 files changed, 4 insertions(+), 3 deletions(-) diff --git a/src/common/can_msg_def.h b/src/common/can_msg_def.h index e0054768..769b5ba0 100644 --- a/src/common/can_msg_def.h +++ b/src/common/can_msg_def.h @@ -9,4 +9,5 @@ // CAN_BUMPER 1st BYTE (bite oriented) #define LEFT_BUMPER 1 -#define RIGHT_BUMPER 2 \ No newline at end of file +#define RIGHT_BUMPER 2 + diff --git a/src/robofsm/eb2008/fsmmain.cc b/src/robofsm/eb2008/fsmmain.cc index 178be919..3cac2a3d 100644 --- a/src/robofsm/eb2008/fsmmain.cc +++ b/src/robofsm/eb2008/fsmmain.cc @@ -471,7 +471,7 @@ FSM_STATE(go_to_container) robot_trajectory_new(NULL); robot_trajectory_add_point_trans(PLAYGROUND_WIDTH_M - 0.6, 1.0); robot_trajectory_add_final_point_trans(PLAYGROUND_WIDTH_M - 0.4, - 0, NO_TURN()); + 0, TURN_CCW(-90)); /*FSM_TIMER(GO_TO_CONTAINER_TIMER);*/ break; case EV_TIMER: diff --git a/src/robofsm/eb2008/fsmmove.cc b/src/robofsm/eb2008/fsmmove.cc index e85462fb..2c0343f7 100644 --- a/src/robofsm/eb2008/fsmmove.cc +++ b/src/robofsm/eb2008/fsmmove.cc @@ -108,7 +108,7 @@ static void check_for_collision_in_future(Trajectory *traj, double current_time) double x, y; bool valid; - traj->getRefPos(current_time+1/*s*/, future_pos); + traj->getRefPos(current_time+0.5/*s*/, future_pos); /* Ignore obstacles when turning */ if (fabs(future_pos.v) < 0.01) -- 2.39.2