ROS Resources: Documentation | Support | Discussion Forum | Index | Service Status | ros @ Robotics Stack Exchange |
1 | initial version |
This is a Java question; it has nothing to do with rosjava.
The code inside CancellableLoop
has to be inside a method, not in the body of the subclass you are creating; see this answer: https://stackoverflow.com/questions/10559539/java-identifier-expected.
That should be
connectedNode.executeCancellableLoop(new CancellableLoop() {
@Override
public void run() {
// Your code has to be here
}
}