Skip to main content
Version: 3.2.1

Results

note

This resource demonstrates how to query detailed information of an object, zone or other health. It provides Object Shape, Object History, Zone Configuration and SENSR's Health Status.

We recommend using the SENSR SDK over this when possible as it provides a more stable interface.

GET

/results/object/shape

  • Return point clouds of an object at a specific timestamp. If a timestamp is not provided the current time will be used.

  • If the timestamp does not match with any timestamp SENSR has in memory it will match with the timestamp closest to the provided one.

  • Parameters
    • id : Object ID
    • time : (Optional) Approx. timestamp when the event occurred. Format (e.g. 2020-12-04T06:40.125Z)
  • Return code
    • 200 OK
    • 400 BAD REQ
  • Example

$ curl -X GET 'http://localhost:9080/results/object/shape?id=0&time=2020-12-04T06:40.125000000Z'
** Respond **
{ "id" : 0,
"timestamp" : "2020-12-04T06:40.125000000Z",
"points" : ".............." }

/results/object/history

  • Return historical data of an object such as position. If length is not provided SENSR will return all available history for that object.

  • Parameters
    • id : Object ID
    • length : (Optional) History length
  • Return code
    • 200 OK
    • 400 BAD REQ
  • Example

$ curl -X GET 'http://localhost:9080/results/object/history?id=0&length=-1'
** Respond **
{
"id" : 0,
"states" : [
{
"position": {"x":0.0,"y":0.0,"z":0.0},
"timestamp" : "2020-12-04T06:40.125000000Z"
},
...
]
}

/results/zone

  • Return the detailed status of a specific event zone. The response has the list of object IDs that are inside the zone at annotated timing.

  • Note that this is only available for event zones. Other zones types will not work with this interface.

  • Parameters
    • id : Zone ID (Returns all zones if zero)
  • Return code
    • 200 OK
  • Example

$ curl -X GET 'http://localhost:9080/results/zone?id=1001'
** Respond **
{
"zones":[{
"id":1001,
"name":"Default Name",
"pbox":{
"points":[
{"x":6.75325871,"y":-32.13},
{"x":-18.3767433,"y":-24.1500034},
{"x":-11.7967463,"y":20.0199947},
{"x":12.7032528,"y":3.29000163}
],
"minZ":-1.5,
"maxZ":3.5
},
"type":"event",
"objectIds":[43,26,20,5]
}]
}

/results/health

  • Return the current system health.

  • Parameters
  • Return code
    • 200 OK
  • Example

$ curl -X GET 'http://localhost:9080/results/health'
** Respond **
{
"master":"OK",
"nodes":{
"algo_0000":{
"status":"OK",
"sensors":{
"/lidar_0003/pandar":"SENSOR_ALIVE",
"/lidar_0002/pandar":"SENSOR_ALIVE",
"/lidar_0001/pandar":"SENSOR_ALIVE",
"/lidar_0000/pandar":"SENSOR_ALIVE"
}
}
}
}
Logo
If you need access, please contact