02-26-2007, 05:29 PM,
|
|
jdeneux
Junior Member
|
Posts: 10
Threads: 0
Joined: Oct 2005
|
|
thelusiv Wrote:jdeneux, I haven't yet created a gain setting for the force-feedback. You could also try turning on stop-and-start to see if that gives you better results. What kind of joystick were you trying to use? Does it work in jstest, jscal, jscalibrator, etc.?
After further investigation, it turns out that it works sometimes with jstest and friends. There is something deeply wrong with the driver, it seems. I will try kernel 2.6.20, with some luck these problems are already fixed.
|
|
03-01-2007, 03:04 PM,
|
|
jdeneux
Junior Member
|
Posts: 10
Threads: 0
Joined: Oct 2005
|
|
thelusiv, I looked into this a long time ago when I wanted to integrate FF into the SDL, or at least make my FF code collaborate with SDL.
SDL can use /dev/input/jsX or /dev/input/eventX depending on how it's compiled. If it uses the second method, then extending the SDL_Joystick (or whatever it's called) to support FF would be easy.
I don't know of any non-intrusive method to do what you are trying to do. I think maybe you could use the name of the device (you can retrieve that with SDL, see the joystick test app in SDL's source code).
Then I think maybe you can also retrieve the name of the joystick through /dev/input/eventX. Then it's just a matter of iterating over the files in /dev/input/eventX and looking for a name match.
That method is not perfect, I don't think one should assume event devices are named /dev/input/eventX. Another problem is that it does not work if you have two devices with the same name (e.g. two "anonymous" devices, or two identical devices).
|
|
03-01-2007, 04:41 PM,
|
|
stenyak
Junior Member
|
Posts: 44
Threads: 1
Joined: Dec 2006
|
|
I suggest you subscribe to the SDL mailing list (maybe there's one for developers, dunno), and ask for some more info there
|
|
03-01-2007, 09:42 PM,
|
|
Kada
Junior Member
|
Posts: 6
Threads: 0
Joined: Mar 2007
|
|
Hello,
it's good to hear, that someone is currently working on native FF support in Linux. Stenyak pointed me to this discussion from the Live for Speed forum, thank you for that.
First of all, I have a basic question, which version of ff-utils do you use for testing? Is somewhere newer version than this one?
My problem with Logitech wheels under linux was, that not all axes were recognized and that the kernel set huge deadzones for the axes. I wrote a little "hack" (I wouldn't call it patch :-)) for 2.6.20, in hid-lgff.c, that adds all axes and removes deadzones.
The problem is, that the logitech wheels, that I've tested (WFF GP, red momo) doesn't report usbhid (field->usage) in standard way, as a standard hid axis. There are 4 axis: wheel, combined gas-brake, gas axis and brake axis. But only 2 are correctly reported (wheel and combined, with deadzones) and thus recognized by the hid driver. Maybe this is the problem for non-working clutch in G25 wheel as Stenyak posted on the lfsforum. (non-axis hid "usage" field reported, for the clutch)
I added usb ids for Logitech WFF GP in hid-lgff.c and hid-ff.c, but I did't get any force by "fftest". That is why I'm asking, if there is not some other newer version of ff-utils.
|
|
03-02-2007, 02:59 AM,
|
|
thelusiv
Administrator
|
Posts: 2,346
Threads: 223
Joined: Jun 2005
|
|
Welcome, Kada
This is the version of ff-utils I'm using, which jdeneux pointed me to: http://sourceforge.net/project/showfiles...e_id=98791
As for your kernel patch, I recommend you communicate with the people on the linux-input mailing list (which jdeneux also pointed me to). The archive is here: http://www.mail-archive.com/linux-input@...f.cuni.cz/
You can subscribe by sending a mail with the text "subscribe linux-input" in the message body to majordomo ~at~ atrey.karlin.mff.cuni.cz
If you can get the GP working on Linux I think you'll make a lot of people happy. It might take a little reverse-engineering if the wheel isn't fully HID compliant. Is that what you're implying? Here's some interesting info on HID: http://www.usb.org/developers/hidpage/
jdeneux, I just signed up for the SDL mailing list and after I do a little more research on the topic, I'm going to post some questions, and try to get started.
|
|
03-02-2007, 11:50 PM,
|
|
anrp
Junior Member
|
Posts: 2
Threads: 0
Joined: Mar 2007
|
|
G25 Wheel
Just wanted to poke my head in here. I contacted Logitech about potentially getting tech info on the FFB stuff in the G25 wheel; they said that they couldn't give it out, so that's not going to be any help. :?
I do have good news though; I own a G25, and I have no windows machines except inside VMs, so I have a vested interest in getting it working fully. (Yes, I bought it with the full knowledge that it wasn't going to completely work for me in the beginning. It mostly works, just not all of the features.)
There is one question I have, and this probably isn't so much the right place but I'll ask anyway: would there potentially be legal trouble with the same person reverse engineering and developing a driver for the linux kernel? I personally don't think so, since I'm not looking at any code, just the inputs and outputs of someone else's code. (I'm willing to work with someone else to do two-party RE if someone wants docs.)
|
|
03-03-2007, 12:47 AM,
|
|
Kada
Junior Member
|
Posts: 6
Threads: 0
Joined: Mar 2007
|
|
thelusiv Wrote:If you can get the GP working on Linux I think you'll make a lot of people happy. Just a quick info. Finally I got force feedback with WFF GP working, yes force feedback works in VDrift (latest svn version of vdrift, hacked 2.6.20 kernel). I'll post more later, I did not sleep whole night (5:50am here :-)).
|
|
03-03-2007, 11:39 AM,
|
|
Kada
Junior Member
|
Posts: 6
Threads: 0
Joined: Mar 2007
|
|
First of all, I was stupid. I always tested force feedback by the "fftest" utility, which never worked for me. But, thanks to this thread, I tried the "ffcfstress" program, and it works. So, adding usbids for the wheel is enough to make WFF GP work (with FF). For separate axis (gas/brake) is a small patch needed. I'll post the details to the linux-input mailing list.
I don't have many experience with VDrift. Is somewhere discussion about FF feeling in VDrift? I searched this forum, but I didn't find anything about "users experience". Maybe it's "too new" feature, isn't it? I'm posting my comments on it here, if it's wrong thread, please move it.
The first problem with FF is, that the wheel is not centered, even if the car is stopped. It's turned about 30 degrees to the left. It feels like flat left front tyre . Maybe some additional calibration is needed. My wheel was _not_ calibrated in the kernel (through jscal utility), it was calibrated only in vdrift.
The FF effects are too sudden. I mean, when I drive straight, or only slightly turning, then there are no forces (except centering force described above). When the turn is harder and the car becomes drifting, then a new (strong) force appears. But it's like yes or no, only strong "drifting" force or nothing (except centering), no smaller contious forces between these two.
The other thing is, that the "drifting" force is "weird". Maybe the forces are in the opposite direction for my wheel (just guessing), like in gtr2, RACE, f1 challenge and must be reversed. Would be possible to add force feedback test to the gui, something like "now moving wheel left", "now moving right", "now ceneterig"?
I'm really glad, that there is opensource racing simulator like this, keep it going :-).
P.S. I spent most of the time compiling nvidia binary s**t for 2.6.20, you need to patch their "sources", the patch is on the nvida official forum. Maybe this save time for someone.
|
|
03-03-2007, 07:41 PM,
|
|
thelusiv
Administrator
|
Posts: 2,346
Threads: 223
Joined: Jun 2005
|
|
Kada, I'm glad you're making progress with your wheel. Thanks for the feedback (no pun intended) about force feedback.
You can add a ff_gain option to your VDrift.config under the [ joystick ] section that will make the forces you feel on the steering wheel stronger or weaker, depending on the number you use. I think maybe by default it's 2.0, so the forces are doubled, but you could set it back to 1.0 and it might feel better for you. 2.0 felt pretty good on my Logitech Momo Racing Force wheel (the black one). I'll add an option for the ff_gain setting to the Options -> Controls -> Joystick menu soon.
As for inverting the forces, again I just set it up so that it felt right on my wheel - when I turn right it pushes the wheel left, and so on. Is this really backwards on your wheel? Is that common for some wheels to take opposite values from others? If so, I can add another option "ff_invert" or something that can be on or off, and this will probably solve the problem.
|
|
03-03-2007, 10:49 PM,
|
|
stenyak
Junior Member
|
Posts: 44
Threads: 1
Joined: Dec 2006
|
|
Forces may feel wrong because, IIRC, the code reads torques applied to the wheels, and applies them to the steering wheel.
This is not what happens in real life. You would need to simulate the linkages from the steering rod attached to both front wheels, through the steering rack, to the steering wheel (ending up with a torque). But not having the suspension simulated properly, i guess that's as close as you can get.
I'm not sure how far from reality it is, maybe not too much, but keep that in mind in the future if you want to get more realistc FFB in vdrift.
|
|
03-04-2007, 07:12 AM,
|
|
stenyak
Junior Member
|
Posts: 44
Threads: 1
Joined: Dec 2006
|
|
The method i mention is the one used by all sims that happen to be acclaimed by the simracing community as being the most realistic, the ones that really allow to "connect" with the car, and that feel the more natural in all circumstances: netKar, netKarPro, Richard Burns Rally, Drivers Republic, LFS (I don't know if there are more sims that do it The Right Way ).
|
|
|