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

[CSE 276F Submission] PokeCube-v1 #375

Merged
merged 3 commits into from
Jun 10, 2024
Merged

Conversation

xixinzhang
Copy link
Contributor

A simple task where the objective is to poke a red cube with a peg and push it to a target goal position.

Solvable via ppo baseline:

python examples/baselines/ppo/ppo.py --env_id="PokeCube-v1" --num-eval-steps=50  --num_envs=1024 --update_epochs=8 --num_minibatches=32 --total_timesteps=5_000_000 --eval_freq=8 --num-steps=20

head_to_cube_dist = torch.linalg.norm(
self.peg_head_pos[..., :2] - self.cube.pose.p[..., :2], axis=1
)
is_peg_cube_touch = head_to_cube_dist <= self.cube_half_size + 0.005
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

please rename is_peg_cube_touch to something like is_peg_cube_close. This condition does not check correctly if they are touching. Checking closeness is fine.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I have modified the variable names containing "touch" incorrectly, thanks for your advice.

# initialize the goal region
goal_region_xyz = cube_xyz + torch.tensor([0.05 + self.goal_radius, 0, 0])
goal_region_xyz[..., 2] = 1e-3
goal_region_q = euler2quat(0, np.pi / 2, 0)
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

can you make the task slightly more difficult by randomizing the quaternion for the cube? This seems too easy. I expect it to be still solvable with a bit of z-axis randomization

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Add z-axis randomization of the cube, rotate in the range [-pi/6, pi/6]

@StoneT2000
Copy link
Member

Thank you for your submission for the course. This task is nice and sufficiently interesting to be added. However could you make a different peg instead of the default provided magnet/blue red one? Since the peg does not need specific orientation

@xixinzhang
Copy link
Contributor Author

Thank you for your submission for the course. This task is nice and sufficiently interesting to be added. However could you make a different peg instead of the default provided magnet/blue red one? Since the peg does not need specific orientation

The peg has been changed to single-color

Copy link
Member

@StoneT2000 StoneT2000 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

thank you, this looks good!

@StoneT2000 StoneT2000 merged commit 324b2da into haosulab:main Jun 10, 2024
ramialt pushed a commit to ramialt/ManiSkill that referenced this pull request Jun 11, 2024
* add new env PokeCube-v1

* add z-axis randomization of cube, modify peg's color, variable name
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

Successfully merging this pull request may close these issues.

2 participants