Events
Last updated
Last updated
In this section you will find all of Misty's API calls for triggering different events. You can upload the sample code for an event by loading the event sample template. If you need information on how to trigger events with bump and touch sensors you can check out Sensor Events.
Initiates Misty's detection of faces in her line of vision. This command assigns each detected face a random ID.
When you are done having Misty detect faces, call StopFaceDetection
.
Stops Misty's detection of faces.
Directs Misty to recognize a face she sees, if it is among those she already knows. To use this command, you previously must have used either the StartFaceDetection
command or the StartFaceTraining
command to detect and store one or more face IDs in Misty's memory.
When you are done having Misty recognize faces, call StopFaceRecognition
.
Stop Misty looking for face to recognize.
Trains Misty to recognize a specific face and applies a user-assigned ID to that face.
This process should take less than 15 seconds and will automatically stop when complete. To halt an in-progress face training, you can call CancelFaceTraining
.
Example Code
Parameters
FaceId (string) - A unique string of 30 characters or less that provides a name for the face. Only alpha-numeric, -, and _ are valid characters.
Halts face training that is currently in progress. A face training session stops automatically, so you do not need to use the CancelFaceTraining
command unless you want to abort a training that is in progress.
Starts Misty locating the position and type of objects.
Example Code
When you issue a StartObjectDetector
command, Misty will start streaming ObjectDetection
events when an appropriate object is seen.
To receive those events, you must also register for the ObjectDetection
event type.
Object detection consumes extra resources, so when you are done using the events, you should call the StopObjectDetector
command.
You can find a list of known objects in Known objects
Parameters
MinimumConfidence (double) - The minimum confidence to trigger sending an event. From 0 to 1.0.
ModelId (int) - The TensorFlow Lite object model to use. Valid model ids are 0-3.
MaximumTrackerHistory (int) - How long to hold previous object history across frames.
Stop Misty locating the position and types of objects.
Starts Misty locating the position and values of Ar Tags.
Example Code
When you issue a StartArTagDetector
command, Misty will start streaming ArTagDetection
events when an appropriate tag is seen.
To receive those events, you must also register for the ArTagDetection
event type.
Parameters
Dictionary (int) - The Ar Tag dictionary to use.
TagSizeMm (double) - The size of the printed tags. Used in assessing distance.
Stops Misty locating position and values of AR tags.
Starts Misty detecting QR tags.
Stops Misty detecting QR tags.
Initiates a robot interaction event in Misty, enabling her to engage in interactions that may involve vision data processing.
Example code
Paratmeters
useVisionData
(bool): Specifies whether the interaction event should utilize Misty's vision capabilities. When set to True
, Misty will process visual data (such as facial recognition or object detection) as part of the interaction.
Stops the interaction event.