北京移动官方网站,山东手机版建站系统哪家好,电白网站建设公司,安庆做网站电话0.前置
机器人持续学习基准LIBERO系列1——基本介绍与安装测试机器人持续学习基准LIBERO系列2——路径与基准基本信息机器人持续学习基准LIBERO系列3——相机画面可视化及单步移动更新机器人持续学习基准LIBERO系列4——robosuite最基本demo机器人持续学习基准LIBERO系列5——…0.前置
机器人持续学习基准LIBERO系列1——基本介绍与安装测试机器人持续学习基准LIBERO系列2——路径与基准基本信息机器人持续学习基准LIBERO系列3——相机画面可视化及单步移动更新机器人持续学习基准LIBERO系列4——robosuite最基本demo机器人持续学习基准LIBERO系列5——获取显示深度图机器人持续学习基准LIBERO系列6——获取并显示实际深度图机器人持续学习基准LIBERO系列7——计算并可视化点云
1.获取轨迹文件路径有关包
from libero.libero import benchmark, get_libero_path
import os2.初始化类和任务
用来获取轨迹文件文件名
benchmark_instance benchmark.get_benchmark_dict()[libero_10]()
num_tasks benchmark_instance.get_num_tasks()3.生成轨迹文件路径
datasets_default_path get_libero_path(datasets)
print(datasets_default_path)
demo_files [os.path.join(datasets_default_path, benchmark_instance.get_task_demonstration(i)) \for i in range(num_tasks)]
print(demo_files)demo_files是由hdf5文件路径组成的列表
4.重放轨迹有关包
import h5py
from libero.libero.utils.dataset_utils import get_dataset_info
from IPython.display import HTML
import imageio5.轨迹hdf5文件结构
demo_0:n步 actions:(n,7)dones:(n,)obs agentview_rgb:(n,128,128,3)ee_ori:(n,3)ee_pos:(n,3)ee_states:(n,6)eye_in_hand_rgb:(n,128,128,3)gripper_states:(n,2)joint_states:(n,7) rewards:(n,)robot_states:(329,47) demo_1 …
6.使用手外相机生成重放视频
example_demo_file demo_files[9]
# Print the dataset info. We have a standalone script for doing the same thing available at scripts/get_dataset_info.py
get_dataset_info(example_demo_file)with h5py.File(example_demo_file, r) as f:images f[data/demo_0/obs/agentview_rgb][()]video_writer imageio.get_writer(output.mp4, fps60)
for image in images:video_writer.append_data(image[::-1])
video_writer.close()HTML(video width640 height480 controlssource srcoutput.mp4 typevideo/mp4/videoscriptvar video document.getElementsByTagName(video)[0];video.playbackRate 2.0; // Increase the playback speed to 2x/script
)