I have created a small Python program that communicates with an URScript program over a network using socket_read_[something] commands that makes it possible to run an UR3e robot along a certain path relative to a specific feature I have defined in the installation, which is working as expected.
I would now like to modify these programs so that it is possible to choose which feature the robot moves relative to, preferably within the following limitations (I have figured out how to do it without either limitation, but that is not ideal for my use case):
- The user and the Python program should not need to have access to the pose of the feature on their own; the URScript transmitting all feature names and poses to the Python program so that one can be selected would be fine, but e.g. having them in a .txt file read by the Python program would not.
- The URScript should not have to be modified further in order to be able to select any further features; for example, an
if/else_if
approach selecting one of features A-F based on a string sent from the Python program would need to be modified to allow the selection of feature G, so that would not work well.
Is this possible, and – if so – how would I go about implementing it?