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
while(ros::ok())
{
    ROS_INFO("position of wheel1:[%d]",right);
}

Your program reach this loop and do nothing else than ROS_INFO. ROS doesn't process any callback if spin or spinOnce isn't called so you need to put the line ros::spinOnce() in your loop.