public interface ConnectedNode extends Node
A ConnectedNode serves as a factory for:
| Modifier and Type | Method and Description |
|---|---|
org.ros.message.Time |
getCurrentTime()
In ROS, time can be wallclock (actual) or simulated, so it is important to
use
getCurrentTime() instead of using the standard
Java routines for determining the current time. |
ParameterTree |
getParameterTree()
Create a
ParameterTree to query and set parameters on the ROS
parameter server. |
<T,S> ServiceServer<T,S> |
getServiceServer(GraphName serviceName) |
<T,S> ServiceServer<T,S> |
getServiceServer(java.lang.String serviceName) |
java.net.URI |
lookupServiceUri(GraphName serviceName) |
java.net.URI |
lookupServiceUri(java.lang.String serviceName) |
<T> Publisher<T> |
newPublisher(GraphName topicName,
java.lang.String messageType) |
<T> Publisher<T> |
newPublisher(java.lang.String topicName,
java.lang.String messageType) |
<T,S> ServiceClient<T,S> |
newServiceClient(GraphName serviceName,
java.lang.String serviceType)
Create a
ServiceClient. |
<T,S> ServiceClient<T,S> |
newServiceClient(java.lang.String serviceName,
java.lang.String serviceType) |
<T,S> ServiceServer<T,S> |
newServiceServer(GraphName serviceName,
java.lang.String serviceType,
ServiceResponseBuilder<T,S> serviceResponseBuilder)
Create a new
ServiceServer. |
<T,S> ServiceServer<T,S> |
newServiceServer(java.lang.String serviceName,
java.lang.String serviceType,
ServiceResponseBuilder<T,S> serviceResponseBuilder) |
<T> Subscriber<T> |
newSubscriber(GraphName topicName,
java.lang.String messageType) |
<T> Subscriber<T> |
newSubscriber(java.lang.String topicName,
java.lang.String messageType) |
addListener, executeCancellableLoop, getLog, getMasterUri, getMessageSerializationFactory, getName, getResolver, getScheduledExecutorService, getServiceRequestMessageFactory, getServiceResponseMessageFactory, getTopicMessageFactory, getUri, resolveName, resolveName, shutdownorg.ros.message.Time getCurrentTime()
getCurrentTime() instead of using the standard
Java routines for determining the current time.<T> Publisher<T> newPublisher(GraphName topicName, java.lang.String messageType)
T - the message type to create the publisher fortopicName - the topic name, will be pushed down under this namespace unless
'/' is prepended.messageType - the message data type (e.g. "std_msgs/String")Publisher for the specified topic<T> Publisher<T> newPublisher(java.lang.String topicName, java.lang.String messageType)
newPublisher(GraphName, String)<T> Subscriber<T> newSubscriber(GraphName topicName, java.lang.String messageType)
T - the message type to create the Subscriber fortopicName - the topic name to be subscribed to, this will be auto resolvedmessageType - the message data type (e.g. "std_msgs/String")Subscriber for the specified topic<T> Subscriber<T> newSubscriber(java.lang.String topicName, java.lang.String messageType)
newSubscriber(GraphName, String)<T,S> ServiceServer<T,S> newServiceServer(GraphName serviceName, java.lang.String serviceType, ServiceResponseBuilder<T,S> serviceResponseBuilder)
ServiceServer.serviceName - the name of the serviceserviceType - the type of the service (e.g. "rosjava_test_msgs/AddTwoInts")serviceResponseBuilder - called for every request to build a responseServiceServer<T,S> ServiceServer<T,S> newServiceServer(java.lang.String serviceName, java.lang.String serviceType, ServiceResponseBuilder<T,S> serviceResponseBuilder)
<T,S> ServiceServer<T,S> getServiceServer(GraphName serviceName)
serviceName - the GraphName of the ServiceServerServiceServer with the given name or null if it
does not exist<T,S> ServiceServer<T,S> getServiceServer(java.lang.String serviceName)
getServiceServer(GraphName)java.net.URI lookupServiceUri(GraphName serviceName)
serviceName - the GraphName of the service URI to lookupURI of the service or null if it does not existjava.net.URI lookupServiceUri(java.lang.String serviceName)
lookupServiceUri(GraphName)<T,S> ServiceClient<T,S> newServiceClient(GraphName serviceName, java.lang.String serviceType) throws ServiceNotFoundException
ServiceClient.serviceName - the name of the serviceserviceType - the type of the service (e.g. "rosjava_test_msgs/AddTwoInts")ServiceClientServiceNotFoundException - thrown if no matching service could be found<T,S> ServiceClient<T,S> newServiceClient(java.lang.String serviceName, java.lang.String serviceType) throws ServiceNotFoundException
ServiceNotFoundExceptionnewServiceClient(GraphName, String)ParameterTree getParameterTree()
ParameterTree to query and set parameters on the ROS
parameter server.ParameterTree with NameResolver in this namespace.