You can not select more than 25 topics Topics must start with a chinese character,a letter or number, can include dashes ('-') and can be up to 35 characters long.

control_node.py 521 B

123456789101112131415161718192021222324
  1. #!/usr/bin/env python
  2. # -*- coding: utf-8 -*-
  3. import random
  4. from dora import Node
  5. import pyarrow as pa
  6. node = Node()
  7. for event in node:
  8. if event["type"] == "INPUT":
  9. print(
  10. f"""Node received:
  11. id: {event["id"]},
  12. value: {event["data"]},
  13. metadata: {event["metadata"]}"""
  14. )
  15. node.send_output(
  16. "direction",
  17. pa.array(
  18. [random.random() + 1, 0, 0, 0, 0, random.random() - 0.5],
  19. type=pa.uint8(),
  20. ),
  21. )

DORA (Dataflow-Oriented Robotic Architecture) is middleware designed to streamline and simplify the creation of AI-based robotic applications. It offers low latency, composable, and distributed datafl