IR kinect subscribtion

asked 2014-06-19 10:01:17 -0500

ROSkinect gravatar image

updated 2014-06-20 02:21:48 -0500

Hi there.


I'm working with the Kinect in ROS. Had anyone subscribed to /camera/ir/image_raw ? because I get black screen when I launch this command in the shell:

$> rosrun image_view image_view image:=/camera/ir/image_raw

and how to subscribe to it using c++ program like that : what should I put instead of mono8 ? (Raw uint16 IR image data is given by the topic)

void imageCallbackir(const sensor_msgs::ImageConstPtr& msg)
{   
    cv_bridge::CvImagePtr cv_ptr;

    try
    {
        cv_ptr = cv_bridge::toCvCopy(msg, sensor_msgs::image_encodings::MONO8);

    }

    catch (cv_bridge::Exception& e)
    {
        ROS_ERROR("cv_bridge exception: %s", e.what());
        return;
    }


    cv::imshow("OpenCV viewer Kinect ir", cv_ptr->image);

    cvWaitKey(3);
}

Thank you.

edit retag flag offensive close merge delete

Comments

Info? What sensor? What software? What OS? What are you launching?

jbinney gravatar image jbinney  ( 2014-06-19 19:59:00 -0500 )edit

Now it's clear

ROSkinect gravatar image ROSkinect  ( 2014-06-20 02:55:41 -0500 )edit

which pkg do you use for getting data from kinect?

Hamid Didari gravatar image Hamid Didari  ( 2014-06-20 03:31:50 -0500 )edit

I had mention that in my question, I'm using /camera/ir/image_raw And it's the only topic for that

ROSkinect gravatar image ROSkinect  ( 2014-06-20 03:49:06 -0500 )edit

why you didn't use openni pkg?

Hamid Didari gravatar image Hamid Didari  ( 2014-06-20 07:09:20 -0500 )edit

I use the package :roslaunch openni_launch openni.launch and then I launch the topic

ROSkinect gravatar image ROSkinect  ( 2014-06-20 07:46:28 -0500 )edit

try to subscribe another topic . is that show correctly? for example "$rosrun image_view image_view image:=/camera/rgb/image_color"

Hamid Didari gravatar image Hamid Didari  ( 2014-06-20 08:05:25 -0500 )edit

I want IR camera only as I mention that in the title and not the rbg camera

ROSkinect gravatar image ROSkinect  ( 2014-06-20 08:22:36 -0500 )edit