| Both sides previous revisionPrevious revisionNext revision | Previous revision |
| delta:software:hal [2018/08/10 10:01] – fink | delta:software:hal [Unknown date] (current) – removed - external edit (Unknown date) 127.0.0.1 |
|---|
| ========HAL======== | |
| To get more information about the Hardware Abstraction Layer and how it works, please have a look into the [[http://wiki.eeros.org/eeros_architecture/hal/start | HAL ]] described on the [[http://wiki.eeros.org/|eeros wiki]]. \\ | |
| EEROS for the Beagle Bone Blue is using the [[https://github.com/StrawsonDesign/librobotcontrol|robotis_cape_library]]. You'll find the wrapper and its functions in the bbblue-eeros folder. | |
| |
| =====Configure the motors===== | |
| If you want to run a motor with EEROS you need to define a Peripheral Output with the respective "signalId" used in the HAL-Configuration file. As you can see in the HAL-Configuration file for the Delta roboter in "subdevice2" the type for the motors is set to "AnalogOut". In this subdevice section the 4 motors are configured to match the functions of the robotics_cape_library. In the EEROS application for the Delta roboter you can set a motor voltage of -8.0V to 8.0V. The HAL gets this values and wraps it to match the values of the robotics_cape_library which then runs the motors with the desired voltage. | |
| {{ :delta:software:hal-motor.jpg?300 |HAL-Configuration for the motors}} | |
| |
| =====Configure the encoders===== | |
| The Delta roboter has two different encoders. The [[https://www.faulhaber.com/de/produkte/serie/ieh2-4096/|ieh2-4096]] and the [[https://www.faulhaber.com/de/produkte/serie/hem3-256/|hem3-256]]. | |
| {{:delta:software:hal-ieh2.jpg?300|HAL config for ieh2 encoder}}{{ :delta:software:hal-hem3.jpg?300|HAL config for hem3 encoder}} | |
| |
| |
| =====HAL-Configuration file for the Delta roboter===== | |
| <code json> | |
| { | |
| "device0": { | |
| "library": "libbbblueeeros.so", | |
| "devHandle": "dummy", | |
| "subdevice0": { | |
| "type": "DigOut", | |
| "channel0": { | |
| "signalId": "onBoardGreen" | |
| }, | |
| "channel1": { | |
| "signalId": "ledBlue" | |
| }, | |
| "channel49": { | |
| "signalId": "ledRed" | |
| }, | |
| "channel116": { | |
| "signalId": "onBoardRed" | |
| }, | |
| "channel98": { | |
| "signalId": "emag" | |
| } | |
| }, | |
| "subdevice1": { | |
| "type": "DigIn", | |
| "channel0": { | |
| "signalId": "buttonMode" | |
| }, | |
| "channel1": { | |
| "signalId": "buttonPause" | |
| }, | |
| "channel97": { | |
| "signalId": "buttonBlue" | |
| }, | |
| "channel57": { | |
| "signalId": "buttonRed" | |
| }, | |
| "channel113": { | |
| "signalId": "buttonGreen" | |
| } | |
| }, | |
| "subdevice2": { | |
| "type": "AnalogOut", | |
| "channel1": { | |
| "signalId": "motor1", | |
| "scale": [ { "id" : "dac", | |
| "minIn": -1.0, "maxIn": 1.0, | |
| "minOut": -8.0, "maxOut": 8.0 } | |
| |
| ], | |
| "range": [ { "id" : "dac", | |
| "minIn": -0.75, "maxIn": 0.75, | |
| "minOut": -6.0, "maxOut": 6.0 } | |
| ], | |
| "unit": "V" | |
| }, | |
| "channel2": { | |
| "signalId": "motor2", | |
| "scale": [ { "id" : "dac", | |
| "minIn": -1.0, "maxIn": 1.0, | |
| "minOut": -8.0, "maxOut": 8.0 } | |
| ], | |
| "range": [ { "id" : "dac", | |
| "minIn": -0.75, "maxIn": 0.75, | |
| "minOut": -6.0, "maxOut": 6.0 } | |
| ], | |
| "unit": "V" | |
| }, | |
| "channel3": { | |
| "signalId": "motor3", | |
| "scale": [ { "id" : "dac", | |
| "minIn": -1.0, "maxIn": 1.0, | |
| "minOut": -8.0, "maxOut": 8.0 } | |
| ], | |
| "range": [ { "id" : "dac", | |
| "minIn": -0.75, "maxIn": 0.75, | |
| "minOut": -6.0, "maxOut": 6.0 } | |
| ], | |
| "unit": "V" | |
| }, | |
| "channel4": { | |
| "signalId": "motor4", | |
| "scale": [ { "id" : "dac", | |
| "minIn": -1.0, "maxIn": 1.0, | |
| "minOut": -6.0, "maxOut": 6.0 } | |
| | |
| ], | |
| "range": [ { "id" : "dac", | |
| "minIn": -1, "maxIn": 1, | |
| "minOut": -6.0, "maxOut": 6.0 } | |
| ], | |
| "unit": "V" | |
| } | |
| }, | |
| "subdevice3": { | |
| "type": "Fqd", | |
| "channel1": { | |
| "signalId": "enc1", | |
| "scale": [ { "id" : "gear", | |
| "minIn": 0, "maxIn": 6.283185307, | |
| "minOut": 0, "maxOut": 477.522083346 }, | |
| { "id" : "enc", | |
| "minIn": 0, "maxIn": 477.522083346, | |
| "minOut": 0, "maxOut": 311296}, | |
| { "id" : "fqd", | |
| "minIn": 0, "maxIn": 311296, | |
| "minOut": 0, "maxOut": 1245184} | |
| ], | |
| "range": [ { "id" : "gear", | |
| "minIn": 0, "maxIn": 6.283185307, | |
| "minOut": 0, "maxOut": 477.522083346 }, | |
| { "id" : "enc", | |
| "minIn": 0, "maxIn": 477.522083346, | |
| "minOut": 0, "maxOut": 311296}, | |
| { "id" : "fqd", | |
| "minIn": 0, "maxIn": 311296, | |
| "minOut": 0, "maxOut": 1245184} | |
| ], | |
| "unit": "rad" | |
| }, | |
| "channel2": { | |
| "signalId": "enc2", | |
| "scale": [ { "id" : "gear", | |
| "minIn": 0, "maxIn": 6.283185307, | |
| "minOut": 0, "maxOut": 477.522083346 }, | |
| { "id" : "enc", | |
| "minIn": 0, "maxIn": 477.522083346, | |
| "minOut": 0, "maxOut": 311296}, | |
| { "id" : "fqd", | |
| "minIn": 0, "maxIn": 311296, | |
| "minOut": 0, "maxOut": 1245184} | |
| ], | |
| "range": [ { "id" : "gear", | |
| "minIn": 0, "maxIn": 6.283185307, | |
| "minOut": 0, "maxOut": 477.522083346 }, | |
| { "id" : "enc", | |
| "minIn": 0, "maxIn": 477.522083346, | |
| "minOut": 0, "maxOut": 311296}, | |
| { "id" : "fqd", | |
| "minIn": 0, "maxIn": 311296, | |
| "minOut": 0, "maxOut": 1245184} | |
| ], | |
| "unit": "rad" | |
| }, | |
| "channel3": { | |
| "signalId": "enc3", | |
| "scale": [ { "id" : "gear", | |
| "minIn": 0, "maxIn": 6.283185307, | |
| "minOut": 0, "maxOut": 477.522083346 }, | |
| { "id" : "enc", | |
| "minIn": 0, "maxIn": 477.522083346, | |
| "minOut": 0, "maxOut": 311296}, | |
| { "id" : "fqd", | |
| "minIn": 0, "maxIn": 311296, | |
| "minOut": 0, "maxOut": 1245184} | |
| ], | |
| "range": [ { "id" : "gear", | |
| "minIn": 0, "maxIn": 6.283185307, | |
| "minOut": 0, "maxOut": 477.522083346 }, | |
| { "id" : "enc", | |
| "minIn": 0, "maxIn": 477.522083346, | |
| "minOut": 0, "maxOut": 311296}, | |
| { "id" : "fqd", | |
| "minIn": 0, "maxIn": 311296, | |
| "minOut": 0, "maxOut": 1245184} | |
| ], | |
| "unit": "rad" | |
| }, | |
| "channel4": { | |
| "signalId": "enc4", | |
| "scale": [ { "id" : "gear", | |
| "minIn": 0, "maxIn": 5.8, | |
| "minOut": 0, "maxOut": 670.206432766 }, | |
| { "id" : "enc", | |
| "minIn": 0, "maxIn": 753.982236862, | |
| "minOut": 0, "maxOut": 30720}, | |
| { "id" : "fqd", | |
| "minIn": 0, "maxIn": 30720, | |
| "minOut": 0, "maxOut": 122880} | |
| ], | |
| "range": [ { "id" : "gear", | |
| "minIn": 0, "maxIn": 6.283185307, | |
| "minOut": 0, "maxOut": 753.982236862 }, | |
| { "id" : "enc", | |
| "minIn": 0, "maxIn": 753.982236862, | |
| "minOut": 0, "maxOut": 30720}, | |
| { "id" : "fqd", | |
| "minIn": 0, "maxIn": 30720, | |
| "minOut": 0, "maxOut": 122880} | |
| ], | |
| "unit": "rad" | |
| } | |
| } | |
| } | |
| } | |
| |
| |
| </code> | |