【导读】本文介绍了Pybotics,一个Python机器人运动学和校准工具箱,可快速地仿真和评估常见的机器人概念,如运动学,动力学,轨迹生成与标定等。
Github链接:
https://github.com/nnadeau/pybotics
用法
文档网站:
https://pybotics.readthedocs.io/
安装
# python3 is mapped to pip or inside a venv
pip install pybotics
# python3-pip
pip3 install pybotics
# https://github.com/pypa/pipenv
pipenv install pybotics
# https://github.com/sdispater/poetry
poetry add pybotics
基本用法
"""Basic usage of the pybotics package."""
from pybotics.geometry import vector_2_matrix
from pybotics.predefined_models import ur10
from pybotics.robot import Robot
from pybotics.tool import Tool
def main():
"""
Demonstrate pybotics usage.
View source for more info.
"""
# init robot
robot = Robot.from_parameters(ur10())
# add tool
tool = Tool()
tool.position = [1, 2, 3]
robot.tool = tool
# set world frame
world_frame = vector_2_matrix([100, 200, 300, 0, 0, 0])
robot.world_frame = world_frame
print(f"Robot: {robot}")
print(f"Kinematic Chain: {robot.kinematic_chain}")
if __name__ == "__main__":
main()