This resource represents general sensor configuration in SENSR.
The general sensor configuration contains parameters which are shared between all sensors in SENSR (e.g. algo_node.base_to_origin).
GET§
-
/settings/sensor/list§
Get the list of supported config-ids and config data types in /settings/sensor resource
- Parameters
- node-uri : ID of algo node which the desired config is located. (If you use one algo node it is normally
algo_0000
. and there is one more special algo node calledcommon
). - config-id : ID of config (optional)
- node-uri : ID of algo node which the desired config is located. (If you use one algo node it is normally
- Return code
- 200 OK
- 400 BAD REQ
- List of the types that SENSR API supports natively
Example§
$ curl -X GET 'http://localhost:9080/settings/sensor/list?node-uri=algo_0000&config-id=algo_node' ** Respond ** { "base_to_origin": { "tx": "Float", "ty": "Float" }, "sensor_to_base": { "tz": "Float", "qw": "Float", "qx": "Float", "qy": "Float", "qz": "Float" } }
- Parameters
-
/settings/sensor/meta§
Get a meta information of the desired config
- Parameters
- node-uri : same as node-uri in /settings/sensor/list
- config-id : Id of the desired config
- Return code
- 200 OK
- 400 BAD REQ
- Explanation of each fields in meta
- show : Decide to show the config in Preference menu or not.
- display_name : Displayed name in Preference menu.
- use_tooltip : Decide to show tooltip in Preference menu or not.
- tooltip_msg : Message of tooltip
- tooltip_args : Arguments which will be shown in tooltip.
- step_size : Step size of the config
- min : Min. range of the config
- max : Max. range of the config
Example§
$ curl -X GET 'http://localhost:9080/settings/sensor/meta?node-uri=algo_0000&config-id=algo_node' ** Respond ** { "show": true, "display_name": "Algo-Node Info", "base_to_origin": { "datatype": "Table", "show": true, "display_name": "Position of Algo node", "tx": { "datatype": "Float", "show": true, "display_name": "X Position of Algo node" }, "ty": { "datatype": "Float", "show": true, "display_name": "Y Position of Algo node" } }, "sensor_to_base": { "datatype": "Table", "show": true, "display_name": "Quaternion of Algo node", "tz": { "datatype": "Float", "show": true, "display_name": "Z Position of Algo node" }, "qw": { "datatype": "Float", "show": true, "display_name": "Qw of Algo node" }, "qx": { "datatype": "Float", "show": true, "display_name": "Qx of Algo node" }, "qy": { "datatype": "Float", "show": true, "display_name": "Qy of Algo node" }, "qz": { "datatype": "Float", "show": true, "display_name": "Qz of Algo node" } } }
- Parameters
-
/settings/sensor§
Get an actual value of the desired config
- Parameters
- node-uri : same as node-uri in /settings/sensor/list
- config-id : Id of the desired config
- Return code
- 200 OK
- 400 BAD REQ
Example§
$ curl -X GET 'http://localhost:9080/settings/sensor?node-uri=algo_0000&config-id=algo_node' ** Respond ** { "base_to_origin": { "tx": 0.0, "ty": 0.0 }, "sensor_to_base": { "tz": 0.0, "qw": 1.0, "qx": 0.0, "qy": 0.0, "qz": 0.0 } }
- Parameters
POST§
-
/settings/sensor§
Update the value of the desired config
- Parameters
- node-uri : same as node-uri in /settings/sensor/list
- config-id : Id of the desired config
- Return code
- 200 OK
- 400 BAD REQ
Example§
$ curl -X POST 'http://localhost:9080/settings/sensor?node-uri=algo_0000&config-id=algo_node' --data '{ "base_to_origin": { "tx": 0.0, "ty": 0.0 }, "sensor_to_base": { "tz": 0.0, "qw": 1.0, "qx": 0.0, "qy": 0.0, "qz": 0.0 } }' ** Respond ** 200 OK
- Parameters