统一存储的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:
@@ -125,3 +125,4 @@ python lerobot/scripts/control_robot.py \
|
|||||||
--control.policy.path=outputs/train/act_koch_pick_place_lego/checkpoints/latest/pretrained_model
|
--control.policy.path=outputs/train/act_koch_pick_place_lego/checkpoints/latest/pretrained_model
|
||||||
```
|
```
|
||||||
|
|
||||||
|
export LD_LIBRARY_PATH=/home/ubuntu/miniconda3/envs/piper_lerobot/lib:$LD_LIBRARY_PATH
|
||||||
@@ -160,17 +160,17 @@ class PiperMotorsBus:
|
|||||||
gripper_state = gripper_msg.gripper_state
|
gripper_state = gripper_msg.gripper_state
|
||||||
|
|
||||||
return {
|
return {
|
||||||
"joint_1": joint_state.joint_1,
|
"joint_1": joint_state.joint_1 / self.joint_factor,
|
||||||
"joint_2": joint_state.joint_2,
|
"joint_2": joint_state.joint_2 / self.joint_factor,
|
||||||
"joint_3": joint_state.joint_3,
|
"joint_3": joint_state.joint_3 / self.joint_factor,
|
||||||
"joint_4": joint_state.joint_4,
|
"joint_4": joint_state.joint_4 / self.joint_factor,
|
||||||
"joint_5": joint_state.joint_5,
|
"joint_5": joint_state.joint_5 / self.joint_factor,
|
||||||
"joint_6": joint_state.joint_6,
|
"joint_6": joint_state.joint_6 / self.joint_factor,
|
||||||
"gripper": gripper_state.grippers_angle
|
"gripper": gripper_state.grippers_angle / 1000 / 1000
|
||||||
}
|
}
|
||||||
|
|
||||||
def safe_disconnect(self):
|
def safe_disconnect(self):
|
||||||
"""
|
"""
|
||||||
Move to safe disconnect position
|
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
|
return obs_dict, action_dict
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
def send_action(self, action: torch.Tensor) -> torch.Tensor:
|
def send_action(self, action: torch.Tensor) -> torch.Tensor:
|
||||||
"""Write the predicted actions from policy to the motors"""
|
"""Write the predicted actions from policy to the motors"""
|
||||||
if not self.is_connected:
|
if not self.is_connected:
|
||||||
@@ -199,8 +197,6 @@ class PiperRobot:
|
|||||||
|
|
||||||
return action
|
return action
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
def capture_observation(self) -> dict:
|
def capture_observation(self) -> dict:
|
||||||
"""capture current images and joint positions"""
|
"""capture current images and joint positions"""
|
||||||
if not self.is_connected:
|
if not self.is_connected:
|
||||||
|
|||||||
Reference in New Issue
Block a user