File Exchange

image thumbnail

MATLAB and Simulink Robotics Arena: Walking Robot

version 4.0 (65.4 MB) by MathWorks Student Competitions Team
Example files for MATLAB and Simulink Robotics Arena walking robot videos.

124 Downloads

Updated 06 Dec 2019

GitHub view license on GitHub

Example files for the MATLAB and Simulink Robotics Arena videos and blog posts on walking robots.

Refer to the GitHub page for more information and links, as well as to download older releases of this submission: https://github.com/mathworks-robotics/msra-walking-robot

For any questions, email us at roboticsarena@mathworks.com.

Cite As

MathWorks Student Competitions Team (2020). MATLAB and Simulink Robotics Arena: Walking Robot (https://github.com/mathworks-robotics/msra-walking-robot), GitHub. Retrieved .

Comments and Ratings (61)

Tyler Presser

Hello there, is anyone having a problem using the LIPM application where it says you are missing function ss(A,B,C,D) ?

Brian Kim

Hello @mlaudu, the 'states' resulting from 'stanceSim' is already in relative position. If you take a look at the 'stanceSim', I always use relative states of the pendulum rather than the absolute state with respect to world. So because 'states' are already defined with respect to the base of the pendulum, no adjustment was made.

mlaudu

Thank you very much for this interesting submission. I was going through the code in animateLIPM.mlx and animateLIPMLocal.mlx. In the former file, it seems to say that body (CoM) position is resolved in the global reference and thereafter adjusted to be with respect to the feet reference frame and saved in the variable stepinfo.step (example lines 101 and 151 in animateLIPM.mlx). However, this adjustment was not done in line 186 of the same file even though it appears to me that the 'states' variable returned from integrating (updating) the LIPM state equations in the function stanceSim returns the states reckoned with respect to global frame as well. Am I missing something here?

Jiliang Wang

Hello, I got a problem. I am trying to repeat step 3_contact, but the torso stays at the center of ground, rather than standing with two feet on the ground. When I do the simulation, the whole robot just fall down. Can anybody tell me what's wrong with my model? Thanks.

whut_wp

Anybady can send me the model at 528930935@qq.com. I cannot download this model due to some error. Thank you a lot.

Luis Cordoba

Omar Shadeed

Hi
After I finished training and tried to run the model, it runs for only 0.5 seconds. However, this problem doesn't happen if I load one of the given pre-saved agents. Any ideas why is this happening?
Thanks a lot!

Ranbao Deng

jinan charafeddine

I'm working on MatLab 2019a can anyone help me to convert these files to MatLab 2019a.

khaled saad

i'm working on matlab 2018a can anyone help me to convert these files to matlab 2018a.

Xiaochen Gao

Hello!I also have the problems of unrecognized function or variable 'robotParameters' but I have already run the startupWalkingRobot script. So what's going wrong?
Thanks a lot!

Fabian Lopez

Sebastian Castro

@Jingchao, I think you need to disable the "useParallel" flag in the script if you want to see the simulation animations, since that Mechanics Explorer doesn't support parallel execution.

Jingchao Li

@Sebastian-- Hello Sebastian,
When running the example of reinforcement learning, I can't see the animation demonstration of the learning process. How should I set this up?
Thank you.

Jingchao Li

Qiaoli Ji

Hi, I can not open this file by my Matlab 2017a,could you help me?

yayun liu

Sebastian Castro

@Lars: Feel free to email us at roboticsarena@mathworks.com with more information and we can take a look.

Lars van der Velde

I cant seem to view the Models. It gives an error when I try to look at it or it doesn't show at all.

guangshuai pan

@Sebastian -- i found the folder, thank you so much. greetings

Sebastian Castro

@Jorge -- did you run the startupWalkingRobot script to add all the folders to the path? walkingRobotUtils is a library found in the 'Libraries' subfolder.

hello im a student and im currently cheking the files walkingRobot_step1-4, the file 3 going into robot->Robot Leg R or Robot Leg L ->insade Contact Force Logging it tells 'Failed to load library 'walkingRobotUtils' and I cant find that library anywere. I also get this problem with the file step4. Can any one help me with this what im doing wrong ,thank you.(i have Simscape Multibody Contact Forces library).

Sebastian Castro

@Kanak -- did you run the startupWalkingRobot script to add all the folders to the path?

Kanak Bhatia

Hello
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)
robotParameters

Wally auf der Strasse

Astha

Hans Lynn

Maitreyee Mordekar

Sebastian Castro

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.

https://www.mathworks.com/matlabcentral/answers/429729-opening-a-simulink-file-that-was-saved-in-r2018b-version-onto-a-r2017b-version

shalakha Bang

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?

Chaitanya Nawale

Hey,
could you please send the file version which is compatible with matlab 2016a?
Thank you.

Iyama Hiroyuki

samrat malla

Sebastian Castro

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).

https://www.mathworks.com/help/robotics/ref/importrobot.html

Talha Ilyas

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?

Talha Ilyas

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.

Sebastian Castro

Hello Talha,

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:

https://www.mathworks.com/help/robotics/manipulators.html

Talha Ilyas

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?

Talha Ilyas

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?

Shiny S

Gaura Shukla

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

Ankush Singhi

Hello Sebastian,
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?

Sebastian Castro

Hello Ankush,

I tried to look into your error but the model runs successfully on my side.

Could you send us an email at roboticsarena@mathworks.com with detailed information (MATLAB version, the steps you took, etc.)? Thanks!

Ankush Singhi

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!

Omololu Makinde

ADARSH SRIVASTAVA

Tommy Pratama

Yang Meng

Sina

Zichong Lu

Tolga Karakurt

yaseen Ahmed

Rajmeet

very useful

Byung Hyuk Kang

Kenneth Chao

Nour Khashan

Updates

4.0

Added new folder on the modeling basics of humanoid walking. Updated Modeling and Simulation and Optimization examples to use the robot geometry from the new content above. Updated the contact force modeling to use the built-in features in R2019b.

3.0.2

updated GitHub

3.0.1

Changed path to GitHub repository.

3.0.0.0

Added Reinforcement Learning example, linked repository to GitHub, and restructured folders.

2.0.0.0

Added leg inverse kinematics, 3D walking, and MPC trajectory examples. Fixed issues with optimization script.

MATLAB Release Compatibility
Created with R2019b
Compatible with R2019a to any release
Platform Compatibility
Windows macOS Linux
Acknowledgements

Inspired by: Simscape Multibody Multiphysics Library

ControlDesign

ControlDesign/InverseKinematics

ControlDesign/MPCHumanoid

LIPM

Libraries/MultiphysicsLib

Libraries/MultiphysicsLib/Libraries

Libraries/MultiphysicsLib/Libraries/+forcesPS

Libraries/MultiphysicsLib/Libraries/+forcesPS/+hydraulic

Libraries/MultiphysicsLib/Libraries/+forcesPS/+math

Libraries/MultiphysicsLib/Libraries/+forcesPS/+mechanical

ModelingSimulation

Optimization

ReinforcementLearning