Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- void NaivePlayer::move(double deadline, Motion& motion_sequence) {
- // Don't allow more than one movement turn
- if (!moved) {
- // Assume we have enough time to perform the entire motion
- // Get source the destination
- if (it == env->get_target_configurations().end()){
- moved = true;
- }else{
- it++;
- }
- bool found_path = planner.query(q_s, q_t, motion_sequence);
- /*q_s.set_location(q_t.get_location());
- q_s.set_rotation(q_t.get_rotation());
- q_t.set_location((*it).get_location());
- q_t.set_rotation((*it).get_rotation());
- */
- q_s = q_t;
- q_t = *it;
- }
- }
Add Comment
Please, Sign In to add comment