机器人编程代写 | COMP4500 Mobile Robotics I
COMP4500 Mobile Robotics I
LAB 3: Adding Functionality
The purpose of lab 3 is to further explore Cozmo’s capabilities and establish a good code base
for future labs. In this lab you will implement continuous driving, finite state machine behaviors,
and AR marker reading on top of your lab 2 code.
Continuous driving: If you have not already, implement Cozmo motion using the
drive_wheels command. This is necessary for the ability to drive and turn in place which is
essential for the second part of the lab.
We will look for the use of this command in the code.
FSM: Adapt your code to include the capabilities of a finite state machine. There are many ways
of doing this but it must be object oriented not a series of if, elif statements. We require at
least three states to be demonstrated during the demo, use of the Cozmo screen to display the
current state, an auditory signal for a state change, and a print statement on your terminal to
show state changes. To summarize when your code runs, we need to be able to see the current
state on the Cozmo screen, hear a beep when the current state is changed, and see on your
terminal the exiting state and the entering state.
We look for the implementation of the FSM in the code. Also, you should add a diagram of your
designed FSM (as a PDF file) along the code. The TA will grade this part based on both criteria.
Navigate towards the cube by reading AR markers: One cube will be placed in the Arena
with your robot. Your robot must navigate to a pre-designated face of this cube and then face it.
Note that in this step, you use a customized AR marker on the cube.
Follow moving target: Before running the code, place the robot and the first cube in the arena.
After your robot has reached the first cube, it should switch to a searching and tracking state for
the second marker on the second cube (different pattern the markers have to have different
patterns). At this point place the cube in the arena (do not remove the first cube). While
searching and tracking, you should move the second cube in front of the robot and Cozmo must
follow it. If the cube leaves the robots sight, it should begin its search pattern in the direction it
was last seen.