SimMechanics Motion problem

1 次查看(过去 30 天)
Tomás
Tomás 2012-4-15
Good Afternoon, I'm trying to simulate the motion of a robot for a project in the university. I've already calculated the angular inputs for the hip and knee joints. I have those values in matrix format and would like to input them into simmechanics in order to provide motion instructions. I have created two derivatives to obtain the angular velocity and angular acceleration using the values introduced by the precalculated matrix of angular positions. Happens that when inputting that matrix simmechanics gives me "Error in port widths or dimensions. Output port 1 of 'robo_1_v3/Mux2' is a [30003x1] matrix.". Can you give me some clue about how can I deal with inputting pre calculated matrix in simmechanics simulation? Thank you in advance for your help.
  2 个评论
David
David 2012-10-12
Hi Tomas.
Good morning, I have been working on SimMechanics and I encountered the same problem as you said, I wonder if I fix you, and ask that you please guide me a little so I fix mine.
thanks
Rozo David Osorio
Tomás
Tomás 2012-10-12
Good afternoon David, After that initial attempt I solved my problem in a different way. There are multiple ways to import data to simmechanics, you can use simulink timeseries(my first option) or you can create your own matrix. What I've done is that I created a matrix with the time increments in the first column, then I entered the joint values in the second column. You must be sure that the number of lines is the same for time and angle positions. Then you can use the "from workspace" block to input the matrix. I hope this helps, if not I am able to help you more just send me a message or reply to this message and we'll figure out a way to solve your problem.

请先登录,再进行评论。

回答(1 个)

Steve Miller
Steve Miller 2023-5-10
See comment above for answer.
--Steve

类别

Help CenterFile Exchange 中查找有关 Assembly 的更多信息

Community Treasure Hunt

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

Start Hunting!

Translated by