How can I change the physical properties of a motor?

Typically: "How do I... ", "How can I... " questions
Post Reply
jvitolla
Posts: 9
Joined: 14 Feb 2013, 16:50

How can I change the physical properties of a motor?

Post by jvitolla »

Hi,

I would like to know if it's possible to change the physical properties of a motor (motor enabled joint). Parameters such as resistance, inductance and the motor constants are important for the response I get from the motor, so it would be very useful for me to be able to change them according to my actual implementation.

Thanks a lot!

Cheers,

Joseph

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

Re: How can I change the physical properties of a motor?

Post by coppelia »

Hello,

Joints or motors are handled basically via:

- Torque/force
- max. speed

At least those are the parameters that you can provide to the underlying physics engines. Then of course there are other parameters that are very specific to a given engine. Additionally, you have no guarantee that those specific parameters, even if they exist in both engines (e.g. the "normal CFM") corresponds to the same physical values. Or that the effects/handling will be same. So your question is very tricky.
Now, modelling a geared motor, an electric motor or any other motor, is up to you: you will have to write the link between physical values (e.g. voltage/ampere) and engine parameters. That link will very probably be some kind of control loop. You can currently access following joint parameters programmatically (dynamic parameters):

- p, I or D parameter
- motor enable state
- position enable state
- max velocity
- torque/force

Refer to this section. Refer also to simSetJointForce.

We are currently thinking about a possibility to write custom control loops in C/C++ (via a callback mechanism) or even in Lua, via another mechanism.

Cheers

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

Re: How can I change the physical properties of a motor?

Post by coppelia »

Hello again,

We can confirm that from next release on (V3.0.2) there will be a callback mechanism that allows you to write custom low-level joint controllers in Lua.

Cheers

Post Reply