The goals for this section:
Task 1.1 — Cleanup. Remove directory ~/autonomy_ws
if it exists. This may be leftover from a previous section
Task 1.2 – Git clone your repo. Clone your group’s workspace repository into the ∼/autonomy_ws/src
directory:
Task 1.3 – Work on a new branch. Create a branch called section6
and work from this new branch.
For this section, we want to create a simple scanning controller, PerceptionController
, which outputs simple control targets depending on a ROS2 parameter named active
.
This node will output
active == False
active == True
To implement this node, the easiest way is to inherit from asl_tb3_lib.control.BaseController
and override the compute_control
function. Take a look at the source code to see what function signature it requires. We have decomposed this task into the following sub tasks to guide you through building your node.
Task 2.1 - Create new node and launch file. Create perception_controller.py
in scripts
and implement the node by inheriting from BaseController
. Also create the associated launch file.
<aside>
💡 Remember to do the usual routines when creating new node (CMakeLists.txt
, executable permission, shebang, colcon build, source, etc.).
</aside>
<aside>
💡 The launch file should look very much similar to heading_control.launch.py
</aside>
If implemented correctly, you should see the following error when launching your node
NotImplementedError: Calling abstract function