ROS Resources: Documentation | Support | Discussion Forum | Index | Service Status | ros @ Robotics Stack Exchange |
1 | initial version |
You're calling ros::spin() first, which blocks, so you code isn't run.
2 | No.2 Revision |
You're calling ros::spin() first, which blocks, so you code isn't run.
The rest of your code doesn't seem ROS related, so if that doesn't work, you should seek out other sources.