o3de / o3de-extras

Other
58 stars 60 forks source link

Animate wheels when RigidBodyTwistControlComponent is used #124

Closed michalpelka closed 1 year ago

michalpelka commented 1 year ago

RigidBodyTwistControlComponent is a very easy-to-use component that applies torque and forces to the robot body to simulate its locomotion. It is a crude, but effective solution, however current locomotion entities (e.g. wheel) are stationary w.r.t. robot body.

Describe the solution you'd like I would like to propose an extension to RigidBodyTwistControlComponent (e.g. in form of another component) that allows us to animate wheels. It will only affect the visual part of the simulation. I think a solution would be beneficial for locomotion methods:

The proposed component should observe the effective velocity of the robot. The main rigid body velocity should be fed through the linearized inverse kinematic model to obtain the rotation wheel. We should consider introducing inheritance here, where the base class can have an arbitrary Jacobian matrix (or other linearization), and there will be the implementation that will provide Jacobians for every supported locomotion scheme and expose its parameters (e.g. wheelbase)

adamdbrw commented 1 year ago

The feature is useful outside of the context of mecanum wheels and makes sense in general for this simplified control mode.

adamdbrw commented 1 year ago

This feature is no longer needed as the wheels are spinning visible and naturally with physics.