Browse Source

Send random direction in control node as float array

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

+ 2
- 2
examples/python-ros2-dataflow/control_node.py View File

@@ -21,7 +21,7 @@ for i in range(500):
node.send_output(
"direction",
pa.array(
[1, 0, 0, 0, 0, 1],
type=pa.uint8(),
[random.random() + 1, 0, 0, 0, 0, (random.random() - 0.5) * 5],
type=pa.float32(),
),
)

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

@@ -44,10 +44,10 @@ for i in range(500):
case "direction":
direction = {
"linear": {
"x": event["data"][0],
"x": event["value"][0],
},
"angular": {
"z": event["data"][5],
"z": event["value"][5],
},
}



Loading…
Cancel
Save