cozmo.pets

Pet detection.

Cozmo is capable of detecting pet faces (cats and dogs).

The cozmo.world.World object keeps track of pets the robot currently knows about, along with those that are currently visible to the camera.

Each pet is assigned a Pet object, which generates a number of observable events whenever the pet is observed, etc.

If a pet goes off-screen, it will be assigned a new object_id (and therefore a new Pet object will be created) when it returns. This is because the system can only tell if something appears to be a cat or a dog; it cannot recognize a specific pet or, for instance, tell the difference between two dogs.

Note that these pet-specific events are also passed up to the cozmo.world.World object, so events for all pets can be observed by adding handlers there.

Module Attributes

PET_VISIBILITY_TIMEOUT

Length of time in seconds to go without receiving an observed event before assuming that Cozmo can no longer see a pet.

PET_TYPE_UNKNOWN

Pet Type reported by Cozmo when unsure of type of pet

PET_TYPE_CAT

Pet Type reported by Cozmo when he thinks it's a cat

PET_TYPE_DOG

Pet Type reported by Cozmo when he thinks it's a dog

Classes

EvtPetAppeared(**kwargs)

Triggered whenever a pet is first visually identified by a robot.

EvtPetDisappeared(**kwargs)

Triggered whenever a pet that was previously being observed is no longer visible.

EvtPetObserved(**kwargs)

Triggered whenever a pet is visually identified by the robot.

Pet(conn, world, robot[, pet_id])

A single pet that Cozmo has detected.