SimMechanics Motion problem

6 views (last 30 days)
Tomás
Tomás on 15 Apr 2012
Answered: Steve Miller on 10 May 2023
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 Comments
David
David on 12 Oct 2012
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 on 12 Oct 2012
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.

Sign in to comment.

Answers (1)

Steve Miller
Steve Miller on 10 May 2023
See comment above for answer.
--Steve

Community Treasure Hunt

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

Start Hunting!