Camera Controller Widget
Widget Type: rc-camera-controller

Configuration
warning
Note: setPosition, zoomIn, zoomOut, captureDataAndSave are deprecated and should be added as buttons instead, see example
Available Keys up, down, right, left
Each with either service or commandId.
service Service call when button in pressed payload - The payload sent for the service call
commandId The commandId for the command to call when button in pressed payload - The payload for the command
ptzAutofireInterval The number of ms between auto-fire when any button is held down.
buttons
An array of button configurations with icon, tooltip and service call.
- tooltip - any string
- icon - any icon currently available in the Widgets library. See Storybook.
- color - any color currently available in the Widgets library, but don't go bonkers. This is not clown software!
- execution - service endpoint and it's payload or commandId and its payload (Same as up, down, right, left)
"buttons": [
{
"tooltip": "Your tooltip",
"icon": "eye",
"color": "blue",
"execution": {
"service": "some/service/endpoint",
"payload": {
"zoom": {
"value": -1
}
}
}
}
],
Example
{
"up": {
"service": "/spot/spotcam/ptz/movePositionByFoVPercentage",
"payload": {
"vfovPercentage": 15
}
},
"down": {
"service": "/spot/spotcam/ptz/movePositionByFoVPercentage",
"payload": {
"vfovPercentage": -15
}
},
"right": {
"service": "/spot/spotcam/ptz/movePositionByFoVPercentage",
"payload": {
"hfovPercentage": 20
}
},
"left": {
"service": "/spot/spotcam/ptz/movePositionByFoVPercentage",
"payload": {
"hfovPercentage": -20
}
},
"ptzAutofireInterval": 1000,
"buttons": [
{
"icon": "zoom-in",
"tooltip": "Zoom In",
"execution": {
"service": "/spot/spotcam/ptz/movePositionByRadian",
"payload": {
"zoom": {
"value": 1,
},
},
},
},
{
"icon": "zoom-out",
"tooltip": "Zoom Out",
"execution": {
"service": "/spot/spotcam/ptz/movePositionByRadian",
"payload": {
"zoom": {
"value": -1,
},
},
},
},
{
"icon": "camera-home",
"tooltip": "Reset Camera Position",
"execution": {
"service": "/spot/spotcam/ptz/setPositionByRadian",
"payload": {
"pan": {
"value": 0,
},
"tilt": {
"value": 0,
},
"zoom": {
"value": 0,
},
},
},
},
{
"icon": "camera",
"tooltip": "Capture",
"color": "red",
"execution": {
"service": "/spot/data/captureDataAndSaveToSpotStorage",
"payload": {
"name": "spot-cam-ptz",
}
}
}
]
}