Sunrise Workbench ptp move in Cartesian instead of Axis Angle

  • So I am trying to move my robot in sunrise workbench. I am successful in moving the robot when giving the axis angles.
    Below is an example of how I am currently using the function

    lBR_iiwa_7_R800.move(ptp(Ax1inRadians, Ax2inRadians, Ax3inRadians, Ax4inRadians, Ax5inRadians, Ax6inRadians, Ax7inRadians))

    However, I would like to end up doing something more like this as I am receiving the X,Y,Z,A,B,C data from a camera. But I am obviously not calling the right function or setting this move up appropriately

    lBR_iiwa_7_R800.move(ptp(pose.X, pose.Y, pose.Z, pose.Alpha, pose.Beta, pose.Gamma));

    What are the correct functions or steps to be able to command the robot in Cartesian?

    Thanks in advance :grinning_face_with_smiling_eyes:

  • ptp() method has 3 or 4 variants for its parameters.

    The one you need to use is ptp(AbstractFrame) and the parameter type AbstractFrame refers to ObjectFrame and Frame classes.

    ObjectFrame; are the frames that you actually made with Workbench interface (P1, P2..). Teach them and just use them(drag&drop into editor).

    Frame; modifiable class that contains Cartesian position value. Can not have teaching information, only being used within your code like normal variables.

    In short, try this

    lBR_iiwa_7_R800.move(ptp(new Frame(pose.X, pose.Y, pose.Z, pose.Alpha, pose.Beta, pose.Gamma)));

    - Be careful if angle values are in Radian, and keep in mind that the Frame value is an absolute value from your World(0,0,0,0,0,0), not a relative value from the current position.

    - Code might not work before corrections. I just wrote the code without checking.

    - Cause the Frame can not have Status Turn values included in teaching information, the robot motion could be away from your expectation or not possible to reach.

    - And your A3 will remain still. 6 Cartesian values are not enough to have all 7 joint values through Inverse Kinematics.

  • Sweet thanks sorry for the late reply I ran into a few hardware issues. But I will try the example you sent and see how it goes, I believe that this is exactly what I need, as the values X,Y,Z,A,B,C that I will be using is the pose of an object in relation to the world coordinate systems origin.

Advertising from our partners