aloha
aloha copied to clipboard
record_episodes.py freq_mean below 42
Hi,
Thanks for the great work.
When I run python3 record_episodes.py
, it doesn't save demonstrations because the parameter feq_mean
is below the threshold 42, in my case, it is about 36-38.
freq_mean = print_dt_diagnosis(actual_dt_history)
if freq_mean < 42:
return False
I checked that the time cost is from the code chunk below:
self.puppet_bot_left.arm.set_joint_positions(left_action[:6], blocking=False)
self.puppet_bot_right.arm.set_joint_positions(right_action[:6], blocking=False)
self.set_gripper_pose(left_action[-1], right_action[-1])
time.sleep(DT)
return dm_env.TimeStep(
step_type=dm_env.StepType.MID,
reward=self.get_reward(),
discount=None,
observation=self.get_observation())
Any suggestions to solve this problem?
Platform NOTE: RTX4090, Ubuntu20.04, ROS noetic
Hi and thanks for raising this issue!
To make sure: have you commented out the FK_in_space line as mentioned in the readme? That line will introduce extra delay when calling set_joint_positions.
If not, you could try to break down the delay by timing set_joint_positions, set_gripper_pose, and get_observation separately. That would give more context here.
Worst case scenario: you could reduce the DT or make it adaptive, so running the snippet above always take 0.02 sec. This would introduce some non-markovian-ness though, but probably fine.
@onePnot1 Hi, how to use own arm to record custom datasets?