update some readme
Some checks failed
Secret Leaks / trufflehog (push) Has been cancelled

This commit is contained in:
2025-06-19 11:49:19 +08:00
parent 2f124e34de
commit 68986f6fc0
4 changed files with 53 additions and 18 deletions

View File

@@ -701,7 +701,7 @@ class RealmanRobotConfig(RobotConfig):
"joint_6": [6, "realman"], "joint_6": [6, "realman"],
"gripper": [7, "realman"], "gripper": [7, "realman"],
}, },
init_joint = {'joint': [90, -90, -90, -90, 90, -90, 1000]} init_joint = {'joint': [90, -90, -90, 90, -90, 90, 10]}
) )
} }
) )
@@ -721,13 +721,13 @@ class RealmanRobotConfig(RobotConfig):
height=480, height=480,
use_depth=False use_depth=False
), ),
"right": IntelRealSenseCameraConfig( # "right": IntelRealSenseCameraConfig(
serial_number="405622075165", # serial_number="405622075165",
fps=30, # fps=30,
width=640, # width=640,
height=480, # height=480,
use_depth=False # use_depth=False
), # ),
"front": IntelRealSenseCameraConfig( "front": IntelRealSenseCameraConfig(
serial_number="145422072751", serial_number="145422072751",
fps=30, fps=30,

View File

@@ -43,6 +43,7 @@ class RealmanRobot:
# build state-action cache # build state-action cache
self.joint_queue = deque(maxlen=2) self.joint_queue = deque(maxlen=2)
self.last_endpose = init_pose
# build gamepad teleop # build gamepad teleop
if not self.inference_time: if not self.inference_time:
@@ -187,8 +188,10 @@ class RealmanRobot:
before_write_t = time.perf_counter() before_write_t = time.perf_counter()
# result = self.arm.rmarm.rm_movej_p(target_pose, 100, 0, 0, 0) # result = self.arm.rmarm.rm_movej_p(target_pose, 100, 0, 0, 0)
self.arm.rmarm.rm_movep_follow(target_pose) if self.last_endpose != target_pose:
self.arm.rmarm.rm_movep_follow(target_pose)
self.arm.rmarm.rm_set_gripper_position(action['gripper'], False, 2) self.arm.rmarm.rm_set_gripper_position(action['gripper'], False, 2)
self.last_endpose = target_pose
ret = self.arm.rmarm.rm_get_current_arm_state() ret = self.arm.rmarm.rm_get_current_arm_state()
target_joints = ret[1].get('joint', self.arm.init_joint_position) target_joints = ret[1].get('joint', self.arm.init_joint_position)

View File

@@ -175,7 +175,8 @@ def say(text, blocking=False):
cmd = ["say", text] cmd = ["say", text]
elif system == "Linux": elif system == "Linux":
cmd = ["spd-say", text] # cmd = ["spd-say", text]
cmd = ["edge-playback", "-t", text]
if blocking: if blocking:
cmd.append("--wait") cmd.append("--wait")

View File

@@ -8,6 +8,8 @@ conda activate lerobot
Install 🤗 LeRobot: Install 🤗 LeRobot:
```bash ```bash
pip install -e . -i https://pypi.tuna.tsinghua.edu.cn/simple pip install -e . -i https://pypi.tuna.tsinghua.edu.cn/simple
pip install edge-tts
sudo apt install mpv -y
# pip uninstall numpy # pip uninstall numpy
# pip install numpy==1.26.0 # pip install numpy==1.26.0
@@ -51,18 +53,19 @@ echo $HF_USER
```bash ```bash
python lerobot/scripts/control_robot.py \ python lerobot/scripts/control_robot.py \
--robot.type=piper \ --robot.type=realman \
--robot.inference_time=false \ --robot.inference_time=false \
--control.type=record \ --control.type=record \
--control.fps=30 \ --control.fps=15 \
--control.single_task="move" \ --control.single_task="move" \
--control.repo_id=${HF_USER}/test \ --control.repo_id=maic/test \
--control.num_episodes=2 \ --control.num_episodes=2 \
--control.warmup_time_s=2 \ --control.warmup_time_s=2 \
--control.episode_time_s=10 \ --control.episode_time_s=10 \
--control.reset_time_s=10 \ --control.reset_time_s=10 \
--control.play_sounds=true \ --control.play_sounds=true \
--control.push_to_hub=false --control.push_to_hub=false \
--control.display_data=true
``` ```
Press right arrow -> at any time during episode recording to early stop and go to resetting. Same during resetting, to early stop and to go to the next episode recording. Press right arrow -> at any time during episode recording to early stop and go to resetting. Same during resetting, to early stop and to go to the next episode recording.
@@ -104,22 +107,50 @@ python lerobot/scripts/train.py \
--wandb.enable=true --wandb.enable=true
``` ```
# FT smolvla
python lerobot/scripts/train.py \
--dataset.repo_id=maic/move_the_bottle_into_ultrasonic_device_with_realman_single \
--policy.path=lerobot/smolvla_base \
--output_dir=outputs/train/smolvla_move_the_bottle_into_ultrasonic_device_with_realman_single \
--job_name=smolvla_move_the_bottle_into_ultrasonic_device_with_realman_single \
--policy.device=cuda \
--wandb.enable=false \
--steps=200000 \
--batch_size=16
# Inference # Inference
还是使用control_robot.py中的record loop配置 **--robot.inference_time=true** 可以将手柄移出。 还是使用control_robot.py中的record loop配置 **--robot.inference_time=true** 可以将手柄移出。
```bash ```bash
python lerobot/scripts/control_robot.py \ python lerobot/scripts/control_robot.py \
--robot.type=piper \ --robot.type=realman \
--robot.inference_time=true \ --robot.inference_time=true \
--control.type=record \ --control.type=record \
--control.fps=30 \ --control.fps=30 \
--control.single_task="move" \ --control.single_task="move the bottle into ultrasonic device with realman single" \
--control.repo_id=$USER/eval_act_jack \ --control.repo_id=maic/move_the_bottle_into_ultrasonic_device_with_realman_single \
--control.num_episodes=1 \ --control.num_episodes=1 \
--control.warmup_time_s=2 \ --control.warmup_time_s=2 \
--control.episode_time_s=30 \ --control.episode_time_s=30 \
--control.reset_time_s=10 \ --control.reset_time_s=10 \
--control.push_to_hub=false \ --control.push_to_hub=false \
--control.policy.path=outputs/train/act_koch_pick_place_lego/checkpoints/latest/pretrained_model --control.policy.path=outputs/train/act_move_the_bottle_into_ultrasonic_device_with_realman_single/checkpoints/100000/pretrained_model
``` ```
```bash
python lerobot/scripts/control_robot.py \
--robot.type=realman \
--robot.inference_time=true \
--control.type=record \
--control.fps=30 \
--control.single_task="move the bottle into ultrasonic device with realman single" \
--control.repo_id=maic/eval_smolvla_move_the_bottle_into_ultrasonic_device_with_realman_single \
--control.num_episodes=1 \
--control.warmup_time_s=2 \
--control.episode_time_s=60 \
--control.reset_time_s=10 \
--control.push_to_hub=false \
--control.policy.path=outputs/train/smolvla_move_the_bottle_into_ultrasonic_device_with_realman_single/checkpoints/160000/pretrained_model \
--control.display_data=true
```