### Ballbot and Controller

Posted:

**06 Mar 2018, 14:05**Hello everyone,

I am studying the ballbot model in V-REP. Could someone help me understand it?

I understand that v[1]=v[1]*ls*w/l it is the same as v[1]=v[1]*w, because above the author did ls = l. Right ?

I researched and the elements 3, 7, 11 are position.

What are the variables vect, velo, d and v ?

Which controller is being used ?

Thanks

I am studying the ballbot model in V-REP. Could someone help me understand it?

Code: Select all

```
local l=math.sqrt(v[1]*v[1]+v[2]*v[2]+v[3]*v[3])
local ls=l
local w=0.18
v[1]=v[1]*ls*w/l
v[2]=v[2]*ls*w/l
v[3]=v[3]*ls*w/l
```

Code: Select all

```
local m=simGetObjectMatrix(sens,-1)
local euler=simGetEulerAnglesFromMatrix(m)
euler[1]=0
euler[2]=0
local m2=simBuildMatrix({0,0,0},euler)
local m3=simGetInvertedMatrix(m2)
local vect={m[3],m[7],m[11]}
vect=simMultiplyVector(m3,vect)
v=simMultiplyVector(m3,v)
velo=simMultiplyVector(m3,velo)
d=0.2
```

What are the variables vect, velo, d and v ?

Which controller is being used ?

Thanks