ideas from arc about the corba fl interface interface ideas learned from k9 and k10 (lorenzo) corba...
TRANSCRIPT
![Page 1: Ideas from ARC about the CORBA FL interface Interface ideas learned from K9 and K10 (Lorenzo) CORBA usage and wrapping ideas learned from MIRO (Hans)](https://reader036.vdocument.in/reader036/viewer/2022070413/5697bfb91a28abf838c9fb84/html5/thumbnails/1.jpg)
Ideas from ARC about the CORBA FL interface
Interface ideas learned from K9 and K10 (Lorenzo)
CORBA usage and wrapping ideas learned from MIRO (Hans)
![Page 2: Ideas from ARC about the CORBA FL interface Interface ideas learned from K9 and K10 (Lorenzo) CORBA usage and wrapping ideas learned from MIRO (Hans)](https://reader036.vdocument.in/reader036/viewer/2022070413/5697bfb91a28abf838c9fb84/html5/thumbnails/2.jpg)
Generic Robot Interfaces (GRI)• Object-Oriented to be modular and applied to
various scenarios• Comes with detailed documentation for
unambiguous usage by multiple users• End-User focused (“PanTilt” rather than
“CtrlMotor”, etc.)• Do not provide extra functions not supported
by represented objects (like “track object” in the camera interface)
• Close to CLARAty modules and capabilities• Supports functionalities of K9client, I_K10,
RoverCommander and scalable
![Page 3: Ideas from ARC about the CORBA FL interface Interface ideas learned from K9 and K10 (Lorenzo) CORBA usage and wrapping ideas learned from MIRO (Hans)](https://reader036.vdocument.in/reader036/viewer/2022070413/5697bfb91a28abf838c9fb84/html5/thumbnails/3.jpg)
GRI usage in IRG
Currently refining the interface, will submit soon proposition to JPL
Experiment on K10 and replace current ICE network link
Replace K9client with CORBA & GRI (CLARAty DL/FL compatible)
Use GRI inside the Rover Controller itself for better component approach
T
![Page 4: Ideas from ARC about the CORBA FL interface Interface ideas learned from K9 and K10 (Lorenzo) CORBA usage and wrapping ideas learned from MIRO (Hans)](https://reader036.vdocument.in/reader036/viewer/2022070413/5697bfb91a28abf838c9fb84/html5/thumbnails/4.jpg)
High Level Subsystems
![Page 5: Ideas from ARC about the CORBA FL interface Interface ideas learned from K9 and K10 (Lorenzo) CORBA usage and wrapping ideas learned from MIRO (Hans)](https://reader036.vdocument.in/reader036/viewer/2022070413/5697bfb91a28abf838c9fb84/html5/thumbnails/5.jpg)
Access to Devices
![Page 6: Ideas from ARC about the CORBA FL interface Interface ideas learned from K9 and K10 (Lorenzo) CORBA usage and wrapping ideas learned from MIRO (Hans)](https://reader036.vdocument.in/reader036/viewer/2022070413/5697bfb91a28abf838c9fb84/html5/thumbnails/6.jpg)
Data structures for Telemetry(Using Notification Service)
![Page 7: Ideas from ARC about the CORBA FL interface Interface ideas learned from K9 and K10 (Lorenzo) CORBA usage and wrapping ideas learned from MIRO (Hans)](https://reader036.vdocument.in/reader036/viewer/2022070413/5697bfb91a28abf838c9fb84/html5/thumbnails/7.jpg)
Supporting Types
![Page 8: Ideas from ARC about the CORBA FL interface Interface ideas learned from K9 and K10 (Lorenzo) CORBA usage and wrapping ideas learned from MIRO (Hans)](https://reader036.vdocument.in/reader036/viewer/2022070413/5697bfb91a28abf838c9fb84/html5/thumbnails/8.jpg)
Lessons from CORBA in other projects (MIRO)
• CORBA offers more than IPC.
• Valuable CORBA features:– Naming Service– Notification Service– Asynchronous Method Invocation
![Page 9: Ideas from ARC about the CORBA FL interface Interface ideas learned from K9 and K10 (Lorenzo) CORBA usage and wrapping ideas learned from MIRO (Hans)](https://reader036.vdocument.in/reader036/viewer/2022070413/5697bfb91a28abf838c9fb84/html5/thumbnails/9.jpg)
Naming Service
Getting a reference (IOR) to a remote object.• Ad hoc: store in file, exchange via scp.• Object tree: Top level object provides
accessors for child interfaces / objects.• Naming Service: provides a map of names to
object references– Makes “top-level” interface unnecessary.– Structuring of name space possible
(subdirectories).
![Page 10: Ideas from ARC about the CORBA FL interface Interface ideas learned from K9 and K10 (Lorenzo) CORBA usage and wrapping ideas learned from MIRO (Hans)](https://reader036.vdocument.in/reader036/viewer/2022070413/5697bfb91a28abf838c9fb84/html5/thumbnails/10.jpg)
disc disc
client
scp
object 1object 2
object 3
?
disc disc
client
scp
object 1
object 2
object 3
Name ServiceName 1,Name 2,Name 3,
…
disc disc
client
scp
object 1
object 2
object 3
1. Ad hoc
2. Object Tree
3. Naming Service
1.
2.
3.
Object Reference Acquisition
![Page 11: Ideas from ARC about the CORBA FL interface Interface ideas learned from K9 and K10 (Lorenzo) CORBA usage and wrapping ideas learned from MIRO (Hans)](https://reader036.vdocument.in/reader036/viewer/2022070413/5697bfb91a28abf838c9fb84/html5/thumbnails/11.jpg)
Rather than using a hierarchy of interfaces (with brittle IDL), extensively advertising objects through the Naming Service keeps interfaces independent.
But it does require documenting object names outside of IDL.
![Page 12: Ideas from ARC about the CORBA FL interface Interface ideas learned from K9 and K10 (Lorenzo) CORBA usage and wrapping ideas learned from MIRO (Hans)](https://reader036.vdocument.in/reader036/viewer/2022070413/5697bfb91a28abf838c9fb84/html5/thumbnails/12.jpg)
Notification Service
• Subscription management (header):– domain_name: robot name– type_name: event name
• Instance based event filtering (filterable_data):– Constraint language.
• Payload (remainder_of_body):– Telemetry
– Perception results …
![Page 13: Ideas from ARC about the CORBA FL interface Interface ideas learned from K9 and K10 (Lorenzo) CORBA usage and wrapping ideas learned from MIRO (Hans)](https://reader036.vdocument.in/reader036/viewer/2022070413/5697bfb91a28abf838c9fb84/html5/thumbnails/13.jpg)
Asynchronous Message Invocation (AMI)
Problem:• Many physical operations take time.• Clients (i.e. DL) mostly require non-blocking
semantics.• But not always.AMI Solution:• Allowing to call a blocking operation as a non-
blocking one.• No changes on the server side required.• Client can use both access methods.
![Page 14: Ideas from ARC about the CORBA FL interface Interface ideas learned from K9 and K10 (Lorenzo) CORBA usage and wrapping ideas learned from MIRO (Hans)](https://reader036.vdocument.in/reader036/viewer/2022070413/5697bfb91a28abf838c9fb84/html5/thumbnails/14.jpg)
Blocking Method Call(Direct CORBA)
![Page 15: Ideas from ARC about the CORBA FL interface Interface ideas learned from K9 and K10 (Lorenzo) CORBA usage and wrapping ideas learned from MIRO (Hans)](https://reader036.vdocument.in/reader036/viewer/2022070413/5697bfb91a28abf838c9fb84/html5/thumbnails/15.jpg)
Non-Blocking Method Call(Using AMI)
![Page 16: Ideas from ARC about the CORBA FL interface Interface ideas learned from K9 and K10 (Lorenzo) CORBA usage and wrapping ideas learned from MIRO (Hans)](https://reader036.vdocument.in/reader036/viewer/2022070413/5697bfb91a28abf838c9fb84/html5/thumbnails/16.jpg)
Client/Server Helper Classes
• Provide default configuration of the ORB• Generic helper methods
– Name Service operations– …
• Ease common operations– Object reference acquisition– Servant handling– AMI operations
![Page 17: Ideas from ARC about the CORBA FL interface Interface ideas learned from K9 and K10 (Lorenzo) CORBA usage and wrapping ideas learned from MIRO (Hans)](https://reader036.vdocument.in/reader036/viewer/2022070413/5697bfb91a28abf838c9fb84/html5/thumbnails/17.jpg)
Client Side Wrappers
Hiding CORBA• Development
overhead:– Coding overhead– Debugging overhead
• Usage overhead:– Runtime overhead– Another possible
place to look for errors
Keeping CORBA optional• Cumbersome for non-
trivial interfaces:– Data structures– Exceptions
• Difficult for many features:– Naming Service ->
map<string, IOR>– Notification Service ->
reimplement a big spec?– AMI -> ???
![Page 18: Ideas from ARC about the CORBA FL interface Interface ideas learned from K9 and K10 (Lorenzo) CORBA usage and wrapping ideas learned from MIRO (Hans)](https://reader036.vdocument.in/reader036/viewer/2022070413/5697bfb91a28abf838c9fb84/html5/thumbnails/18.jpg)
Simple Client Example// simple IDL interfaceinterface Foo{ long bar(in long p);};
// simple c++ clientvoid main (int argc, char * argv[]) { IRG::Client client(argc, argv); // client helper class // IOR resolution helper method (naming service) Foo_var foo = client.resolveName<Foo>("FooInstance1");
int rc = foo->bar(2); // method invocation}
![Page 19: Ideas from ARC about the CORBA FL interface Interface ideas learned from K9 and K10 (Lorenzo) CORBA usage and wrapping ideas learned from MIRO (Hans)](https://reader036.vdocument.in/reader036/viewer/2022070413/5697bfb91a28abf838c9fb84/html5/thumbnails/19.jpg)
Simple Server Example
// servant implementationstruct FooImpl : public virtual POA_Foo { virtual int bar (int p) { return 2 * p; }};
// server implementationvoid main (int argc, char * argv[]) { IRG::Server server(argc, argv); // helper class FooImpl * foo_servant = new FooImpl(); // servant instance
// servant activation server.activate_named_object("FooInstance1", foo_servant);
server.run(); // server loop}
![Page 20: Ideas from ARC about the CORBA FL interface Interface ideas learned from K9 and K10 (Lorenzo) CORBA usage and wrapping ideas learned from MIRO (Hans)](https://reader036.vdocument.in/reader036/viewer/2022070413/5697bfb91a28abf838c9fb84/html5/thumbnails/20.jpg)
AMI Client Examplevoid main (int argc, char * argv[]) { IRG::Server server(argc, argv); // helper class server.detach() // background thread for callback Foo_var foo = server.resolveName<Foo>("FooInstance1");
// AMI helper class IRG::Ami_Helper<IRG::AMI_Foo_bar> helper; // asynchoronous invocation // passing the callback as first parameter foo->sendc_bar(helper.handler()->_this(), 2); ... // do something else while (!helper.finished()); // busy wait till finished helper.wait(); // or wait till finished int rc = helper.result(); // retrieve return value}
![Page 21: Ideas from ARC about the CORBA FL interface Interface ideas learned from K9 and K10 (Lorenzo) CORBA usage and wrapping ideas learned from MIRO (Hans)](https://reader036.vdocument.in/reader036/viewer/2022070413/5697bfb91a28abf838c9fb84/html5/thumbnails/21.jpg)
Summary• Keep interfaces compact, user-focused, well-
mapped to FL capabilities.• Use Naming Service for interface
independence.• Use Notification Service for transport of
telemetry (including structs).• Use CORBA internally in FL.• Use AMI for non-blocking DL/FL calls.• Use wrappers sparingly.