Updated 16 Oct 2019
This entry contains all the files for the "Walking Robots" episodes of the MATLAB and Simulink Robotics Arena.
This entry contains Simscape models of a walking robot, including variants for different levels of actuator detail. In addition, you will find an optimization script that uses a genetic algorithm to find an optimal walking trajectory, reinforcement learning to learn a closed-loop neural network based control policy, as well as models showing leg inverse kinematics, position control, and trajectory generation with Model Predictive Control (MPC).
NOTE: The original walking models work with MATLAB R2017a and onwards. However, the 3D walking models require at least MATLAB R2018a, and the reinforcement models require at least MATLAB R2019a.
The CAD model for the walking robot can be found at https://cad.onshape.com/documents/5fe92a55bb0eaf8b1a0ed6c2/w/58d64f59407477ebd625e16e/e/5295d0860871d6a3d51ca630
For convenience, local copies of the Simscape Multibody Multiphysics Library and Simscape Multibody Contact Forces Library have been included with this submission. If you would like to install the latest version of these libraries, you can find them below:
* Simscape Multibody Multiphysics Library: https://www.mathworks.com/matlabcentral/fileexchange/37636-simscape-multibody-multiphysics-library
* Simscape Multibody Contact Forces Library: https://www.mathworks.com/matlabcentral/fileexchange/47417-simscape-multibody-contact-forces-library
MathWorks Student Competitions Team (2019). MATLAB and Simulink Robotics Arena: Walking Robot (https://www.github.com/mathworks/msra-walking-robot), GitHub. Retrieved .
First of all thanks for your lectures
I have a error.Can you tell what is wrong
Unrecognized function or variable 'robotParameters'.
Error in walkingrobottrial1 (line 10)
The basic files are developed in R2017a. For earlier versions, you can change your Simulink preferences to load models in later versions and see whether it works on your end.
hey..the model seems very useful for me as i am trying to implement the same.Can you please upload the R2016a model of the same?
could you please send the file version which is compatible with matlab 2016a?
While findind a CAD to URDF converter is one option, it's not the only one.
You can also define the kinematics yourself by building a Rigid Body Tree from scratch, or you can use "importrobot" on a Simscape Multibody body (which could be imported from CAD) to automatically generate a Rigid Body Tree from there).
And also if you can shed some light on how do you get the motion profiles of hip , knee and ankle joints which led to stable biped walking?
Thank you for the reply Sebastian , I looked into that, but it requires a .urdf file of this robot walker. Is there any way to convert directly from CAD model to .urdf or do you have any .urdf file for this model, which you can share?
Many thanks in anticipation.
I would look into the Robotic Manipulator functionality, which can also be used to solve for kinematics/dynamics of other articulated rigid body trees such as walking robots:
In the sense, that I manage to calculate the total Center of Mass position and the center of Mass position of each joint separately, how can I use this information to get the stable walking gait in this model?
Hey Sebastian, First of all thank you for providing us with this data and also brilliantly done lectures.
I have a question is about a motion input of the robot, what is that motion input is based on and how do you calculated it? can I have more insight on that?
I am trying to exploit a COM (centre of mass) position of the whole robot or of the each link and to create a motion input from that to create a stable walking gait. Is it possible in your point of view and any tip to deploy that if I have a COM position of the robot and each of its link?
Hi sebastian....your videos for the walking robot are amazing and tried to simulate the same, however when i am simulating the model, the robot is not really walking but goes upward in the z direction of the world frame comes back down and then falls....can you please help me with this
Thanks for the swift response.
I was able to figure out that problem and it seems to be sorted!
Now I am trying to replicate the same model for 4-legged robot by just copying the two legs and and giving required connections and offsetting both set of legs. Here I am facing the problem in that the foot goes inside the World Plane (instead of moving on the surface) and the movement of the legs is erratic with legs rotating quite far away from the torso! What can be done to resolve this?
I tried to look into your error but the model runs successfully on my side.
Could you send us an email at email@example.com with detailed information (MATLAB version, the steps you took, etc.)? Thanks!
WalkingRobot_step3>Robot>Robot Leg R>Sphere to Plane Force1>Forces
I have "Unresolved Link" under "Force Law" and "Cross Product" and because of which I think I am getting the following error:
'$bdroot' is not a valid model name because it is not a valid MATLAB function name.
What can be done to rectify this?
Thanks in advance!
Changed path to GitHub repository.
Added Reinforcement Learning example, linked repository to GitHub, and restructured folders.
Added leg inverse kinematics, 3D walking, and MPC trajectory examples. Fixed issues with optimization script.