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

update observation space docstring for fetch pick_and_place push slide environments #197

Merged
merged 1 commit into from
Dec 23, 2023

Conversation

SethPate
Copy link
Contributor

Description

The docstring for the observations space in the Fetch Push, Slide, PickAndPlace tasks has a typo. I didn't find a similar problem in Reach. This is only a change to the docstring.

Fixes # (issue)

Type of change

  • This change requires a documentation update

Screenshots

n/a

Checklist:

  • I have run the pre-commit checks with pre-commit run --all-files (see CONTRIBUTING.md instructions to set it up)
  • I have commented my code, particularly in hard-to-understand areas
  • I have made corresponding changes to the documentation
  • My changes generate no new warnings
  • I have added tests that prove my fix is effective or that my feature works
  • New and existing unit tests pass locally with my changes

@Kallinteris-Andreas
Copy link
Collaborator

  1. can you run pre-commit?
  2. can you point to the code that corresponds to the changed documentation (with a perma-link)
    Thanks

@SethPate
Copy link
Contributor Author

Here's the relevant code:
https://github.com/Farama-Foundation/Gymnasium-Robotics/blob/f2754e19011a6ef329a40efc92dfa4bad81a22d3/gymnasium_robotics/envs/fetch/fetch_env.py#L205C1-L205C51

I'm seeing the same failure on pre-commit, not sure what would cause it to break.

Copy link
Collaborator

@Kallinteris-Andreas Kallinteris-Andreas left a comment

Choose a reason for hiding this comment

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

Thanks, for the fixes!!!

@Kallinteris-Andreas
Copy link
Collaborator

I will merge as soon as I fix the CI situation

@Kallinteris-Andreas Kallinteris-Andreas changed the title update observation space docstring update observation space docstring for fetch pick_and_place push slide environments Dec 22, 2023
@Kallinteris-Andreas
Copy link
Collaborator

Kallinteris-Andreas commented Dec 22, 2023

The perma-link provided in a previous post was for the oldmujoco-py based version, for context new version:

grip_pos = self._utils.get_site_xpos(self.model, self.data, "robot0:grip")
dt = self.n_substeps * self.model.opt.timestep
grip_velp = (
self._utils.get_site_xvelp(self.model, self.data, "robot0:grip") * dt
)
robot_qpos, robot_qvel = self._utils.robot_get_obs(
self.model, self.data, self._model_names.joint_names
)
if self.has_object:
object_pos = self._utils.get_site_xpos(self.model, self.data, "object0")
# rotations
object_rot = rotations.mat2euler(
self._utils.get_site_xmat(self.model, self.data, "object0")
)
# velocities
object_velp = (
self._utils.get_site_xvelp(self.model, self.data, "object0") * dt
)
object_velr = (
self._utils.get_site_xvelr(self.model, self.data, "object0") * dt
)
# gripper state
object_rel_pos = object_pos - grip_pos

@Kallinteris-Andreas Kallinteris-Andreas merged commit 604a10f into Farama-Foundation:main Dec 23, 2023
4 of 5 checks passed
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