Info
This question is closed. Reopen it to edit or answer.
How to correctly initialize revolute joints in SimMechanics 2nd generation?
1 view (last 30 days)
Show older comments
I have a SimMechanics model of a robotic arm with 6 revolute joints. Since I want the simulation of the robot to start at a specific initial pose (distinct from all angles being 0), I define the initial rotation angle of each joint in State Targets -> Specify Position Target -> Value. If I update the diagram by pressing Ctrl-D, the robot is displayed in the desired pose in the Mechanics Explorer. Moreover, in the Model Report the actual and the specified positions coincide. However, as soon as I start the simulation, the robot 'jumps' back to an initial pose where all joint angles equal to 0. This happens in both cases, i) when I start the simulation within Simulink using Ctrl-T and ii) when I run the simulation using the sim('model_name') command in a m-file. Eventually, I would like to start the simulation using my main script and the sim() command. I'm currently using MATLAB/Simulink and SimMechanics R2015a.
How do I correctly define the initial pose of my model, i.e. the pose of the robot at time 0 of the simulation? In fact, is there a way to start the simulation of the robot from an initial pose distinct from all angles being 0?
0 Comments
Answers (0)
See Also
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!