|
|
|
![]() |
|
|||||||
|
||||||||
![]() |
|
|
Thread Tools | Rate Thread | Display Modes |
|
|
|
#1
|
|||||
|
|||||
|
Re: Kiwi Field Oriented Driving Programming
An even cleaner way to limit speeds:
Code:
biggest = max(1.0, abs(wheel1), abs(wheel2) ,abs(wheel3)) wheel1 = wheel1 / biggest wheel2 = wheel2 / biggest wheel3 = wheel3 / biggest If you want to make the controls less sensitive at small deflections of the joysticks, you can change 1.0 in the first line for 1.5 or 2.0 or even as high as 2.414 (1 + sqrt(2)), which appears to be the highest number that can come out of the previous transformations. And yes, using degrees and radians incorrectly could cause discontinuities, esp. at the transition through 0. Last edited by GeeTwo : 25-05-2015 at 20:32. |
|
#2
|
||||
|
||||
|
Re: Kiwi Field Oriented Driving Programming
Doesn't this procedure make it so that even the slightest input will give full throttle? I mean sure it scales it appropriately now but What if you only wanted the wheels to run at say 0.1, 0.05, 0.05 ? Now this scales it to 1, 0.5, 0.5
|
|
#3
|
||||
|
||||
|
Re: Kiwi Field Oriented Driving Programming
Quote:
GeeTwo's code: Code:
biggest = max(1.0, abs(wheel1), abs(wheel2) ,abs(wheel3)) wheel1 = wheel1 / biggest wheel2 = wheel2 / biggest wheel3 = wheel3 / biggest |
![]() |
| Thread Tools | |
| Display Modes | Rate This Thread |
|
|