Overview

The goals for this section:

  1. Run an image classifier on the TurtleBot.
  2. Detect and classify real-world objects using the classifier.

Setup

Task 1.1 — Cleanup. Remove directory ~/autonomy_ws if it exists. This may be leftover from a previous section.

Task 1.2 — Directories. Create the base directory structure for your group’s ROS workspace, ~/autonomy_ws/src.

Task 1.3 — Clone and Branch. Clone your group’s GitHub repo to the src/ directory, and create a new branch called section6.

Task 1.4 — Build. Navigate back to the root of your workspace, ~/autonomy_ws/, and build it using colcon build --symlink-install.

Circular Motion

For this section, we want to implement a controller named PerceptionController. This makes the robot move in a circular motion continuously, stopping for 5 seconds when a stop command is sent, and then resuming movement.

Task 2.1 - Create a file named perception_controller.py in autonomy_repo/scripts. Set the shebang at the top of the file, and import:

Task 2.2 - Create a class named PerceptionController that inherits from BaseController. In the __init__ method of the class:

Task 2.3 - Using the @property decorator, define the active property of type bool. This property should retrieve the current value of the active parameter in real-time.