maxspahn / gym_envs_urdf

URDF environments for gym
https://maxspahn.github.io/gym_envs_urdf/
GNU General Public License v3.0
46 stars 14 forks source link

Placing walls in the environment should be more intuitive #77

Closed GijsGroote closed 2 years ago

GijsGroote commented 2 years ago

When walls should be places other than the default, it takes to long to understand how to place walls.

maxspahn commented 2 years ago

What would you find most intuitive?

GijsGroote commented 2 years ago

TL;DR remove add_walls, extend add_obstacle(obstacle) to add_obstacles(obstacle, positions=list[pose_2D, ....])

Let's take into account the implementation of obstacles, there are 2 methods to create walls: createCollisionShape or createMultiBody or loadURDF / loadSDF / loadMJCF

the quickstart documentation already suggest it is better to load in urdf files with the loadURDF method. So I suggest placing walls should be upgraded from createMultiBody to loadURDF.

This would mean the add_walls would become exactly as add_obstacle additionally it would be useful to place walls on multiple pose_2D locations.

where add_walls(wall_urdf, locations = list[pose_2D, ....]) where numpy array pose_2D = (x, y, orientation) of the center of mass of the wall. (what do you think, pose_2D should point to center of mass, corner of wall, something else?)

It would be logical to recall add_walls to add_multiple_obstacles or to fully intergrate add_walls into add_obstacle.

maxspahn commented 2 years ago

alright, I'll have a look at it!