File Exchange

image thumbnail

Simulation and Control of NAO ankle kit with SimMechanics and Serial IO blocks

version (16.4 MB) by

Model and simulate a complicated ankle joint using Simulink and SimMechanics.



View License

The Aldebaran Nao Ankle Kit lets users explore, design, and test behavior of this complex joint. The roll and pitch joints are controlled over a USB connection, enabling motor commands to be sent at high data rates (921.6 kbps), and motor encoder values to be returned back to Simulink. You can use this system in teaching and research to explore the behavior of closed/open loop systems, review mechanical concepts, simulate systems, and much more.
The zipped folder contains two Simulink models.

Model 1: Ankle in SimMechanigs 2G - R2012b\Tibia_gauche_leger.slx

A simplified CAD model of NAO ankle was imported into Simulink. You can run this model without a real Nao ankle.

- This simulation relies on an automatic import of a CAD model from SolidWorks. Double-click on the "Left_Ankle_Kit" subsystem for more information
- This model leverages Simulink capabilities related to the design control systems. Two PIDs compute the needed torque to reach a given target position.
- Each PID is tuned automatically using Simulink Control Design. Double-click a PID block and choose "Tune..." in the dialog box for more information.
- Press Ctrl+D or choose "Simulation/Update Diagram" to visualize the system at rest
- Run the simulation to visualize a moving ankle

Model 2: nao_ankle_simulink_com.mdl

Send the movement command to the real NAO ankle kit to see the movement. You need to have a NAO ankle (mechatronics version) to run this model. You also need to do the following setup:

(1): Choose the compiler for MATLAB/Simulink by running "mex –setup" at MATLAB command prompt. You can use the MATLAB built-in compiler for 32 bits MATLAB, otherwise you will need a compiler such as Visual Studio 2010.

(2): Remember to reduce the latency of your serial port in the advanced settings of your COM port (Control Panel -> Device Manager -> Right-click the Serial Port used for Ankle Kit).

Comments and Ratings (1)


Updated license

MATLAB Release
MATLAB 8.0 (R2012b)

Download apps, toolboxes, and other File Exchange content using Add-On Explorer in MATLAB.

» Watch video

Win prizes and improve your MATLAB skills

Play today

Ankle in SimMechanigs 2G - R2012b/