Which parameters can be set for motors?

Typically: "How do I... ", "How can I... " questions
Post Reply
artiny
Posts: 20
Joined: 14 Feb 2015, 11:56

Which parameters can be set for motors?

Post by artiny »

hy
I would like to know ,wich dynamic parameters is possible to set up. The motor is:
http://www.maxonmotor.com/maxon/view/product/148866 (under the specifioction tab is the parameters)

If I want to create this motor in V-rep, wich dynamic parameters I should configurate?
http://www.coppeliarobotics.com/helpFil ... erties.htm
Motor enabled, target velocity, max. torque/force
Using Revolute joints (torque/force mode)

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

Re: Which parameters can be set for motors?

Post by coppelia »

Hello,

the way a physics engine simulates a motor is different from a real motor. Among the differences are:
  • The real motor is controlled with voltage/pwm/etc. The torque it can exert is a function of that, but also a function of velocity.
  • The simulated motor (when the control loop is not enabled) is controlled with a given torque/force it can exert, and a target velocity. While the max. velocity is not reached, the motor will exert the specified torque/force (i.e. the torque/force is not dependent on the velocity of the motor). Once the target velocity is reached, the motor will try to keep that target velocity.
Since the simulated motor doesn't behave realistically, mainly regarding the force/torque it can exert vs velocity, you will have to improve things by writing a joint control callback script. In there, you could first check at what velocity the motor is operating, then do a look-up in a table to find out the corresponding torque/force it can exert at that speed and apply it as max. force/torque. This means, your joint control callback script will dynamically modify the max. force/torque according to the velocity, which allows to quite nicely mimic the behaviour of a real motor.

Cheers

artiny
Posts: 20
Joined: 14 Feb 2015, 11:56

Re: Which parameters can be set for motors?

Post by artiny »

Thank you for the answer.

I read this post:
If you want to control the velocity, what else do you need to specify than the desired velocity, and the motor torque/force?
At least, the phyiscs engines do not take any other input that these. But here you have several options:

you can set a very large force/torque, and simply provide the desired velocity
you can set a very large velocity, and simply modulate the force/torque

Because this is how a physics engine motor is working: it will accelerate to the specified velocity, with the specified force/torque. If that force/torque is large, the velocity is reaches almost instantaneously. Otherwise, it will take some time.
If I want to ,for my mobile robot simulate the maximum speed in V-rep, what is in real life 0.8 m/s (with radius:2,5 cm of differencial wheel).
When I set the user interface unit to Radians , in the joint dynamics console set the max force/torque for very large 999 and the velocity set to 32 (when I converted the 0.8 m/s to rad/s is get 32) will be good?

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

Re: Which parameters can be set for motors?

Post by coppelia »

If you have a wheel of radius R, and you want your robot to travel at V m/s, then set a motor velocity of V/(2*R) rad/s, or V*180/(2*R*pi) deg/s

Cheers

oxsygiandi
Posts: 4
Joined: 10 Mar 2015, 07:10

Which unit can be set for motors?

Post by oxsygiandi »

Which one the value I must use for simulate the dynamixel mx-28R that has
stall torque 1.5N.m, speed 55rpm?

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

Re: Which parameters can be set for motors?

Post by coppelia »

If you have left the user settings to default (i.e. degrees, meters and seconds), then specify 1.5 for the max. torque/force and 330 for Target velocity.

If you set above values via the API, then the units are the SI units (Meters, seconds, kg, radians, etc.). Then you would set 1.5 for the torque, and 5.7596 for the target velocity.

Cheers

Post Reply