From c1ba663826b257786888f328f2feddddd8309927 Mon Sep 17 00:00:00 2001 From: Philipp Oppermann Date: Thu, 31 Aug 2023 14:53:48 +0200 Subject: [PATCH] Debug: Print direction after conversion to arrow array --- examples/python-ros2-dataflow/random_turtle.py | 13 ++++++++++++- 1 file changed, 12 insertions(+), 1 deletion(-) diff --git a/examples/python-ros2-dataflow/random_turtle.py b/examples/python-ros2-dataflow/random_turtle.py index f1678668..7892073b 100755 --- a/examples/python-ros2-dataflow/random_turtle.py +++ b/examples/python-ros2-dataflow/random_turtle.py @@ -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