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

Refactor collision objects and visual objects #30

Open
4 tasks
luator opened this issue Nov 11, 2020 · 2 comments
Open
4 tasks

Refactor collision objects and visual objects #30

luator opened this issue Nov 11, 2020 · 2 comments
Assignees
Labels
enhancement New feature or request

Comments

@luator
Copy link
Member

luator commented Nov 11, 2020

As discussed in #29, the collision and visual objects should be refactored and unified.

  • Arguments for collision and visual shapes should be unified (right now one uses half extents and the other full extents). Maybe they can even be combined to avoid code duplication.
  • Consistently use np.array instead of list everywhere for things like positions and orientations.
  • Make sure all object types follow the same API (right now, there is for example visual_objects.Marker which has not been touched in Use small Cuboid instead of Cube #29.
  • Add more functionality? (e.g. method to get velocity of a collision object)

Copy of my suggestion from #29:

The interfaces for collision and visual objects should really be unified, ideally even be merged in some way. I have not thought this through completely but maybe something like the following would be a good solution:

cube_shape = CubeShape(width=0.1)
collision_cube = make_collision_object(cube_shape, mass=5, position=...)
visual_cube = make_visual_object(cube_shape, position=...)

With this, the same "cube shape" object could be used for both the manipulation object and the goal marker, reducing the risk of accidentally defining them differently.

@luator luator added the enhancement New feature or request label Nov 11, 2020
@luator
Copy link
Member Author

luator commented Nov 11, 2020

@shrutij01 Does this make sense to you?

@shrutij01
Copy link
Collaborator

@shrutij01 Does this make sense to you?

@luator yes, it does! Thank you, I will look into this.

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

No branches or pull requests

2 participants