Teaching by demonstation

  • Hi,


    I need to write a program to teaching by demonstration using handguiding motion but i don't really know how to do it. I have a few question:
    1. I know that i need to create frames of current positions every several milliseconds but i don't know how to do it. Do i have to create another thread or i can do it in background task?
    2. Should i do it by using arraylist and every next step frame have to be added to it?
    3. Which is the best way to save frames? I tried OutputObjectStream but frame class doesn't implement "Serializable" interface so it is impossible and is it good to store data in txt file or better in other type?


    I would be very grateful for your help.

  • Quote

    1. I know that i need to create frames of current positions every several milliseconds but i don't know how to do it. Do i have to create another thread or i can do it in background task?


    Use the DataRecorder class. It's detailed in the documentation
    DataRecorder(String fileName, long timeout, TimeUnit timeUnit,int sampleRate)
    Chapter 15.24.1 Creating an object for data recording


    Quote

    2. Should i do it by using arraylist and every next step frame have to be added to it?


    Do you need the whole motion to be seamless and smoothed out or do you want in in batches?

    Quote

    3. Which is the best way to save frames? I tried OutputObjectStream but frame class doesn't implement "Serializable" interface so it is impossible and is it good to store data in txt file or better in other type?


    I don't know for sure, but I always prefer to use Axes values, otherwise I use the DataRecorder's mathod addCurrentCartesianPosition-
    XYZ()

  • The DataRecorder method wouldn't work since you have to stop the application, grab the data, upload it to a new application.....unless you are ok doing that.


    Can you talk a bit more about how you want the Teach by Demonstration application to work?

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