I am trying to program a robot in such a way it would take robot position coordinates from another python code I have.
Is there a way to just define the variables and the robot program would take in position inputs from the other code. (like calling a class maybe)
Is your “another Python code” a script inside Visual Components or a completely independent application?
Yeah. It’s from an independent application.
I have a code which converts my camera coordinated frame to robot base frame and I want it’s position output to be the input for my robot’s VC code.
You will need to implement the interprocess communication yourself. Your question is the same as this.
Thankyou for the reply!
I am still a bit confused.
Here’s my scenario, I have a code which detects objects and the model detects the center of the bounding box which would the be the coordinates for my robot to pick it up.
The code would output me variables X and Y coordinates (depending on the objects)
I want to simulate the pick and place with the X and Y coordinates (varying after each loop) as the input to the robots.
- So is the TCP/IP server and client my original python code and VC python script respectively?
- Is there a way to set a robot base frame inside VC, so it would be similar to my camera coordinates.
- My task requires me to allot each robot a particular item which would be detected by my model, So can I use my main python code as a “parent” code for my sub programs for robots, which would be called as per the required operation.