• Welcome to PiBoSo Official Forum. Please login or sign up.
 
March 28, 2024, 11:00:54 PM

News:

World Racing Series beta14 available! :)


Direct steer

Started by PiBoSo, April 28, 2013, 08:53:11 PM

Previous topic - Next topic

PiBoSo

April 28, 2013, 08:53:11 PM Last Edit: February 20, 2020, 05:26:46 PM by PiBoSo
To directly control the torque applied to the handlebars, edit profile.ini and add:
[hardcore]
directsteer=1
directsteer_maxtorque=30
directsteer_maxtorque2=0.5

Use negative values to invert the forces.
The second torque scales with speed and then is added to the first one.


Since Beta17, GP Bikes automatically reads the file "directsteer.cfg" from the bike folder.
If the file is missing, the default parameters are used.
Example file:
angle
{
 P = -250
 D = -40
}
torque
{
 threshold_velocity = 3
}
The "angle" section sets the parameters for direct angle control, used at low speed.
Steer control switches to direct torque above "threshold_velocity".


Please make sure to disable the automatic dab, that doesn't work correctly with direct steer: https://forum.piboso.com/index.php?topic=15.msg96471#msg96471
"La perfezione non è il nostro obiettivo, è la nostra tendenza".

PiBoSo

April 28, 2013, 08:53:51 PM #1 Last Edit: February 09, 2021, 04:29:49 PM by PiBoSo
To directly set the steer angle edit profile.ini and add:
[hardcore]
directsteer=2
directsteer_maxangle=20

directsteer_maxangle is the max steer angle, in degrees.


Like in "directsteer=1" mode, it is possible to set the proportional and derivative controller parameters adding a file named "directsteer.cfg" in the bike folder.
The only difference is that the "torque" section is ignored.


Starting with Beta19b, an alternative implementation of direct steer has been integrated.
It can be enabled using "directsteer=3".
Unlike "directsteer=2" mode, the parameters sets in the "directsteer.cfg" file are ignored.
"La perfezione non è il nostro obiettivo, è la nostra tendenza".

Hispinkness Prior

Quote from: PiBoSo on April 28, 2013, 08:53:11 PM
To directly control the torque applied to the handlebars, edit profile.ini and add:

[hardcore]
directsteer=1
directsteer_maxtorque=30
directsteer_maxtorque2=0.5


Use negative values to invert the forces.
The second torque scales with speed and then is added to the first one.
which doc do we put this in?

HornetMaX

Quote from: Hispinkness Prior on May 19, 2013, 11:05:20 AM
Quote from: PiBoSo on April 28, 2013, 08:53:11 PM
To directly control the torque applied to the handlebars, edit profile.ini and add:

[hardcore]
directsteer=1
directsteer_maxtorque=30
directsteer_maxtorque2=0.5


Use negative values to invert the forces.
The second torque scales with speed and then is added to the first one.
which doc do we put this in?
It's written in the text you quoted: profile.ini

MaX.

iVolution

Just tried the direct steering thing. Cannot see how that is ever going to work with a controller. Once up to speed it seems doable but I think this stuff is meant for when you actually have handlebars.

Klax75

I can use DST, it takes a lot of practice. I don't use Default steering anymore.

Furious

Hi. I'm here to report (or find out how it should be) that direct steer angle doesn't work as intended (as expected).
As I understand when I use a controller, let's say, a driving wheel and I threat the wheel as the handlebars the angle I turn the wheel should be the same as the angle of the handlebars turned in the GP Bikes. No matter of the speed, no mater of the lean angle, the angle I turn the wheel the bars should turn. The feedback I get is the force that go against me turning the wheel, but if I'm able to overcome that force I can turn the handle bars no matter what. That how it does on every racing sim.

But not in GP Bikes :( As the bike gains some speed the steering has no clear connection to what I do with the wheel. And that's a real problem for me in case the simulator I'm building.
Can anyone explain it to me?

teeds

Quote from: Furious on September 21, 2014, 08:07:57 PM
But not in GP Bikes :( As the bike gains some speed the steering has no clear connection to what I do with the wheel. And that's a real problem for me in case the simulator I'm building.
Can anyone explain it to me?

The same was confusing me while considering the required axis needed for a sit on controller build. I then just resigned myself to that only lean is going to work with this game. I had thought that to be more realistic I'd need 3 directional axis -

1/. Steering
2/. Bike Lean
3/. Rider Lean

But then noticed the game does not have these, so gave up on it. Then I see this direct steer option, which gave me hope, but it does not work as I had expected at all, as with direct steer on you get to steer but now no lean?

So I though OK I ride road bikes, MX bikes and pushbikes, so how do I ride them.....  ??? I Soon found it's not so easy to articulate verbally, for me anyway, can anyone else? Do we need 3 axis as above to get nearer to the real thing?


PiBoSo

Quote from: Furious on September 21, 2014, 08:07:57 PM
Hi. I'm here to report (or find out how it should be) that direct steer angle doesn't work as intended (as expected).
As I understand when I use a controller, let's say, a driving wheel and I threat the wheel as the handlebars the angle I turn the wheel should be the same as the angle of the handlebars turned in the GP Bikes. No matter of the speed, no mater of the lean angle, the angle I turn the wheel the bars should turn. The feedback I get is the force that go against me turning the wheel, but if I'm able to overcome that force I can turn the handle bars no matter what. That how it does on every racing sim.

But not in GP Bikes :( As the bike gains some speed the steering has no clear connection to what I do with the wheel. And that's a real problem for me in case the simulator I'm building.
Can anyone explain it to me?

Are you using directsteer=2?
"La perfezione non è il nostro obiettivo, è la nostra tendenza".

Furious

Yes I do. I can make a video to explain completely how that works for me.

HornetMaX

September 22, 2014, 07:21:11 PM #10 Last Edit: September 22, 2014, 07:25:27 PM by HornetMaX
Quote from: teeds on September 22, 2014, 03:40:40 PM
The same was confusing me while considering the required axis needed for a sit on controller build. I then just resigned myself to that only lean is going to work with this game. I had thought that to be more realistic I'd need 3 directional axis -

1/. Steering
2/. Bike Lean
3/. Rider Lean

But then noticed the game does not have these, so gave up on it. Then I see this direct steer option, which gave me hope, but it does not work as I had expected at all, as with direct steer on you get to steer but now no lean?

So I though OK I ride road bikes, MX bikes and pushbikes, so how do I ride them.....  ??? I Soon found it's not so easy to articulate verbally, for me anyway, can anyone else? Do we need 3 axis as above to get nearer to the real thing?
On a real bike you don't have an independent bike lean input: the bike leans due to the torque you apply to the handlebar and due to your body movements.
That's why if you use direct steer you have no lean input (and rightly so).

Making a sit-on controller that tries to mimic a real motorbike is tough. Very tough. Most of the people I've seen trying this have given the dream up or have ended up with something much farther from their initial objective (maybe still enjoyable, but that's not the same thing).

From a purely theoretical standpoint you'd need:

  • the trivial stuff: throttle, clutch and brakes axis.
  • 2 input axes for rider lean left/right and fwd/back (rider lean, not bike lean).
  • 1 axis associated to a torque sensor: it won't move due to your input (something like a load cell, except it  is torsional and not "linear"). That would provide GPB the torque you apply to the handlebar. You'd have to use direct steer torque (not direct steer angle).
  • 1 output axis for the steering: GPB will dictate the position of the handlebars. The actuator should be (in principle) perfect: instantaneous and with unlimited torque (in practice, very fast ompared to the typical max frequency of handlebar movements and stronger than your arms).
  • 1 output axis for the bike lean: GPB will dictate the bike lean (making your frame lean).

Notice how the steering works: you do not dictate the handlebar angle directly. You apply a torque, then GPB "decides" how the handlebar will move due to the combination of your input and the other torques acting on the front head (coming from road-tire interaction, centrifugal forces and gyro torques).

Even with that (which is very very tricky to build), it won't be perfect as you'd miss the interaction between your body and the chassis (which are kind of simulated by 2 input axis for rider lean).
Potentially you could put the same sort of torque sensor on the controller frame lean axis, but then GPB should provide an additional input.

It's a very very high call for a mere passionate.

MaX.


Furious

I mainly agree with you beside 1 thing.
QuoteNotice how the steering works: you do not dictate the handlebar angle directly. You apply a torque, then GPB "decides" how the handlebar will move due to the combination of your input and the other torques acting on the front head (coming from road-tire interaction, centrifugal forces and gyro torques).

All of the Direct input controllers works other way. You decide of the angle you turn and the sim counters it with the calculated forces put on the steering wheel. Mainly there is no real difference between torque steering and angle steering cause all comes to the 1 thing, the handlebars turn angle. How you compute it doesn't matter. In my opinion the angle steereing is more natural due to the actual, real handlebars turns.

But everything else I agree with. Following, my simulator will have 2 axis (pitch and roll) to simulate acceleration and bike movement. Visual head tracking for VR and defining biker position on the bike ( bikers lean) and the force feedback handlebars. But I need that one last "ingredient" to work right.

HornetMaX

Quote from: Furious on September 22, 2014, 07:33:20 PM
I mainly agree with you beside 1 thing.
QuoteNotice how the steering works: you do not dictate the handlebar angle directly. You apply a torque, then GPB "decides" how the handlebar will move due to the combination of your input and the other torques acting on the front head (coming from road-tire interaction, centrifugal forces and gyro torques).

All of the Direct input controllers works other way. You decide of the angle you turn and the sim counters it with the calculated forces put on the steering wheel.

I agree,  but in a true physical model you cannot input an angle, you can only input a torque. On your real bike or car, you don't input an angle, you input a torque: the bike/car then "decides the angle" (assuming no power steering for the car). You try to set the angle to what you want applying a torque. So in a usual controller, you set the angle but the sim behind has somehow to convert this into a torque. 

Quote from: Furious on September 22, 2014, 07:33:20 PM
Mainly there is no real difference between torque steering and angle steering cause all comes to the 1 thing, the handlebars turn angle. How you compute it doesn't matter.

I disagree, there's a big difference. The current system (what you find on steering wheels) is easier to implement: you only need a rotational encored + a motor and some electronics to control the motor to produce the desired torque (not that hard). If one had to do what I was saying you'd need a torque sensor and some electronics to make a full control loop on the motor (able to set and maintain a specific position).

I'd need to think a bit more about that whole thing, but my guess would be that with usual systems (g25/27 etc) you should use direct steer angle, but you'll be liable to wide discrepancies between the angle you set and what you see in the game (at least during transient phases).

If you had a controller with a torque sensor, you should use direct steer torque and the overall feeling should be better. But maybe the controller would have to be extremely expensive in order to have the necessary performance.

MaX.

Furious

I agree that in real life you steer with torque. You use the (force x radius of the steering wheel=) torque to put the wheel in THE ANGLE YOU WANT. And it's the same thing everywhere. We can also say that "direct angle " mode is really also the "give me the torque" mode. Why? Cause if the FF works fine ( calculates the forces on the handlebars depending on the bike dynamics, tires friction ect) and you still want to turn that wheel by using force, you can calculate the force you are working with with the following variables:
- Force produced by FF
- derative by time of angle value.

If the FF forces it with 1 NM but the wheel is not moving, than? You know the answer.

And I still claim that in proper simulator you need the "turnable" handlebars as they turn in RL

HornetMaX

Quote from: Furious on September 22, 2014, 10:17:55 PM
I agree that in real life you steer with torque. You use the (force x radius of the steering wheel=) torque to put the wheel in THE ANGLE YOU WANT. And it's the same thing everywhere. We can also say that "direct angle " mode is really also the "give me the torque" mode. Why? Cause if the FF works fine ( calculates the forces on the handlebars depending on the bike dynamics, tires friction ect) and you still want to turn that wheel by using force, you can calculate the force you are working with with the following variables:
- Force produced by FF
- derative by time of angle value.
Sure, except that doing time derivatives of noisy signals is messy: if there's too much noise or the signals changes too fast, you end up with extremely large torque signals or, in order to filter them, with delays in the loop. Could be bad.

Quote from: Furious on September 22, 2014, 10:17:55 PM
And I still claim that in proper simulator you need the "turnable" handlebars as they turn in RL
Oh I think you've misunderstood my post (my fault maybe, maybe it wasn't that clear).

In what I was saying, the bars would be turnable, of course (no sense otherwise). The difference would be that the bars output is a torque (and not an angle).
The torque is directly read by a torque sensor, instead of being computed from an angular measurement in an indirect manner.

The bar position will be "set by the game" (more precisely, the control device will have a control loop that will track the target bar position computed by the sim). Of course, applying a torque on the bars will alter the bar angle, as the applied torque is simply added to the "environment" torque by the sim in order to compute the evolution of the (target) bar position.

In a conventional system, the control device sends an angle to the sim and the sim sends a force (feedback) to the control device.
In what I was saying it's the opposite: the control device sends the torque to the sim and the sim sends an angle to the control device (angle that will be implemented by the device, i.e. the bars will turn in this case too). This mimics more naturally the physical model of the bike.

Most likely, generating a torque and reading an angle (usual systems) is cheaper than generating an angle and reading a torque. But the end result may not be the same.
In principle, they are equivalent, in practice it may be a different story.

To a certain degree it is the same difference you can have on these two pedal (or lever) brake systems:

  • The usual system: you have a spring of known stiffness and a position sensor (usually a potentiometer): from the position sensor and the stiffness you can compute the force applied.
  • The better system: a load cell, where there's no actual movement (past a certain point) and a torque is directly read.

MaX.