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 755 B

12345678910111213141516171819202122232425262728293031
  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 i in range(500):
  8. event = node.next()
  9. if event is None:
  10. break
  11. if event["type"] == "INPUT":
  12. match event["id"]:
  13. case "turtle_pose":
  14. print(
  15. f"""Pose: {event["value"]}""".replace("\r", "").replace("\n", " ")
  16. )
  17. case "tick":
  18. direction = {
  19. "linear": {
  20. "x": 1.0,
  21. },
  22. "angular": {"z": 1.0},
  23. }
  24. node.send_output(
  25. "direction",
  26. pa.array([direction]),
  27. )

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