Data Classes and Enums

These are definitions of data objects and enumerations sent to and received from the robot.

Describes a bounding box with two 2D points.

Sets the limits of a bounding Box located in an image. The bounding box limits are described in pixels in XY plane.

Parameters:
  • x1 (int) – Point 1 X coordinate in pixels.

  • y1 (int) – Point 1 Y coordinate in pixels.

  • x2 (int) – Point 2 X coordinate in pixels.

  • y2 (int) – Point 2 Y coordinate in pixels.

Describes a Tait-Bryan angle rotation.

Parameters:
  • x (float) – Rotation around X axis in radians.

  • y (float) – Rotation around Y axis in radians.

  • z (float) – Rotation around Z axis in radians.

Describes a 3D point in cartesian space.

Parameters:
  • sys (CoordSystem) – Coordinate system used.

  • x (float) – X coordinate in meters.

  • y (float) – Y coordinate in meters.

  • z (float) – Z coordinate in meters.

Describes a cartesian 3D vector.

Parameters:
  • x (float) – X vector.

  • y (float) – Y vector.

  • z (float) – Z vector.

Enum class describing available coordinate frames. X generally points forward, Y to the left and Z upwards (from point of view of robot).

Origin in center of chest cam, not implemented yet

Origin in center of head cam.

Max Value of enum, used only in calculations

Origin in center of left eye.

Origin in center of right eye.

Fixed to head, x axis pointing in facing direction.

Origin in head center, head facing slightly downwards.

Origin in head center, head facing straight.

Enum class describing what data type is used.

32 bit float

64 bit double

32 bit integer

64 bit integer

32 bit unsigned integer

64 bit unsigned integer

Class containing all infomation sent via perception socket.

Parameters:
  • time (int) – Timestap of image taken as basis for persons

  • persons (list[Person]) – List of detected persons.

  • sst_time_latest (int) – Timestamp of audio taken as basis for sst_latest

  • sst_tracks_latest (list[SstMeta]) – Most current list of detected sound sources.

Defines attributes of a detected person.

Parameters:
  • id_score (float) – Defaults to None.

  • user_id (float) – Unique user id. Defaults to None.

  • face (Bbox2d) – Bounding box of face. Defaults to None.

  • landmarks (PersonLandmarks) – Position of left end of mouth. Defaults to None.

  • head_position (Bryan) – Position of head in Tait-Bryan angles (radians). Defaults to None.

  • gaze (CartVec3d) – Vector describing persons direction of gaze. Defaults to None.

  • facial_expression (PersonFacialExpression) – Person’s facial expression. Defaults to None.

  • dist_mm (float) – Distance from robot to person (mm). Defaults to None.

  • gaze_overlap (float) – How much person is staring at robot, 0 = not looking at robot, 1 = looking directly at robot. Defaults to None.

  • g_eye_left (CartSys3d) – A list of the position of left eye in all coord frames. This might be out of frame, then sys is CoordSystem.UNDEFINED. Defaults to None.

  • g_eye_right (CartSys3d) – A list of the position of right eye in all coord frames. This might be out of frame, then sys is CoordSystem.UNDEFINED. Defaults to None.

  • g_nose (CartSys3d) – A list of the position of nose in all coord frames. This might be out of frame, then sys is CoordSystem.UNDEFINED. Defaults to None.

  • g_head_position (CartSys3d) – A list of the position of head in all coord frames. Defaults to None.

  • g_gaze (CartSys3d) – A list of the target of persons gaze in all coord frames. Defaults to None.

Class describing the facial expression of the detected person

Each emotion in this class is described by a magnitude where 1 describes maximum expression and 0 describes minimum expression.

Parameters:
  • neutral (float) – magnitude of neutral.

  • happy (float) – magnitude of happyness.

  • sad (float) – magnitude of sadness.

  • surprise (float) – magnitude of surprise.

  • anger (float) – magnitude of anger.

Class describing position of a person’s facial landmarks.

Each landmark is described by its 2D position within the host image.

Parameters:
  • eye_left (Point2d) – Position of left eye.

  • eye_right (Point2d) – Position of right eye.

  • nose (Point2d) – Position of nose.

  • mouth_left (Point2d) – Position of left end of mouth.

  • mouth_right (Point2d) – Position of right end of mouth.

Describes a 2D point using pixel coordinates.

Parameters:
  • x (int) – X coordinate in pixels.

  • y (int) – Y coordinate in pixels.

Available information about tracked sounds.

Parameters:
  • id (int) – ID per separable sound source, reused.

  • activity (float) – Activity of signal (0 to 1).

  • loc (CartSys3d) – Spacial source of sound.

  • is_dynamic (bool) – If track is dynamic or statically defined.

Run a coroutine with a robot connection as the only parameter.

This is used to start navel “apps”. This function is only provided as a shorthand for the most common use-case, calling the run method on any of the connection classes accomplishes the same goal.