优化手柄控制
This commit is contained in:
@@ -1,6 +1,6 @@
|
||||
import time
|
||||
from typing import Any, Dict
|
||||
from Robotic_Arm.rm_robot_interface import *
|
||||
from Robotic_Arm.rm_robot_interface import RoboticArm,rm_thread_mode_e
|
||||
from lerobot.motors import Motor, MotorCalibration, MotorsBus
|
||||
#动作执行成功
|
||||
ACTION_SUCCESS = 0
|
||||
@@ -224,6 +224,7 @@ class RealmanMotorsBus(MotorsBus):
|
||||
values = list(actionData.values())
|
||||
for k,v in enumerate(self.init_pose):
|
||||
self.init_pose[k]+=values[k]
|
||||
print(f"init_pose:{self.init_pose[:-1]}")
|
||||
self.rmarm.rm_movej_p(self.init_pose[:-1], 50, 0, 0, 0)
|
||||
# self.init_pose[6]+=actionData['gripper']
|
||||
# self.rmarm.rm_set_gripper_position(int(self.init_pose[6]*1000), False, 0)
|
||||
@@ -310,15 +311,15 @@ class RealmanMotorsBus(MotorsBus):
|
||||
return 0,self.motors[motor].id
|
||||
|
||||
def _encode_sign(self, data_name, ids_values):
|
||||
raise NotImplementedError
|
||||
pass
|
||||
|
||||
def _decode_sign(self, data_name, ids_values):
|
||||
raise NotImplementedError
|
||||
pass
|
||||
|
||||
def _split_into_byte_chunks(self, value, length):
|
||||
raise NotImplementedError
|
||||
pass
|
||||
|
||||
def broadcast_ping(self, num_retry = 0, raise_on_error = False):
|
||||
raise NotImplementedError
|
||||
pass
|
||||
def _handshake(self) -> None:
|
||||
pass
|
||||
|
||||
Reference in New Issue
Block a user