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 framerate #74

Open
christianrauch opened this issue Apr 7, 2019 · 3 comments
Open

low framerate #74

christianrauch opened this issue Apr 7, 2019 · 3 comments

Comments

@christianrauch
Copy link

christianrauch commented Apr 7, 2019

The camerav1_1280x720.launch only gives me 51 Hz on /raspicam_node/image/compressed. Is this expected?

With roslaunch raspicam_node camerav1_1280x720.launch enable_raw:=true this drops to 21 Hz on /raspicam_node/image/compressed and 9 Hz on /raspicam_node/image.
It appears that the framerate drops in general when enable_raw is enabled. Is it possible to select a raw-only mode?

How can I achieve a framerate of 90 Hz for uncompressed raw images?

@rohbotics
Copy link
Member

In my experience you can't get 90hz with raw unless you lower your resolution. With some really basic performance analysis, the code ends up spending most of its time in memcpy, because the raw images are so large.

@rohbotics
Copy link
Member

Another note: maybe you can get a little better framerates with more GPU memory in your config.txt

@christianrauch
Copy link
Author

christianrauch commented Apr 13, 2019

I found a summary of video modes:

The result is that we now have a set of mode as follows :

  • 2592×1944 1-15fps, video or stills mode, Full sensor full FOV, default stills capture
  • 1920×1080 1-30fps, video mode, 1080p30 cropped
  • 1296×972 1-42fps, video mode, 4:3 aspect binned full FOV. Used for stills preview in raspistill.
  • 1296×730 1-49fps, video mode, 16:9 aspect , binned, full FOV (width), used for 720p
  • 640×480 42.1-60fps, video mode, up to VGAp60 binned
  • 640×480 60.1-90fps, video mode, up to VGAp90 binned

So this seems to be a hardware limitations. Images at HD resolution (1280 x 720) can ony be read at upto 49 Hz and the maximum framerate of 90 Hz can only be achieved with VGA resolution (640 x 480) or lower.

Is the node capable of publishing at this framerate? I assume that if raspivid can read from the graphics buffer and write to disk at this framerate, the ROS node should be able to publish at this framerate too.

Since these modes are supported by V4L2 on the Raspberry Pi, they might also just work with the generic ROS usb camera driver node.

Edit: The modes differ from V1 and V2 of the camera: https://picamera.readthedocs.io/en/release-1.12/fov.html. The V2 should be able to provide HD at 90 Hz.

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

No branches or pull requests

2 participants