Guest User

Untitled

a guest
Sep 16th, 2018
107
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. void NaivePlayer::move(double deadline, Motion& motion_sequence) {
  2.     // Don't allow more than one movement turn
  3.      
  4.     if (!moved) {
  5.         // Assume we have enough time to perform the entire motion
  6.         // Get source the destination
  7.        
  8.         if (it == env->get_target_configurations().end()){
  9.             moved = true;
  10.         }else{
  11.             it++;
  12.         }
  13.         bool found_path = planner.query(q_s, q_t, motion_sequence);
  14.         /*q_s.set_location(q_t.get_location());
  15.         q_s.set_rotation(q_t.get_rotation());
  16.  
  17.         q_t.set_location((*it).get_location());
  18.         q_t.set_rotation((*it).get_rotation());
  19.         */
  20.         q_s = q_t;
  21.         q_t = *it;
  22.        
  23.     }  
  24.  
  25. }
Add Comment
Please, Sign In to add comment