线程评级:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
variable targets - Generate robot program issue
#1
Hi
I just picked up RoboDK last week and have been working hard experimenting with the python API trying to get some basics down but there's something I don't quite understand. It might just be a limitation of the software or it is me not understanding how to use the postprocessor.

I want to use RoboDK for offline programming of my UR robot setup. I then want to transfer my code to the robot and have it run with minimal overhead of work on the online robot side. I'd rather do more work offline just to have it work online as easily as possible.

So on to my program:
In my program I want to generate I bunch of targets in a grid layout. The size of the grid is calculated from an input variable string that is sent to the robot at runtime. (The robot reads a qr code where the grid data is stored). This means that the target points are not known ahead of time.

My naive "solution":
Great I have python, I thought, so I quickly wrote up a python function that takes an input string and spits out the points and moves the robot around and everything works in the simulation where I pass the string to the python function using call arguments.

The issue:
The point where I don't understand RoboDK anymore is when I generate the robot program the compiled robot program has none of the python code in it and there is just a line with a call the my python program that looks something like "move_grid(""). So from this I gather that the python program cannot be translate automatically to UR-scripts.

如果我试着direc生成机器人程序tly from my python script (with a call to the function at the end of the file) the output file is just a bunch of points not depended on my input variable anymore. My functions are not respected and are not there anymore and it just spits out the points.

Is there any way that RoboDK can be set up so it spits out my functions or worst case a place to manually write the UR scripts that should be inserted into the code instead of the functions calls so I can get the full program for the UR-robot.

I Hope someone can help me. So far RoboDK have been great for setting up the simulated world, but now writing code for it feels a bit limited. It feels like I'd have to rewrite the whole program on the teach pendant anyway.
#2
Hi,

在将Python代码转换为脚本代码时,您确实在该软件的限制范围内。
You can't really do what you are trying to do directly.
One day we will get there, but crating program with variables is a big can of worms if you consider we have to implement this for 40+ brands on over 100 post-processor.
What we first focused on is creating programs with a high number of points for applications like sanding, dispensing, welding, cutting, milling, etc.
It's not as geared towards creating programs for material handling types of applications (on the offline programming side at least, the simulation works well for both.)

But there is something else you can do to kind of bridge the gap.
If you look at this function in python: RunInstruction
//www.w5838.com/doc/en/PythonAPI/robo...nstruction

You can insert raw script in your generated program.
You can also do the same with the program call from the UI using the small dropdown menu.

杰里米
通过访问我们寻找有关Robodk及其功能的有用信息Online Documentation通过观看我们的教程Youtube Channel.


#3
Hi Jeremy

Thank you for the answer.
因为我担心我在我开始时我没有意识到的软件。我完全得到了它的蠕虫,它是实现这种语言翻译。遗憾的是,制造商不能满足于几个简单的标准。使用您提到的用例,我可以完全看到使用Robodk的吸引力。它非常棒,很容易它是生成这样的目标,只是快速进入。那时我只是不适合我的项目。它对我有益于使用该软件验证我的机器人可以确实可以达到它应该的所有点。
I'm not sure the RunInstruction command will be good for me. It feels a bit hacky to do it that way, and there's no way of checking my code for bugs offline.

\ TDCN
#4
You are right that there is no way of verifying your code this way.

I'm sorry that our product is not completely suited to streamline your project as you would have to do the simulation to verify the reach/singularity/collision for all your points and recreate the same process in the robot's native language. I understand this would feel a bit redundant.

杰里米
通过访问我们寻找有关Robodk及其功能的有用信息Online Documentation通过观看我们的教程Youtube Channel.






Users browsing this thread:
1 Guest(s)