KUKA YouBot Control Code  
KUKA Robot Overview
KUKA YouBot is a 5 revolute joint robot arm attached to an omnidirectional platform, fitted with 4 mecanum wheels. The mobile robot is equipt with a gripper end effector that enables it to pick up and manipulate objects.
In this project, I developed control code to map and execute movement of the robot in order to pick up a cube and move it to a predefined location.
Part 1: Kinematics Simulator
Utilizing Euler's Method, this script determines the next state of the robot and all of its elements based on the joint velocities. Through spatial twists, velocities are calculated and displacements are applied to achieve the next state.
For this particular project, the time step was set to be every one hundredth of a second. As a test, robot simulation was calculated for movement in the +X, +Y, and rotation about the vertical with different wheel velocities.
Part 2: Trajectory Generator
The trajectory of the gripper end effector is calculated based on starting, cube, and end placement transformation matrices. This portion of the code calculates the reference configuration matrices of the end effector in order to pick up and place the cube.
As a test, the transform matrices were calculated at each time step of the process and graphically demonstrated in CoppeliaSim.
Part 3: Feedforward and Feedback Control
The feedforward controller takes the reference configurations from the Trajectory Generator code and determines the velocity twist at each time step. Error is found by comparing to the actual robot configuration, found via the Kinematics Simulator code. A PD controller is implented to minimize error between the reference and actual configurations.
In the plot to the right, a very poorly tuned PID controller is implemented, showing terrible overshoot and settling time.
Code on Github
Download Report
  Final Demonstrations