ROS Resources: Documentation | Support | Discussion Forum | Service Status | Q&A answers.ros.org
Ask Your Question
1

image_view stereo_view do not show image or disparity

asked 2016-01-25 11:07:55 -0500

Azharudeen gravatar image

updated 2016-01-25 21:56:24 -0500

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 * /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

edit retag flag offensive close merge delete

Comments

Have you solved this?

Ariel gravatar imageAriel ( 2016-03-17 07:41:03 -0500 )edit

Did you solve this problem? can you please share the solution?

sophie.shin gravatar imagesophie.shin ( 2017-04-21 04:17:17 -0500 )edit

1 Answer

Sort by ยป oldest newest most voted
0

answered 2016-03-20 19:51:56 -0500

mtbrobotanist gravatar image

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

edit flag offensive delete link more

Comments

If there is not already a github issue for this, please open one.

joq gravatar imagejoq ( 2016-03-20 20:30:14 -0500 )edit
2
mtbrobotanist gravatar imagemtbrobotanist ( 2016-03-20 20:52:30 -0500 )edit

Can you please explain this in detail...?

sophie.shin gravatar imagesophie.shin ( 2017-04-21 04:13:27 -0500 )edit

Your Answer

Please start posting anonymously - your entry will be published after you log in or create a new account.

Add Answer

Question Tools

1 follower

Stats

Asked: 2016-01-25 11:07:55 -0500

Seen: 1,031 times

Last updated: Mar 20 '16