Liquid particle spillage check

Typically: "How do I... ", "How can I... " questions
Post Reply
xuehonghu
Posts: 8
Joined: 06 Mar 2019, 15:19

Liquid particle spillage check

Post by xuehonghu » 08 May 2019, 16:53

Hi, everyone,
I would like to check how many liquid particles are spilled out from a moving cup in each simulation episode. I wonder whether there are any approaches to achieve that?
Thanx

coppelia
Site Admin
Posts: 7229
Joined: 14 Dec 2012, 00:25

Re: Liquid particle spillage check

Post by coppelia » 09 May 2019, 06:56

Hello,

unfortunately there is no direct way to testing that. There are two possibilities however:
  • use a vision sensor and somehow extract the approximate number of particles
  • use a force/torque sensor under the cup, and extract the weight of the cup. Everything above the weight of the cup alone is coming from the particles in the cup
Cheers

xuehonghu
Posts: 8
Joined: 06 Mar 2019, 15:19

Re: Liquid particle spillage check

Post by xuehonghu » 16 May 2019, 10:17

Thanks! In my current settings, I use sim.addParticleObject and sim.addParticleObjectItem to generate particles, which is exactly the same as in the demonstration example scene : V-rep_grasping_scene
Is there a way to (1) count the number of the objects in the scene including the particles? (2) get the object handle for each particles so that I can iterate through all the particles and compute the distance of each particle to the container, deciding whether they are spilled or not. According to the settings in V-rep_grasping_scene, I just can't get the object handle since there is no new particle objects displayed in the hierarchical tree.

If both of the approches are possible, how to realize that?
Best regards

coppelia
Site Admin
Posts: 7229
Joined: 14 Dec 2012, 00:25

Re: Liquid particle spillage check

Post by coppelia » 17 May 2019, 10:42

This is unfortunately currently not possible. Particle objects are not scene objects and won't appear in the scene hierarchy.
You will have to go with one of the method I described earlier.

Cheers

Post Reply