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 Summary
Modifier and TypeMethodDescriptionvoidaddListener(NodeListener listener) Add a newNodeListenerto theNode.voidexecuteCancellableLoop(CancellableLoop cancellableLoop) org.apache.commons.logging.LoggetLog()org.ros.message.MessageSerializationFactorygetName()org.ros.message.MessageFactoryorg.ros.message.MessageFactoryorg.ros.message.MessageFactorygetUri()voidStops and Clears node listeners.resolveName(String name) resolveName(GraphName name) Resolve the given name, using ROS conventions, into a full ROS namespace name.voidshutdown()Shut the node down.
-
Method Details
-
getName
GraphName getName()- Returns:
- the fully resolved name of this
Node, e.g. "/foo/bar/boop"
-
resolveName
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
- See Also:
-
getResolver
NodeNameResolver getResolver()- Returns:
NodeNameResolverfor this namespace
-
getUri
URI getUri() -
getMasterUri
URI getMasterUri()- Returns:
URIofMasterXmlRpcEndpointthat 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
MessageSerializationFactoryused by this node
-
getTopicMessageFactory
org.ros.message.MessageFactory getTopicMessageFactory()- Returns:
- the
MessageFactoryused by this node
-
getServiceResponseMessageFactory
org.ros.message.MessageFactory getServiceResponseMessageFactory()- Returns:
- the
MessageFactoryused by this node for service responses
-
getServiceRequestMessageFactory
org.ros.message.MessageFactory getServiceRequestMessageFactory()- Returns:
- the
MessageFactoryused by this node for service requests
-
addListener
Add a newNodeListenerto theNode.- Parameters:
listener- theNodeListenerto add
-
getScheduledExecutorService
ScheduledExecutorService getScheduledExecutorService()- Returns:
- the
ScheduledExecutorServicethat thisNodeuses
-
executeCancellableLoop
Executes aCancellableLoopusing theNode'sScheduledExecutorService. TheCancellableLoopwill be canceled when theNodestarts shutting down.Any blocking calls executed in the provided
CancellableLoopcan potentially delayNodeshutdown and should be avoided.- Parameters:
cancellableLoop- theCancellableLoopto execute
-
shutdown
void shutdown()Shut the node down. -
removeListeners
void removeListeners()Stops and Clears node listeners.
-