# how to model stairs in simscape multibody?

조회 수: 6(최근 30일)
Nayla 2023년 3월 25일
답변: Nathan Hardenberg 2023년 6월 5일 13:32
I am trying to model a simple staircase with the simscape add-on. I couldn'nt find any block that would permit it. Hence, i designed one in Solidworks and imported it into matlab. When i run the simulation, my walking robot is not recognizing the stairs as such and walks as if the ground (which is supposed to be the staircase) is even. The contact between legs and staircase is enable by the spatial force contact block and by selecting, i.e. exporting the staircase geometrie it is shown "Convex hull".
Is there a simpler way to model the staircase?

댓글을 달려면 로그인하십시오.

### 채택된 답변

Sam Chak 2023년 3월 25일
Are you looking some kind of "staircase-shaped function" that is generated by a mathematical function?
Or, you are looking for non-math-based staircase that can be generated using the programming-like conditional If-Else statements?
x = linspace(-10, 10, 20001);
y1 = sign(x + 5);
y2 = sign(x);
y3 = sign(x - 5);
y = y1 + y2 + y3;
plot(x, y), grid on
##### 댓글 수: 1표시 없음숨기기 없음
Nayla 2023년 3월 25일
hello @Sam Chak, thanks for the reply. actually, i was meaning to model a rigid model. A staircase that looks like this:

댓글을 달려면 로그인하십시오.

### 추가 답변(1개)

Nathan Hardenberg 2023년 6월 5일 13:32
Depending on the usecase two options come to mind:
1. Creating a staircase in a CAD-program and using the "File Solid"-Block to use it in simscape. Many file types are supported (e.g. step, stl, ipt, prt, ...)
2. Using "Brick Solid"-Blocks to model each staircase-step inside of simcape yourself

댓글을 달려면 로그인하십시오.

### 범주

Find more on Assembly in Help Center and File Exchange

R2022b

### Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by