RoboDK Forum
Invalid item provided error- Printable Version

+- RoboDK Forum (//www.sinclairbody.com/forum)
+-- Forum: RoboDK (EN) (//www.sinclairbody.com/forum/Forum-RoboDK-EN)
+--- Forum: RoboDK API (//www.sinclairbody.com/forum/Forum-RoboDK-API)
+--- Thread: Invalid item provided error (/Thread-Invalid-item-provided-error)



Invalid item provided error-vasu536-04-03-2020

Hi all

I just started using RoboDK API with python and when I am trying to write and test some basic scripts to perform joint and linear motion its throwing error that the item provided is invalid. I am attaching the screenshots of the error and my script. Can someone help me with this, please.

Also, I am using Mac and my python path is /usr/local/bin/python3.7

Its acually moving to the desired joint position before even reaching the MoveJ command and throwing error there. Same error for target.pose which is on the next line.

也将控制台输出随着code.

Sorry, forgot the attachment before.


RE: Invalid item provided error-Albert-04-03-2020

It looks like the target named "Target" does not exist.

You need to add a target (Program-Teach Target) and rename it to Target.

If it still fails, can you provide the RDK project file?


RE: Invalid item provided error-vasu536-04-06-2020

Do you mean, I need to do it on the Simulation environment? So, we can only use the Variables that are defined in the simulation space in Python script?


RE: Invalid item provided error-vasu536-04-06-2020

Thank you. That worked and looks like I got answer to my next question as well.

I have been using macOS to run the simulation platform and it has been not smooth sailing. Especially because the data is stored in a hidden Contents folder unlike the windows and now I am trying to open robodk using python script based on the example and it throws the following error.

The line that's throwing the error:

RDK = Robolink(args=["-NEWINSTANCE", "-NOUI", "-SKIPINI", "-EXIT_LAST_COM"])

I can see that its trying to access ~/RoboDK/RoboDK.app/Contents/MacOS/RoboDK for my robot application path. I am aware my application is RoboDK.app and if it is pointing to that folder, I might not get that error. My question is, how can I get access to changing the application path?

Also, in your opinion, is it going to get more difficult to keep using Mac? Would using Linux make it easier?