In my project, I need to set exactly the initial linear/angular velocity of a body. Since the controller can be seen as acting in open-loop, I have to be sure about the current state.

In initialization I've written these lines:

Code: Select all

```
simSetObjectFloatParameter(quadcopterH, sim_shapefloatparam_init_velocity_a, state.rate_a);
simSetObjectFloatParameter(quadcopterH, sim_shapefloatparam_init_velocity_b, state.rate_b);
simSetObjectFloatParameter(quadcopterH, sim_shapefloatparam_init_velocity_g, state.rate_g);
```

Code: Select all

```
-- in frame t:
local m1=simGetObjectMatrix(objHandle,-1)
-- in frame t+dt:
local m2=simGetObjectMatrix(objHandle,-1)
local rotationAxis,rotationAngle=simGetRotationAxis(m1,m2)
rotationVelocity=rotationAngle/dt
```

- What is the physical meaning of these three parameters? Are they the, approximated, time derivative of the Euler angles? If that is the case, I would compute them inverting the following relation:

https://imgur.com/a/wc3fYMT

- In this post viewtopic.php?t=6780#p26986 you explained that simGetVelocity is (abg/dt) computed on the "difference" of consecutive rotation matrices. But in my tests it seems to return the same value as rotationAxis*rotationVelocity, that is just an angular velocity.

Running on V-REP 3.4.0