setVariable() not having an effect
古いコメントを表示
Hey everyone
I am trying to set up a reinforcement learning setup, where the initial conditions should be randomized after every episode. In my reset function, I have the following code:
ball.x0 = -0.04 + 0.08*rand; % m, ball initial x distance from center of plate
ball.y0 = -0.04 + 0.08*rand; % m, ball initial height from the top surface of plate
ball.z0 = 0;
ball.x0
ball.y0
in = setVariable(in,'ball',ball);
In my Simulink model, I have specified the input variable in the 6-DOF Joint primitive. But now, the ball starts at the same position every time, altough it should be randomized. Do you have any ideas?
Thanks a lot!

採用された回答
その他の回答 (0 件)
カテゴリ
ヘルプ センター および File Exchange で Multibody Modeling についてさらに検索
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!