Public Member Functions | Public Attributes | Private Attributes
bridge_server.GenericActionServer Class Reference

The GenericActionServer will launch a ROS node that blocks until a dedicated action request is made by the robot, such as 'OpenDoor'. More...

List of all members.

Public Member Functions

def __init__
 Constructor for a GenericActionServer.
def execute_cb
 Callback function that monitors the machine tool action sequence for 'ACTIVE', 'COMPLETE', and 'READY' data item states.
def setup_topic_data
 This function imports the topic package and creates an action server for each package specified in the configuration file.
def xml_callback
 Processes the xml chunk provided by the LongPull class instance and stores the result into the XML_queue since the tags have changed.

Public Attributes

 action_list
 adapter
 capture_xml
 config
 conn
 di_dict
 lib_manifests
 msg_parameters
 mtool
 ns
 port
 server_name
 type_handle
 url
 url_port
 XML_queue

Private Attributes

 _as
 _resultDict

Detailed Description

The GenericActionServer will launch a ROS node that blocks until a dedicated action request is made by the robot, such as 'OpenDoor'.

Once a request is received, the callback function will monitor the machine tool and complete the 'READY' handshake before returning the request result to the dedicated action client.

Dedicated action client data items are specified by a configuration file that must be included with the main program during execution. If this file is not provided, the node will terminate with an error message indicating the need for this file.

Command line example:

bridge_server.py -i bridge_server_config.yaml bridge_server.py -input bridge_server_config.yaml

The class contains the following methods: setup_topic_data -- sets up class instance variables. execute_cb -- triggered by a ROS action client, monitors machine tool response sequence and submits 'READY' handshake. xml_callback -- parses xml stream and stores xml into a data queue.

Definition at line 70 of file bridge_server.py.


Constructor & Destructor Documentation

Constructor for a GenericActionServer.

Definition at line 72 of file bridge_server.py.


Member Function Documentation

Callback function that monitors the machine tool action sequence for 'ACTIVE', 'COMPLETE', and 'READY' data item states.

Once the machine tool is completed with the requested action and sends the machine tool 'READY' signal, the ROS action server returns set_succeeded to the ROS action client that requested the action.

Parameters:
goal,:from action client, class instance of the data item action goal, i.e. goal = mtconnect_msgs.msg.OpenDoorGoal()

Definition at line 195 of file bridge_server.py.

This function imports the topic package and creates an action server for each package specified in the configuration file.

Data is stored in the following class attributes:

self.lib_manifests --> used to track which manifests have been loaded self.type_handle --> used for ROS SimpleActionClient, stores package name with action messages self.action_list --> used for ROS SimpleActionClient, stores CNC action request strings self.server_name --> dictionary of data_item:DataItem pairs in str:str format self._resultDict --> dictionary of result class instances, i.e. {'MaterialLoad':mtconnect_msgs.msg._MaterialLoadResult.MaterialLoadResult()} self._as --> dictionary of ROS action servers referenced by DataItem

Definition at line 154 of file bridge_server.py.

Processes the xml chunk provided by the LongPull class instance and stores the result into the XML_queue since the tags have changed.

The queue is used to ensure capture of updated tags while the execute_cb function is being executed.

Parameters:
chunk,:xml data, read from response.read()

Definition at line 300 of file bridge_server.py.


Member Data Documentation

Definition at line 72 of file bridge_server.py.

Definition at line 72 of file bridge_server.py.

Definition at line 72 of file bridge_server.py.

Definition at line 72 of file bridge_server.py.

Definition at line 72 of file bridge_server.py.

Definition at line 72 of file bridge_server.py.

Definition at line 72 of file bridge_server.py.

Definition at line 72 of file bridge_server.py.

Definition at line 72 of file bridge_server.py.

Definition at line 72 of file bridge_server.py.

Definition at line 72 of file bridge_server.py.

Definition at line 72 of file bridge_server.py.

Definition at line 72 of file bridge_server.py.

Definition at line 72 of file bridge_server.py.

Definition at line 72 of file bridge_server.py.

Definition at line 72 of file bridge_server.py.

Definition at line 72 of file bridge_server.py.

Definition at line 72 of file bridge_server.py.


The documentation for this class was generated from the following file:


mtconnect_ros_bridge
Author(s): Stephen L. Wiedmann
autogenerated on Mon Jan 6 2014 11:30:45