roboschool stateの調査
戻り値はこれ
全体を、-5, +5 にclipしている
code:python
j は ordered_joints
code:python
more は色々
code:python
more = np.array([
z-self.initial_z, # 1
np.sin(self.angle_to_target), #2 np.cos(self.angle_to_target), #3 0.3*vx, 0.3*vy, 0.3*vz, #4,5,6 # 0.3 is just scaling typical speed into -1..+1, no physical sense here ], dtype=np.float32)
1つ目は、z
code:python
self.body_xyz = (parts_xyz0::3.mean(), parts_xyz1::3.mean(), body_pose.xyz()2) 2, 3つ目は、
angle_to_targetの、y, x
4,5,6つ目は、body を主体とした角速度。0.3 は、-1..+1 に調整するため
code:python
r, p, yaw = self.body_rpy
self.rot_minus_yaw = np.array(
)
vx, vy, vz = np.dot(self.rot_minus_yaw, self.robot_body.speed()) # rotate speed back to body point of view
0.3*vx, 0.3*vy, 0.3*vz # 0.3 is just scaling typical speed into -1..+1, no physical sense here
code:python
r, p, yaw = self.body_rpy
戻って、最後、self.feet_contactは、接地状況。_step で更新している。 code:python
self.feet_contacti = 1.0 if (self.foot_ground_object_names & contact_names) else 0.0