This repository contains a ROS 2 Jazzy workspace for the project objective: simulate a QBot that decodes AprilTags, routes each parcel tag to the encoded destination bay, and then run the same routing code on a Raspberry Pi QBot.
The QBot has no arm, so the task is navigation-only. It does not pick up or place parcels.
- Start at the configured home pose.
- Drive to the parcel scan pose.
- Decode a visible parcel AprilTag.
- Use
robot_ws/src/parcel_delivery_robot/config/arena.yamlto map the parcel tag to a destination bay tag. - Drive to the parcel approach pose only to verify the tag.
- Drive to the encoded bay approach pose.
- Verify the bay AprilTag.
- Repeat for all configured parcel tags.
- Return home.
cd robot_ws
source /opt/ros/jazzy/setup.zsh
colcon build --packages-select robot_interfaces parcel_delivery_robot --symlink-install
source install/setup.zsh
ros2 launch parcel_delivery_robot parcel_delivery_sim.launch.pyThe simulation uses simulated_tag_detector, which publishes the same project
detection message that the real AprilTag adapter publishes on the Raspberry Pi.
Before cloning/building on the Pi, you can check whether this computer can see the Pi over Ethernet or Wi-Fi:
./tools/qbot_pi_network_check.shFor a known Pi address, pass it explicitly:
./tools/qbot_pi_network_check.sh 192.168.1.50 raspberrypi.localInstall the hardware dependencies on the Pi first:
sudo apt update
sudo apt install -y python3-rosdep libfreenect-dev ros-jazzy-apriltag-ros ros-jazzy-apriltag-msgs
sudo rosdep init || true
rosdep updateThen clone/build/run the workspace:
cd ~/Final_Project/robot_ws
source /opt/ros/jazzy/setup.zsh
rosdep install --from-paths src --ignore-src -r -y
colcon build --symlink-install
source install/setup.zsh
../tools/qbot_pi_smoke_check.sh
ros2 launch parcel_delivery_robot parcel_delivery_qbot.launch.py port:=/dev/ttyUSB0The QBot launch starts the existing Kobuki base driver, odometry, LiDAR, Kinect,
apriltag_ros, the AprilTag adapter, and the parcel routing controller.
Expected runtime topics:
/cmd_vel: velocity commands to the Kobuki base./odom: QBot odometry./scan: LiDAR scan./detections:apriltag_msgs/msg/AprilTagDetectionArrayfromapriltag_ros./kinect/depth_registered/image: Kinect registered depth used to estimate tag range./parcel_delivery/status: task state and active route.
By default, apriltag_ros reads /kinect/rgb/image_raw and
/kinect/rgb/camera_info, then publishes /detections. If your detector
publishes on a different topic:
ros2 launch parcel_delivery_robot parcel_delivery_qbot.launch.py apriltag_topic:=/your/detectionsThe AprilTag adapter also reads /kinect/rgb/camera_info and
/kinect/depth_registered/image. It samples registered depth at the detected
tag center to publish the tag's relative position, range, and bearing in
robot_interfaces/msg/AprilTagDetection.
If your depth image is published elsewhere:
ros2 launch parcel_delivery_robot parcel_delivery_qbot.launch.py depth_image_topic:=/your/depth/imageIf you already run your own AprilTag detector, disable the built-in detector:
ros2 launch parcel_delivery_robot parcel_delivery_qbot.launch.py launch_apriltag:=falseIf you already publish robot_interfaces/msg/AprilTagDetection directly,
disable both the built-in detector and adapter:
ros2 launch parcel_delivery_robot parcel_delivery_qbot.launch.py launch_apriltag:=false use_apriltag_adapter:=false- Place the QBot at the
home_posefromarena.yamlbefore starting. - Arrange parcels and bay markers to match the coordinates in
arena.yaml, or edit that file for the real arena measurements. - Parcel tags
1,2, and3route to bay tags101,102, and103. - The task manager assumes odometry coordinates match the configured arena.
- AprilTag detection comes from the Kinect RGB image by default.
- If the real printed tag size is not 0.28 m, update
robot_ws/src/parcel_delivery_robot/config/apriltag_36h11.yaml.
ROS generated folders are intentionally ignored and should not be committed:
robot_ws/build, robot_ws/install, and robot_ws/log.