Package org.ros.node
Class NodeConfiguration
java.lang.Object
org.ros.node.NodeConfiguration
Stores configuration information (e.g. ROS master URI) for
Nodes.- Author:
- ethan.rublee@gmail.com (Ethan Rublee), kwc@willowgarage.com (Ken Conley), damonkohler@google.com (Damon Kohler)
- See Also:
-
Field Summary
Fields -
Method Summary
Modifier and TypeMethodDescriptionstatic NodeConfigurationcopyOf(NodeConfiguration nodeConfiguration) org.ros.message.MessageSerializationFactoryThese ordered paths tell the ROS system where to search for more ROS packages.org.ros.internal.message.service.ServiceDescriptionFactoryorg.ros.message.MessageFactoryorg.ros.message.MessageFactoryorg.ros.internal.message.topic.TopicDescriptionFactoryorg.ros.message.MessageFactorystatic NodeConfigurationCreates a newNodeConfigurationfor aNodethat is only accessible on the local host.static NodeConfigurationnewPrivate(URI masterUri) Creates a newNodeConfigurationfor aNodethat is only accessible on the local host.static NodeConfigurationCreates a newNodeConfigurationfor a publicly accessibleNode.static NodeConfigurationCreates a newNodeConfigurationfor a publicly accessibleNode.setDefaultNodeName(String nodeName) Sets the name of theNodeif the name has not already been set.setDefaultNodeName(GraphName nodeName) Sets the name of theNodeif the name has not already been set.setMasterUri(URI masterUri) setMessageSerializationFactory(org.ros.message.MessageSerializationFactory messageSerializationFactory) setNodeName(String nodeName) setNodeName(GraphName nodeName) setParentResolver(NameResolver resolver) setRosPackagePath(List<File> rosPackagePath) These ordered paths tell the ROS system where to search for more ROS packages.setRosRoot(File rosRoot) setServiceDescriptionFactory(org.ros.internal.message.service.ServiceDescriptionFactory serviceDescriptionFactory) setServiceRequestMessageFactory(org.ros.internal.message.service.ServiceRequestMessageFactory serviceRequestMessageFactory) setServiceResponseMessageFactory(org.ros.internal.message.service.ServiceResponseMessageFactory serviceResponseMessageFactory) setTcpRosAdvertiseAddressFactory(AdvertiseAddressFactory tcpRosAdvertiseAddressFactory) setTcpRosBindAddress(BindAddress tcpRosBindAddress) setTimeProvider(TimeProvider timeProvider) Sets theTimeProviderthatNodes will use.setTopicDescriptionFactory(org.ros.internal.message.topic.TopicDescriptionFactory topicDescriptionFactory) setTopicMessageFactory(org.ros.message.MessageFactory topicMessageFactory) setXmlRpcAdvertiseAddressFactory(AdvertiseAddressFactory xmlRpcAdvertiseAddressFactory) setXmlRpcBindAddress(BindAddress xmlRpcBindAddress)
-
Field Details
-
DEFAULT_MASTER_URI
The default masterURI.
-
-
Method Details
-
copyOf
- Parameters:
nodeConfiguration- theNodeConfigurationto copy- Returns:
- a copy of the supplied
NodeConfiguration
-
newPublic
Creates a newNodeConfigurationfor a publicly accessibleNode.- Parameters:
host- the host that theNodewill run onmasterUri- theURIfor the master that theNodewill register with- Returns:
- a new
NodeConfigurationfor a publicly accessibleNode
-
newPublic
Creates a newNodeConfigurationfor a publicly accessibleNode.- Parameters:
host- the host that theNodewill run on- Returns:
- a new
NodeConfigurationfor a publicly accessibleNode
-
newPrivate
Creates a newNodeConfigurationfor aNodethat is only accessible on the local host.- Parameters:
masterUri- theURIfor the master that theNodewill register with- Returns:
- a new
NodeConfigurationfor a privateNode
-
newPrivate
Creates a newNodeConfigurationfor aNodethat is only accessible on the local host.- Returns:
- a new
NodeConfigurationfor a privateNode
-
getParentResolver
- Returns:
- the
NameResolverfor theNode's parent namespace
-
setParentResolver
- Parameters:
resolver- theNameResolverfor theNode's parent namespace- Returns:
- this
NodeConfiguration
-
getMasterUri
-
setMasterUri
- Parameters:
masterUri- theURIof the master that theNodewill register with- Returns:
- this
NodeConfiguration - See Also:
-
getRosRoot
- Returns:
- the location where the ROS core packages are installed
- See Also:
-
setRosRoot
- Parameters:
rosRoot- the location where the ROS core packages are installed- Returns:
- this
NodeConfiguration - See Also:
-
getRosPackagePath
These ordered paths tell the ROS system where to search for more ROS packages. If there are multiple packages of the same name, ROS will choose the one that appears in theListfirst.- Returns:
- the
Listof paths where the system will look for ROS packages - See Also:
-
setRosPackagePath
These ordered paths tell the ROS system where to search for more ROS packages. If there are multiple packages of the same name, ROS will choose the one that appears in theListfirst.- Parameters:
rosPackagePath- theListof paths where the system will look for ROS packages- Returns:
- this
NodeConfiguration - See Also:
-
getNodeName
- Returns:
- the name of the
Node
-
setNodeName
- Parameters:
nodeName- the name of theNode- Returns:
- this
NodeConfiguration
-
setNodeName
- Parameters:
nodeName- the name of theNode- Returns:
- this
NodeConfiguration
-
setDefaultNodeName
Sets the name of theNodeif the name has not already been set.- Parameters:
nodeName- the name of theNode- Returns:
- this
NodeConfiguration
-
setDefaultNodeName
Sets the name of theNodeif the name has not already been set.- Parameters:
nodeName- the name of theNode- Returns:
- this
NodeConfiguration
-
getMessageSerializationFactory
public org.ros.message.MessageSerializationFactory getMessageSerializationFactory()- Returns:
- the
MessageSerializationFactoryfor theNode
-
setMessageSerializationFactory
public NodeConfiguration setMessageSerializationFactory(org.ros.message.MessageSerializationFactory messageSerializationFactory) - Parameters:
messageSerializationFactory- theMessageSerializationFactoryfor theNode- Returns:
- this
NodeConfiguration
-
setTopicMessageFactory
- Parameters:
topicMessageFactory- theMessageFactoryfor theNode- Returns:
- this
NodeConfiguration
-
getTopicMessageFactory
public org.ros.message.MessageFactory getTopicMessageFactory() -
setServiceRequestMessageFactory
public NodeConfiguration setServiceRequestMessageFactory(org.ros.internal.message.service.ServiceRequestMessageFactory serviceRequestMessageFactory) - Parameters:
serviceRequestMessageFactory- theServiceRequestMessageFactoryfor theNode- Returns:
- this
NodeConfiguration
-
getServiceRequestMessageFactory
public org.ros.message.MessageFactory getServiceRequestMessageFactory() -
setServiceResponseMessageFactory
public NodeConfiguration setServiceResponseMessageFactory(org.ros.internal.message.service.ServiceResponseMessageFactory serviceResponseMessageFactory) - Parameters:
serviceResponseMessageFactory- theServiceResponseMessageFactoryfor theNode- Returns:
- this
NodeConfiguration
-
getServiceResponseMessageFactory
public org.ros.message.MessageFactory getServiceResponseMessageFactory() -
setTopicDescriptionFactory
public NodeConfiguration setTopicDescriptionFactory(org.ros.internal.message.topic.TopicDescriptionFactory topicDescriptionFactory) - Parameters:
topicDescriptionFactory- theTopicDescriptionFactoryfor theNode- Returns:
- this
NodeConfiguration
-
getTopicDescriptionFactory
public org.ros.internal.message.topic.TopicDescriptionFactory getTopicDescriptionFactory() -
setServiceDescriptionFactory
public NodeConfiguration setServiceDescriptionFactory(org.ros.internal.message.service.ServiceDescriptionFactory serviceDescriptionFactory) - Parameters:
serviceDescriptionFactory- theServiceDescriptionFactoryfor theNode- Returns:
- this
NodeConfiguration
-
getServiceDescriptionFactory
public org.ros.internal.message.service.ServiceDescriptionFactory getServiceDescriptionFactory() -
getTcpRosBindAddress
- Returns:
- the
BindAddressfor theNode's TCPROS server - See Also:
-
setTcpRosBindAddress
- Parameters:
tcpRosBindAddress- theBindAddressfor theNode's TCPROS server- See Also:
-
getTcpRosAdvertiseAddressFactory
- Returns:
- the
AdvertiseAddressFactoryfor theNode's TCPROS server - See Also:
-
setTcpRosAdvertiseAddressFactory
public NodeConfiguration setTcpRosAdvertiseAddressFactory(AdvertiseAddressFactory tcpRosAdvertiseAddressFactory) - Parameters:
tcpRosAdvertiseAddressFactory- theAdvertiseAddressFactoryfor theNode's TCPROS server- Returns:
- this
NodeConfiguration - See Also:
-
getTcpRosAdvertiseAddress
- Returns:
- the
AdvertiseAddressfor theNode's TCPROS server - See Also:
-
getXmlRpcBindAddress
- Returns:
- the
BindAddressfor theNode's XML-RPC server - See Also:
-
setXmlRpcBindAddress
- Parameters:
xmlRpcBindAddress- theBindAddressfor theNode's XML-RPC server- See Also:
-
getXmlRpcAdvertiseAddress
- Returns:
- the
AdvertiseAddressfor theNode's XML-RPC server - See Also:
-
getXmlRpcAdvertiseAddressFactory
- Returns:
- the
AdvertiseAddressFactoryfor theNode's XML-RPC server - See Also:
-
setXmlRpcAdvertiseAddressFactory
public NodeConfiguration setXmlRpcAdvertiseAddressFactory(AdvertiseAddressFactory xmlRpcAdvertiseAddressFactory) - Parameters:
xmlRpcAdvertiseAddressFactory- theAdvertiseAddressFactoryfor theNode's XML-RPC server- See Also:
-
getTimeProvider
- Returns:
- the configured
TimeProvider
-
setTimeProvider
- Parameters:
timeProvider- theTimeProviderthatNodes will use
-