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

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
    }
}