# Displaying Compressed Images crashed after a while using raspicam

**URL:** <https://forum.ubiquityrobotics.com/t/displaying-compressed-images-crashed-after-a-while-using-raspicam/219>\
**Category:** General Questions\
**Created:** [December 22, 2018, 7:35pm UTC](https://forum.ubiquityrobotics.com/t/displaying-compressed-images-crashed-after-a-while-using-raspicam/219 "2018-12-22T19:35:36Z")\
**Posts on this page:** 13\
**Page:** 1

<div class="post-metadata">

**Author:** ![medokbk](https://forum.ubiquityrobotics.com/letter_avatar_proxy/v4/letter/m/b5a626/32.png) [@medokbk](https://forum.ubiquityrobotics.com/u/medokbk)\
**Post date:** [December 22, 2018, 7:35pm UTC](https://forum.ubiquityrobotics.com/t/displaying-compressed-images-crashed-after-a-while-using-raspicam/219/1 "2018-12-22T19:35:36Z")

</div>

hello everybody i’m using raspicam in raspberry , so in order to use compressed images in my laptop i run my subscriber node , my imshow run correctly but after a while the image freezed and blocked … with image raw the image streaming worked correctly but the fps was too low for that i did compile UbiquityRobotics/raspicam\_node that has compressed image publisher but the image freeze after 1 minute…

---

<div class="post-metadata">

**Author:** ![rohbotics](https://forum.ubiquityrobotics.com/user_avatar/forum.ubiquityrobotics.com/rohbotics/32/222_2.png) [@rohbotics](https://forum.ubiquityrobotics.com/u/rohbotics)\
**Post date:** [December 23, 2018, 11:07pm UTC](https://forum.ubiquityrobotics.com/t/displaying-compressed-images-crashed-after-a-while-using-raspicam/219/2 "2018-12-23T23:07:19Z")

</div>

What do you mean by “my imshow”? Do you have your own subscriber node, or are you using rqt\_image\_view?

---

<div class="post-metadata">

**Author:** ![medokbk](https://forum.ubiquityrobotics.com/letter_avatar_proxy/v4/letter/m/b5a626/32.png) [@medokbk](https://forum.ubiquityrobotics.com/u/medokbk)\
**Post date:** [December 25, 2018, 7:07pm UTC](https://forum.ubiquityrobotics.com/t/displaying-compressed-images-crashed-after-a-while-using-raspicam/219/3 "2018-12-25T19:07:20Z")

</div>

both of them , the rqt\_image\_view and the my subscriber node with cv2.imshow()

---

<div class="post-metadata">

**Author:** ![rohbotics](https://forum.ubiquityrobotics.com/user_avatar/forum.ubiquityrobotics.com/rohbotics/32/222_2.png) [@rohbotics](https://forum.ubiquityrobotics.com/u/rohbotics)\
**Post date:** [December 27, 2018, 5:22am UTC](https://forum.ubiquityrobotics.com/t/displaying-compressed-images-crashed-after-a-while-using-raspicam/219/4 "2018-12-27T05:22:20Z")

</div>

Ah, that is an interesting issue, have not seen it before.

A few more questions to help me better understand whats going on:

When it crashes, are you still able to ssh into the pi?  
Does `rostopic echo` on the compressed image topic work on your laptop? What about locally on the Pi?  
Are you using any GUI features of the pi?

---

<div class="post-metadata">

**Author:** ![medokbk](https://forum.ubiquityrobotics.com/letter_avatar_proxy/v4/letter/m/b5a626/32.png) [@medokbk](https://forum.ubiquityrobotics.com/u/medokbk)\
**Post date:** [December 27, 2018, 7:30am UTC](https://forum.ubiquityrobotics.com/t/displaying-compressed-images-crashed-after-a-while-using-raspicam/219/5 "2018-12-27T07:30:17Z")

</div>

-the ssh still work  
-rostopic shows nothings…  
one thing i do is that Im using raspberry 3 B+ , and ubuntu mate , which i think does not support yet this rpi , but i created a publisher node in python code that publish compressed images it work properly but it take a huge ressource of cpu in raspi about 60% …

---

<div class="post-metadata">

**Author:** ![rohbotics](https://forum.ubiquityrobotics.com/user_avatar/forum.ubiquityrobotics.com/rohbotics/32/222_2.png) [@rohbotics](https://forum.ubiquityrobotics.com/u/rohbotics)\
**Post date:** [January 2, 2019, 4:55am UTC](https://forum.ubiquityrobotics.com/t/displaying-compressed-images-crashed-after-a-while-using-raspicam/219/6 "2019-01-02T04:55:21Z")

</div>

Sounds like something in raspicam\_node is crashing, probably the jpg encoder on the GPU.

Could you use our ubuntu image, as we keep the GPU drivers up to date (which the ubuntu mate team doesn’t seem to do) [https://downloads.ubiquityrobotics.com/pi.html](https://downloads.ubiquityrobotics.com/pi.html)

Rohan

---

<div class="post-metadata">

**Author:** ![medokbk](https://forum.ubiquityrobotics.com/letter_avatar_proxy/v4/letter/m/b5a626/32.png) [@medokbk](https://forum.ubiquityrobotics.com/u/medokbk)\
**Post date:** [January 2, 2019, 7:39pm UTC](https://forum.ubiquityrobotics.com/t/displaying-compressed-images-crashed-after-a-while-using-raspicam/219/7 "2019-01-02T19:39:59Z")

</div>

Thank so much rohan i will try this , its not just the gpu encoder its bunch of things does not work , like raspiconfig , i2c , pwm ,building some library … i installed ubntu mate just because i needed ROS …

---

<div class="post-metadata">

**Author:** ![medokbk](https://forum.ubiquityrobotics.com/letter_avatar_proxy/v4/letter/m/b5a626/32.png) [@medokbk](https://forum.ubiquityrobotics.com/u/medokbk)\
**Post date:** [January 12, 2019, 3:35pm UTC](https://forum.ubiquityrobotics.com/t/displaying-compressed-images-crashed-after-a-while-using-raspicam/219/8 "2019-01-12T15:35:36Z")

</div>

hi rohan thank you for the last help , however i still facing the same issue the image freeze after 1 minute , i don’t know how to fix that ,

---

<div class="post-metadata">

**Author:** ![rohbotics](https://forum.ubiquityrobotics.com/user_avatar/forum.ubiquityrobotics.com/rohbotics/32/222_2.png) [@rohbotics](https://forum.ubiquityrobotics.com/u/rohbotics)\
**Post date:** [January 12, 2019, 5:36pm UTC](https://forum.ubiquityrobotics.com/t/displaying-compressed-images-crashed-after-a-while-using-raspicam/219/9 "2019-01-12T17:36:48Z")

</div>

Are you running over Wifi or Ethernet on the Pi? Have you tried using a lower resolution?

---

<div class="post-metadata">

**Author:** ![medokbk](https://forum.ubiquityrobotics.com/letter_avatar_proxy/v4/letter/m/b5a626/32.png) [@medokbk](https://forum.ubiquityrobotics.com/u/medokbk)\
**Post date:** [January 12, 2019, 9:10pm UTC](https://forum.ubiquityrobotics.com/t/displaying-compressed-images-crashed-after-a-while-using-raspicam/219/10 "2019-01-12T21:10:37Z")

</div>

i’m using wifi , yes even in low resolution still have the issue the window freeze and no error shows up, when i kill the process it give a msg about Assertion Failed , i thing it’s somthing related to the buffer is it ??

---

<div class="post-metadata">

**Author:** ![rohbotics](https://forum.ubiquityrobotics.com/user_avatar/forum.ubiquityrobotics.com/rohbotics/32/222_2.png) [@rohbotics](https://forum.ubiquityrobotics.com/u/rohbotics)\
**Post date:** [January 13, 2019, 5:25pm UTC](https://forum.ubiquityrobotics.com/t/displaying-compressed-images-crashed-after-a-while-using-raspicam/219/11 "2019-01-13T17:25:10Z")

</div>

Just to make sure, you are running ROS Kinetic on both the pi and the host, correct?

What is the assertion failed message?

---

<div class="post-metadata">

**Author:** ![arifrahman](https://forum.ubiquityrobotics.com/letter_avatar_proxy/v4/letter/a/41988e/32.png) [@arifrahman](https://forum.ubiquityrobotics.com/u/arifrahman)\
**Post date:** [January 28, 2019, 3:43am UTC](https://forum.ubiquityrobotics.com/t/displaying-compressed-images-crashed-after-a-while-using-raspicam/219/12 "2019-01-28T03:43:01Z")

</div>

I’ve had the same issue when using raspicam\_node on Turtlebot3. Turns out the latest version makes it freeze. Not sure why, but the older version works well.

> <https://github.com/ROBOTIS-GIT/turtlebot3/issues/357>
>
> ISSUE TEMPLATE ver. 0.2.0
> 
> 1. Which TurtleBot3 you have?
> 
> - \[/\] Burger
> … - \[\] Waffle
> - \[\] Waffle Pi
> 
> 2. Which SBC(Single Board Computer) is working on TurtleBot3?
> 
> - \[/\] Raspberry Pi 3
> - \[\] Intel Joule 570x
> - \[\] etc (PLEASE, WRITE DOWN YOUR SBC HERE)
> 
> 3. Which OS you installed in SBC?
> 
> - \[\] Ubuntu MATE 16.04 or later
> - \[/\] Raspbian
> - \[\] etc (PLEASE, WRITE DOWN YOUR OS)
> 
> 4. Which OS you installed in Remote PC?
> 
> - \[/\] Ubuntu 16.04 LTS (Xenial Xerus)
> - \[\] Ubuntu 18.04 LTS (Bionic Beaver)
> - \[\] Linux Mint 18.x
> - \[\] etc (PLEASE, WRITE DOWN YOUR OS)
> 
> 5. Write down software version and firmware version
> 
> - Software version: \[x.x.x\] not sure, downloaded in December 2018
> - Firmware version: \[x.x.x\] not sure, using the one in the downloaded Raspbian image
>  
> 6. Write down the commands you used in order
> on laptop:
> - roscore
> - rqt\_image\_view
> 
> on tb3:
> - roslaunch turtlebot3\_bringup turtlebot3\_rpicamera.launch 
> 
> 7. Copy and Paste your error message on terminal
> 
> \> pi@raspberrypi:~ $ roslaunch turtlebot3\_bringup turtlebot3\_rpicamera.launch 
> \> ... logging to /home/pi/.ros/log/13f84b2a-00f2-11e9-a504-6c71d97cbaff/roslaunch-raspberrypi-1525.log
> \> Checking log directory for disk usage. This may take awhile.
> \> Press Ctrl-C to interrupt
> \> Done checking log file disk usage. Usage is \<1GB.
> \> 
> \> started roslaunch server http://192.168.1.218:39943/
> \> 
> \> SUMMARY
> \> ========
> \> 
> \> PARAMETERS
> \> \* /raspicam\_node/camera\_frame\_id: camera
> \> \* /raspicam\_node/camera\_info\_url: package://turtleb...
> \> \* /raspicam\_node/framerate: 15
> \> \* /raspicam\_node/height: 480
> \> \* /raspicam\_node/width: 640
> \> \* /rosdistro: kinetic
> \> \* /rosversion: 1.12.13
> \> 
> \> NODES
> \> /
> \> raspicam\_node (raspicam\_node/raspicam\_node)
> \> 
> \> ROS\_MASTER\_URI=http://192.168.1.57:11311
> \> 
> \> process\[raspicam\_node-1\]: started with pid \[1534\]
> \> \[INFO\] \[1544938851.012345956\]: splitter component done
> \> 
> \> \[INFO\] \[1544938851.193950142\]: camera calibration URL: package://turtlebot3\_bringup/camera\_info/turtlebot3\_rpicamera.yaml
> \> \[INFO\] \[1544938851.261482438\]: Camera successfully calibrated from default file
> \> \[INFO\] \[1544938851.261671786\]: using default calibration URL
> \> \[INFO\] \[1544938851.261839100\]: camera calibration URL: file:///home/pi/.ros/camera\_info/camera.yaml
> \> \[INFO\] \[1544938851.262271917\]: Unable to open camera calibration file \[/home/pi/.ros/camera\_info/camera.yaml\]
> \> \[WARN\] \[1544938851.262382036\]: Camera calibration file /home/pi/.ros/camera\_info/camera.yaml not found.
> \> \[INFO\] \[1544938851.262492154\]: No device specifc calibration found
> \> \[INFO\] \[1544938855.803032683\]: Starting video capture (640, 480, 80, 15)
> \> 
> \> \[INFO\] \[1544938855.804324729\]: Video capture started
> \> 
> \> 
> \> 
> 
> 
> 8. Please, describe detailedly what difficulty you are in 
> 
> - when I turn on my pi camera, it works for only a short amount of time (less than 1 minute). 
> - after that time, no new image is published.
> - but there is no error printed
> - if I restart the publisher node (turtlebot3\_rpicamera.launch), it works OK again. 
> - but, after some short time, it stops working as before.

---

<div class="post-metadata">

**Author:** ![rohbotics](https://forum.ubiquityrobotics.com/user_avatar/forum.ubiquityrobotics.com/rohbotics/32/222_2.png) [@rohbotics](https://forum.ubiquityrobotics.com/u/rohbotics)\
**Post date:** [January 28, 2019, 4:21am UTC](https://forum.ubiquityrobotics.com/t/displaying-compressed-images-crashed-after-a-while-using-raspicam/219/13 "2019-01-28T04:21:41Z")

</div>

Hi,

This issue should be resolved now ([https://github.com/UbiquityRobotics/raspicam\_node/issues/65](https://github.com/UbiquityRobotics/raspicam_node/issues/65))

Let me know if this comes up again.

Thanks to everyone who provided information about the bug!

Rohan
