Package org.ros.node

Interface Node

All Known Subinterfaces:
ConnectedNode
All Known Implementing Classes:
DefaultNode

public interface Node
A node in the ROS graph.
Author:
khughes@google.com (Keith M. Hughes)
  • Method Details

    • getName

      GraphName getName()
      Returns:
      the fully resolved name of this Node, e.g. "/foo/bar/boop"
    • resolveName

      GraphName resolveName(GraphName name)
      Resolve the given name, using ROS conventions, into a full ROS namespace name. Will be relative to the current namespace unless the name is global.
      Parameters:
      name - the name to resolve
      Returns:
      fully resolved ros namespace name
    • resolveName

      GraphName resolveName(String name)
      See Also:
    • getResolver

      NodeNameResolver getResolver()
      Returns:
      NodeNameResolver for this namespace
    • getUri

      URI getUri()
      Returns:
      the URI of this Node
    • getMasterUri

      URI getMasterUri()
      Returns:
      URI of MasterXmlRpcEndpoint that this node is attached to.
    • getLog

      org.apache.commons.logging.Log getLog()
      Returns:
      Logger for this node, which will also perform logging to /rosout.
    • getMessageSerializationFactory

      org.ros.message.MessageSerializationFactory getMessageSerializationFactory()
      Returns:
      the MessageSerializationFactory used by this node
    • getTopicMessageFactory

      org.ros.message.MessageFactory getTopicMessageFactory()
      Returns:
      the MessageFactory used by this node
    • getServiceResponseMessageFactory

      org.ros.message.MessageFactory getServiceResponseMessageFactory()
      Returns:
      the MessageFactory used by this node for service responses
    • getServiceRequestMessageFactory

      org.ros.message.MessageFactory getServiceRequestMessageFactory()
      Returns:
      the MessageFactory used by this node for service requests
    • addListener

      void addListener(NodeListener listener)
      Add a new NodeListener to the Node.
      Parameters:
      listener - the NodeListener to add
    • getScheduledExecutorService

      ScheduledExecutorService getScheduledExecutorService()
      Returns:
      the ScheduledExecutorService that this Node uses
    • executeCancellableLoop

      void executeCancellableLoop(CancellableLoop cancellableLoop)
      Executes a CancellableLoop using the Node's ScheduledExecutorService. The CancellableLoop will be canceled when the Node starts shutting down.

      Any blocking calls executed in the provided CancellableLoop can potentially delay Node shutdown and should be avoided.

      Parameters:
      cancellableLoop - the CancellableLoop to execute
    • shutdown

      void shutdown()
      Shut the node down.
    • removeListeners

      void removeListeners()
      Stops and Clears node listeners.