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

Revision history [back]

I got it, It must be used the latch parameter of the Publisher class. The 3rd param is the latch, by default it is false, if it is true, than the msg has a transitory stat/ not instant.

Publisher takeOff=n.advertise<std_msgs::Empty>("/ardrone/takeoff",1,true);

I got it, It must be used the latch parameter of the Publisher class. The 3rd param is the latch, by default it is false, if it is true, than the msg has a transitory stat/ not instant.

Publisher takeOff=n.advertise<std_msgs::Empty>("/ardrone/takeoff",1,true);

Or:

 system( "rostopic pub /ardrone/land std_msgs/Empty");