Sensor
note
This resource allows direct access to the sensor configuration in SENSR. The public interface settings/sensor-ext
provides a safer interface for the sensor configuration so prefer that over using this if possible.
GET
/internal/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 sensor config is located.
- config-id : ID of config (optional)
- Return code
- 200 OK
- 400 BAD REQ
Example
$ curl -X GET 'http://localhost:9080/internal/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"
}
}
/internal/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 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/internal/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"
}
}
}
/internal/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 config (optional)
- Return code
- 200 OK
- 400 BAD REQ
Example
$ curl -X GET 'http://localhost:9080/internal/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
}
}