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

you must to create one node handle in your class such as:

class High_control
{
private:
       ros::NodeHandle node_handle;
....
}

and in your init you should do something like this

rcInSubscriber     = n.subscribe<mavros_msgs::RCIn>("mavros/rc/in", 10, &High_control::RcIn,this);

you must to create one node handle in your class such as:

class High_control
{
private:
       ros::NodeHandle node_handle;
n;
....
}

and in your init you should do something like this

rcInSubscriber     = n.subscribe<mavros_msgs::RCIn>("mavros/rc/in", 10, &High_control::RcIn,this);