Events

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.

StartFaceDetection

Initiates Misty's detection of faces in her line of vision. This command assigns each detected face a random ID.

misty.start_face_detection()

When you are done having Misty detect faces, call StopFaceDetection.

StopFaceDetection

Stops Misty's detection of faces.

misty.stop_face_detection()

StartFaceRecognition

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.

misty.start_face_recognition()

When you are done having Misty recognize faces, call StopFaceRecognition.

StopFaceRecognition

Stop Misty looking for face to recognize.

misty.stop_face_recognition()

StartFaceTraining

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

misty.start_face_training("Simone")

Parameters

misty.start_face_training(self, faceId : str = None)
  • FaceId (string) - A unique string of 30 characters or less that provides a name for the face. Only alpha-numeric, -, and _ are valid characters.

CancelFaceTraining

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.

misty.cancel_face_training("Simone")

StartObjectDetector

Starts Misty locating the position and type of objects.

Example Code

misty.start_object_detector(0.6,0,5)

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

misty.start_object_detector(self, minimumConfidence : float = None, modelId : int = None, maxTrackerHistory : int = None, delegateType : int = None)
  • 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.

StopObjectDetector

Stop Misty locating the position and types of objects.

misty.stop_object_detector()

StartArTagDetector

Starts Misty locating the position and values of Ar Tags.

Example Code

misty.start_ar_tag_detector(7,144)

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

misty.start_ar_tag_detector(self, dictionary : int = None, tagSizeMm : float = None)
  • Dictionary (int) - The Ar Tag dictionary to use.

  • TagSizeMm (double) - The size of the printed tags. Used in assessing distance.

StopArTagDetector

Stops Misty locating position and values of AR tags.

misty.stop_ar_tag_detector()

StartQrTagDetector

Starts Misty detecting QR tags.

misty.start_qr_tag_detector()

StopQrTagDetector

Stops Misty detecting QR tags.

misty.stop_qr_tag_detector()

StartRobotInteractionEvent

Initiates a robot interaction event in Misty, enabling her to engage in interactions that may involve vision data processing.

Example code

misty.start_robot_interaction_event(True)

Paratmeters

misty.start_robot_interaction_event(self, useVisionData : bool = None)
  • 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.

StopRobotInteractionEvent

Stops the interaction event.

misty.stop_robot_interaction_event()

Last updated