Remode on ROS

asked 2016-09-28 03:33:51 -0500

xavier12358 gravatar image

Hello,

I try to understand a code using ROS called REMODE. Here is the main function:

#include <ros/ros.h>
#include <rmd/check_cuda_device.cuh>
#include <rmd/depthmap_node.h>

int main(int argc, char **argv)
{
  if(!rmd::checkCudaDevice(argc, argv))
    return EXIT_FAILURE;

  ros::init(argc, argv, "rpg_open_remode");
  ros::NodeHandle nh;
  rmd::DepthmapNode dm_node(nh);
  if(!dm_node.init())
  {
    ROS_ERROR("could not initialize DepthmapNode. Shutting down node...");
    return EXIT_FAILURE;
  }

  std::string dense_input_topic("/svo/dense_input");
  ros::Subscriber dense_input_sub = nh.subscribe(
        dense_input_topic,
        1,
        &rmd::DepthmapNode::denseInputCallback,
        &dm_node);

  ros::Rate loop_rate(30);
  while(ros::ok())
  {
    ros::spinOnce();
    loop_rate.sleep();
  }

  return EXIT_SUCCESS;
}

As I understand there is a callback redirection from the /svo/dense_input to the rmd::DepthmapNode::denseInputCallback, am I right?

So an the other program svo had to work too in order to receive the callback, am I right?

Can someone help me about that?

edit retag flag offensive close merge delete