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

Low FPS when subscribing to point cloud topic. #227

Closed
RhysMcK opened this issue Jul 4, 2018 · 11 comments
Closed

Low FPS when subscribing to point cloud topic. #227

RhysMcK opened this issue Jul 4, 2018 · 11 comments
Assignees

Comments

@RhysMcK
Copy link

RhysMcK commented Jul 4, 2018

I have notice that the FPS from the zed-ros-wrapper drops from 15 fps ( as desired in launch file) to about 5 fps when i subscribe to the point_cloud topic. Obviously the additional computational overhead when having to calculate the point cloud slows down the main working thread. Has there been any work on computing the point cloud asynchronously?

Cheers.

@Myzhar Myzhar self-assigned this Jul 4, 2018
@Myzhar
Copy link
Member

Myzhar commented Jul 4, 2018

I need more information to help you:

  • platform (CPU, GPU, ...)
  • SDK version

One of the main cause maybe running Rviz on the same machine.
To reduce the power requested by Rviz you could try to change this settings:

  • Unreliable: ON
  • Style: Points
  • Size (Pixels): 1
  • Queue size: 1

To verify that is Rviz that slows down the system you can check the pointcloud generation frequency with this test:

  1. open a console and start ZED node:
    $ roslaunch zed_wrapper zed.launch
  2. open another console and test the frequency of the topic:
    $ rostopic hz /zed/point_cloud/cloud_registered

@RhysMcK
Copy link
Author

RhysMcK commented Jul 4, 2018

Thanks for the response. This is running with GPU (nvidia 1060) and CPU ( Intel® Core™ i7-7700K Processor) on version SDK 2.4. Those values I stated above were determined via the rostopic hz. I am only running zed.launch

@Myzhar
Copy link
Member

Myzhar commented Jul 4, 2018

Which GPU and CPU?

@RhysMcK
Copy link
Author

RhysMcK commented Jul 4, 2018

Sorry, i edited after inital response.

@Myzhar
Copy link
Member

Myzhar commented Jul 4, 2018

Ok, I think you can take advantage of the new release of the wrapper that will be released with new SDK in the next days

@RhysMcK
Copy link
Author

RhysMcK commented Jul 4, 2018

Okay great! I look forward to testing this :)

@Russ76
Copy link

Russ76 commented Jul 5, 2018

Does using the notelet instead of the node help with the fps issue?

@RhysMcK
Copy link
Author

RhysMcK commented Jul 5, 2018

Hi @Russ76, i am currently already using this as a nodelet.

@RhysMcK
Copy link
Author

RhysMcK commented Jul 5, 2018

I've done a little bit of investigation, and the bottle neck appears in the zed_wrapper_nodelet.cpp:lines 708- 716:

if (cloud_SubNumber > 0) {
     zed.retrieveMeasure(cloud, sl::MEASURE_XYZBGRA);
     point_cloud_frame_id = cloud_frame_id;
     point_cloud_time = t;
     publishPointCloud(width, height, pub_cloud);
}

It takes about 0.17 seconds to complete this block, which is about 5-6hz. About 70% of that time is cosumed in the publishPointCloud() call.

@Myzhar
Copy link
Member

Myzhar commented Jul 5, 2018

Thank you for the investigation @RhysMcK
publishPointCloud is indeed the function that have been improved in the version that we are going to release

@Myzhar
Copy link
Member

Myzhar commented Aug 6, 2018

Performances improved in 1b16546

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

No branches or pull requests

3 participants