ROS Resources: Documentation | Support | Discussion Forum | Index | Service Status | ros @ Robotics Stack Exchange
Ask Your Question
0

cloud_tpc empty in OpenNI listener in RGBDSLAM

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

DonaldV gravatar image

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

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
0

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

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

Comments

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 image DonaldV  ( 2013-02-07 04:06:35 -0500 )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 image Felix Endres  ( 2013-02-07 04:26:08 -0500 )edit

Question Tools

1 follower

Stats

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

Seen: 185 times

Last updated: Feb 07 '13