enableMotor.cpp
Go to the documentation of this file.
00001 #include "ros/ros.h"
00002 #include "p2os_driver/MotorState.h"
00003 
00004 int main( int argc , char** argv )
00005 {
00006         ros::init( argc , argv , "enableMotor");
00007         ros::NodeHandle nodeHandle;
00008 
00009         ros::Publisher _publisher = nodeHandle.advertise<p2os_driver::MotorState>( "cmd_motor_state" , 10 );
00010         ros::Rate _loop( 10 );
00011         p2os_driver::MotorState enableFlag;
00012 
00013         enableFlag.state = 1;
00014         int count = 0;
00015         while( ros::ok() && ( count < 10 ) )
00016         {
00017                 
00018                 _publisher.publish( enableFlag );
00019                 _loop.sleep();
00020                 ++count;
00021         }
00022 
00023 
00024         return 0;
00025 }


p2os_enableMotor
Author(s): Sayan36055
autogenerated on Mon Oct 6 2014 08:35:18