Skip to main content
Version: 3.4.0

Node

note

This resource is used for interacting with algo node configurations in SENSR. A node configuration has configs related to algo node setup. (e.g. username, bin ...)

GET

/[SENSR version]/settings/node/list

  • Get the list of available config IDs and associated data types of an algo node.

  • Parameters
    • N/A
  • Return code
    • 200 OK
  • Example

$ curl -X GET 'http://localhost:9080/[SENSR version]/settings/node/list'
** Respond **
[
{
"uid": "String",
"ip": "String",
"name": "String",
"rosbag_path": "String",
"preset": "String",
"enable_gpu": "Bool",
"disabled": "Bool"
}
]

/[SENSR version]/settings/node

  • Get an config table of the desired algo node.

  • Parameters
    • node-uri : ID of algo node.
  • Return code
    • 200 OK
    • 400 BAD REQ
  • Example

$ curl -X GET 'http://localhost:9080/[SENSR version]/settings/node?node-uri=algo_0000'
** Respond **
{
"uid":"algo_0000",
"ip":"172.17.0.1",
"name":"Algo Node 1",
"rosbag_path":"/root/seoulrobotics/rosbags/sample.bag",
"preset":"outdoor_gpu",
"enable_gpu":true,
"disabled":false
}

/[SENSR version]/settings/node-transform

  • Get the transform (position and rotation) of the algo node

  • Parameters
    • node-uri : ID of algo node.
  • Return code
    • 200 OK
    • 400 BAD REQ
  • Example

$ curl -X GET 'http://localhost:9080/[SENSR version]/settings/node-transform?node-uri=algo_0000'
** 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
}
}

/[SENSR version]/settings/node-detection-range

  • Get the detection range of the algo node

  • Parameters
    • node-uri : ID of algo node.
  • Return code
    • 200 OK
    • 400 BAD REQ
  • Example

$ curl -X GET 'http://localhost:9080/[SENSR version]/settings/node-detection-range?node-uri=algo_0000'
** Respond **
{
"x_range": [
-50.0,
50.0
],
"y_range": [
-10.0,
50.0
],
"z_range": [
-1.5,
3.5
]
}


PUT

/[SENSR version]/settings/node

  • This command creates a new algo node.

  • The command takes in the algo node configuration table as can be seen in the example below. Please refer to the POST command section for details about the format of the data as it is almost identical. The only difference is that you can skip the uid here, SENSR will create one for the newly created algo node.

  • If this command was successful, the uid of the new algo node is returned.

  • You should also call /commands/apply-change to save your changes.

  • Parameters
    • N/A
  • Return code
    • 200 OK
    • 400 BAD REQ
  • Example

$ curl -X PUT 'http://localhost:9080/[SENSR version]/settings/node'
--data '{
"ip": "192.168.0.100",
"name": "Algo_1",
"rosbag_path": "",
"preset": "outdoor",
"enable_gpu": false,
"disabled":false
}'
** Respond **
"algo_0001"


POST

/[SENSR version]/settings/node

  • Update the config of the algo node specified by the uid-field in the request body. Note that the combination of IP address and port should be unique.

  • You should also call /commands/apply-change to save your changes.

  • Parameters
    • N/A
  • Return code
    • 200 OK
    • 400 BAD REQ
  • Example

$ curl -X POST 'http://localhost:9080/[SENSR version]/settings/node'
--data '{
"uid": "algo_0000",
"ip": "192.168.0.100",
"name": "Algo_1",
"rosbag_path": "",
"preset": "outdoor",
"enable_gpu": false,
"disabled":false
}'
** Respond **
200 OK

/[SENSR version]/settings/node-transform

  • Update the transform (position and rotation) of the algo node specified by the uid-parameter.

  • The fields "qw", "qx", "qy", and "qz" are the components of the quaternion rotation. The rotation of the algo node is also limited to the z-axis, so "qx" and "qy" should be kept as zero. Additionally the norm of the quaternion should be 1.0 for it to be considered valid.

  • Note that for the algo node the height should always be ground-level, so keep "tz" as zero.

  • You should also call /commands/apply-change to save your changes.

  • Parameters
    • node-uri : ID of algo node.
  • Return code
    • 200 OK
    • 400 BAD REQ
  • Example

$ curl -X POST 'http://localhost:9080/[SENSR version]/settings/node-transform?node-uri=algo_0000'
--data '{
"base_to_origin": {
"tx": 1.0,
"ty": 2.0
},
"sensor_to_base": {
"tz": 0.0,
"qw": 1.0,
"qx": 0.0,
"qy": 0.0,
"qz": 0.0
}
}'
** Respond **
200 OK

/[SENSR version]/settings/node-detection-range

  • Update the detection range of the algo node specified by the uid-parameter.

  • You should also call /commands/apply-change to save your changes.

  • Parameters
    • node-uri : ID of algo node.
  • Return code
    • 200 OK
    • 400 BAD REQ
  • Example

$ curl -X POST 'http://localhost:9080/[SENSR version]/settings/node-detection-range?node-uri=algo_0000' 
--data '{
"x_range": [
-20.0,
10.0
],
"y_range": [
-10.0,
50.0
],
"z_range": [
-1.5,
3.5
]
}'
** Respond **
200 OK


DELETE

/[SENSR version]/settings/node

  • Delete an algo node.

  • Parameters
    • node-uri : ID of algo node.
  • Return code
    • 200 OK
    • 400 BAD REQ
  • Example

$ curl -X DELETE 'http://localhost:9080/[SENSR version]/settings/node?node-uri=algo_0001'        
** Respond **
200 OK

Logo
If you need access, please contact