ROS Resources: Documentation | Support | Discussion Forum | Index | Service Status | ros @ Robotics Stack Exchange
Ask Your Question
1

Raspicam_node stops working after 30 seconds

asked 2018-12-10 16:17:30 -0500

luzi gravatar image

updated 2018-12-11 04:01:48 -0500

Hi all

I installed the raspicam_node plugin on a raspberry pi. The node is starting up well and is publishing the right data for around 30 seconds. Afterwards there is no data being transmitted any more - also no error messages in the console. And I tested it with different network configurations and also running all nodes on one and the same machine and it's always the same. After some time (10s - 60s) the camera stops working. Nevertheless the light on the camera is still on. And when I use a node with rospy (Python node), it works fine.

Can anyone help me? Thank you in advance.

EDIT: It seems as if some kind of buffer gets filled up, because the transmission stops always exactly 37 seconds after the first message. Any ideas of which buffer / queue might get filled up and not emptied. (it is not a memory issue - there is still a lot of free RAM).

edit retag flag offensive close merge delete

Comments

Maybe try just viewing the video with another method to isolate your HW and network from ROS. One method described here:

https://www.youtube.com/watch?v=JjPsW...

If there is a camera or network issue it may show up when viewing as in video above.

My raspicam running for weeks no issue.

billy gravatar image billy  ( 2018-12-10 18:43:46 -0500 )edit

Other methods work perfectly (e.g. a simple python streaming node). So it has to be something raspicam node related...

luzi gravatar image luzi  ( 2018-12-11 03:09:55 -0500 )edit

Did you see anything strange in the dmesg output? Would be nice to see this:

dmesg > out.txt[run your node until it crashes]dmesg > out2.txt

and then show us what diff out.txt out2.txt shows.

allenh1 gravatar image allenh1  ( 2018-12-12 12:27:04 -0500 )edit

1 Answer

Sort by ยป oldest newest most voted
0

answered 2019-01-19 13:10:17 -0500

marticres gravatar image

I'm new in ROS and I have the same problem. I couldn't even properly see the stream with rqt_image_view until I found out how to lower the framerate. In my case raspicam_node publishes around 200 compressed images until it stops publishing (no error message either, and camera LED is still on. I wrote a very basic subscriber node, so it counts the number of images published. This node and the image shown at rqt_image_view are refreshed at the same time. Also rostopic hz /raspicam_node/image/compressed doesn't work accordingly to the framerate I set. I run all the nodes on the Raspberry Pi.

As of following the YouTube video posted on the comments by billy, the stream freezes right at the beginning (shows the first frame it takes) and then it might refresh after ~30 seconds (hardly ever though). I understand that this could not work due to network issues, but still raspicam_node could still work if I run all the nodes on the Pi? I post some of the terminal output when running raspivid -o - -t 0 -hf -w 800 -h 400 -fps 24 |cvlc -vvv stream:///dev/stdin --sout '#standard{access=http,mux=ts,dst=:8160}' :demux=h264 (not able to attach files yet...)

[6b600ea8] core input debug: Buffering 0%
[6b600ea8] core input debug: Buffering 13%
[6b500700] core stream output debug: adding a new sout input (sout_input:0x6b201d88)
[6b502c28] core mux debug: adding a new input
[6b502c28] mux_ts mux debug: adding input codec=h264 pid=68
[6b502c28] mux_ts mux debug: new PCR PID is 68
[6b600ea8] core input debug: Buffering 26%
[6b600ea8] core input debug: Buffering 40%
[6b600ea8] core input debug: Buffering 53%
[6b600ea8] core input debug: Buffering 66%
[6b600ea8] core input debug: Buffering 80%
[6b600ea8] core input debug: Buffering 93%
[6b600ea8] core input debug: Stream buffering done (320 ms in 292 ms)
[6b600ea8] core input debug: Decoder wait done in 0 ms
[6b502c28] core mux warning: late buffer for mux input (30057)
[6b502c28] core mux warning: late buffer for mux input (1300)
[6b502c28] core mux warning: late buffer for mux input (677)
...
[6b502c28] core mux warning: late buffer for mux input (76579)
[6b600ea8] core input error: ES_OUT_SET_(GROUP_)PCR  is called too late (pts_delay increased to 300 ms)
[6b600ea8] core input error: ES_OUT_RESET_PCR called
[6b600ea8] core input debug: Buffering 0%
[6b600ea8] core input debug: Buffering 13%
[6b600ea8] core input debug: Buffering 26%
[6b600ea8] core input debug: Buffering 40%
[6b600ea8] core input debug: Buffering 53%
[6b600ea8] core input debug: Buffering 66%
[6b600ea8] core input debug: Buffering 80%
[6b600ea8] core input debug: Buffering 93%
[6b600ea8] core input debug: Stream buffering done (320 ms in 333 ms)
[6b600ea8] core input debug: Decoder wait done in 0 ms
[6b502c28] core mux warning: late buffer for mux input (30089)
[6b502c28] mux_ts mux debug: adjusting rate at 87519/631145 (113/74)
[6b502c28] mux_ts mux debug: adjusting rate at 80000/543626 (74/0)
...

No differences shown following allenh1 advice. I'm running ROS Kinetic on Ubuntu Mate 16.04 on the ... (more)

edit flag offensive delete link more

Question Tools

2 followers

Stats

Asked: 2018-12-10 16:17:30 -0500

Seen: 555 times

Last updated: Dec 11 '18