0
$\begingroup$

Rosanswers logo

I have been trying to view my stereo disparity image using image_view stereo_view but whenever i run it i get two blank left and right windows with the following error in terminal

init done opengl support available

(stereo_view:14758): GLib-GObject-WARNING **: invalid uninstantiatable type '(null)' in cast to 'GtkWidget'

(stereo_view:14758): GLib-GObject-WARNING **: instance of invalid non-instantiatable type '(null)'

(stereo_view:14758): GLib-GObject-CRITICAL **: g_signal_connect_data: assertion 'G_TYPE_CHECK_INSTANCE (instance)' failed

(stereo_view:14758): GLib-GObject-WARNING **: invalid uninstantiatable type '(null)' in cast to 'GtkWidget'

(stereo_view:14758): GLib-GObject-WARNING **: instance of invalid non-instantiatable type '(null)'

(stereo_view:14758): GLib-GObject-CRITICAL **: g_signal_connect_data: assertion 'G_TYPE_CHECK_INSTANCE (instance)' failed

(stereo_view:14758): GLib-GObject-WARNING **: invalid uninstantiatable type '(null)' in cast to 'GtkWidget'

(stereo_view:14758): GLib-GObject-WARNING **: instance of invalid non-instantiatable type '(null)'

(stereo_view:14758): GLib-GObject-CRITICAL **: g_signal_connect_data: assertion 'G_TYPE_CHECK_INSTANCE (instance)' failed [ INFO] [1453739975.777426383]: Subscribing to:

* /camera/left/image_rect_color
* /camera/right/image_rect_color
* /camera/disparity
  • I was able to get the images in rviz using camera display

  • I am using ubuntu 14.04 with indigo distro

  • how can i fix this problem?

anybody please help me


Originally posted by Azharudeen on ROS Answers with karma: 90 on 2016-01-25

Post score: 1


Original comments

Comment by Ariel on 2016-03-17:
Have you solved this?

Comment by sophie.shin on 2017-04-21:
Did you solve this problem? can you please share the solution?

$\endgroup$

1 Answer 1

0
$\begingroup$

Rosanswers logo

I'm running the same setup.

The problem is inside imageCB() method in stereo_view.cpp.

image_mutex_.unlock() was being called before imshow() for the left, right and disparity images.

image_mutex_.unlock();
if (!last_left_image_.empty())
  cv::imshow("left", last_left_image_);
if (!last_right_image_.empty())
  cv::imshow("right", last_right_image_);
cv::imshow("disparity", disparity_color_);

the location of image_mutex_.unlock(); is causing the window threads to lock up.

change the above to this:

if (!last_left_image_.empty())){
  cv::imshow("left", last_left_image_);
  cv::waitKey(1);
}
if (!last_right_image_.empty()){
  cv::imshow("right", last_right_image_);
  cv::waitKey(1);
}
cv::imshow("disparity", disparity_color_);
cv::waitKey(1);   

image_mutex_.unlock();

moving the unlock() command below the Mat checks and adding cv::waitKey(1) for each cv::imshow() solved it for me.

You'll have to download the source code from https://github.com/ros-perception/image_pipeline.git and compile it yourself. look in image_view/src/stereo_view.cpp for the image call back.

Hope this helps


Originally posted by mtbrobotanist with karma: 76 on 2016-03-20

This answer was ACCEPTED on the original site

Post score: 0


Original comments

Comment by joq on 2016-03-20:
If there is not already a github issue for this, please open one.

Comment by mtbrobotanist on 2016-03-20:
Done: https://github.com/ros-perception/image_pipeline/issues/188

Comment by sophie.shin on 2017-04-21:
Can you please explain this in detail...?

$\endgroup$

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.