统一存储的state和action为相同的度量,小数度量
Some checks are pending
Secret Leaks / trufflehog (push) Waiting to run
Some checks are pending
Secret Leaks / trufflehog (push) Waiting to run
This commit is contained in:
@@ -160,17 +160,17 @@ class PiperMotorsBus:
|
||||
gripper_state = gripper_msg.gripper_state
|
||||
|
||||
return {
|
||||
"joint_1": joint_state.joint_1,
|
||||
"joint_2": joint_state.joint_2,
|
||||
"joint_3": joint_state.joint_3,
|
||||
"joint_4": joint_state.joint_4,
|
||||
"joint_5": joint_state.joint_5,
|
||||
"joint_6": joint_state.joint_6,
|
||||
"gripper": gripper_state.grippers_angle
|
||||
"joint_1": joint_state.joint_1 / self.joint_factor,
|
||||
"joint_2": joint_state.joint_2 / self.joint_factor,
|
||||
"joint_3": joint_state.joint_3 / self.joint_factor,
|
||||
"joint_4": joint_state.joint_4 / self.joint_factor,
|
||||
"joint_5": joint_state.joint_5 / self.joint_factor,
|
||||
"joint_6": joint_state.joint_6 / self.joint_factor,
|
||||
"gripper": gripper_state.grippers_angle / 1000 / 1000
|
||||
}
|
||||
|
||||
def safe_disconnect(self):
|
||||
"""
|
||||
Move to safe disconnect position
|
||||
"""
|
||||
self.write(target_joint=self.safe_disable_position)
|
||||
self.write("joints", target_joint=self.safe_disable_position)
|
||||
@@ -184,8 +184,6 @@ class PiperRobot:
|
||||
|
||||
return obs_dict, action_dict
|
||||
|
||||
|
||||
|
||||
def send_action(self, action: torch.Tensor) -> torch.Tensor:
|
||||
"""Write the predicted actions from policy to the motors"""
|
||||
if not self.is_connected:
|
||||
@@ -199,8 +197,6 @@ class PiperRobot:
|
||||
|
||||
return action
|
||||
|
||||
|
||||
|
||||
def capture_observation(self) -> dict:
|
||||
"""capture current images and joint positions"""
|
||||
if not self.is_connected:
|
||||
|
||||
Reference in New Issue
Block a user