How to dump path to file?

Typically: "How do I... ", "How can I... " questions
Post Reply
noSkill
Posts: 9
Joined: 02 Jun 2013, 09:39

How to dump path to file?

Post by noSkill » 04 Jun 2013, 18:10

Hi.
I would like to dump path while robot tip moves from point to target. What data should i dump to run later robot's tip though same trajectory?
Another similar question about joints positions: I managed to dump joint positions (one returned by simGetJointPosition). Dump is taken 4 times in second. Is it possible to apply those positions back to model?

coppelia
Site Admin
Posts: 6914
Joined: 14 Dec 2012, 00:25

Re: How to dump path to file?

Post by coppelia » 04 Jun 2013, 23:55

Hello,

you have several different options. Have a look at the model models/other/joint recorder.ttm. Attach the model to a model tree, and set it to recording mode. Run your simulation by setting joint positions, or joint target positions (simSetJointPosition or simSetJointTargetPosition). Stop the simulation. Set the replay mode. Before running the simulation again, make sure you do not set anymore the joint positions or joint target positions (otherwise you will have a conflict between 2 different scripts trying to modify the same joints).

The NAO robot model currently uses this replay technique: models/robots/mobile/NAO.ttm.

Otherwise you can always write/read to/from a file to achive the same thing. Have a look here for example.

Cheers

noSkill
Posts: 9
Joined: 02 Jun 2013, 09:39

Re: How to dump path to file?

Post by noSkill » 06 Jun 2013, 15:55

Thank you

Post Reply