function action = WP_plan2action(plan)
%

AVOID_OBSTACLE = 1;
FIND_FLOOR = 2;
FIND_GRAVITY = 3;
SET_POSE = 4;
RESET_POSE = 5;
EXTEND_WP = 11;
COMBINE_WP = 12;
TERMINATE = 13;

plan_names(AVOID_OBSTACLE).name = 'WP_plan_avoid_obstacle';
plan_names(FIND_FLOOR).name = 'WP_plan_find_floor';
plan_names(FIND_GRAVITY).name = 'WP_plan_find_gravity';
plan_names(TERMINATE).name = 'WP_plan_terminate';

action = feval(plan_names(plan).name);
