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

About bop object physics positioning #20

Closed
wangg12 opened this issue May 16, 2020 · 3 comments
Closed

About bop object physics positioning #20

wangg12 opened this issue May 16, 2020 · 3 comments

Comments

@wangg12
Copy link
Contributor

wangg12 commented May 16, 2020

I tried the example of bop object physics positioning. I found that some objects like benchvise, lamp, duck, glue, can, driller, were always lying on the ground. I used the example config to render about 100 images, I could not find any image in which any of these objects was standing. What was the problem?

@ideas-man
Copy link
Contributor

@wangg12 What do you mean by "standing"?
If I understood it correctly, then I would say that they are not supposed to.

    {
      "module": "object.ObjectPoseSampler",
      "config":{
        "objects_to_sample": {
          "provider": "getter.Entity",
          "conditions": {
            "cp_physics": True
          }
        },
        "pos_sampler":{
          "provider":"sampler.Uniform3d",
          "max":[0.2, 0.2, 0.6],
          "min":[-0.2, -0.2, 0.2]
        },
        "rot_sampler":{
          "provider":"sampler.UniformSO3"
        }
      }
    },
    {
      "module": "object.PhysicsPositioning",
      "config": {
        "min_simulation_time": 3,
        "max_simulation_time": 10,
        "check_object_interval": 1,
        "solver_iters": 25,
        "steps_per_sec": 100
      }
    },

These two modules are responsible for physics positioning and the resulting object pose depends on the outcome of running these two modules.

  • object.ObjectPoseSampler samples poses for objects in a bounding box;
  • object.PhysicsPositioning toggles a somewhat realistic physics animation - objects fall down.
    If you want to preserve the orientation of the object right after loading and just place them on the ground, then you may need to make some mods to the config file for sure. From the top of my head I would say that maybe try manipulators.EntityManipulator and just move the objects manually (or maybe look at the object.OnSurfaceSampler + sampler.UpperRegionSampler).

@wangg12
Copy link
Contributor Author

wangg12 commented May 16, 2020

For "standing", I mean the bottom of the object should be on the ground. I was just wondering, for the example in this repo, is it possible to get such standing poses for these objects? If so, what's the probability? In my observation, almost all of my rendered images didn't show such cases.

@MartinSmeyer
Copy link
Member

MartinSmeyer commented May 16, 2020

Hi @wangg12 ! :-)
Objects are dropped onto the plane, maybe the title of the example is a bit misleading. For some objects the probability of staying upright is really small (however I certainly saw the duck and can upright before). If the goal is to generate a dataset for pose estimation with a bias towards upright objects, you could (1) select the initial poses to be upright before falling (rot_sampler in the config) (2) lower the dropping height (3) use the on_surface_sampler for placing the objects onto the plane before activating physics (4) reduce cube size --> physics --> increase cube size --> physics.

I guess (3) could make most sense to you?

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