quarta-feira, 25 de março de 2015

It's alive!!!

And so Ghost moves!! After some days struggling with motion planning scrips of v-rep I figured that something wasn't working to my favor, maybe it was the lack of dynamics on Ghost or just lack of a better judgment on my part but I gave up on motion planning and started to make a scrip from start.

The first issue was whatever to do a child non-threaded scrip or a threaded one. I started with a non-threaded since it was pointed to be the less heavy on the machine, but the thing was that non-threaded scrips are like function they are called one time in each iteration from scratch, and I didn't want that. so I turn in to threaded scrips and it seemed to be going great, I could create in scrip function must like in C but with a few Lua twitches so all rainbow and sunshines just follow some API functions instructions and you will be find right? Well kind off...must of those instruction teach you to create a sync function with ever iteration and that good when you reading data, bad when you trying to make some non-linear time commands, so basically for a full day my scrip worked on a loop always calling the first function or at leas the part of the code that could run in the time of each iteration (microseconds maybe less = not very much code read) and every time I tried to take that loop out well it did nothing since the scrip wasn't in sync with the simulation :D. But if you already seen the video you know that this story has a happy ending, well after some reading and studying of demo scrips manage to put the scrip in sync with the simulation but not with the iterations, with means that the scrips runs on a loop but it will only start again after it's free.

I also peeped in the custom UI tool and made that little window its not much but its a start. As for what is next, well I going to put some unfortunates souls to test the full set and see how well they adapt to Ghost movements.         

Sem comentários:

Enviar um comentário