Change revolute joint parameter in env.ResetFcn during reinforcement learning

조회 수: 1 (최근 30일)
What is the best way to randomize the initial revolute joint angle during eacg episode of reinforcement learning
right now I am using
function in = Arm_ResetFcn(in, init_angle)
init_angle_up = -pi/2 + 2*rand*pi/2;
if rand > 0*5
in = set_param(in,blk_init,'PositionTargetValue',num2str(init_angle_up));
else
in = set_param(in, blk_init,'PositionTargetValue',num2str(init_angle));
But i am getting errors during simulation
Is it better to define a variable and then use
in = in.setVariable('init_angle',init_angle);
to update the initial angle before each episode?

답변 (0개)

카테고리

Help CenterFile Exchange에서 Reinforcement Learning에 대해 자세히 알아보기

Community Treasure Hunt

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

Start Hunting!

Translated by