ECE 5160: FAST ROBOTS

Lab 12: Path Planning and Execution

Wenyi Fu • ECE • wf223@cornell.edu

INTRODUCTION

In this last lab, we're integrating our robot's abilities to navigate waypoints efficiently. We'll use path planning, obstacle avoidance, feedback control, and localization techniques. The offboard processing is chosen in this lab. The report will summarize the system's capabilities, code snippets, a flowchart, and a demo video. Collaboration will be acknowledged.

LAB TASKS

Design

First, I designed the easiest path to following which could realize the function in the instruction. The robot starts from the point (-4,-3) facing left and then rotates counter clockwise for 45 degrees by a certain distance. Additionally, the following operation is displayed in the figure, where the similar instrution will be executed, which will be fully illustrated in the Python code.

Implementation

As for the implementation on the Artemis, the case functions were first redefined. Since I wanted to make the robot rotate extra angle but not to a certain, I modify the code to assign the input to the increment variable, instead of the target_angle. Furthermore, I also added STOP_MOTOR case to cease the motors when needed.

In the main loop, different function will be turned on according to the flags, pid_orientation_path_on and pid_position_path_on.

The PID algorithm for orientation and position were similar as the previous lab, but I modified the code to use different max and min speed for those two control, because I found out that the starting PWM values were different for my robot.

On the Jupyter lab side, the following program was implemented to realize the path planning. asyncio.run(asyncio.sleep()) was applied to provide the respond time.

After the code construction, the following video displays the operation of the robot. However, the path planning was not accurate, so sometimes I needed to put the robot in the right position for further processing. This might be because I had not got enough time to combine the localization process. Therefore, later research on the application of integrating path planning and localization should be conducted.