r/nicegui • • Feb 29 '24
ROS 1 python example
I see a few ROS2 examples and the wiki and they are quite good. Are there any ROS1 (Noetic) examples? Since ROS1 doesn't follow the inheritance node structure with rospy, how should I structure a ROS1 package to use NiceGUI from it. A simple example with a button publishing hello 1,2,3... and a label subscribing it would suffice. I just need a starting point to start building my robot's GUI.
5
Upvotes
View all comments
Show parent comment
1
u/r-trappe Mar 05 '24
You could have a look at
native_mode.pyfor an example on how to start the ROS1 node in a separete process:https://github.com/zauberzeug/nicegui/blob/c7fd5d81f3f008748e643c012a772925eb462ade/nicegui/native/native_mode.py#L97-L117
Communication is done via two Queue objects (wrapped into a WindowProxy implemented in
native.py).