Robot picks box over head. Python API

Hi,

i have a problem programming a robot to pick up a box from a floorTrack. I have attached a 3D-pdf to visualise the problem.

I am wondering why the robot makes such an effort to grab the box instead of turning into the other direction to grab it. I ahev tried a lot combinations. Among other i adjusted the joints so the robot has the shortest way possible But it still goes that way.

I have tried to adjust the heights and distance of the table.

Here is the code i have use:

from vcScript import *
from vcHelpers.Robot2 import *

def OnRun(): app = getApplication() robot = getRobot() #robot.driveJoints(100.0, 60.0, 60.0) track = app.findComponent("RobotFloorTrack") servo = track.findBehaviour("ServoController") servo.moveJoint(0,3119.4)

box = app.findComponent(“VisualComponents_Box”)
robot.pick(box,100.0)

problem.pdf (1.07 MB)

What is your heart telling you, my friend? The vale of doubt will only hinder the truth that you seek.

Anyway, from the PDF it looks like axis 2 is red, so that usually means there is a joint limit exceeded. You can verify this by going to Program tab > Limits group on ribbon, and enabled the Stop option, which means the simulation will stop if there is an exceeded limit in robot. That is one way to troubleshoot a robot combined with the visual feedback of node geometry highlighted red to indicate what node is exceeding one or more limits such as speed, joint values or singularity.

When using the pick() method, review the documentation. It might also help to review the actual Python file to get a better understanding. In a nutshell, the pick() method is going to calculate a motion target for picking the component. That motion target is then interpolated to get warnings for each configuration in robot. If the configuration for the target is reachable, it is added to a list. From that list, the first configuration in the list is selected, by default, for the robot motions to pick up the component.

Basically, it looks like you need to take some steps to get the configuration you want. First, I would see what’s up with the robot on the track and why axis 2 is giving error. It might have to do with the base-tool setup of robot or some property in robot or track that needs to be changed if the X and Y axes are discombobulated. But don’t waste your time!

  • Upgrade to the latest version, 4.1.
  • Attach the layout, so someone can quickly look over it.
  • It might be a bug in the track or robot, so best to just attach the layout and others review it.