00001 package de.tum.in.fipm.kipm.util; 00002 00003 00004 public interface PrologObjVisInterface { 00005 00006 00007 00008 // 00009 // GENERAL CONVENTIONS 00010 // 00011 // - Object identifiers are of the form <url>#<local> 00012 // e.g. http://ias.cs.tum.edu/kb/ias_semantic_map.owl#cupboard1 00013 // 00014 // - events, actions, objects are transferred as string identifiers, 00015 // the java applet or the resp. object class then reads the information 00016 // it needs for visualisation (duration, positions, etc) by itself 00017 // 00018 // - information can be read with rdf_has(S, P, O), rdf_reachable(S, P, O) (exploits transitivity), 00019 // rdf_triple(S, P, O) (also calls computables), see also 00020 // http://www.swi-prolog.org/pldoc/package/semweb.html 00021 // 00022 // - pose sequences are of the form 00023 // P-(EPISODENR)-(OCCURRENCENR)-(INSTANCENR)-(TIME)-(BECX)-(BECY)-(BECZ)-(ULWX)-(ULWY)-(ULWZ)-(OLWX)-(OLWY)-(OLWZ)-(UBWX)-(UBWY)-(UBWZ)-(OBWX)-(OBWY)-(OBWZ)-(UHWX)-(UHWY)-(UHWZ)-(BRKX)-(BRKY)-(BRKZ)-(OHWX)-(OHWY)-(OHWZ)-(KOX)-(KOY)-(KOZ)-(SEHX)-(SEHY)-(SEHZ)-(OSLX)-(OSLY)-(OSLZ)-(USLX)-(USLY)-(USLZ)-(FULX)-(FULY)-(FULZ)-(FBLX)-(FBLY)-(FBLZ)-(OSRX)-(OSRY)-(OSRZ)-(USRX)-(USRY)-(USRZ)-(FURX)-(FURY)-(FURZ)-(FBRX)-(FBRY)-(FBRZ)-(SBLX)-(SBLY)-(SBLZ)-(OALX)-(OALY)-(OALZ)-(UALX)-(UALY)-(UALZ)-(HALX)-(HALY)-(HALZ)-(FILX)-(FILY)-(FILZ)-(SBRX)-(SBRY)-(SBRZ)-(OARX)-(OARY)-(OARZ)-(UARX)-(UARY)-(UARZ)-(HARX)-(HARY)-(HARZ)-(FIRX)-(FIRY)-(FIRZ) P-(EPISODENR)-(OCCURRENCENR)-(INSTANCENR)-(TIME)-(BECX)-(BECY)-(BECZ)-(ULWX)-(ULWY)-(ULWZ)-(OLWX)-(OLWY)-(OLWZ)-(UBWX)-(UBWY)-(UBWZ)-(OBWX)-(OBWY)-(OBWZ)-(UHWX)-(UHWY)-(UHWZ)-(BRKX)-(BRKY)-(BRKZ)-(OHWX)-(OHWY)-(OHWZ)-(KOX)-(KOY)-(KOZ)-(SEHX)-(SEHY)-(SEHZ)-(OSLX)-(OSLY)-(OSLZ)-(USLX)-(USLY)-(USLZ)-(FULX)-(FULY)-(FULZ)-(FBLX)-(FBLY)-(FBLZ)-(OSRX)-(OSRY)-(OSRZ)-(USRX)-(USRY)-(USRZ)-(FURX)-(FURY)-(FURZ)-(FBRX)-(FBRY)-(FBRZ)-(SBLX)-(SBLY)-(SBLZ)-(OALX)-(OALY)-(OALZ)-(UALX)-(UALY)-(UALZ)-(HALX)-(HALY)-(HALZ)-(FILX)-(FILY)-(FILZ)-(SBRX)-(SBRY)-(SBRZ)-(OARX)-(OARY)-(OARZ)-(UARX)-(UARY)-(UARZ)-(HARX)-(HARY)-(HARZ)-(FIRX)-(FIRY)-(FIRZ) 00024 // and thus an exception: in order to limit the amount of data to be transferred, 00025 // they already contain all information that is required for drawing the poses 00026 // 00027 // 00028 // - ignore if something that is to be added already exists 00029 // - clearHighlighting before highlighting a new something 00030 // 00031 // 00032 00033 00034 // add and highlight object (create if not there, highlight in any case) 00035 // position and dimensions: see KitchenVisApplet 00036 // type: rdf_has(O, rdf:type, T) 00037 void addObject(String obj); 00038 00039 00040 // add and highlight object and all its children 00041 // (read all objects that are linked via parts-relations) 00042 // 00043 // (rdf_reachable(Obj, knowrob:describedInMap, Parent)); 00044 // (rdf_reachable(A, knowrob:describedInMap, Parent),rdf_reachable(A, knowrob:properPhysicalPartTypes, Obj)) 00045 // 00046 void addObjectWithChildren(String obj); 00047 00048 00049 // highlight object if exists (do not create a new one) 00050 void highlightObject(String obj); 00051 00052 00053 // add action sequence, position the cursor to the beginning, draw human 00054 // format: see above 00055 void addActionSequence(String[] actionseq); 00056 00057 00058 // add door events that are shown when the resp. time is displayed 00059 // check type with rdf_has(Event, rdf:type, knowrob:OpeningADoor) or ...#ClosingADoor) 00060 // and read the door id using knowrob:objectActedOn (to be implemented) 00061 void addDoorEvents(String[] doorevents); 00062 00063 00064 // add object interactions 00065 // check type with rdf_has(Event, rdf:type, knowrob:PickingUpAnObject) or ...PuttingDownAnObject) 00066 // and further info using knowrob:objectActedOn (implemented), knowrob:toLocation, knowrob:fromLocation (to be implemented) 00067 void addManipulationActions(String[] manipactions); 00068 00069 00070 // set current time to T (jump inside the episode, show the state at time t as far as known) 00071 void setDisplayTime(float time); 00072 00073 00074 00076 // play functions? (low implementation priority) 00077 // 00078 void play(); 00079 00080 void playFromTime(float time); 00081 00082 void playFromStartTillEnd(float start, float end); 00083 00084 00085 00087 // clear buffers 00088 // 00089 00090 void clear(); 00091 00092 void clearHighlighting(); 00093 00094 void clearActions(); 00095 00096 void clearEvents(); 00097 00098 void clearObjects(); 00099 00100 }