BlenderProc icon indicating copy to clipboard operation
BlenderProc copied to clipboard

Seeking some advice on creating a workpiece grabbing dataset for industrial scenarios

Open TheIOne opened this issue 1 year ago • 5 comments

Describe the issue

Thanks to your work, it made me think of being able to create some industrial scenes based on blenderproc where the workpiece grabbing data is used to realize the target detection of the workpiece. My basic process is like this

  1. Import several workpiece models.
  2. Initialize the poses and generate the scene using physics simulation.
  3. Render the image and remove a number of workpiece simulation grabs from the scene
  4. repeat 2 and 3 to get more data But my problem is that I need to redo the physics simulation for every frame, very time consuming, do you have any suggestions for this problem, very much looking forward to get your reply, thanks!

Minimal code example

No response

Files required to run the code

No response

Expected behavior

Rapid simulation of the workpiece gripping process without the need to physically simulate the entire workpiece.

BlenderProc version

v2.4.1

TheIOne avatar Jul 24 '23 02:07 TheIOne

Why do you need to redo the physics simulation in each iteration? Can you not just put the physics simulator before the loop?

cornerfarmer avatar Jul 24 '23 07:07 cornerfarmer

Why do you need to redo the physics simulation in each iteration? Can you not just put the physics simulator before the loop?

为什么每次迭代都需要重做物理模拟? 你能不能把物理模拟器放在循环之前?

Because if I do the physics simulation before looping, then all the objects in the scene will be fixed in position, but I will remove some objects from them after each frame is recorded, and in reality this may cause some other objects around them to change position, which won't happen if I do the physics simulation.

TheIOne avatar Jul 24 '23 08:07 TheIOne

Ah okay, now I get it. So there are ways to speed up the physics simulation. Which collision shapes do you use? You can also try to adapt the parameters of the simulator, like e.g. max_simulation_time.

Also, after the first simulation, every following simulation only adds small corrections to the object poses right? So these simulations should not be that computationally expensive.

cornerfarmer avatar Jul 24 '23 08:07 cornerfarmer

Ah okay, now I get it. So there are ways to speed up the physics simulation. Which collision shapes do you use? You can also try to adapt the parameters of the simulator, like e.g. max_simulation_time.

Also, after the first simulation, every following simulation only adds small corrections to the object poses right? So these simulations should not be that computationally expensive.

此外,在第一次模拟之后,接下来的每个模拟都只会对物体姿势进行小的修正,对吗?因此,这些模拟的计算成本不应该那么高。

啊,好的,现在我明白了。所以有一些方法可以加快物理模拟。您使用哪些碰撞形状?您还可以尝试调整模拟器的参数,例如.max_模拟_时间。

Hmm right, I'm using CONVEX_HULL, but it still feels slow, it takes about 3 minutes for a frame on a 2080ti graphics card

TheIOne avatar Jul 24 '23 09:07 TheIOne

Do you mean 3 minutes for rendering one frame or for simulating one physics frame? Either way, this should not be the case. Also using convex hulls should be quite fast. Do you have many objects in your simulation? How does it change if you use only one?

cornerfarmer avatar Jul 26 '23 08:07 cornerfarmer