Revision 4 as of 2009-07-29 22:31:51

Clear message

RosdocHeader(invent_client)

Package Summary

Provides an interface for the Willow Garage Inventory system, used by the life_test and qualification systems to automatically log assembly data into invent.

Package Proposal

This should be moved to wg-ros-pkg when that repository exists. It is for WG use primarily, and for future users of the PR2.

Invent Client API

The following is a summary of the functions currently needed for the invent API. The invent client has to be able to do simple tasks like upload attachments and set notes, but also more complicated things like functioning as a test database.

The following changes need to be made before the invent system can be used for processing Beta diagnostic logs. The deadline is 7/15/09 to allow time for testing.

Notes and Attachments

Allow user to set a note and retain its handle for editing (DONE). This can be in xTuple/Remarks/Comments.

int note_id = set_note(serial_number, note_text, note_id = None)
bool result = delete_note(note_id)
string text = get_note(note_id)
int[] note_ids = get_notes(serial_number)

Allow user to upload an attachment (can be any type), retain handle for removal and updating. Document with MIME type. Can just give it a URL. Need CRUDL, xTuple/Documents tab needs to work for serialized parts.

attachment_id = set_attachment(serial_number, attachment_file, attachment_id = None)

We need LCRUD for KeyValues, called Characteristics in xTuple.

Assembly Associations

Each major component has different subcomponents. Users need to figure out what type of component it is and get the subcomponents. ALL PROGRAMMATICALLY.

  • string description = get_assem_type(serial_number). Allows double checking of serial numbers. Outputs description.
  • string[] descriptions = get_subtypes(serial_number, recursive = False) -> List of subtypes (Full arm has upper arm, wrist, shoulder). Recursive lists grand^n children.

  • get_component(serial_number, description) When given a reference and a type name, it returns the serial of the component in that type

shoulder_ref = get_component(68-04178-01001, 'PR2_SHOULDER')
# Return None if no shoulder listed in the full_arm
}}

 * get_assembly(serial_number) Call it with parent's serial to get full tree. 
{{{
parent_serial_number = get_assembly(shoulder_ref)

This allows users to log test results for subcomponents, even if only the main component is scanned.

Device History

When processing diagnostic logs, it is important to be able to recall the history of moves of every part of the robot to compute use.

  • Modify the above get_component() and get_assembly() functions to have an optional date input. This will allow the user to see the configuration of that component on that date.
  • get_assembly_change_dates() All dates that the assembly has recorded any change in configuration
  • get_component_change_dates() All dates that the component has recorded any change in parent assembly

This will allow a precise record of move. The goal is to process .bag files of diagnostics by MCB serial numbers, and associate them with the correct assemblies, and other components (slip rings, etc).


[wiki:/Troubleshooting Troubleshooting]