Controlling the ACRM robot, keyboard control

Typically: "How do I... ", "How can I... " questions
Post Reply
Victor Gomez
Posts: 10
Joined: 15 Dec 2014, 08:26

Controlling the ACRM robot, keyboard control

Post by Victor Gomez »

Good day everyone, I'm quite new to V-REP and still going through the tutorials and manuals available online. Nevertheless, I can't completely understand how the ACRM robot moves.
I intend to do a simulation using it, in which I need to be able to control the direction of it using the keyboard or maybe an in-screen display, i.e., to turn right, left, stop or keep moving forward. Right now, the robot, when the simulation starts, just moves in a, what I call, erratic movement, as I can't understand in the scripts how or where is the movement input, pattern or cycle.

Any suggestion or help about what should I read and go in detail to be able to fulfill this task?

Thank you so very much for your help!

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

Re: Controlling the ACRM robot, keyboard control

Post by coppelia »

Hello Victor,

the control algorithm of the ACMR-5 robot model is similar to following:

A signal is generated that has several sinusoidal components. Then, each element of the snake applies the signal at a different time: first the first element, then a little bit later the second element, then the third element, etc. Basically: the position the the front motor will successively be applied be all other elements, but in a time-delayed manner.

And since that snake has 2 DoFs per element (at least when moving in the water), a second sinusoidal signal is also used.

Cheers

Victor Gomez
Posts: 10
Joined: 15 Dec 2014, 08:26

Re: Controlling the ACRM robot, keyboard control

Post by Victor Gomez »

Thank you so very much for your answer. I understand how it moves now. Nevertheless, I can't identify the function of the movement in the scripts.
I understand that I could, then, time the amplitude of the sinusoidal wave making the robot change (or turn) trajectory a little to the left or right, and then time this change to follow a desired path. Let's say If I want it to rotate left, I could limit the sinusoidal wave per link to oscillate from 180° to 90° instead of 180° to 0°. I would only use the sinusoidal signal for the X-Y movement, as I'm considering only a planar situation. My situation is, I don't find where to modify this.

Thank you so much for your time and help!!

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

Re: Controlling the ACRM robot, keyboard control

Post by coppelia »

in the child script attached to object ACMR, around the end of that script, there is a line:

Code: Select all

table.insert(verticalMovementTable,1,vPos)
vPos is the angular value you will successively apply to all the joints in the snake (it should be hPos, but the horizontal and vertical direction has been inverted somehow, or the snake is effectively lying on its side).

Now you can generate a new vPos in each simulation step.

Cheers

Victor Gomez
Posts: 10
Joined: 15 Dec 2014, 08:26

Re: Controlling the ACRM robot, keyboard control

Post by Victor Gomez »

Thank you so very much for your answer. I'm still working in this, but I think I need to get used more to the syntaxis of the scripts and controls of this. I tried to start by doing my own (and simplified) snake like robot, but I'm still not able to move it.

Thank you!

Post Reply