This project is a simulation of a Turtlebot3 robot navigating through a maze environment using ROS2 (Robot Operating System 2). The robot is equipped with an RGB camera for Aruco marker detection and a logical camera for identifying parts in the environment.
To start the simulation, use the following command:
ros2 launch turtlebot3_gazebo maze.launch.py
This will initialize the Gazebo environment with the Turtlebot3, RGB camera, and logical camera.
This node is responsible for moving the robot in a straight line and stopping it when it is at a distance ≤ 0.4 m from an Aruco marker. It utilizes the cmd_vel
topic for robot movement and subscribes to the odom
topic to get the robot's pose.
This node handles the detection of Aruco markers and performs the following tasks:
- Transforms the detected Aruco marker into the
odom
frame. - Computes the distance between the robot and the marker.
- Checks the parameter associated with the detected marker's ID for further instructions.
This node subscribes to the mage/advanced_logical_camera/image
topic and detects blue and green batteries. It prints the pose of detected batteries in the odom
frame, ignoring repeated detections.
- Start the simulation using the provided launch command.
- Run the MoveRobot node to navigate towards Aruco markers.
- ArucoMarkerHandler node checks marker parameters and performs appropriate actions (rotate 90 degrees, etc.).
- Repeat steps 2-3 until a marker with the parameter value "end" is detected.
- Once the "end" marker is detected, LogicalCameraHandler node prints the pose of detected batteries in the terminal.
Note: Ensure that you have the required ROS2 packages installed and sourced before running the nodes.
- ROS2 (Galactic)
- Turtlebot3 Packages
- OpenCV-contrib
- https://github.com/piyush-g0enka/enpm809Y_fall2023/tree/rwa3
- Piyush Goenka
- Hoang Pham