The goal of this lab is for you to write code to control your Duckiebot. In Part I, your robot should follow one of the signs that come with the Duckiebot kit. Specifically, you should:
$ roslaunch duckietown_demos apriltag_detector.launch
and put a sign in front of the robot. Any Duckietown sign with the AR tag will do. Watch the output of tag_detections as you move the sign in front of the robot. Try a different sign and see what changes.Part II requires you to transform your Part I node into a new node that keeps your Duckiebot in its lane. Note that this node already exists in the Duckietown code repo: feel free to look at it for inspiration but make sure that the node you turn in is your own. You do NOT need to perform any state checking in your node, you only need to accept the lane position message and publish the command message as described below. To accomplish this:
$ roslaunch duckietown_demos apriltag_detector.launch
<launch> <arg name="veh" default="$(env VEHICLE_NAME)"/> <arg name="ai_trafo_mode" default="cb" doc="'cb' for colo balance only; 'both' for color balance and linear trafo"/> <arg name="ai_interval" default="5" doc="interval with which the linear trafo gets updated. color balance is performed every second."/> <arg name="verbose" default="false"/> <!-- start Duckietown nodes --> <arg name="demo_name" value="lane_following"/> <!-- start basic args --> <include file="$(find duckietown_demos)/launch/master.launch"> <!-- Basic arguments --> <arg name="veh" value="$(arg veh)"/> <arg name="demo_name" value="$(arg demo_name)"/> <arg name="param_file_name" value="default" /> <arg name="visualization" value="true" /> <!-- Finite state machine --> <arg name="fsm" value="true"/> <arg name="/fsm/logic_gate" value="false"/> <!-- Camera and anti intagram --> <arg name="/camera/raw" value="false" /> <arg name="anti_instagram" value="true" /> <!-- Lane Following stack --> <arg name="lane_following" value="true"/> <arg name="/lane_following/line_detection" value="false"/> <arg name="line_detector_param_file_name" value="default" /> <arg name="/lane_following/ground_projection" value="true"/> <arg name="/lane_following/lane_filter" value="true"/> <arg name="/lane_following/lane_controller" value="false"/> </include> <group ns="$(env VEHICLE_NAME)"> YOUR NODE/PARAMS/ETC GO HERE </group> </launch>
Turn in to blackboard:
Turn in to blackboard: