Browse Source

Debug: Print direction after conversion to arrow array

tags/v0.2.5-alpha.3
Philipp Oppermann 2 years ago
parent
commit
c1ba663826
Failed to extract signature
1 changed files with 12 additions and 1 deletions
  1. +12
    -1
      examples/python-ros2-dataflow/random_turtle.py

+ 12
- 1
examples/python-ros2-dataflow/random_turtle.py View File

@@ -52,7 +52,18 @@ for i in range(500):
}

print(direction, flush=True)
twist_writer.publish(pa.array(direction))
# TODO FIXME: The below line seems to result in an
# `["linear", "angular"]` array, completely ignoring the values.
direction_arrow = pa.array(
direction,
# TODO: maybe type annotations help somehow?
# type=pa.map_(
# pa.utf8(),
# pa.map_(pa.utf8(), pa.float32()),
# ),
)
print(direction_arrow, flush=True)
# twist_writer.publish(direction_arrow)
case "tick":
pass



Loading…
Cancel
Save