import a 'roshlet' from another roshlet
Hi,
If I have two rosh scripts - lets say a.py and b.py that work perfectly when invoked independently (rosrun rosh rosh a.py) - is there a simple mechanism for importing one into the other that ensures the globals() have been set up during the import.
e.g.,
#### b.py #### def getpoint(): return msg.geometry_msg.PointStamped() #### a.py #### import b actions.foo_controller.move_to(b.getpoint())
The problem is that if I 'rosrun rosh rosh a.py', global variables like msg, actions, etc in module a are set up but these do not carry across when I 'import b'. As a result, b will not load (with an error the msg is not defined).
I had a typo in the program that bhaskara replied to. I've fixed this typo but the question still remains: how can a roshlet be imported from another roshlet?