Package roshlaunch :: Module core :: Class Node
[frames] | no frames]

Class Node

source code

object --+
         |
        Node

Data structure for storing information about a desired node in the ROS system Corresponds to the 'node' tag in the launch specification.

Instance Methods
 
__init__(self, package, node_type, name=None, namespace='/', machine_name=None, args='', respawn=False, remap_args=None, env_args=None, output=None, cwd=None, launch_prefix=None, required=False, filename='<unknown>')
x.__init__(...) initializes x; see help(type(x)) for signature
source code
 
xmltype(self) source code
 
xmlattrs(self) source code
str
to_xml(self)
convert representation into XML representation.
source code
str
to_remote_xml(self)
convert representation into remote representation.
source code

Inherited from object: __delattr__, __format__, __getattribute__, __hash__, __new__, __reduce__, __reduce_ex__, __repr__, __setattr__, __sizeof__, __str__, __subclasshook__

Properties

Inherited from object: __class__

Method Details

__init__(self, package, node_type, name=None, namespace='/', machine_name=None, args='', respawn=False, remap_args=None, env_args=None, output=None, cwd=None, launch_prefix=None, required=False, filename='<unknown>')
(Constructor)

source code 

x.__init__(...) initializes x; see help(type(x)) for signature

Parameters:
  • package (str) - node package name
  • node_type (str) - node type
  • name (str) - node name
  • namespace (str) - namespace for node
  • machine_name (str) - name of machine to run node on
  • args (str) - argument string to pass to node executable
  • respawn (bool) - if True, respawn node if it dies
  • remap_args ([(str, str)]:) - list of [(from, to)] remapping arguments
  • env_args ([(str, str)]) - list of [(key, value)] of additional environment vars to set for node
  • output (str) - where to log output to, either Node, 'screen' or 'log'
  • cwd (str) - current working directory of node, either 'node', 'ROS_HOME' or 'ros-root'. Default: ROS_HOME
  • launch_prefix (str) - launch command/arguments to prepend to node executable arguments
  • required (bool) - node is required to stay running (launch fails if node dies)
  • filename (str) - name of file Node was parsed from
Raises:
  • ValueError - if parameters do not validate
Overrides: object.__init__

to_xml(self)

source code 

convert representation into XML representation. Currently cannot represent private parameters.

Returns: str
XML representation for remote machine

to_remote_xml(self)

source code 

convert representation into remote representation. Remote representation does not include parameter settings or 'machine' attribute

Returns: str
XML representation for remote machine