README.md 2.76 KB
Newer Older
Bruno Laurencich's avatar
Bruno Laurencich committed
1 2 3 4 5
# NOTOCHORD
_Hub software of the Chordata motion capture system_

### Hardware

Bruno Laurencich's avatar
Bruno Laurencich committed
6
Tested under a Raspberry Pi3 with Raspbian "Stretch" Lite 
Bruno Laurencich's avatar
Bruno Laurencich committed
7

Bruno Laurencich's avatar
Bruno Laurencich committed
8
with one Chordata Hub R1 as a multiplexer
Bruno Laurencich's avatar
Bruno Laurencich committed
9

Bruno Laurencich's avatar
Bruno Laurencich committed
10
and three Chordata K-Ceptor R2 as sensors
Bruno Laurencich's avatar
Bruno Laurencich committed
11 12 13

### WIRING

Bruno Laurencich's avatar
Bruno Laurencich committed
14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54
- [RPI 1 (3.3v)]  -> [Chordata Hub 1 (3.3v)]  
- [RPI 6 (GND)]   -> [Chordata Hub 2 (GND)]  
- [RPI 3 (SDA)]   -> [Chordata Hub 4 (SDA)]  
- [RPI 5 (SCL)]   -> [Chordata Hub 5 (SCL)]
- [RPI 7 (GPIO)]  -> [Chordata Hub 3 (ENABLE)] 

_The following connections are made with a 6 cores cable, ~26 AWG, with crimped RJ12 connectors._
- [MUX JP1]           -> [First KCeptor IN]  <ID_module #1>
- [First KCeptor OUT] -> [Second KCeptor IN] <ID_module #4>
- [Second KCeptor OUT]-> [Third KCeptor IN]  <ID_module #6>

For this to work the `Chordata.xml` file has to have the following structure):
```xml

<Chordata version="0.1.0"> 
  <Configuration>
    (... config nodes ...)
  </Configuration>
  <Armature>
    <Mux Name="main_mux" id="0">
      0x73
      <Branch Name="main_branch" id="1">
        CH_1
        <K_Ceptor Name="first" id="2">
          1
          <K_Ceptor Name="second" id="3">
            4
            <K_Ceptor Name="third" id="4">
              6
            </K_Ceptor>
          </K_Ceptor>
        </K_Ceptor>
      </Branch>
    </Mux>
  </Armature>
</Chordata>
```
Note that any other arbitrary hierarchy can be used, it only has to reflect what is connected in reality. 


### INSTALLATION
Bruno Laurencich's avatar
Bruno Laurencich committed
55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95

**First of all you have to activate the i2c adaptor on your rPi** 

```
sudo raspi-config
```

And activate the option under [9 Advanced Options] > [A7 I2C]


**Then install the folowing:**

- I2C tools
```
sudo apt-get install i2c-tools
```


- G++ 5 (or higher, if it's not already installed)

[Guide](https://ijat.my/install-gcc-5-raspberry-pi-3)


- Boost

```
sudo apt-get install libboost1.54-dev
``` 

- i2c driver lib

```
sudo apt-get install libi2c-dev
```

- Xml Lint

```
sudo apt-get install libxml2-utils
```

Bruno Laurencich's avatar
Bruno Laurencich committed
96 97 98 99 100 101 102
- Octave-dev

```
sudo apt install liboctave-dev
```


Bruno Laurencich's avatar
Bruno Laurencich committed
103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125
- Make sure `scons` (Software contruction tool) is installed on your system, `scons -v` should return version info, if not:

```
sudo apt install scons
``` 

**Now you can compile**

```
scons
```

**And run**

```
cd bin
./notochord
```


### CALIBRATION


Bruno Laurencich's avatar
Bruno Laurencich committed
126
**TODO document remote console usage!!**
Bruno Laurencich's avatar
Bruno Laurencich committed
127 128 129 130 131 132 133 134 135
The proccesing of the raw data is performed by a matlab script created by _Ozan AKTAÞ_: `calib/getMagCalib.m`

### LICENSE

This program is free software and is distributed under the GNU General Public License, version 3.
You are free to run, study, share and modify this software.
Derivative work can only be distributed under the same license terms, and replicating this program copyright notice.

More info about the terms of the license [here](https://www.gnu.org/licenses/gpl-faq.en.html).