Gazebo | Ignition | Community
Ask Your Question
0

How to implement paralell threads on plugin

asked 2019-11-11 10:55:07 -0500

Weasfas gravatar image

Hi,

I am currently working with a velodyne plugin on Gazebo. The plugins works fine, however it seems that, when the simulation starts calculating points (E.g.: I subscribe to the Pointcloud) the real time factor drops from 1.00 to 0.50 slowing deeply the whole simulation and thus affecting other services that I am testing.

Is there a way to improve this performance?

One of the ways I want to do this is by adding working threads to the plugin, but I was not able to find any documentation on this possibility. If anyone knows any info, paper or implementation about this topic it would be nice if you share it here.

Thanks in advance.

edit retag flag offensive close merge delete

Comments

Are you using a gpu_ray sensor?

chapulina gravatar imagechapulina ( 2019-11-11 11:02:21 -0500 )edit

@chapulina - I'm trying to do this with a PR2, running Gazebo 9, by changing the hokuyo lidar from ray to gpu_ray as suggested. I'm not seeing any significant improvement (maybe 0.05 RTF). Is there any special dependency here on OpenGL or other libraries that may be needed?

Is there any way to verify that gpu_ray is being run by Gazebo?

Also, is there any other documentation on how to maximize Gazebo performance? I haven't found any on the wikis or docs.

mkhansen gravatar imagemkhansen ( 2020-06-04 17:09:26 -0500 )edit

If you're using gpu_ray Gazebo will only try to load that sensor, so it's safe to assume you're using the correct one. I don't know of any documents explaining how to improve sensor performance. The general tip I can give you is to reduce resolution to the minimum that covers your needs :)

chapulina gravatar imagechapulina ( 2020-06-08 15:49:15 -0500 )edit

Is there any way to introspect what plugins are currently running in Gazebo? I look in the list in the GUI and don't see one for the ray sensor, even though I am getting laser scan data published to ROS.

mkhansen gravatar imagemkhansen ( 2020-06-13 16:51:59 -0500 )edit

1 Answer

Sort by ยป oldest newest most voted
1

answered 2019-11-12 10:00:01 -0500

Weasfas gravatar image

@chapulina provided the right direction.

To avoid the drop I followed these steps:

  1. Change the sensor type from ray to gpu_ray.
  2. Since I was using Gazebo and this plugin I needed to update Gazebo from Gazebo_7.0.0 to Gazebo_7.16.0 using the following approach provided in the section "Alternative installation". The update is to cope with this issue and this issue

Now I able to simulate three lidars (2x16 samples and 1 x64 samples with almost no time_rate variation)

Thanks for the help.

edit flag offensive delete link more

Question Tools

3 followers

Stats

Asked: 2019-11-11 10:55:07 -0500

Seen: 210 times

Last updated: Nov 12 '19