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

Unable to view image using image_view in ROS Indigo with rosberrypi_cam

asked 2017-10-17 06:20:20 -0500

user_123 gravatar image

I have succesfully installed the rosberrypi_cam package following this page. After that when I execute the command

rosrun rosberrypi_cam rosberrypi_cam_node

the red light on camera becomes on, showing a message,

[ INFO] [1506259295.746458853]: using default calibration URL
[ INFO] [1506259295.747325311]: camera calibration URL: file:///home/pi/.ros/camera_info//rosberrypi_cam.yaml
[ INFO] [1506259295.747978384]: Unable to open camera calibration file [/home/pi/.ros/camera_info//rosberrypi_cam.yaml]
[ WARN] [1506259295.748239009]: Camera calibration file /home/pi/.ros/camera_info//rosberrypi_cam.yaml not found.

Now when I try to view an image using,

rosrun image_view image_view image:=/rosberrypi_cam/image_raw

I get the following message,

 [ INFO] [1506259415.296537089]: Using transport "raw"
(image_raw:1697): GLib-GObject-CRITICAL **: g_object_unref: assertion 'G_IS_OBJECT (object)' failed
Attempt to unlock mutex that was not locked
Aborted

Even while trying to calibrate the camera using cameraclibrator.py I am unable to calibrate it since the calibration window is opening as half black with all buttons disabled and without checkerboard. I am unable to understand the problem. Plesae help... Thank you.

edit retag flag offensive close merge delete

Comments

Hey, did you find a solution to this issue?

Drkstr gravatar image Drkstr  ( 2018-10-14 08:25:34 -0500 )edit

1 Answer

Sort by ยป oldest newest most voted
2

answered 2018-09-07 03:15:56 -0500

Smit585 gravatar image

Just check if in your source code, you have put cv::startWindowThread(); before cv::waitKey(10);

If yes, just remove the startWindowThread function. It worked for me,

edit flag offensive delete link more

Comments

Hey, I am in a similar situation. What source code are you talking about, the source code for image_view node?

Drkstr gravatar image Drkstr  ( 2018-10-14 08:10:19 -0500 )edit
1

I worked for me by downloading image_view package in my workspace, and commenting out line 178. - //cv::startWindowThread();

matkok gravatar image matkok  ( 2019-03-15 10:16:38 -0500 )edit

This works, but at this date 2019/Jun/09, it has not been fixed in the image_view package. In the meanwhile I use rqt_image_view. This is an error in the image view package I think because if I open a WIndows using OpenCV functions it does not crash.

Luis Ruiz gravatar image Luis Ruiz  ( 2019-06-08 22:28:36 -0500 )edit

Question Tools

2 followers

Stats

Asked: 2017-10-17 06:20:20 -0500

Seen: 1,847 times

Last updated: Oct 17 '17