Module master

Collection of functions to query information about the ROS master

Functions

execute (method, request, wait_for_master) Execute an XMLRPC call on the master.
getHost () Get the hostname where the master runs.
getPort () Get the port where the master runs.
getURI () Get the full URI to the master (eg.
check () Check if the master is running.
getTopics ([output]) Get the list of topics that are being published by all nodes.
getNodes ([output]) Retreives the currently-known list of nodes from the master.
setRetryTimeout (_1[, _2]) Set the max time this node should spend looping trying to connect to the master.


Functions

execute (method, request, wait_for_master)
Execute an XMLRPC call on the master.

Parameters:

  • method string The RPC method to invoke
  • request std.Variable
    The arguments to the RPC call
    
  • wait_for_master bool Whether or not this call should loop until it can contact the master

Returns:

  1. bool result true if the master is available, false otherwise.
  2. std.Variable response The resonse that was received.
  3. std.Variable payload The payload that was received.
getHost ()
Get the hostname where the master runs.

Returns:

    string The master's hostname
getPort ()
Get the port where the master runs.

Returns:

    string The master's port.
getURI ()
Get the full URI to the master (eg. http://host:port/).

Returns:

    string The URI of the master
check ()
Check if the master is running. This method tries to contact the master. You can call it any time after ros::init has been called. The intended usage is to check whether the master is up before trying to make other requests (subscriptions, advertisements, etc.).

Returns:

    bool true if the master is available, false otherwise.
getTopics ([output])
Get the list of topics that are being published by all nodes.

Parameters:

  • output std.VariableTable Will be filled the the topic names. If parameter is not present, the table will be created by the function (optional)

Returns:

    std.VariableTable Table containing the names of all topics
getNodes ([output])
Retreives the currently-known list of nodes from the master.

Parameters:

  • output std.StringVector Will be filled with the list of nodes. If parameter is not present, the object will be created by this function (optional)

Returns:

    std.StringVector List of nodes
setRetryTimeout (_1[, _2])
Set the max time this node should spend looping trying to connect to the master.

Parameters:

  • _1 number or ros.Duration If number: time duration in secons, fractional number possible
  • _2 number If present, _1 represends the seconds and _2 represends the nanoseconds (optional)
generated by LDoc 1.4.3 Last updated 2016-06-18 21:52:32