Python robotics project focused on kinematic modeling, differential kinematics and trajectory generation for a 6-DOF UR3 manipulator.
The project implements the full pipeline from Cartesian motion specification to joint-space trajectory generation, including forward/inverse kinematics, Jacobian-based differential models and numerical validation of the reconstructed end-effector motion.
- Forward kinematics for the UR3 manipulator
- Inverse kinematics
- Jacobian and differential kinematic models
- Parametric circular end-effector trajectory
- Acceleration / constant-speed / deceleration motion law
- Cartesian-to-joint trajectory conversion
- Joint position, velocity and acceleration generation
- Numerical validation of position and velocity tracking
- Dedicated test scripts for the kinematic models
- Additional PyBullet simulation utilities
The objective is to generate a complete motion for a UR3 robot from a simple Cartesian trajectory specification.
The user can define:
- the center of the circular trajectory
O, - its radius
R, - the target tool velocity
V.
The software then generates the corresponding Cartesian motion and converts it into joint-space trajectories for the six UR3 joints.
The main pipeline can be summarized as:
Trajectory parameters
O, R, V
│
▼
Motion law s(t)
│
▼
Cartesian trajectory
X(t), Ẋ(t), Ẍ(t)
│
▼
Inverse kinematics
│
▼
Joint trajectories
q(t), q̇(t), q̈(t)
│
▼
Forward-kinematics
validation
The forward geometric model computes the end-effector pose from the six joint variables.
The implementation is based on homogeneous transformation matrices and the UR3 geometric parameters.
This model is also used later to reconstruct the Cartesian trajectory from the generated joint configuration.
The inverse geometric model computes joint configurations corresponding to a desired end-effector pose.
The project includes a dedicated test script to validate the inverse-kinematics implementation against the forward model.
The Jacobian is used to relate joint velocities to end-effector velocities:
Ẋ = J(q) q̇
The project also contains direct and inverse differential models used for trajectory analysis and joint-space generation.
The trajectory uses a motion profile composed of:
- acceleration,
- constant velocity,
- deceleration.
The generated scalar motion law provides:
s(t)— curvilinear position,ṡ(t)— velocity,s̈(t)— acceleration.
Switching times such as t1, t2 and tf are computed and displayed in the generated plots.
The end-effector follows a parameterized circular trajectory in the X-Z plane.
The trajectory is defined by:
O = [Ox, Oy, Oz] # circle center
R # radius
V # target velocity
The Y coordinate remains constant.
The software generates:
- position
X(t), - velocity
Ẋ(t), - acceleration
Ẍ(t).
It also displays the 3D operational-space trajectory and the scalar tool velocity.
The Cartesian trajectory is converted into trajectories for all six UR3 joints.
Generated quantities include:
- joint positions
q(t), - joint velocities
q̇(t), - joint accelerations
q̈(t).
This makes it possible to analyse how the Cartesian task translates into robot joint motion.
The generated joint trajectory is validated by reconstructing the robot motion.
The joint positions are passed back through the forward-kinematics model:
q(t)
│
▼
Forward Kinematics
│
▼
X_robot(t)
The position error is then computed as:
e_X(t) = X_reference(t) - X_robot(t)
The end-effector velocity is reconstructed using the Jacobian:
Ẋ_robot(t) = J(q) q̇(t)
and compared with the Cartesian velocity reference:
e_Ẋ(t) = Ẋ_reference(t) - Ẋ_robot(t)
The expected residual errors are primarily numerical.
Running the complete trajectory pipeline produces several visualizations.
s(t)ṡ(t)s̈(t)- switching times
t1,t2,tf
x(t),ẋ(t),ẍ(t)z(t),ż(t),z̈(t)- 3D circular trajectory
- end-effector velocity magnitude
For each of the six joints:
q(t)q̇(t)q̈(t)
- Cartesian position error
- Cartesian velocity error
The repository also contains additional PyBullet simulation utilities under:
src/pybullet/
These files provide an additional environment for robot visualization and control experiments.
Main files include:
src/pybullet/
├── affiche.py
├── control.py
├── intro-pybullet.ipynb
└── simulation_pybullet.py
PyBullet is not included in the main
requirements.txt. Install it separately if you want to use these optional simulation utilities.
pip install pybullet- Python
- NumPy
- Matplotlib
- SymPy
- Robot kinematics
- Jacobian-based differential modeling
- Trajectory generation
- PyBullet (optional simulation)
UR3/
├── main.py
├── main_traj.py
├── requirements.txt
├── rapport-Equipe3.pdf
├── src/
│ ├── const_v.py
│ ├── matrice_tn.py
│ ├── modele_differentiel.py
│ ├── part1_loi_mouvement.py
│ ├── part2_trajectoire_operationnelle.py
│ ├── part3_analyse_tache.py
│ ├── part4_generation_articulaire.py
│ ├── utils.py
│ └── pybullet/
│ ├── affiche.py
│ ├── control.py
│ ├── intro-pybullet.ipynb
│ └── simulation_pybullet.py
├── test_mgd.py
├── test_mgi.py
├── test_mdd_mdi.py
├── test_jacobienne.py
└── README.md
main_traj.py— complete trajectory-generation and validation pipelinemain.py— forward/inverse kinematics demonstrationmatrice_tn.py— homogeneous transformations and forward kinematicsmodele_differentiel.py— Jacobian and differential modelspart1_loi_mouvement.py— motion law generationpart2_trajectoire_operationnelle.py— Cartesian trajectorypart3_analyse_tache.py— tool-velocity and tracking-error analysispart4_generation_articulaire.py— Cartesian-to-joint trajectory generation
- Python 3.x
- pip
git clone https://github.com/Alecbossard/UR3.git
cd UR3python -m venv .venvActivate it:
# Linux / macOS
source .venv/bin/activate
# Windows PowerShell
.venv\Scripts\Activate.ps1pip install -r requirements.txtpython main_traj.pyThe script generates the trajectory and opens the associated Matplotlib figures.
The trajectory parameters can be modified in main_traj.py.
O = [Ox, Oy, Oz]
R = ...
V = ...Where:
Ois the circle center in meters,Ris the circle radius in meters,Vis the target end-effector velocity in m/s.
The repository contains separate scripts for validating the main mathematical components.
python test_mgd.pypython test_mgi.pypython test_mdd_mdi.pypython test_jacobienne.pyThe complete academic report is available in the repository:
This project was developed as an academic robotics project at UPSSITECH – University of Toulouse.
It focuses on the mathematical foundations required for robotic manipulation, including:
Forward Kinematics · Inverse Kinematics · Jacobians · Differential Kinematics · Trajectory Generation · Robot Simulation
Alec Bossard
Engineering student in Robotics and Interactive Systems at UPSSITECH – University of Toulouse.