Trouble understanding arguments in image_transport::advertiseImpl

asked 2018-07-05 10:35:07 -0600

updated 2018-07-05 14:51:38 -0600

gvdhoorn gravatar image

I'm fairly new to ROS. I have a publisher and an advertiseimpl function which basically converts the rccb image format to rgb format before publishing it. Please find the advertiseimpl function below.

void RccbToRgbPublisher::advertiseImpl(ros::NodeHandle& nh, const std::string& base_topic, uint32_t queue_size, const image_transport::SubscriberStatusCallback& user_connect_cb, const image_transport::SubscriberStatusCallback& user_disconnect_cb, const ros::VoidPtr& tracked_object, bool latch)
{
  //Call base advertiseImpl
  image_transport::SimplePublisherPlugin<sensor_msgs::Image>::advertiseImpl(
    nh, base_topic, queue_size, user_connect_cb, user_disconnect_cb, tracked_object, latch);

  //Start and setup the reconfigure server
  reconfigure_server_ = std::unique_ptr<dynamic_reconfigure::Server<RccbToRgbPublisherConfig> >{
    new dynamic_reconfigure::Server<RccbToRgbPublisherConfig>(this->nh()) };
  reconfigure_server_->setCallback(
    std::bind(&RccbToRgbPublisher::configurationChanged, this, std::placeholders::_1, std::placeholders::_2));
}

The arguments user_connect_cb, user_disconnect_cb and tracked_object don't make sense to me. Could anyone please explain what i need to pass as parameters during this function call?

Thank you :)

edit retag flag offensive close merge delete