Skip to content

Add initial control node #5

Open
wants to merge 10 commits into
base: master
Choose a base branch
from
Open

Add initial control node #5

wants to merge 10 commits into from

Conversation

enaix
Copy link

@enaix enaix commented Apr 18, 2023

No description provided.

Comment on lines 46 to 50
async def loop():
await node.init_conn()
while rclpy.ok():
rclpy.spin_once(node, timeout_sec=0)
await asyncio.sleep(0.0001)
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Выглядит странно конечно, есть подозрение что будет CPU жрать

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Затестил, вроде оно не ело

def __init__(self):
super(ControlNode, self).__init__("control")
self.declare_parameter("esp32_ip", "192.168.1.121")
self.sub = self.create_subscription(Control, "movement", self.send, 10)
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

А rclpy нормально относится к асинхронным коллбекам?

@@ -0,0 +1,23 @@
# Copyright 2015 Open Source Robotics Foundation, Inc.
Copy link
Member

@AndBondStyle AndBondStyle May 30, 2023

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Все тесты можно выпилить, они бессмысленные (а еще это нужно сделать, чтобы PR менее мусорным стал)

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Development

Successfully merging this pull request may close these issues.

2 participants