Technical Assessment: Robotics Software Apprentice | Origin (Formerly 10xConstruction)
This repository contains a comprehensive, from-scratch implementation of the Dynamic Window Approach (DWA) local planner developed for the ROS 2 Humble framework. This project serves as a technical submission for the Robotics Software Apprentice position at Origin, demonstrating proficiency in autonomous navigation, kinematic modeling, and real-time obstacle avoidance.
The objective of this project is to automate the navigation of a TurtleBot3 Burger within a simulated environment. By implementing the DWA algorithm independently of existing libraries such as Nav2 or DWB, this project showcases a fundamental understanding of local path planning and motion control.
- Independent Algorithm Implementation: The DWA logic was developed entirely in Python, adhering strictly to the requirement of avoiding pre-existing navigation plugins.
- Goal-Oriented Navigation: The system successfully navigates to specified coordinates with high precision and automated termination upon reaching the goal tolerance.
- Collision Avoidance: Real-time LiDAR data from the
/scantopic is utilized to ensure safe passage through dynamic and static obstacles. - Enhanced Visualization: The planner provides telemetry and trajectory candidates via RViz MarkerArray messages for comprehensive system auditing.
This project is deployed within a VS Code Dev Container to ensure a standardized and reproducible development environment, mitigating cross-platform dependency conflicts.
- Clone this repository.
- Open the directory in Visual Studio Code.
- Select the "Reopen in Container" option when prompted by the editor.
Execute the following commands within the container terminal to install the necessary TurtleBot3 simulation packages:
# Navigate to the workspace source directory
cd ~/turtlebot3_ws/src
# Clone official ROBOTIS dependencies for Humble
git clone -b humble https://github.com/ROBOTIS-GIT/turtlebot3_msgs.git
git clone -b humble https://github.com/ROBOTIS-GIT/turtlebot3.git
# Compile the workspace
cd ~/turtlebot3_ws
colcon build --symlink-install
source install/setup.bashDefine the TurtleBot3 hardware model for the simulation:
export TURTLEBOT3_MODEL=burgerA unified launch file is provided to initialize the Gazebo environment, spawn the robot model, and execute the custom DWA planner node simultaneously.
ros2 launch dwa_planner_py dwa_sim.launch.pyA navigation goal may be assigned via the RViz "2D Goal Pose" interface or by publishing directly to the /goal_pose topic:
ros2 topic pub /goal_pose geometry_msgs/PoseStamped "
header:
frame_id: 'odom'
pose:
position: {x: 3.0, y: 0.0, z: 0.0}
orientation: {w: 1.0}"To inspect the internal state of the planner:
- Initialize RViz:
rviz2 - Configure the Fixed Frame to
odom. - Add a MarkerArray display subscribed to the
/dwa_trajectoriestopic.
Visual Indicators:
- Blue Vectors: Represent the set of sampled candidate trajectories.
- Red Vector: Represents the optimal trajectory selected for execution based on the cost function.
The DWA planner operates through a four-stage cyclic process:
-
Velocity Sampling: Linear and angular velocities are sampled within the dynamic and kinematic constraints of the robot.
-
Trajectory Prediction: The system predicts forward states for a 2.0-second horizon using a discrete-time unicycle kinematic model.
-
Cost Function Evaluation: Each candidate trajectory is scored based on weighted objectives:
- Target Proximity: Minimizing Euclidean distance to the goal.
- Safety Margin: Maximizing clearance from LiDAR-detected obstacles.
- Alignment: Minimizing heading error to ensure smooth, efficient motion.
-
Command Publication: The velocity pair yielding the minimum cost is published to the
/cmd_velcontroller.
The development of this planner was informed by the following academic and technical resources:
- Primary Algorithm: The Dynamic Window Approach to Collision Avoidance (Fox, Burgard, and Thrun, 1997)
- Technical Tutorials: Concepts of DWA implementation.
- AI Assistance: Generative AI tools were utilized to assist with documentation formatting and debugging.
dwa_planner_py/
├── launch/ # Orchestration files for simulation and node deployment
├── worlds/ # Gazebo world files containing obstacle configuration
├── dwa_planner_py/ # Primary Python implementation of the DWA node
├── setup.py # Package metadata and entry point definitions
├── package.xml # ROS 2 manifest and dependency declarations
└── README.md # Documentation and setup guide