DataRecorder - Frame Orientations

  • Hello everyone,


    I have been using the DataRecorder to store data in a file and analyse the results. But I have only been able to find functions to record cartesian positions of frames which is strange. Is there any way to use the DataRecorder to record also frame orientations or use polling with the DataRecorder?
    If it is not possible to use the DataRecorder for that purpose, what is the best way to record data in a file every 1 ms? Should I use java.io?


    Many thanks.

  • Place your Ad here!
  • Hi,


    probably you are looking for this:
    DataRecoder#addCurrentCartesianPositionXYZ(measureFrame, referenceFrame)
    This is not mentioned in the manual, but take a look at what the class offers you.
    I guess you are not a programmer (JAVA, C#, or any other object oriented language), this make it very difficult to program an LBR iiwa or any other robot on this platform :thinking_face:


    the DataRecorder can log the data every 1ms.


    GL && HF

  • Thanks razzo.


    The "addCurrentCartesianPositionXYZ(measureFrame, referenceFrame)" is what I have been using but it only gives me cartesian position, not orientation. I have looked through the DataRecorder class functions but I haven't found a way to record frame orientations. Maybe I am missing something?


    It's true though, my knowledge of Java is limited, I'm more of a C and a little C++ programmer.

  • I thought, that CurrentCartPositionXYZ also records ABC, but I am not sure about that. I do not have a robot at home to check it :frowning_face: At work I have other things to do :thinking_face: And I also have not used the DataRecorder for a longer period :thinking_face:


    Would you be so kind to attach a logfile your DataRecorder?

  • well that is expected with name containing XYZ.
    but this is not the end of the world... in DataRecorder there is a way to dump joint data to a file.
    one could record joint positions (immediately) and calculate or convert to Cartesian positions WITH orientation (later).

    1) read pinned topic: READ FIRST...

    2) if you have an issue with robot, post question in the correct forum section... do NOT contact me directly

    3) read 1 and 2

    Edited once, last by panic mode ().

  • Is there a conversion method from joint positions to cartesian coordinates available somewhere? I think this would not be trivial to figure out by ourselves

  • it is a straight forward calculation. you just need:
    a) DH parameters which can be obtained from robot dimensions
    b) correct transform. Kuka uses Rz(a)*Ry(b)*Rx(c)

  • another option is to let robot do that for you - jsut run robot through all recorded positions and when it reaches each recorded joint position, read/save present Cartesian position. this can be done at lower speed and it does not need to be real time (initial recording with DataLogger i done in real time)

    1) read pinned topic: READ FIRST...

    2) if you have an issue with robot, post question in the correct forum section... do NOT contact me directly

    3) read 1 and 2

  • Probably this is working, it is untested:

    Code
    ForwardKinematicsModule fkm = new ForwardKinematicsModule();
    fkm.setJointConfiguration(new JointPosition(0, 0, 0, 0, 0, 0, 0));
    OutPort opFrame = new OutPort("Frame");
    opFrame = fkm.getFrameOutport();
    Frame frame = (Frame) opFrame.getValue();

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account
Sign up for a new account in our community. It's easy!
Register a new account
Sign in
Already have an account? Sign in here.
Sign in Now

Advertising from our partners