Skip to main content
Version: 2.4.6

Algorithm

note

This resource demonstrates how to interact with algorithm configurations in SENSR. An algorithm configuration contains parameters for controlling the algorithms of the perception pipeline. These parameters enables the user to optimize the perception results of SENSR for their specific use-case.

GET

/[SENSR version]/settings/algorithm/list

  • Get the list of supported config-id and config type in /settings/algorithm resource

  • Parameters
    • node-type : (algo or master) Type of node of the desired config. Most algorithm configs are located under algo node. But if you runs multiple algo nodes, the integration of algorithm results are occurrs in the master node.
    • node-uri : ID of the algo node where the desired config is located (If you use only one algo node it is usually algo_0000. and there is one more special algo node called common which stores shared parameters between algo nodes).
    • config-id : ID of the desired config (optional)
  • Return code
    • 200 OK
    • 400 BAD REQ
    • 404 NOT FOUND
  • Here is a list of the types that SENSR API supports natively:

    • Int
    • Bool
    • Float
    • String
    • Offset Datetime
    • Local Datetime
    • Local Time
    • Vector2 (2 Float array)
    • Vector3 (3 Float array)
    • Vector4 (4 Float array)
    • Array[type]
      • An homogeneous array of one single type.
    • Array[Table]
      • Array can have table type too. In this case, returned json format will be array which has one table inside.
    • Table
      • A table that supports either nested tables, arrays or simple types. In this case, returned json format will be table.
  • Example

$ curl -X GET 'http://localhost:9080/[SENSR version]/settings/algorithm/list?node-type=master&node-uri=common'
** Respond **
{
"output_merger": {
"result_timeouts": {
"algo_node_object_result_timeout": "Float",
"algo_node_point_result_timeout": "Float",
"algo_node_sensor_status_timeout": "Float"
},
"multi_algo_node_merger": {
"dominant_algo_criterion": "Int",
"age_comp_scale_ratio_thr": "Float",
"map_res": "Float",
"max_box_dist_to_split": "Float",
"grow_x_size_tol": "Float",
"grow_y_size_tol": "Float",
"grow_size_rate_tol": "Float",
"grow_size_addition_tol": "Float",
"assoc_dist_threshold": "Float"
}
}
}

/[SENSR version]/settings/algorithm/meta

  • Get meta information of the desired config.

  • Parameters
  • Return code
    • 200 OK
    • 400 BAD REQ
    • 404 NOT FOUND
  • Explanation of each field in meta

    • show : Visibility of the config in Preference menu.
    • display_name : Displayed name in preference menu.
    • use_tooltip : Visibility of tooltip in the preference menu.
    • tooltip_msg : Displayed tooltip message
    • 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/[SENSR version]/settings/algorithm/meta?node-type=master&node-uri=common&config-id=output_merger.result_timeouts.algo_node_point_result_timeout'
** Respond **
{
"datatype": "Float",
"show": true,
"display_name": "Algo-Node Point Result Timeout",
"min": 0.1
}

/[SENSR version]/settings/algorithm

  • Get an actual value of the desired config

  • Parameters
  • Return code
    • 200 OK
    • 400 BAD REQ
    • 404 NOT FOUND
  • Example

$ curl -X GET 'http://localhost:9080/[SENSR version]/settings/algorithm?node-type=master&node-uri=common&config-id=output_merger.result_timeouts.algo_node_point_result_timeout'
** Respond **
0.2


POST

/[SENSR version]/settings/algorithm

  • Update the value of the desired config

  • Parameters
  • Return code
    • 200 OK
    • 400 BAD REQ
    • 404 NOT FOUND
  • Example

$ curl -X POST 'http://localhost:9080/[SENSR version]/settings/algorithm?node-type=master&node-uri=common&config-id=output_merger.result_timeouts.algo_node_point_result_timeout' --data '0.5'
** Respond **
200 OK

Logo
If you need access, please contact