Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

record_episodes.py freq_mean below 42 #18

Open
onePnot1 opened this issue Nov 23, 2023 · 2 comments
Open

record_episodes.py freq_mean below 42 #18

onePnot1 opened this issue Nov 23, 2023 · 2 comments

Comments

@onePnot1
Copy link

onePnot1 commented Nov 23, 2023

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

@tonyzhaozh
Copy link
Owner

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.

@tanxr00
Copy link

tanxr00 commented Jan 15, 2024

@onePnot1 Hi, how to use own arm to record custom datasets?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants