Skip to main content

Heartbeat classes for the IZZY Project.

Project description

izzy-heartbeat

The izzy-heartbeat package provides the classes that allow for heartbeat communication in the IZZY (Intelligent Scenery Simulation Project) as well as enumerations for port numbers and types of heartbeat messages.

Installation

Use the package manager pip to install izzy-hearbeat.

pip install izzy-heartbeat

Background

"IZZY," or the Intelligent Scenery Simulation Platform, is an ongoing research project in applied robotics and control systems for moving scenery in live entertainment. Computerized control of scenery is not new; technologies for controlling both simple and complex movement of scenery in multiple axes have been around for decades. Many traditional approaches borrow heavily from industrial automation systems, employing programmable logic controllers (sometimes with more-user-friendly PC-style front-end interfaces), roller switches, high-powered motors, and cable winches. However, because of the very real safety concerns related to hauling scenic units weighing as much as a couple of tons across the stage at relatively high velocities, typical automation systems rely heavily on highly-choreographed movements and attentive operators to ensure safety. Additionally, traditional approaches often require the construction of expensive sub-floors and decking systems to provide pathways for winched cables and tracks for scenic units to follow.

IZZY and Mother

The IZZY (Intelligent Scenery Simulation Platform) project software is built around two software objects: a client and a server. An implementation of IZZY is a client; the offstage control and programming interface server has been affectionately dubbed "Mother" (a not-so-subtle nod to Alien). A client stores information about an IZZY device, including physical dimensions, network information installed sensor packages, and position and movement information. A server stores network information and a collection of client instances--one instance for each physical IZZY device on the network.

Communication

Heartbeat

To address emergency stop requirements and loss of communication safety concerns, the IZZY project implements a heartbeat protocol between IZZY client devices and Mother servers. When the heartbeat signal is lost, IZZY clients shutdown. Hitting an e-stop button wherever the Mother application is running cuts off the heartbeat signal, triggering a shutdown and system reset.

Upon startup, Mother servers begin sending out Heartbeat hello message packets as broadcast UDP messages. Any powered up IZZY clients on the same network will respond to hello messages by sending a here message packet which contains a data payload with status information about the client. The status information can change depending on the operating mode the client is in; at a minimum, an IZZY client Heartbeat response will include its user-friendly name, its status/operating mode, its position in x, y, and z directions, its heading, and its current speed.

Heartbeat Messages and Packets

Heartbeat messages are programmatically created and stored in custom HeartbeatMessage objects. Heartbeat packets, the raw UDP data that is sent and received, comprise up to 255 bytes of information (46 required bytes and up to 209 status/data payload bytes). Packets begin with a one-byte preamble (0x10) and are followed immediately by an 11-byte IZZY project identifier ("izzymessage," or 0x69 0x7A 0x7A 0x79 0x6D 0x65 0x73 0x73 0x61 0x67 0x65). The next byte contains the total length of the packet. The next 16 bytes contain the 64-bit UUID of the sending device followed by the 64-bit UUID of the receiving device. This is followed by a one-byte Message Type identifier, then the data payload, which can be up to 209 bytes long.

Preamble Message ID Message Length Sender UUID Receiver UUID Message Type Payload
0x10 0x69 0x7A 0x7A 0x79 0x6D 0x65 0x73 0x73 0x61 0x67 0x65 1 byte 8 bytes 8 bytes 1 byte 0-209 bytes

HeartbeatMessages (instances of the HeartbeatMessage class) are different from raw Heartbeat packets in that each instance includes attributes for storing each chunk of a packet separately. This allows for easy programmatic manipulation of the message data when necessary.

[NOTE!] Improperly structured Heartbeat packets will not be interpreted correctly.

Threading

Heartbeat sending and receiving happens on separate threads than the rest of the application, whether on a client or a server. This allows for non-blocking processing and for (relatively) timely delivery and response of heartbeat packets. The package provides three classes to facilitate this: HeartbeatServerThread, HeartbeatListenerThread, and HeartbeatResponderThread.

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

izzy_heartbeat-0.1.6.tar.gz (44.4 MB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

izzy_heartbeat-0.1.6-py3-none-any.whl (7.2 kB view details)

Uploaded Python 3

File details

Details for the file izzy_heartbeat-0.1.6.tar.gz.

File metadata

  • Download URL: izzy_heartbeat-0.1.6.tar.gz
  • Upload date:
  • Size: 44.4 MB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.0.1 CPython/3.13.0

File hashes

Hashes for izzy_heartbeat-0.1.6.tar.gz
Algorithm Hash digest
SHA256 5ade54d75bebb2cd9b8a902bf211ed1dadeb5f6b1944bd6360017486b9192f31
MD5 5db3255f8c1222400ea42563e84aeb6d
BLAKE2b-256 6a093c3fc2a6e0b0a3b482080e8d81b3c7efcea31c2388eccec79ff73cc5c0cb

See more details on using hashes here.

File details

Details for the file izzy_heartbeat-0.1.6-py3-none-any.whl.

File metadata

  • Download URL: izzy_heartbeat-0.1.6-py3-none-any.whl
  • Upload date:
  • Size: 7.2 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.0.1 CPython/3.13.0

File hashes

Hashes for izzy_heartbeat-0.1.6-py3-none-any.whl
Algorithm Hash digest
SHA256 e2d9434dcfd43ae01a12718d9cab39eeb978b192eb175865d688bc5a9d904b59
MD5 93751c6badc833df6df89f4d39a5bfcf
BLAKE2b-256 93f21b0b1f24e88d8c7c067f1e9c8d246242c8c5d70e8a2135aa176e856d2fc0

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page