IR kinect subscribtion

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

ROSkinect gravatar image

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

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 imagejbinney ( 2014-06-19 19:59:00 -0600 )edit

Now it's clear

ROSkinect gravatar imageROSkinect ( 2014-06-20 02:55:41 -0600 )edit

which pkg do you use for getting data from kinect?

hamid gravatar imagehamid ( 2014-06-20 03:31:50 -0600 )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 imageROSkinect ( 2014-06-20 03:49:06 -0600 )edit

why you didn't use openni pkg?

hamid gravatar imagehamid ( 2014-06-20 07:09:20 -0600 )edit

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

ROSkinect gravatar imageROSkinect ( 2014-06-20 07:46:28 -0600 )edit

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

hamid gravatar imagehamid ( 2014-06-20 08:05:25 -0600 )edit

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

ROSkinect gravatar imageROSkinect ( 2014-06-20 08:22:36 -0600 )edit