This project simulates an omnidirectional robot using a simplified version of the Jacobian matrix model.
The Jacobian matrix ( J ) relates the body-frame velocities to the individual wheel velocities.
For a 3-wheel configuration, the matrix is:
Where:
- (
$\theta_1$ ,$\theta_2$ ,$\theta_3$ ) are the angles of the wheels - (
$r$ ) is the wheel radius - (
$L$ ) is the distance from the robot’s center to the wheels
The wheel velocities (\mathbf{\Omega}) are calculated using:
where
- 3-Wheel and 4-Wheel Configurations: Choose between 3-wheel and 4-wheel setups or display both configurations side by side for comparison.
- Velocity Arrows: Visualize the velocity of each wheel dynamically calculated based on robot motion.
- Pause/Resume Functionality: Pause and resume the simulation using the spacebar.
- Customizable Omega: The robot's angular velocity (omega) can be customized through user input.
Ensure you have the following Python packages installed:
pip install numpy matplotlib
To run the simulation, execute the Python script:
python jacobian_simulation.py
Upon running the script, you'll be prompted for the following:
-
Plot both configurations? (
y/n
):- Choose whether to display both 3-wheel and 4-wheel configurations side by side.
-
Omega (angular velocity):
- Enter the desired angular velocity (omega). If left blank, the default value will be used.
-
Use 4 wheels? (
y/n
):- If not plotting both configurations, you'll be asked if you want to use the 4-wheel configuration.
This project was created by Michaël Guerrier (Token Thinker).
The Jacobian matrix calculations for omnidirectional platforms are based on the article: "Defining the Consistent Velocity of Omnidirectional Mobile Platforms" published by MDPI.
Licensed under either of:
- Apache License, Version 2.0 (LICENSE-APACHE or http://www.apache.org/licenses/LICENSE-2.0)
- MIT license (LICENSE-MIT or http://opensource.org/licenses/MIT)
at your option.