UbiquityRobotics / raspicam_node

ROS node for camera module of Raspberry Pi
BSD 3-Clause "New" or "Revised" License
292 stars 162 forks source link

Framerate at 1/3 #61

Closed timzarhansen closed 5 years ago

timzarhansen commented 5 years ago

I am using this package now for a few weeks. But suddenly the frame rate of the published images is around 1/3 of the frame rate I use while initializing the node. 10->3.3 or 60->20

I use v2 cam and ROS Kinetic. I already re-installed the package from source and not from source.

any idea?

rohbotics commented 5 years ago

Are you looking at the frame rate over the network? Running over the network can lead to pretty bad framerates, especially with wifi.

timzarhansen commented 5 years ago

sorry totally forgot to mention that, both. On the py i get 1/3 and in the network (wifi) i get most 3 fps(at 1280x960), which is not a big deal. if i use the lower resolution, like 410x... i still get 1/3 so this seems to not make a difference.

Edit: My current solution is now to use the backup from 2 weeks ago, i think i broke something anywhere. now its 30 fps again if i want 30 fps thanks for the fast reply anyway

sean85914 commented 5 years ago

I got the same result even if I set the master at pi itself. I used 640*480 with 30 fps but when I

rostopic hz

to compressed image, it only got about 10 hz.

timzarhansen commented 5 years ago

Yea i just live with it. For Performance it does not matter in my experience. just use 90 hz if you want 30 ;) thats how i do it now

AlbertLIN95 commented 5 years ago

I use 120 hz and got 43hz. For 90 hz, I got 34. It is amazing....

rohbotics commented 5 years ago

Maybe I should add a multiply by 3 to the code :)

More seriously, after looking into this I have no idea what is causing the frame rate not to be correct.

AlbertLIN95 commented 5 years ago

The frame rate is simply 1/3. The wrong frame rate is due the network issue. (Even if it is wired connection. The network increase the frame rate lol.....)

Rohan Agrawal notifications@github.com 於 2019年1月28日 週一 下午2:49寫道:

Maybe I should add a multiply by 3 to the code :)

More seriously, after looking into this I have no idea what is causing the frame rate not to be correct.

— You are receiving this because you commented. Reply to this email directly, view it on GitHub https://github.com/UbiquityRobotics/raspicam_node/issues/61#issuecomment-458015938, or mute the thread https://github.com/notifications/unsubscribe-auth/Af9Og-63R8mVOaRQwmIvv9SWG8G8Doptks5vHp1rgaJpZM4Y9KdP .

rohbotics commented 5 years ago

I don't have a pi for the next couple days, could someone try changing the VIDEO_FRAME_RATE_DEN to equal 1?

https://github.com/UbiquityRobotics/raspicam_node/blob/kinetic/src/raspicam_node.cpp#L83

I think the DEN means denominator, so this is actually just dividing by 3.