-
Notifications
You must be signed in to change notification settings - Fork 0
Add initial control node #5
base: master
Are you sure you want to change the base?
Conversation
async def loop(): | ||
await node.init_conn() | ||
while rclpy.ok(): | ||
rclpy.spin_once(node, timeout_sec=0) | ||
await asyncio.sleep(0.0001) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Выглядит странно конечно, есть подозрение что будет CPU жрать
There was a problem hiding this comment.
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) |
There was a problem hiding this comment.
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. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Все тесты можно выпилить, они бессмысленные (а еще это нужно сделать, чтобы PR менее мусорным стал)
No description provided.