Physics simulation using Simulink's Simscape Multibody.
- Physical modelling performed within this codebase is based on the Simscape simulation by MRL-HSL.
- MATLAB (tested with r2018A and r2019A)
- Simulink
- Simscape
- Simscape Multibody
Ensure that the src
folder and all subfolders are in MATLAB's search path and all relevant dependencies are installed.
This simulation will display physically-constrained, static poses of the robot, based on predefined joint positions. To run the static simulation, open the static Simulink Solution and run a script to assign joint positions.
NUgus_static % Opens the Simulink static simulation
zombie % Runs the "zombie" script and calls the static simulation
This simulation models contact forces and friction to a free-body robot. This simulation is run in a similar way to the static simulation, opening the Simulink Solution and defining joint positions via a script. However, parameters to define the contact physics must be initialised.
init % Loads contact configuration parameters into the workspace
NUgus_contact % Opens Simulink contact simulation
stand % Runs the "stand" script to set robot pose and calls the static simulation
% To use this loaded pose, run the simulation with CTRL+T
This simulation replaces the default Simscape Multibody revolute joints with Dynamixel MX64 and MX106 servo motors. This allows for the real simulation-time modification of the robot pose for each servo.
init % Loads configuration for the contact forces, as well as initialising motor params
NUgus_servo % Opens Simulink servo simulation, run the simulation with CTRL+T or run button
The pose for the robot can be modified using the Write to Servos
inputs seen in the Simulink solution window.