Modeling the Nao Robot in MapleSim - User Case Studies - Maplesoft

User Case Study:
Modeling the Nao Robot in MapleSim

Applying modern techniques to dramatically reduce model development time, providing greater insight into system behavior, and producing fast, high-fidelity simulations


Nao is a small humanoid robot created by Aldebaran Robotics. Standing 58 cm tall, Nao is used to teach students around the world programming, and to give engineers and software developers a platform for experimentation and robotic applications. Nao was even adopted recently by a financial institution in Japan to use as bank tellers!

Engineers at Maplesoft decided to see if they could create a model of Nao in MapleSim, the advanced system-level modeling and simulation tool that applies modern techniques to dramatically reduce model development time, provide greater insight into system behavior, and produce fast, high-fidelity simulations.

Building the Model

Nao is a highly complex multibody mechanism with 25 degrees of freedom. Using MapleSim's multibody library, Maplesoft engineers created a model using Denavit-Hartenberg (DH) convention to define the robot's joints coordinate frames. CAD models were then imported to define body mass, rotational inertia and center of mass. Because MapleSim is a physical modeling system, the model diagram corresponds closely to the physical system itself, as can be seen in Figure 1.

Servo motors appear at each joint to drive the movement. Signals from the controller trigger the motor to reposition each joint. In combination, these individual servo motors determine how Nao moves.


Figure 1: Multibody model of the Nao robot

The engineers were also able to model the contact between Nao's foot and the floor. This was done by creating custom components in MapleSim, and supplying the mathematical equations that govern friction and normal force. These components were included in the model at each point of contact on the base of each foot.

The MapleSim model also includes a Li-ion battery pack model from the MapleSim Battery Library that powers the motor, so that the behavior of the battery and its interactions with the rest of the system can be modeled as well.

Sensor readings of each joint were exported from Aldebaran Robotics Choregraphe™ to MapleSim via a time lookup table. These were then used as the command signal for each joint.The model responded in the same way the physical robot did. For instance, the MapleSim model can perform Tai Chi as adeptly as its physical counterpart.

Teaching Nao New Tricks

Now that they had a model that simulates the movements of the Nao robot, the Maplesoft engineers then wanted to see if they could not just simulate its behavior accurately, but also teach it do to something new.

Using MapleSim's ability to extract and analysis the mathematical equations of motion of a model, as well as its multibody analysis tools, they determined the symbolic solution to the inverse kinematic problem for the motion of the robot's arm. With this solution, they could calculate the joint motions necessary to place the arm in an arbitrary location in space. They used this information to add a new custom component to the model that takes the desired end position and calculates the movements needed to achieve it. Then, they taught the virtual Nao to draw.

They created an application that allows a human to sketch a shape, image, or word using a mouse. The sketch is analyzed to determine the coordinates of the lines, and then the information is fed into the simulation model. The result? Nao moves his arm and draws the same thing!

Further leveraging MapleSim's ability to solve inverse kinematics problems, Maplesoft engineers have also taught Nao other new tricks, including various dances, playing volleyball, and tracking a quadrocopter.


Figure 2: Servo motors for each joint drive the movement of the robot's arm

Figure 3: Equation-based custom components were used to model the contact points between the foot and the ground

Why This Is Interesting

If you are working on a robotics research or design project where understanding multidomain interactions are important, then using a multidomain modeling platform like MapleSim, as this example demonstrates, will allow you to bring together all aspects of your project into one place.

  • 3D Multibody Modeling: Take advantage of 3D Multibody modeling, simulation, and visualization capabilities
  • Parameterized Models: Conveniently access system parameters to quickly apply design changes and consider a family of designs or products
  • Multidomain Support: Augment the dynamic mechanical system with accurate models of electric motors, controllers and batteries
  • Virtual Testing and Analysis: Investigate system-level behavior and interaction of multidomain subsystems, without the need to build expensive and unpredictable physical prototypes
  • Component Sizing: Easily run batch simulation and parallel processing, and collect data that can be used to assist in component sizing
  • Full Access: Leverage direct access to equations and a full programming language to expand the same simulation model to be part of model design and trajectory optimization tasks
  • Optimized Code Generation: Generate highly optimized c-code from the model for an essential part of model-based control design


Figure 4: Inverse kinematics were used to teach the Nao model to draw

Contact Maplesoft to learn how MapleSim can be used for your projects