用于模拟和编程工业机器人的robodk工具(实现robodk api)

robodk的Python项目详细描述


机器人

robodk包实现了用于python的robodk api。

此软件包允许您与Robodk软件交互,用于模拟和编程工业机器人。使用RobodkAPI for Python,可以使用Python编程语言模拟和编程任何工业机器人。RobodkAPI提供了使用特定于供应商的编程语言的替代方案。

虽然Robodk的图形用户界面可用于创建程序,但通过使用通用编程语言(如Python)可以扩展Robot控制器的限制。

https://raw.githubusercontent.com/RoboDK/RoboDK-API/master/Python/Python-Programming-RoboDK.png

Robodk软件包包括以下两个模块:

  • The robolink module is the link between RoboDK and Python. Any item from the RoboDK item tree can be retrieved. Items are represented by the object Item. An item can be a robot, a reference frame, a tool, an object or a specific project.
  • The robodk module is a robotics toolbox for Python, inspired from Peter Corke’s Robotics Toolbox: http://petercorke.com/Robotics_Toolbox.html.

以下页面概述了RobodkAPI for Python: https://robodk.com/offline-programming

RobodK可以用于广泛的应用,如3D打印、机器人加工、多机器人同步、拾取和放置。

有用的链接:

如何安装

类型:

pip install robodk

要求

必须安装robodk才能使用robolink模块: *Robodk仿真软件:https://robodk.com/download

python api可以与免费的robodk许可证一起使用。

示例

以下脚本显示了一个使用robodk包进行机器人仿真和脱机编程的示例:

from robolink import *    # RoboDK's API
from robodk import *      # Math toolbox for robots

# Start the RoboDK API:
RDK = Robolink()

# Get the robot item by name:
robot = RDK.Item('Fanuc LR Mate 200iD', ITEM_TYPE_ROBOT)

# Get the reference target by name:
target = RDK.Item('Target 1')
target_pose = target.Pose()
xyz_ref = target_pose.Pos()

# Move the robot to the reference point:
robot.MoveJ(target)

# Draw a hexagon around the reference target:
for i in range(7):
    ang = i*2*pi/6 #ang = 0, 60, 120, ..., 360

    # Calculate the new position around the reference:
    x = xyz_ref[0] + R*cos(ang) # new X coordinate
    y = xyz_ref[1] + R*sin(ang) # new Y coordinate
    z = xyz_ref[2]              # new Z coordinate
    target_pos.setPos([x,y,z])

    # Move to the new target:
    robot.MoveL(target_pos)

# Trigger a program call at the end of the movement
robot.RunCode('Program_Done')

# Move back to the reference target:
robot.MoveL(target)

用于模拟的同一脚本可用于机器人离线编程。这意味着将自动生成一个程序,供机器人控制器在机器人上再现运动。 Robodk支持大量的机器人控制器,并且很容易包含使用后处理器的新机器人控制器的兼容性。

有关Robot后置处理器的更多信息,请参见:

有关使用api的更多示例:

支持的机器人

以下列表包括robodk支持的robot控制器:

  • ABB RAPID IRC5: for ABB IRC5 robot controllers
  • ABB RAPID S4C: for ABB S4C robot controllers
  • Adept Vplus: for Adept V+ programming language
  • Allen Bradley Logix5000: for Allen Bradley Logix5000 PCL
  • CLOOS: for CLOOS robot controllers
  • Comau C5G: for Comau C5G robot controllers
  • Denso PAC: for Denso RC7 (and older) robot controllers (PAC programming language)
  • Denso RC8: for Denso RC8 (and newer) robot controllers (PacScript programming language)
  • Dobot: for educational Dobot robots
  • Fanuc R30iA: for Fanuc R30iA and R30iB robot controllers
  • Fanuc R30iA Arc: for Fanuc Arc welding
  • Fanuc RJ3: for Fanuc RJ3 robot controllers
  • GCode BnR: for B&R robot controllers
  • GSK: for GSK robots
  • HIWIN HRSS: for HIWIN robots
  • KAIRO: for Keba Kairo robot controllers
  • KUKA IIWA: for KUKA IIWA sunrise programming in Java
  • KUKA KRC2: for KUKA KRC2 robot controllers
  • KUKA KRC2 CamRob: for KUKA CamRob milling option
  • KUKA KRC2 DAT: for KUKA KRC2 robot controllers including DAT data files
  • KUKA KRC4: for KUKA KRC4 robot controllers
  • KUKA KRC4 Config: for KUKA KRC4 robot controllers with configuration data in each line
  • KUKA KRC4 DAT: for KUKA KRC4 robot controllers including DAT data files
  • Kawasaki: for Kawasaki AS robot controllers
  • Mecademic: for Mecademic Meca500 robot
  • Motoman/Yaskawa: For Motoman robot controllers (JBI II and JBI III programming)
  • Mitsubishi: for Mitsubishi robot controllers
  • Nachi AX FD: for Nachi AX and FD robot controllers
  • Daihen OTC: for Daihen OTC robot controllers
  • Precise: for Precise Scara robots
  • Siemens Sinumerik: for Siemens Sinumerik ROBX robot controller
  • Staubli VAL3: for Staubli VAL3 robot programs (CS8 controllers and later)
  • Staubli VAL3 InlineMove: to generate Staubli VAL3 programs with inline movement data
  • Staubli S6: for Staubli S6 robot controllers
  • Toshiba: for Toshiba robots
  • Universal Robots: for UR robots, generates linear movements as pose targets
  • Universal Robots RobotiQ: for UR robots including support for RobotiQ gripper
  • Universal Robots joints: for UR robots, generates linear movements as joint targets
  • Yamaha: for Yamaha robots

应用程序加载程序插件

一旦脚本在python中运行,就可以使用app loader插件轻松地将其设置为应用程序。Robodk应用程序允许您自定义Robodk软件环境以进行模拟和脱机编程。 Robodk应用程序可以很容易地分发用于生产。此处提供更多信息:

linting(源代码检查器)

pylint是python编程的源代码、bug和质量检查器。使用robodk的默认设置(vscode/vscodium文本编辑器)时,pylint默认集成。

如果您喜欢使用其他文本编辑器,可以使用pylint_robodk模块和pylint进行linting。必须将以下参数传递给pylint才能激活此功能:

  • –load-plugins=pylint_robodk

欢迎加入QQ群-->: 979659372 Python中文网_新手群

推荐PyPI第三方库


热门话题
java Spring AOP:在方法之间交换信息   数组Java将字符串转换为字符[]   堆内存java。lang.OutOfMemoryError:PermGen space+java   安卓 Java。lang.ClassCastException:无法将活动强制转换到接口   java尝试使用气泡排序将随机整数数组从最大到最小排序   线程“main”java中的indexoutofboundsexception异常。lang.ArrayIndexOutofBounds异常:发电机处为3。main(Generator.java:35)   java“宽大”有什么用?   java SimpleCaptcha NoSuchMethodError   java在哪里部署Web服务的jar依赖项?   Java8获取列表中连续数字的函数方法   java为什么JWT令牌不安全?   java Uber API:在请求或发出令牌时指定多个作用域会返回无效的请求参数   java如何使用映射器从包含多个引用单元的JSON字符串中获取对象列表?   java警告匿名子类(?)没有串行版本   Jackson 2.9.0中的java JsonGenerationException。pr1   java试图打印多个catch语句   java如何创建一个sql表并获得每个唯一字段的平均价格?   java为什么SetMinimumSize设置最小高度而不是宽度?   java与使用POI合并的混淆   java在Xpath中使用“AND”和“normalizespace”时在不同浏览器中遇到不同的错误