English Version:

Build Dataset, Train Model & Inference

返回目录:

开始使用

启动遥操作

机器人启动后,终端会提示遥操作界面:

source install/setup.bash
ros2 launch astra_controller start.launch.py

image.png

由于我们希望在其他的电脑上遥操作机器人,所以我们需要拼接一下网址:

image.png

在其他电脑上使用Chrome**(必须使用Chrome,Firefox不支持连接踏板所必须的WebSerial功能)**打开拼接好的网址 https://192.168.31.249:9443/index.html (必须使用https,否则不支持传输数据用的WebRTC)

打开遥操作界面后,首先标定摄像头内参,记得使用100%比例打印标定板:

https://github.com/hilookas/astra_teleop/blob/main/src/astra_teleop/calibration_board.pdf

同时连接标定好踏板,按照页面右下角指示操作:

收集数据集

在你的AhaRobot上位机上,使用如下命令以收集数据集:

# rm -rf /home/rosdev/.cache/huggingface/lerobot/lookas/astra_grab_floor_toys_extended # 如果你想重新开始收集数据集
# rm -rf /home/rosdev/.cache/huggingface/lerobot/lookas/astra_grab_floor_toys_extended/images # 如果你中途中断了数据收集
source install/setup.bash
pushd non_ros_src/lerobot
python lerobot/scripts/control_robot.py --robot.type=astra_joint --control.type=record --control.single_task="Grab the toys on the floor and put them on the tabletop." --control.fps=30 --control.repo_id=lookas/astra_grab_floor_toys_extended --control.tags='["astra"]' --control.warmup_time_s=0 --control.episode_time_s=-1 --control.reset_time_s=-1 --control.num_episodes=50 --control.push_to_hub=true --control.resume=false --control.local_files_only=true --control.run_compute_stats=true

其中,--control.num_episodes=50控制收集的demo数量,--control.push_to_hub=false可以避免将收集到的数据推送到huggingface上,--control.resume=true以增加数据集,--control.run_compute_stats=false则将取消掉统计过程以加快数据收集速度。

查看数据集中的内容