Robot API example/ru

Введение
Это пример базируется на файле примера RobotExample.py.

You may use this file directly if you want.

Example how to use the basic robot class Robot6Axis which represents a 6-axis industrial robot. The Robot module is dependent on Part but not on other modules. It works mostly with the basic types Placement, Vector and Matrix. So we need only:

Basic robot stuff
create the robot. If you do not specify another kinematic it becomes a Puma 560

accessing the axis and the Tcp. Axes go from 1-6 and are in degree:

move the first axis of the robot:

the Tcp has changed (forward kinematic)

move the robot back to start position (reverse kinematic):

the same with axis 2:

Waypoints:

generate more. The trajectory always finds automatically a unique name for the waypoints

create a trajectory

see a list of all waypoints:

Working with the document objects
Working with the robot document objects: first create a robot in the active document

Define the visual representation and the kinematic definition (see Robot 6-Axis and VRML Preparation for Robot Simulation for details about that)

start positon of the Axis (only that which differ from 0)

retrieve the Tcp position

move the robot

create an empty Trajectory object in the active document

get the Trajectory

add the actual TCP position of the robot to the trajectory

insert some more Waypoints and the start point at the end again:

Simulation
To be done.....

Exporting the trajectory
The trajectory is exported by Python. That means for every control cabinet type there is a post-processor Python module. Here is in detail the Kuka post-processor described

and that's kind of how it's done: