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

Revision history [back]

click to hide/show revision 1
initial version
#include <ros/ros.h>
#include "groundPlanFit.cpp"

int main(int argc, char **argv)
{
  ros::init(argc, argv, "ground_plan_fit");

  ros::NodeHandle node;
  ros::NodeHandle priv_nh("~");
  ground_plan_fit::groundPlanFit class_object(node,priv_nh);

  dynamic_reconfigure::Server<ground_plan_fit::ParametersConfig> server;
  dynamic_reconfigure::Server<ground_plan_fit::ParametersConfig>::CallbackType f;

  f = boost::bind(&ground_plan_fit::groundPlanFit::parametersCallback, &class_object, _1, _2);
  server.setCallback(f);

  ros::spin();

  return 0;
}

You just need to create the class_object first and then pass it as a parameter to bind. Your using a member function to bind to and it needs the classes "this" pointer.