aztarna.ros.ros package

Submodules

aztarna.ros.ros.helpers module

ROS Scanner helper module.

:author Alias Robotics SL (https://aliasrobotics.com)

class aztarna.ros.ros.helpers.Node(name)[source]

Bases: aztarna.ros.commons.BaseNodeROS

Node class, an extension of the BaseNodeROS

class aztarna.ros.ros.helpers.ROSHost(address, port)[source]

Bases: aztarna.ros.commons.BaseHostROS

Class for keeping all the attributes of a ROS Node.Extends:class:aztarna.commons.BaseHostROS

class aztarna.ros.ros.helpers.Service(name)[source]

Bases: aztarna.ros.commons.BaseServiceROS

Service class, an extension of BaseServiceROS

class aztarna.ros.ros.helpers.Topic(name, topic_type)[source]

Bases: aztarna.ros.commons.BaseNodeROS

Topic class, an extension of BaseNodeROS

aztarna.ros.ros.scanner module

ROS Scanner module.

:author Alias Robotics SL (https://aliasrobotics.com)

class aztarna.ros.ros.scanner.ROSScanner[source]

Bases: aztarna.commons.RobotAdapter

ROSScanner class, an extension of BaseScanner for ROS.

analyze_nodes(address, port)[source]

Scan a node and gather all its data including topics, services and Communications.

Parameters
  • address – address of the ROS master

  • port – port of the ROS master

static analyze_topic_types(ros_master_client)[source]

Extract topic from ROS Master and disassemble them into topic name and topic type.

Parameters

ros_master_client – xml-rpc object for the ROS Master Client

Returns

A dictionary of topics. Key is the topic name and value the topic type

extract_nodes(source_array, topics, pub_or_sub, host)[source]

From all the data ROS Master returns, extract just the node info.

Parameters
  • source_array – A multiple level array containing data from the the ROS system state

  • topics – A list of all topics found in the ROS system

  • pub_or_sub – A boolean to separate publisher and subscriber nodes

  • host – Current ROS host

extract_services(source_array, host)[source]

Extract the services from the ROS system state.

Parameters
  • source_array – A multiple level array containing data from the the ROS system state

  • host – Current ROS host

static get_create_node(node_name, host)[source]

Generate new aztarna.ros.helpers.Node objects, and if they exist just return them.

Parameters
  • node_name – The name of the node to create or return

  • host – Current ROS host

Returns

The newly created node or an existing that matches node_name

print_results()[source]

Print the information of a ROS system.

scan()[source]

Call to aztarna.ros.scanner.scan_network() asynchronously

scan_network()[source]

Scan the provided network (from args) searching for ROS nodes.

scan_pipe()[source]
scan_pipe_main()[source]
set_xmlrpcuri_node(ros_master_client, host)[source]

Once all node data is collected, set the xml.

Parameters

ros_master_client – xml-rpc object for the ROS Master Client

write_to_file(out_file)[source]

Write the information of a ROS system into the provided file.

Parameters

out_file – The file where to write the results

Module contents