Bug in dataset_generator.py while saving joint_velocities
Hi!
Thanks for the great work!
I would like to point out a bug in dataset_generator.py that may happen while saving joint_velocities which generates duplicate frames with exactly the same joint_positions and joint_velocities.
I downloaded the generated demos from PreACT. And while I was inspecting the demo structure, I found that the joint_velocities can be calculated by joint_positions of adjacent frames. I manually confirmed that it's mostly correct: difference between joint_positions divided by delta time--0.05s is roughly equal to joint_velocities.
However, I notice that there are certain frames that have exactly the same joint_positions and joint_velocities. The same joint_positions indicates that the robot did not move, while the joint_velocities could indicate some bug?
Here is what I found from from the pkl file of this demo (val/close_jar/all_variations/episodes/episode0/low_dim_obs.pkl):
Velocity error analysis: Mean error per joint: [0.00015695 0.001749 0.00015985 0.00051234 0.00014436 0.00172141 0.00058723] Max error per joint: [0.01520634 0.13777256 0.01447678 0.03603935 0.01175404 0.14060974 0.08033276] Worst frame index: 115 Worst frame error: 0.1406097412109375 Significant mismatch found! Check if demo is corrupted or delta_time is wrong. joint_positions[115] = [-0.18113899 0.50589633 0.01586798 -1.98203373 -0.01134741 2.41657305 0.91748607] joint_positions[116] = [-0.18113899 0.50589633 0.01586798 -1.98203373 -0.01134741 2.41657305 0.91748607] joint_velocities[116] = [-0.00416279 0.13777256 -0.00335693 -0.00947475 -0.00200748 0.14060974 -0.00582695] joint_velocities[115] = [-0.00416279 0.13777256 -0.00335693 -0.00947475 -0.00200748 0.14060974 -0.00582695] Estimated v = [0. 0. 0. 0. 0. 0. 0.]
Links can be found here:
PreACT repo: https://github.com/peract/peract#download PreACT saved data on Huggingface: https://huggingface.co/datasets/hqfang/RLBench-18-Tasks
Best, Xianjie
Not sure whether it's because the demo is generated by a relatively old version of RLBench and the bug has been fixed in the new version?
Similarly, there are two frames in episode1 that have the same velocities and positions:
joint_positions[130] = [-0.09380674 -0.08350965 -0.11569616 -2.88443708 -0.02401292 2.73060584 0.52143824] joint_positions[131] = [-0.09380674 -0.08350965 -0.11569616 -2.88443708 -0.02401292 2.73060584 0.52143824] joint_velocities[130] = [ 0.00741005 0.12661457 -0.00412464 -0.00038147 0.02579689 0.12641907 -0.02010822] joint_velocities[131] = [ 0.00741005 0.12661457 -0.00412464 -0.00038147 0.02579689 0.12641907 -0.02010822]
any news on this?