• Welcome to PiBoSo Official Forum. Please login or sign up.
October 31, 2020, 11:01:18 PM


World Racing Series beta14 available! :)

Show posts

This section allows you to view all posts made by this member. Note that you can only see posts made in areas you currently have access to.

Messages - Chris_Beeves

Does that not make the lever extremely stiff when there's nothing "flexing"?

Why can't you calibrate it with air in the system?
Quote from: poupou59890 on May 09, 2019, 06:37:31 AMand if the rig can lean as real will be awesome (but this will be for another time)
This has been discussed a whole lot, and leaning a motorcycle sim would probably not contribute to a realistic feeling. The force vector is always parallel with the bikes "y-axis" (the one going straight up through the bike) no matter how much the bike is leaning (a very small difference depending on the tire width). Tilting a sim just makes you feel like you're falling off I guess.
I would put my money on acceleration and braking(raising and lowering the front) and yaw (making the rear go from side to side). That would make a cool experience I think.

Quote from: poupou59890 on May 09, 2019, 06:37:31 AMI filled the brake fluid yesterday, and the feeling is good with the breka lever but I found that the range it is not as expected, not very linear...but I will try to adpat that later when the full rig will be built.

Can't wait to see it running on VR :)

Since there are no calipers, there is no motion for you to feel in the brake handle.. To replicate motion I would try leaving a few bubbles of air in the system while bleeding. That would give you a small "sponge" perhaps?
Edit: then the pressure sensor can't be the lowest point. The bubble would find its way out..
Suggestions and wishlist / Re: Knee drag output
May 09, 2019, 08:39:19 PM
Aah! Thanks. So, unzip, edit, zip?
I actually got the encoder working today!
It is incredible how exact they are. On 1:1 gearing I get a resolution of 0,045 degrees steering angle! (About 8000 ppr)
That should absolutely be sufficient!
Suggestions and wishlist / Re: Knee drag output
May 09, 2019, 08:14:29 PM
I can't find an "effects" folder.. Should I be looking some other place than the install folder?
Last week I got a rotary encoder from a friend. It comes from a hp printer.

Yesterday I finally got around to figuring the wiring out. By the time I finished all the figuring out and it was time to hook it up to 5V I had the days last figuring; I figured it was better to switch the power on when I was less tired, to avoid letting all the magic blue smoke out..

Hopefully this will work for sensing handlebar angle!

Today I started soldering everything to a circuit board. Had som trouble with loose connections making the rear brake lock up. :)

I am the biggest time optimist in the world when it comes to soldering. It takes forever!

Also I ordered two 43A motor controllers. I think I will begin with making a ffb unit with a cordless drill motor to test. Right now I don't know how big a motor I will need.

It'll have to be a proper prototype though, so I'll have to make room for a second motor or a bigger one just in case.
Quote from: HornetMaX on May 07, 2019, 12:15:54 PM
Quote from: Chris_Beeves on May 07, 2019, 07:54:48 AMThe derivative (within a quite small time span) of YawVelocity should be interesting for this, right?
In principle, yes. In practice you'll likely need to be smarter than a plain derivative. You'll have to play with some sort of high-pass filter to see if this is feasible, on the Yaw or on the Yaw velocity.
To be honest, I expect that won't be enough but it depends on what you really want to do with the "Hey I'm losing the rear" signal.

The tricky thing is that a low-side happens pretty fast ...

Yeah, that makes sense.
As you said, it depends on what's good enough..

To actually replicate a "near crash" experience as an aid for the driver is a lot of work since most of the time you just crash anyway ;)

Quote from: HornetMaX on May 07, 2019, 12:15:54 PM
Quote from: Chris_Beeves on May 07, 2019, 07:54:48 AMHow does it read when leaning in a turn? Is it relative to the bike or the ground?
If bike, not interesting, if ground, possibly usable?
I guess you're aware of the Telemetry tool I've made for GPB, right ?
Inspecting the evolution of the angles over a lap can help understand what they are.

They yaw is the "bike direction": imagine a line along the bike frame, project it in the 2d X-Y (horizontal) plane and measure the angle between that projection and a given fixed direction (the "north") and you get the yaw angle.
If there's no lateral sliding (rear or front), then it's the same as the heading, the direction you're moving in.

Not sure what you mean with "relative to the bike or ground".

Maxhud? Haven't tried it yet. Will though.

I get what you mean, but my ambition to describe what I mean in three dimensions clearly outweighed my linguistic talent, so we'll just leave it there!
General Discussion / Re: DS2 users
May 07, 2019, 11:41:23 AM
I use Opentrack and a Ps3 cam to control the rider. It makes me smile every time the rider follows me when I tuck in behind the screen on the straights. :D
General Discussion / Re: DS2 users
May 07, 2019, 08:17:11 AM
Quote from: poupou59890 on May 06, 2019, 02:56:07 PMIs it me or just exiting pit is incredibly difficult in direct steer mode ?

It is the hardest part! Especially on Victoria. I usually just pin it so I crash into the barrier. Holding reset from there usually spawns you on the main straight.
It's not pretty, but it works ;)
Quote from: HornetMaX on May 07, 2019, 07:40:29 AMThe trivial approach is to use m_fYaw/YawVelocity and some filtering: the yaw varies when you follow the track, but if your bike starts to lose the rear in a turn, the yaw will vary quickly. Depending on the detection precision you need, filtering could be enough or totally not enough.
If it's not enough you'd have to go ballistic with something way more complex, like a simplified model of the entire bike & tyres to predict a yaw and see when the measured one diverges.

If GPB outputs in the telemetry the tyres (rear and front) sideslip angles then it would probably be easier to do something, but it's unlikely this will happen give that GPB outputs are the outputs one could reasonably expect to see in a real bike (onboard) telemetry system.

This is a bit over my level, but I'm curious. The derivative (within a quite small time span) of YawVelocity should be interesting for this, right?

How does it read when leaning in a turn? Is it relative to the bike or the ground?
If bike, not interesting, if ground, possibly usable?
Quote from: HornetMaX on May 07, 2019, 06:41:25 AMAnd here it goes again :)
Quote from: HornetMaX on April 20, 2019, 10:19:44 AMDS2, as expected, is the way to go for FFB. I can't even remebber the number of times a newcomer arrives, asks for advice on an FFB rig, one suggests DS2 and the guy ends up saying "I'll do DS1 because <insert wrong explanation here>".
Nah, there I went. All on my own. And found the way out myself. :P

I still think that with better support in the game, that would be a great and cost efficient solution. Something like a spring loaded car sim wheel.

Quote from: HornetMaX on May 07, 2019, 06:41:25 AM
Quote from: Chris_Beeves on May 06, 2019, 09:07:40 PMEnter M301!! Yes, I know! A completely new name!! :O

And WOOW! It actually works surprisingly well!! I still have to tweak the settings a lot, but for proof of concept,
I am more than content!! You can really "feel the road" in the handlebars, and the counter steering is surprisingly
intuitive! (Still difficult as h*ll though)
All this with DSA/DS2 right ?
Exactly. That is the only mode for ffb.

Quote from: HornetMaX on May 07, 2019, 06:41:25 AM
Quote from: Chris_Beeves on May 06, 2019, 09:07:40 PM- Making the .dlo plugin for gpb send serial data to The Arduino to control the knee sliders (to begin with)
You're aware the info is not available in GPB telemetry right ?
I've seen your suggestion/wishlist post about it but judging from past experience I wouldn't bet much on the request being granted.

I had to try.
If I wasn't aware, I wouldn't put it on the wishlist, would I? ;)

Until the miracle happens I will trigger it using lean angle. If it is too "off" I'll combine the integer with an analog input with a potentiometer for on-the-fly calibration.
Quote from: D4rw1n on May 06, 2019, 10:37:32 PMFollowing this very closely !!

A lot of good ideas, and about the haptic feedback for the sliders, I had thought about putting some curved and textured spinning disks directly mapped to motorcycle speed,.
So that when you lean (with actual sliders) and hit the apex, you would touch these curved disks as if it was in real.
Of course only if the chassis can lean.

A question about your loading cells: are you actually measuring the mean value between both of them? or are they dedicated for their proper side?

When I used them for steering I measured the difference between them.
Since I can't write code for the Arduino, I have to settle for editing code other people have done. I used the "Joystick Library" found here on GitHub and adapted it to my setup. Since the steering was mapped to only one analog input on the Arduino, I had to have the load cells work "against" each other and amplify the difference in voltage between them.

(Not an UNO like in the picture, but a Leonardo)

The Vref ended up at about 2,7V and increased to 4,6V when I pushed one of them and about 0,6V when I pushed the other.
A working circuit, but it didn't work the way I thought it would with GP-Bikes.. So i took the circuit apart and used the load cells separately.

Cool idea with the discs btw! I think it it would be quite a lot of work for not so much difference in feel though. IRL knee pucks don't really deliver much "sense of speed". I don't think I would pass a blind test with a 200km/h scrape and a 60km/h one.. Unless there were curbs of course. ;)
General Discussion / Re: DS2 users
May 06, 2019, 09:17:35 PM
Quote from: D4rw1n on May 06, 2019, 08:11:58 PMPlease correct me if I'm wrong, as I'm still trying to understand some difference between DS1 (elderly called DST) & DS2 (elderly called DSA).

(I may repeat with different words what has been already said earlier on this thread, so my apologises in advance for the redundancy)

I'm not sure to understand all the things about DS1 & DS2 as I have never tried it with a handlebar, but will try some day with my xbox controller, *just for science*.

My current understanding is:
- DS1 gets as input a torque value from the game controller, i.e most likely a handlebar with some load cells or any alternative sensor able to measure the torque applied on the handgrips (presumably without force feedback, but see the * further).
- DS2 gets as input a steering angle from the game controller, i.e most likely a handlebar with force feedback feature.

Assuming the force feedback effect we usually talk about (like here and in any other racing game) is calculated from GP-Bikes and sent to the controller, and because the force feedback has a direct effect on the steering angle at anytime (turning resistance but also wobble effect), it would put pressure against driver hands on the handlebar and provide complete random and irrelevant values read from a load cell, therefore it would make no sense to use regular force feedback with DS1. Is that phrasing correct?

Assuming what has been stated above is correct, there is still one thing I don't fully understand and that I have read in multiple times on the forum: "DS1 can't be played with force feedback".

If we consider we use DS1 with a big&powerful stepper motor and optionally a rotary encoder (it's out of scope regarding the topic but still .. I would prefer a close loop though).

DS1 example would be:
You want to lean the motorcycle on the right, so you push on your right handlegrip and/or pull the left one. Call this moment A.
Automagically, your perfect calibration of load cells input is sent as a torque input to GP-Bikes and the physical engine makes its calculations and as a result turns slightly the handlebar (call this moment B) and lean the bike's chassis until you have reached expected lean angle. Call this moment C.
While this was happening, in parallel your steering handlebar has slightly moved as well in real life (moment B) and chassis has leaned as well (moment B too).
Then you release any pressure on your handlebar, and the absence of torque input lets the physical engine put the steering angle to 0 degree again (or close from that) (moment C).

In this scenario, I assume we would feel directly the force through the stepper motor, without using any regular "force feedback" input from the game, but actually a direct effect on the steering handlebar, isn't it?
I'm thinking as well such FFB mode would affect as well torque input, but that would be exactly like in real life.

I'm not sure I have been clear on the 2 different force feedback I'm talking about, as I have actually no precise clue how a regular force feedback is presented from a game to a game controller (int? float? array of float?). If I'm not wrong, I don't think such value is given through telemetry data shared from DLO memory.

EDIT: re-reading my post shows me it can be felt contradictory about the "regular" force feedback and the "stepper motor" feedback.
In other words (again): I'm wondering actually whether the regular force feedback given through DS2 mode is as accurate and as real as the one we would feel through DS1 with a stepper motor controlling the steering.
Hence my statement "therefore it would make no sense to use force feedback with DS1" ...

All that post to say that I have only a very small in-game practice and that I'm trying to see what path I should take to develop my own rig: DS1 or DS2?

I think you pretty much nailed it with that description!

The stepper vs. DS1 I thought about as well. I discarded it as too complicated. DS2 works well enough for me to put my energy there. I'm looking forward to hearing more about this though!
Custom hardware / The M30x/MCCC/Lumberbar
May 06, 2019, 09:07:40 PM
Hello enthusiasts!

This is going to be a monster post describing my ongoing project of making a controller.
The idea is to keep it low budget and open source but maximum fun!
It's gonna be a long one.
Get ready, here comes the blabla:

I recently bought my father a force feedback wheel as a retirement present. It was loads of fun!
But it got me thinking about simulators, or more so the absence of them in motorcycle games.
Why is there no game that implements proper counter steering? (This was before I found GPB)
How hard can it be to make a proper controller?
I started contacting companies (Milestone, Jester, etc) that I knew were making cool arcade motorcycle games.
They were not very interested in my questions and suggestions.
Then I stumbled on to Gp bikes. Love at first sight.. Then I tried direct steering, and wow!
I hated it! What a horrible horrible function! I was using a PlayStation controller at the time, and it was ridiculously impossible.
So, I decided to make my own controller.
Enter MCCC! (Motorcycle countersteer controller) (CCC in Roman numbers =300) So,
The magnificent M300!!

I knew I wanted it to be based on torque input. That's the only way I could think of that could be realistic.
At first I thought about a static bar with pressure sensitive resistors plugged into a ps3 controller,
but a static bar just felt wrong. I thought I'd add an adjustable spring resistance that would change
with acceleration and lean. I would also need two inputs to act as one axis. I thought r1/r2 button
did this, since they are the Z-axis, but it didn't work out.
So, scrapped the M300..

Then I found the Arduino Leonardo which seemed to be the answer to all my questions (except the two-outputs-one-input-problem).

Enter M300! (Again..)

This time I actually built something. A few pieces of wood, an old RC radio and some crashed clip-ons from my old Triumph.
I connected the brake handle (bicycle style handles) to one of the potentiometers and some springs and thread from the
"handlebars" to the other one for steering (until I could figure out the torque thing). Then I took an old throttle handle
and cramped a potentiometer into the end of the right clip-on and connected it to the handle. A little tinkering, zip-ties
and a spring later, I had a working throttle handle!
Loaded The Arduino with a ffb wheel program and actually got the steering, brake and throttle working!
On the "wrong" axis and of course no ffb, sure, but it worked fine in gpb!

Activated Directsteer again, and WOW!! It was horrible!! Still completely impossible..
So I started over..

Enter M300!!
(Again, yes...)

Now I bought two load cells which I connected together in a way that any respectable engineer would frown upon.
Got them working against each other and amplified the voltage difference between them with an op-amp.

After many hours studying and testing I got them working perfectly, just the way I wanted! I used the now
spare potentiometer from the old steering for the clutch handle. Worked perfect!
Plugged it all in and tried it with GPBikes.. Guess what!? It was still horribly horrible!
At this point I was quite ready to give up.

Then I saw Marcel's Mixed Reality video where he put a handlebar on his Fanatec wheel base,
and it looked awesome! I didn't know Piboso had implemented ffb in such a good way!
Sure, it has its bugs on rough surfaces, but wow!

This made me go out and buy a cheap second hand Logitech Driving Force GT wheel to see what
I could do with it. If it worked, I will make my own more powerful ffb base.
I took the M300 apart again and turned the Logitech around and tilted it (as in the picture)
and strapped the remains of the M300 to it. I took the load cells from the steering and used
one for the front brake. Great feeling!

Enter M301!! Yes, I know! A completely new name!! :O

And WOOW! It actually works surprisingly well!! I still have to tweak the settings a lot, but for proof of concept,
I am more than content!! You can really "feel the road" in the handlebars, and the counter steering is surprisingly
intuitive! (Still difficult as h*ll though)

So, I'm still investigating what solution will be best for my new base. A stepper motor with supreme torque and
holding torque is probably the way to go, but I'm not sure how it works with the available open source Arduino
force feedback sketches. Probably not very well without a quite expensive motor driver.. I'm probably gonna try
a largeish DC motor and gear it. Bang/buck ratio is probably hard to beat. I'm thinking, since I don't really
need 900 degreed turning (more like 50), I can gear it with belt and pulleys and get a lot of torque per ampere.

A side project while working on this was my little lean seat. The A.S.S.-unit (Arduino Seat Sensor )
I put switches that monitored if I had my weight to the center, left or right and I got the rider to lean
accordingly in the game. It was cool that I got it working, but it just didn't feel natural at all.
Got the tip from passerby to use head tracking instead. So I got my ps3 cam out and soldered myself
a 3 diode race hat! Using Opentrack I can now move the rider by moving my head. That is some next level stuff!
And it feels much more immersive (close to falling off my chair).

Having a spare load cell I just had to build foot controls as well! Took an old set of foot pegs from my Cbr and connected
switches to the gear side and load cell to the brake side.

It's really nice having a proper shifter!

It contributes greatly to the overall feeling.

That is pretty much where I am today.

What's on the workbench right now is:

- Converting the race hat to IR leds instead of blue ones

- Making haptic feedback knee sliders (so that you get some indication before you fall off in direct steer mode) First prototype is done! They're lying there waiting for serial data to arrive.. I'm thinking of ways to make them wireless, there will be enough cables on this thing as it is..

- Making the .dlo plugin for gpb send serial data to The Arduino to control the knee sliders (to begin with)

- Constructing a prototype ffb base

- Making it all look good (Knowing myself, it is unlikely I will take the time to do that.. :) )

I'll keep updating with my progress!