Discussion on DFNs integrationinterfaces » History » Version 16
Quentin Labourey, 2018-04-12 17:50
1 | 10 | Quentin Labourey | h1. Discussion on DFNs interfaces |
---|---|---|---|
2 | 1 | Quentin Labourey | |
3 | 2 | Quentin Labourey | This page is a discussion to fix once and for all the interfaces and the way DFNs are going to be release inside the InFuse repo. I'll develop the example of DEM as it is the only DFPC that is "ready" at the moment. But I'm pretty sure that this can be generalized easily. For a reminder, the different DFNs of the DEM building DFPC can be found "here":https://drive.google.com/drive/u/1/folders/0B-snyoPgDrt5QmNlT0NOOUpsdHM (diagram DFPC_DEM_BUILDING.html). |
4 | 3 | Quentin Labourey | |
5 | So the DEM DFPCs contains 3 DFNs: |
||
6 | * PcTransform to transform the point cloud from sensor frame to world frame |
||
7 | * Rasterizer to project the cloud on a cartesian grid |
||
8 | * MapFuser to fuse it into our internal grid |
||
9 | 4 | Quentin Labourey | |
10 | 9 | Quentin Labourey | At the moment the three DFNs + the ASN1 layer are in the same library. However, it is important to separate ASN1 from core as ASN1 might not always be the communication standard. A way to do this is to build 2 libraries as follows: |
11 | 6 | Quentin Labourey | |
12 | 7 | Quentin Labourey | |
13 | 8 | Quentin Labourey | |
14 | 5 | Quentin Labourey | |
15 | 1 | Quentin Labourey | !Libraries.png! |
16 | 10 | Quentin Labourey | |
17 | |
||
18 | |||
19 | This way, libatlaas.so (or .a, but I think .so makes more sense here) contains the code of the three DFPC, while libatlaasASN1.so contains interfaces in ASN.1. It can be easily tested in ROS, in different ways. I think the way that makes more sense is a separate nodes with the DFN classes as attributes, as follows: |
||
20 | |||
21 | 11 | Quentin Labourey | |
22 | 10 | Quentin Labourey | |
23 | !libraries_ROS.png! |
||
24 | 12 | Quentin Labourey | |
25 | |
||
26 | |||
27 | 13 | Quentin Labourey | The advantage with this is that it separates clearly the different layers, and make it easy to write something that tests the different DFNs (e.g. I wrote 1 ROS node per DFN, making the stacking easy, the whole DEM DFPC can actually be put in one rosnode/genom3 module to accelerate/not spam the network with data). |
28 | |||
29 | h1. Integration with InFuse archi |
||
30 | 14 | Quentin Labourey | |
31 | 15 | Quentin Labourey | The way DFNs are integrated in InFuse relies on the DFNCI, as shown below for the example of PCTransform: |
32 | 14 | Quentin Labourey | |
33 | |
||
34 | |||
35 | 1 | Quentin Labourey | !infuse_archi.png! |
36 | 15 | Quentin Labourey | |
37 | |
||
38 | |||
39 | It is divided into 3 classes: |
||
40 | * DFNCI: Abstract class that each DFN will extend |
||
41 | * PcTransformInterface: Definition of the interface for the DFN. The functions "input" and "output" are used to update the io of the DFNs. |
||
42 | * PcTransformImplementation1: Definition of the DFI, i.e. one possible implementation of the DFN. It is where the process and configure functions are defined. |
||
43 | 16 | Quentin Labourey | |
44 | There are different ways to integrate our code into this architecture. The most simple for us would be either make the DFI depend or inherit from atlaas, as below: |
||
45 | |||
46 | |
||
47 | |||
48 | !integration_archi.png! |
||
49 | |||
50 | |