for my Bachelors Thesis i will need a bit of Python programming in VC4, but i’m fairley new to this.
I built a layout where robots pick up moving glass from a conveyor with the pickMovingPart() method. I now want to add a suction grabber to the robot and make him pick the glass with it, but despite changing the tool on the robot it goes back to grabbing it with Tool[1] because the Subroutine “vcHelperLinearMove” generated by the pickMovingPart() method resets it to Tool[1]. Any way to change this?
Thank you for your question and good luck with the thesis. See the attached layout.
If you are using vcHelpers.Robot2 and the pickMovingPart() method, it is a given that you should set the ActiveTool property to the tool frame you want to use for the movement. In other cases, you might want to change the container for the picked part.
Let me know if the attached layout helps–see the PythonScript2 behavior in the robot, specifically the last two lines of code.
I encounter this problem in which when the robot places the part in the component with the command robot.place(conveyor), the component doesn’t move and stays still in the conveyor. Do you know what the problem is?
You are doing a good job. To complete the tutorial, delete the Physics Path behavior in Conveyor 2.
The tutorial is over 4 years old, and the eCatalog components are different. The Conveyor components now have a Physics Path and OneWayPath behaviors. The vcHelpers.Robot2 has two methods place() and releaseComponent(). The place() function will call releaseComponent(). The releaseComponent() by default will check for VC_CONTAINER type objects and take the first one. Since the Physics Path behavior is listed before the One Way Path, and that behavior is used.
If you want to hit the dancefloor, you could modify the vcHelpers.Robot2 module to your needs, for example add a Physics filter as an argument or so that you can pass the container object you want to place something in. There are a couple different workarounds as well, but if you do need physics just delete the behavior from the conveyor.
Side note to whomever added those heuristic path planning properties to the Conveyor, consider making a tutorial on how to use them/avoid congestion.
Thanks a lot @WilliamSmith!!
Works perfectly when deleting conveyor’s physics path. I wouId have never guessed it was that error so I really appreciate your help.
That will be 1 billon Dogecoin, please. Jk. No problem, and it is probably a good time to update the vcHelpers at some point anyway. I’ll let support know about this.