Compare commits
2 Commits
1dca14b3f5
...
0fae637b76
| Author | SHA1 | Date | |
|---|---|---|---|
| 0fae637b76 | |||
| b8a76bab69 |
26
realman.yml
26
realman.yml
@@ -1,6 +1,6 @@
|
||||
type: realman
|
||||
port: 192.168.3.18:8080
|
||||
mock: True
|
||||
mock: False
|
||||
mode: 1
|
||||
gripper_range:
|
||||
- 10
|
||||
@@ -9,31 +9,31 @@ motors:
|
||||
joint_1:
|
||||
id: 1
|
||||
model: realman
|
||||
norm_mode: DEGREES
|
||||
norm_mode: degrees
|
||||
joint_2:
|
||||
id: 2
|
||||
model: realman
|
||||
norm_mode: DEGREES
|
||||
norm_mode: degrees
|
||||
joint_3:
|
||||
id: 3
|
||||
model: realman
|
||||
norm_mode: DEGREES
|
||||
norm_mode: degrees
|
||||
joint_4:
|
||||
id: 4
|
||||
model: realman
|
||||
norm_mode: DEGREES
|
||||
norm_mode: degrees
|
||||
joint_5:
|
||||
id: 5
|
||||
model: realman
|
||||
norm_mode: DEGREES
|
||||
norm_mode: degrees
|
||||
joint_6:
|
||||
id: 6
|
||||
model: realman
|
||||
norm_mode: DEGREES
|
||||
norm_mode: degrees
|
||||
gripper:
|
||||
id: 7
|
||||
model: realman
|
||||
norm_mode: DEGREES
|
||||
norm_mode: degrees
|
||||
# cameras:
|
||||
# left:
|
||||
# serial_number_or_name: 153122077516
|
||||
@@ -54,10 +54,10 @@ motors:
|
||||
# height: 480
|
||||
# use_depth: False
|
||||
joint:
|
||||
- -90
|
||||
- 15
|
||||
- 90
|
||||
- 90
|
||||
- 90
|
||||
- 90
|
||||
- -90
|
||||
- 10
|
||||
- 80
|
||||
- 110
|
||||
- 0
|
||||
- 10
|
||||
@@ -79,7 +79,6 @@ from lerobot.datasets.utils import build_dataset_frame, combine_feature_dicts
|
||||
from lerobot.datasets.video_utils import VideoEncodingManager
|
||||
from lerobot.policies.factory import make_policy, make_pre_post_processors
|
||||
from lerobot.policies.pretrained import PreTrainedPolicy
|
||||
from lerobot.policies.utils import make_robot_action
|
||||
from lerobot.processor import (
|
||||
PolicyAction,
|
||||
PolicyProcessorPipeline,
|
||||
|
||||
@@ -75,7 +75,7 @@ class RealmanMotorsBus(MotorsBus):
|
||||
if mock:
|
||||
self.rmarm = RoboticArmMock()
|
||||
else:
|
||||
self.rmarm = RoboticArm(rm_thread_mode_e.RM_TRIPLE_MODE_E)
|
||||
self.rmarm = RoboticArm(rm_thread_mode_e.RM_DUAL_MODE_E)
|
||||
address = port.split(':')
|
||||
self.ip = address[0]
|
||||
self.port = int(address[1])
|
||||
@@ -103,6 +103,9 @@ class RealmanMotorsBus(MotorsBus):
|
||||
'''
|
||||
使能机械臂并检测使能状态,尝试5s,如果使能超时则退出程序
|
||||
'''
|
||||
|
||||
self.handle = self.rmarm.rm_create_robot_arm(self.ip, self.port)
|
||||
self.rmarm.rm_set_arm_run_mode(0)
|
||||
enable_flag = False
|
||||
loop_flag = False
|
||||
# 设置超时时间(秒)
|
||||
@@ -140,7 +143,6 @@ class RealmanMotorsBus(MotorsBus):
|
||||
break
|
||||
time.sleep(1)
|
||||
|
||||
self.handle = self.rmarm.rm_create_robot_arm(self.ip, self.port)
|
||||
self.rmarm.rm_movej(self.init_joint_position[:-1], 5, 0, 0, 1)
|
||||
time.sleep(3)
|
||||
ret = self.rmarm.rm_get_current_arm_state()
|
||||
|
||||
@@ -68,7 +68,7 @@ class RealmanRobot(Robot):
|
||||
"Mismatch between calibration values in the motor and the calibration file or no calibration file found"
|
||||
)
|
||||
self.calibrate()
|
||||
self.configure()
|
||||
# self.configure()
|
||||
logger.info(f"{self} connected.")
|
||||
|
||||
@property
|
||||
|
||||
10
test.py
Normal file
10
test.py
Normal file
@@ -0,0 +1,10 @@
|
||||
import time
|
||||
from Robotic_Arm.rm_robot_interface import *
|
||||
if __name__=="__main__":
|
||||
rmarm = RoboticArm(rm_thread_mode_e.RM_DUAL_MODE_E)
|
||||
rmarm.rm_create_robot_arm("192.168.3.18", 8080)
|
||||
rmarm.rm_set_arm_run_mode(0)
|
||||
while True:
|
||||
ret = rmarm.rm_get_arm_software_info()
|
||||
print(ret)
|
||||
time.sleep(1)
|
||||
Reference in New Issue
Block a user