This is a special resource to control sensors in SENSR.
You can add, delete or modify sensors via this resource.
GET§
-
/settings/sensor-ext/list§
Get the list of available config-id and config data type of a specific type of sensor.
You need at least one algo node to get the list.- Parameters
- sensor-type : The type of sensor (
lidar
/odom
/can
)
- sensor-type : The type of sensor (
- Return code
- 200 OK
- 404 NOT FOUND
- List of the types that SENSR API supports natively
Example§
$ curl -X GET 'localhost:9080/settings/sensor-ext/list?sensor-type=lidar' ** Respond ** [ { "uid": "String", "name": "String", "topic": "String", "sensor": "String", "stack_capacity": "Int", "detection_radius": "Float", "use_intensity_filtering": "Bool", "minimum_intensity": "Float", "arguments": "Table", "base_to_origin": { "tx": "Float", "ty": "Float" }, "sensor_to_base": { "tz": "Float", "qw": "Float", "qx": "Float", "qy": "Float", "qz": "Float" } } ]
- Parameters
-
/settings/sensor-ext§
Get an actual config of the desired sensor.
If you do not pass any sensor-id, this command returns the full sensor-ids in SENSR.
If you pass node-uri, this command returns the full sensor-ids in the specific node only.- Parameters
- sensor-id : ID of sensor.
- node-uri : ID of algo node.(optional)
- Return code
- 200 OK
- 400 BAD REQ
Example§
$ curl -X GET 'localhost:9080/settings/sensor-ext?sensor-id=lidar_0000' ** Respond ** { "uid": "lidar_0000", "name": "PointCloud", "topic": "/velodyne_points", "sensor": "ROS Message", "stack_capacity": 0, "detection_radius": 1000.0, "use_intensity_filtering": false, "minimum_intensity": 0.0, "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 }, "arguments": {} } $ curl -X GET 'localhost:9080/settings/sensor-ext' ** Respond ** [ "lidar_0000", "lidar_0001" ] $ curl -X GET 'localhost:9080/settings/sensor-ext?node-uri=algo_0000' ** Respond ** [ "lidar_0000" ]
- Parameters
POST§
-
/settings/sensor-ext§
Update the config of the desired sensor. (
topic
should be unique within an algo node.)- Parameters
- sensor-id : ID of sensor.
- Return code
- 200 OK
- 400 BAD REQ
Example§
$ curl -X POST 'localhost:9080/settings/sensor-ext?sensor-id=lidar_0000' --data '{ "name": "PointCloud", "topic": "/velodyne_points", "sensor": "ROS Message", "stack_capacity": 0, "detection_radius": 1000.0, "use_intensity_filtering": false, "minimum_intensity": 0.0, "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 }, "arguments": {} }' ** Respond ** 200 OK
- Parameters
PUT§
-
/settings/sensor-ext§
Add a new sensor to the desired algo node. If this command was successful, the id of the newly added sensor is returned. Please call POST command to the newly added sensor right after this command.
Because the default config of the newly added sensor are not proper in most cases.- Parameters
- node-uri : ID of the desired algo node.
- sensor-type : The type of sensor (
lidar
/odom
/can
)
- Return code
- 200 OK
- 400 BAD REQ
Example§
$ curl -X PUT 'localhost:9080/settings/sensor-ext?node-uri=algo_0000&sensor-type=lidar' ** Respond ** "lidar_0001"
- Parameters