Gazebo | Ignition | Community
Ask Your Question
0

How to generate large number of random particles which are continually moving in to one direction for collision detection

asked 2018-10-09 20:37:04 -0600

sajithsam gravatar image

Hi ,

I am using gazebo + Ros (melodic) + URDF for my robot. I have created a contact sensor as below. Now I need to generate huge number of random particles (like small bubbles) which are continuously moving towards my robot. (without effect of the gravity) and get the hit count for a given time

Is there any way to generate these particles? Please help here

edit retag flag offensive close merge delete

1 Answer

Sort by ยป oldest newest most voted
0

answered 2018-10-31 11:27:31 -0600

Duckfrost gravatar image

updated 2018-10-31 17:26:08 -0600

Hi, I created a demo trying to solve this question. I created a World plugin for Gazebo that launches particles in a desired direction. You just have to add it to your worls with the number of particle models you want to be and that's quite it.

Here a Leave a Video explaining a bit all the code

Here I leave you the ROSJECT

Here the Git with the code

And here I leave the main cpp file that makes everything work. It essentially we reset the positions of the particles ( particles are considered any model with the name particle in it ) in the world and then apply a force in the desired direction. All the particles have their gravity disconnected.

particle_shooter_plugin.cpp

particle_shooter.world

Hope it was useful

image description

edit flag offensive delete link more

Question Tools

1 follower

Stats

Asked: 2018-10-09 20:37:04 -0600

Seen: 1,410 times

Last updated: Oct 31 '18