roboticslab-uc3m / questions-and-answers

A place for general debate and question&answer
https://robots.uc3m.es/developer-manual/appendix/repository-index.html
2 stars 0 forks source link

How can I program... by demonstration? #28

Closed jgvictores closed 7 years ago

jgvictores commented 7 years ago

Yes! That is the question... how can I PbD!?

PeterBowman commented 7 years ago

Something like this?

jgvictores commented 7 years ago

@PeterBowman Probably, with emphasis on this. :-)

David-Estevez commented 7 years ago

I see this has extended to issues too... ;)

jgvictores commented 7 years ago

Esentially, you'll want some gravity compensation to help out. That's [gcmp] off the BasicCartesianControl : http://robots.uc3m.es/dox-kinematics-dynamics/group__BasicCartesianControl.html

Option 1: Manually grab some "waypoints" and then create a program. For instance, in the joint space, do some yarp rpc /robotName/manipulatorName/rpc:i to get joint positions you can later use in your program as in this example or similar.

Option 2: Use yarpdatadumper (related) to record the full trajectory. Then use stuff from our tools repository. Specifically, you'll want the PlaybackThread. You can find an example of use at examplePlaybackThread and its corresponding test.

Note: There are several alternatives to these approaches, but these are kind of nice. yarpmanager has some record/playback facilities, but I haven't really tried them. Additionally, yarpdataplayer does some playback, but for me it's nice to have something like what we have in the previously mentioned tools repository because it is a small library that can be used independently and is not coupled with any graphical interface.

jgvictores commented 7 years ago

@rsantos88 I'd enjoy some feedback on this! Good to close the issue? Maybe we should document this somewhere (teo-software-manual is looking pretty abandoned)?

rsantos88 commented 7 years ago

@jgvictores yes, for me it's ok. You can close it if you want ;)

jgvictores commented 7 years ago

Cool!

rsantos88 commented 6 years ago

Option 2: Use yarpdatadumper (related) to record the full trajectory. Then use stuff from our tools repository. Specifically, you'll want the PlaybackThread. You can find an example of use at examplePlaybackThread and its corresponding test.

An example to record the left arm trayectory of Teo:

the acquisition will start. By pressing CTRL+C the acquisition is terminated.