MATLAB coursework for Georgia Tech ME 4451 Robotics, Spring 2026. This collection covers serial and parallel robot kinematics, Dynamixel servo control, convolutional neural networks, and TurtleBot3 navigation using ROS, odometry, LiDAR, IMU, and Marvelmind indoor positioning.
The folders preserve course starter code, student implementations, experiments, reference PDFs, and selected homework figures and reports. They are independent lab workspaces rather than one integrated application. Some supplied mobile robotics handouts are dated Spring 2024; the Lab 2, Lab 3, and Lab 5 handouts are dated Spring 2026.
MATLAB robotics labs and homework for Georgia Tech ME 4451: robot kinematics, Dynamixel servo control, CNN digit classification, and ROS-based TurtleBot3 navigation.
| Folder | Main topic | Starting point |
|---|---|---|
4451_Lab1_matlab_updated/ |
Servo communication, joint commands, and repeatability | interface.m, task8.m |
4451_Lab2_matlab/ |
Serial RRR kinematics and Cartesian path drawing | RRR_draw_shape.m |
Lab 3/ |
Parallel 3RRR inverse kinematics and motion | 4451_Lab3_matlab/RRR3_draw_shape.m |
Lab 5/ |
CNN handwritten digit classification | Lab5_Student_Code/SHELL_Lab_51_Rev1.m |
Lab 6/ |
TurtleBot3 and ROS fundamentals | Sections of lab6_skeleton.m |
Lab 7/ |
Straight motion and obstacle avoidance | Sections of lab7_skeleton.m |
Lab 8/ |
Smooth navigation with indoor positioning and heading feedback | smoothNagivationTest.m, sections of lab8_skeleton.m |
HW1/ |
RobotSketch poses and joint interpolation | RobotSketch2016/demo_robot_serial_movie_HW01.m |
HW2/ |
Forward/inverse kinematics and Cartesian interpolation | RobotSketch2016/demo_robot_serial_movie_HW02.m |
Lab 4 is not included. A Lab 1 handout is also absent from this folder; its description below is based on the code and references to Lab 1 in later handouts.
Introduces communication with the physical RRR serial robot and control of its individual revolute joints. The code opens a serial connection, sets servo positions and velocities, reads joint positions, enables or disables torque, and operates the pen gripper.
interface.mcontains individual servo communication and motion experiments.RRR_go_angles.mis intended to constrain and command three joint angles.task8.mcommands several configurations and repeatedly returns to a starting configuration, supporting accuracy and repeatability measurements using a star-like motion sequence.dxl_*.mprovides the serial packet, byte conversion, error checking, servo, and gripper functions reused in Labs 2 and 3.updates.txtrecords changes to the supplied communication utilities.
Reference: No Lab 1 PDF is included. Lab 2, Section 5 refers back to joint-angle control, and Lab 3, Section 8 describes reusing the Lab 1 repeatability exercise.
Uses forward and inverse displacement analysis to command the pen's Cartesian position and orientation, rather than specifying joint angles directly. The lab accounts for the pen's lateral offset from the last link and explores both elbow configurations. Its main task is to draw a straight line; circular motion is a bonus task.
data_RRR.mdefines the robot's Denavit–Hartenberg parameters.RRR_FDA.mandRRR_RDA.mcalculate forward and inverse kinematics.RRR_forward.mandRRR_reverse.maccount for the pen offset when converting between joint configurations and pen poses.RRR_go_configuration.mconverts a desired pose into servo commands throughRRR_go_angles.m.path_line.mandpath_circle.mgenerate sampled Cartesian paths.RRR_draw_shape.mcommands the path, records joint angles, reconstructs measured pen positions, and plots the desired and measured motion. The saved configuration selects a straight line.TriggerFcn.mprovides the timer flag used to sequence path points.
Reference: Lab 2 handout — RRR Serial Robot Servo Control, especially Sections 4–5 for the pen offset, inverse kinematics, line drawing, and circular motion.
Extends the serial-robot inverse kinematics to a planar parallel mechanism with three RRR chains. Each chain is treated as a virtual serial robot with its own base location and orientation offset. The handout asks students to command platform poses, measure accuracy and repeatability, draw a line, and rotate the platform in place.
4451_Lab3_matlab/data_RRR3.mdefines link lengths, base locations, and the platform and servo offsets.4451_Lab3_sample_code/RRR3_reverse.mapplies inverse kinematics to all three virtual chains and collects their actuated joint angles.4451_Lab3_sample_code/RRR_RDA.msupplies the underlying serial-chain calculation.4451_Lab3_matlab/RRR3_go_configuration.mapplies the servo coordinate offsets, wraps angles, and sends the commands throughRRR_go_angles.min the sample-code folder.4451_Lab3_matlab/RRR3_draw_shape.m,path_line.m, andTriggerFcn.mprovide timed path execution and joint-angle recording.
Both code subfolders are needed on the MATLAB path. Calibration fields and joint bounds still require attention; see the current-code notes below.
Reference: Lab 3 handout — 3RRR Inverse Kinematics, Sections 6–9 for coordinate offsets, servo commands, accuracy tests, and path motion.
Builds and trains CNNs to classify 28 × 28 grayscale handwritten digits. The sequence introduces a basic classifier, compares a baseline network with a single-parameter modification, and offers an open-ended network design exercise.
SHELL_Lab_51_Rev1.mloads MATLAB's bundledDigitDataset, makes an 80/20 training/test split, trains a basic convolution/ReLU classifier, and evaluates test accuracy.buildStage2Layers.mbuilds a two-stage convolution/ReLU/max-pooling network with optional dropout and a ten-class output.SHELL_Lab_52_Rev1.mruns the BASE-versus-MOD comparison to investigate how a selected parameter affects accuracy and training behavior.SHELL_Lab_53_Rev1.mcontains a custom CNN experiment within limits on epochs and batch size.Lab5_showPlots.mdisplays a sample prediction, class probabilities, first-layer activation maps, and learned filters.
All five files are in Lab5_Student_Code/. The handout discusses MNIST, while the actual scripts load the example DigitDataset installed with MATLAB. The bonus accuracy target is an assignment objective, not a verified result for this repository.
References: Lab 5 handout — An Overview of Neural Networks, Sections 5.1–5.3; Convolutional Neural Networks reference PDF. Block 5 Notes.docx is also included.
Introduces the TurtleBot3 Burger, ROS publishers and subscribers, velocity commands, odometry, and LiDAR. The handout asks students to improve distance control with odometry feedback and follow a square with 3 ft sides in both directions, recording position and heading around the route.
lab6_skeleton.mcontains sections for connecting to ROS, inspecting messages, commanding motion, and collecting sensor data.turtlebotSendSpeed.mpublishes forward and angular velocity;turtlebotStop.msends repeated zero-velocity commands.getTurtlebotOdometry.mextracts position and quaternion-derived heading, with a supplied heading offset.turtlebotGoDistance.mincludes odometry-based distance checking;turtlebotTurnAngle.muses heading feedback for relative turns.calibratePrecession.mestimates heading drift from successive odometry readings.square_path.jpgis an included path image.
References: Lab 6 handout, Sections 3–6; TurtleBot startup instructions; bundled TurtleBot3 documentation.
Builds on Lab 6 by holding a heading during a 10 ft straight run and using LiDAR to detect and travel around an obstacle. The handout then asks for navigation across the room, with optional final-heading control and obstacle avoidance during navigation.
lab7_skeleton.morganizes ROS connection, sensor exploration, and motion experiments.straightLineMotion.m,straightLineMotion_v2.m, andstraightLineMotion_v3.mpreserve alternative straight-motion implementations.evadeObstacle.muses scan data and incremental movement to pass an obstacle and return toward the original path.resetOdometry.mpublishes an odometry reset request.- Local copies of the odometry, distance, turn, speed, and stop helpers support these experiments.
The handout's complete room-navigation task describes the assignment scope; the presence of these component functions does not establish that every task or bonus was completed.
Reference: Lab 7 handout, Sections 3–5 for straight-line motion, obstacle avoidance, and room navigation.
Combines position and heading feedback to drive toward a goal pose while commanding linear and angular velocity together. The handout calls the positioning system “GPS,” but it is Marvelmind ultrasonic indoor positioning. The code explores GPS with odometry or IMU heading feedback, along with an odometry-only waypoint variant.
lab8_skeleton.mcontains ROS setup, sensor inspection, and navigation experiment sections.GPSNav.mimplements a smooth goal-pose navigation experiment using positioning and odometry feedback.smoothGPSNavigation.muses indoor position and IMU heading, previews a simulated trajectory, and logs the measured motion and controller signals.smoothGPSNavigation2.mandCopy_of_smoothGPSNavigation.mpreserve alternative controller versions.smoothNagivationTest.msimulates a goal-pose controller without robot communication. The filename's spelling is preserved.smoothOdomWaypointNavigation.mfollows multiple goal poses using odometry and logs the active waypoint and controller history.straightLineMotion.mrecords and plots indoor-position and odometry trajectories while inspecting LiDAR.IMU_testing.m,getTurtlebotIMUYaw.m,zeroTurtlebotIMU.m,turtlebotTurnAngleIMU.m,turtlebotGoStraightIMU.m, andwrapTo180Deg.msupport IMU heading experiments.marvelmind_nav/msg/contains ROS message definitions.matlab_msg_gen_ros1.zip,install/, andVersionInfo.matsupport custom-message registration;install/includes generated MATLAB, Python, and C/C++ message interfaces and setup files.
The handout discusses a 2 cm position target and a 5° orientation target, with final orientation also presented as extra credit. Controller variants use different tolerances; these targets should not be read as measured performance claims.
References: Lab 8 handout, Sections 3–4 for message registration and navigation; additional MATLAB-version instructions; Lecture 25 notes supplied alongside the controller code.
Uses RobotSketch to draw three RRR configurations and animate transitions between them by interpolating joint angles. The exercise illustrates how different joint configurations can produce the same end-effector pose and how a joint-space path affects the tool trajectory.
In HW1/RobotSketch2016/, start with demo_robot_serial_HW01.m and demo_robot_serial_movie_HW01.m. data_RRR_lab_HW01.m supplies robot data; data_path12_movie.m and data_path23_movie.m generate the transitions. The folder also contains pose/path PNGs, a report, and general RobotSketch demos and drawing utilities.
References: Homework 1 assignment; included HW1 report.
Implements forward kinematics to recover the end-effector pose and inverse kinematics to recover joint angles. Unlike HW1's joint interpolation, the straight path is sampled in Cartesian space and converted into joint configurations. A second animation moves the tool around a circle while pointing toward its center.
In HW2/RobotSketch2016/, RRR_FDA.m and RRR_RDA.m provide the kinematics. data_path12_movie_HW02.m and data_circle_movie_HW02.m generate the paths used by demo_robot_serial_movie_HW02.m; test.m visually compares the forward-kinematics result with the robot drawing. Figures and a report are included in HW2/.
References: Homework 2 assignment; included HW2 report.
The two RobotSketch2016/ folders contain supporting DH transforms, rotation/translation matrices, link and frame drawing functions, geometry patches, robot parameter files, and generic serial/parallel demos. These are bundled course utilities, not additional labs.
- Open the specific lab or homework directory in MATLAB. Keep only the relevant directories on the MATLAB path: many labs reuse function names with different implementations.
- For HW1 and HW2, use the corresponding
RobotSketch2016/directory and inspect the selected robot/movie data file in the demo before running it. - For Labs 1–3, use the physical robot and USB2Dynamixel connection expected by the course. Set the correct COM port, servo IDs, calibration offsets, and joint limits. The helpers use the legacy
serial,fopen,fread, andfwriteinterface, so MATLAB release compatibility matters. - For Lab 5, install Deep Learning Toolbox and confirm the bundled
DigitDatasetexists at the path constructed by the scripts. Keep the training scripts and plotting/layer helpers together. - For Labs 6–8, use ROS Toolbox and the course's ROS 1 TurtleBot3 setup. Set the robot IP and actual topic names. Typical topics in this code are
/cmd_vel,/odom,/scan,/imu, and/reset; available topics depend on the robot configuration. - For Lab 8, follow the included custom-message registration PDFs. The original handout specifies MATLAB R2022b, Python 3.9, and Visual Studio Community 2022. The additional instructions explain regeneration with
rosgenmsgfor other MATLAB versions. The checked-in generated installation contains machine-specific paths and should not be assumed portable.
Run the mobile-robot skeleton files section by section. They deliberately print a warning and return when run as whole scripts. Inspect the chosen section before executing it because motion sections send commands to physical hardware.
For an offline navigation preview, open Lab 8/ in MATLAB and run:
history = smoothNagivationTest([0, 0, 0], [1, 1, 90]);This invokes the simulation function and does not connect to ROS. Positions are in meters and input headings are in degrees. Serial-robot lab poses generally use centimeters and degrees at their command interfaces, with radians inside the kinematics. Some mobile scripts accept feet and convert internally; check each signature and coordinate convention before reusing it.
This is a coursework archive containing completed portions alongside starter files and experimental variants. Source inspection identifies several setup or implementation gaps:
- Lab 1's
RRR_go_angles.mhas empty joint-limit arrays. It also opens and closes the serial connection internally, whiletask8.mmanages a connection around its calls. - Lab 3's
data_RRR3.mreferences undefineddelta1–delta3andbeta1–beta3. Its sampleRRR_go_angles.mstores bounds as[90, -90], inconsistent with its minimum/maximum clipping expression. These need correction and calibration before use. - Lab 6's
turtlebotGoDistance.mandcalibratePrecession.mreferencetheta_offsetwithout defining it locally or accepting it as an argument. The skeleton also retains IP/topic placeholders. - Lab 5.1's saved network omits the global-average-pooling layer listed in the handout's required architecture chain.
- Lab 8's
smoothGPSNavigation2.msets its preview integration interval to zero. It andsmoothOdomWaypointNavigation.muse 0.20 m / 15° tolerances, whilesmoothGPSNavigation.muses 0.02 m / 5°. - Duplicate functions, alternate controllers,
.asvautosaves, generated message files, and local configuration values are preserved. Select a specific implementation rather than adding the entire repository recursively to the MATLAB path.
The documentation was checked against the available source and handouts. MATLAB training, simulations, and physical robot tasks were not executed as part of this documentation update.
Course handouts, RobotSketch, Dynamixel helpers, and generated ROS support retain their original authorship and embedded notices. Student work and supplied support code coexist in this archive. No repository-wide license is supplied here.