Closed tetov closed 2 years ago
I'm confused because the scenario you mention as crashing is the one I use all the time, and I just tested without issues:
Also works using your repro file:
So, I wonder what is different between your setup and mine. I have seen the connection crash from time to time, but usually it was due to other components down the line that were doing calculations on ROS without checking the connection was really active...
Hm.. Could you please try with the docker file from compas_rrc_start?
I'll test with just roscore later..
Sorry, can't reproduce it again.. weird.
Describe the bug
Grasshopper component "ROS Connect" does not provide a persistent connection. When the connect input is set to True momentarily (using a button component) a connection is made but the input changes to false (the button is de-pressed) the connection is closed.
If I attach a Toggle component set to True, i.e. a persistent True is given as an input Rhino crashes.
I made a "normal" GhPython component using the similar code that works as expected, see repro.ghx. I'll put the component code at the bottom too.
I think this might be a limitation of the component workflow, but I'm not sure.
To Reproduce
Steps to reproduce the behavior:
Screenshots
Expected behavior
Persistent connection after pressing button component.
Desktop (please complete the following information):**
3.9.9
conda
Component code
Original
compas_fab/src/compas_fab/ghpython/components/Cf_RosConnect/code.py
Sample of working code