Ask Your Question

cloud_tpc empty in OpenNI listener in RGBDSLAM

asked 2013-02-06 10:15:50 -0600

DonaldV gravatar image

updated 2016-10-24 08:34:32 -0600

ngrennan gravatar image

Hello, I was stepping through the RGBDSLAM code, and I found that even though I have a Kinect connected to my PC, noCloudCallback() is called instead of kinectCallback() because the cloud_tpc string is always empty.

ParameterServer* params = ParameterServer::instance();
std::string cloud_tpc = params->get<std::string>("topic_points");
//All information from Kinect
if(!visua_tpc.empty() && !depth_tpc.empty() && !cloud_tpc.empty())
    kinect_sync_->registerCallback(boost::bind(&OpenNIListener::kinectCallback, this, _1, _2, _3));
//No cloud, but visual image and depth
else if(!visua_tpc.empty() && !depth_tpc.empty() && !cinfo_tpc.empty() && cloud_tpc.empty())
    no_cloud_sync_->registerCallback(boost::bind(&OpenNIListener::noCloudCallback, this, _1, _2, _3));

Can anyone help me understand why this is the case and why I have to do to call the kinectCallback()?

edit retag flag offensive close merge delete

1 Answer

Sort by ยป oldest newest most voted

answered 2013-02-07 01:30:44 -0600

You need to set the corresponding parameter in the launch file, e.g:

<param name="config/topic_points" value="/camera/depth_registered/points"/>
edit flag offensive delete link more


Can you please specify which launch file? Do you mean the openni launch file? I am running RGBDSLAM like this roslaunch openni_launch openni.launch rosrun rgbdslam rgbdslam

DonaldV gravatar imageDonaldV ( 2013-02-07 04:06:35 -0600 )edit

just running rgbdslam with rosrun will use the default parameters. You best use a launchfile e.g. rgbdslam/launch/rgbdslam.launch and modify the parameters to your needs (add the line in my answer, if not already contained). then launch it as "roslaunch rgbdslam rgbdslam.launch"

Felix Endres gravatar imageFelix Endres ( 2013-02-07 04:26:08 -0600 )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


Asked: 2013-02-06 10:15:50 -0600

Seen: 115 times

Last updated: Feb 07 '13