diff --git a/README.md b/README.md index d2364fe..8632d20 100644 --- a/README.md +++ b/README.md @@ -125,3 +125,4 @@ python lerobot/scripts/control_robot.py \ --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 \ No newline at end of file diff --git a/lerobot/common/robot_devices/motors/piper.py b/lerobot/common/robot_devices/motors/piper.py index b532095..ab829b3 100644 --- a/lerobot/common/robot_devices/motors/piper.py +++ b/lerobot/common/robot_devices/motors/piper.py @@ -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) \ No newline at end of file + self.write("joints", target_joint=self.safe_disable_position) \ No newline at end of file diff --git a/lerobot/common/robot_devices/robots/piper.py b/lerobot/common/robot_devices/robots/piper.py index d594f1f..2bca07e 100644 --- a/lerobot/common/robot_devices/robots/piper.py +++ b/lerobot/common/robot_devices/robots/piper.py @@ -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: