Who wants to help me balance a segway? ( fun, I hope )

Sage
Posts: 1,199
Joined: 2004.10
Post: #31
All this, yet nobody wants to help me balance my segway! LOL
Quote this message in a reply
Moderator
Posts: 3,577
Joined: 2003.06
Post: #32
TomorrowPlusX Wrote:All this, yet nobody wants to help me balance my segway! LOL
There IS NO WAY we can balance a segway if we can't agree on rads/degs! ... Wink

You *are* using metric though aren't you? Sneaky
Quote this message in a reply
DoG
Moderator
Posts: 869
Joined: 2003.01
Post: #33
I tried fiddling with this a bit, but I don't get it how the bloody motors work. Do I have to set targetRate? Can't I just set the torque I want directly? Because, having an unknown type of controller trying to adjust the motor's speed behind the scenes isn't exactly helpful.
Quote this message in a reply
Sage
Posts: 1,199
Joined: 2004.10
Post: #34
You can set torque and target rate.

someMotor.setTorque( ... )
someMotor.setTargetRate(... )

I thought I included that in the readme. If I didn't sorry.
Quote this message in a reply
DoG
Moderator
Posts: 869
Joined: 2003.01
Post: #35
What I mean is that just setting torque doesn't seem to do anything, if I don't set the target rate, which i really don't want to do, as the physics should take care of spinning up the motors in response to the torque.
Quote this message in a reply
Sage
Posts: 1,199
Joined: 2004.10
Post: #36
I see. I think my concept of torque is different than yours, and since I have no engineering background, mine's probably incorrect.

My "motor" is a shim around ODE's motor type, where you specify rotation rate, and how much torque to apply to maintain that rate. If you set a rate of 2pi, it will rotate once per second. But if your torque is zero, it won't rotate at all. All torque is -- in this case -- is the force being applied to reach the target rate.
Quote this message in a reply
DoG
Moderator
Posts: 869
Joined: 2003.01
Post: #37
Well, this sucks, then. Possibly, this is also why the control scheme fails so badly. I tried emulating pure torque based control, but it causes pretty bad instabilities.

Can you possibly replace the ODE motor by something that simply applies a torque (or two opposing forces on a hinge that create torque) to a hinge or something?
Quote this message in a reply
Sage
Posts: 1,199
Joined: 2004.10
Post: #38
It's worth looking into. Thanks.
Quote this message in a reply
Member
Posts: 567
Joined: 2004.07
Post: #39
yea, can't help. no intel machine.

I can, however, interject every now and then to offer inspirational comments to boost morale!

It's not magic, it's Ruby.
Quote this message in a reply
Post Reply