tud-hri / joan

JOAN is an software package that allows to perform human-in-the loop experiments in the open source driving simulator CARLA. JOAN facilitates communication between human input devices and CARLA, the implementation of haptic feedback, systematically storing experiment data, and the automatic execution of experiments with multiple experimental conditions.
Other
11 stars 7 forks source link

Support for logitech steering wheel #29

Open StijnOosterlinck opened 10 months ago

StijnOosterlinck commented 10 months ago

Hi,

I have Logitech G923 Racing Wheel & Pedals which I want to use to drive around using JOAN.

When adding hardware input, I noticed that there is a preset for logitech steering wheel, but a logitech steering wheel can not be chosen as input. I also noticed that there was a commit on the development branch where this was implemented but this commit was reverted.

Is there still support for logitech steering wheel & pedals? And if so, how do I set it up? Because it doesn't seem to work right now.

Thanks!

OlgerSiebinga commented 10 months ago

Hi,

Yes, there is a preset for a Logitech steering wheel. The only known problem with this is that the channels through which these steering wheels communicate (i.e., all useful information stored in the preset) depent on the drivers you have installed. The type of drivers can also change the name of your steering wheel in the drop-down box. With the standard Windows drivers, it might show up as a generic gaming input. You can use Windows' hardware manager to figure out what the steering wheel is called or install the Logitech gaming software which includes the Logitech drivers and should rename it to a useful name.

To figure out the correct channel you can use JOAN. The Joystick settings window has a "preview" checkbox that allows you to manually check the channels (e.g., move the steering wheel and see which values change). I have pushed a bug fix for this functionality just now (commit dfc556b) so just make sure you pull develop.

The old commit you saw was an attempt to include the Logitech steering wheel SDK in JOAN. This would allow for tunable force feedback. But unfortunately, we could not get this to work because the Logitech SDK needed to be linked to a specific window that always needs to be highlighted in Windows.

StijnOosterlinck commented 10 months ago

Thanks a lot!

It worked if I indeed set the channels by manually checking them. Now I can use my pedals and steering wheel :)

Two small questions:

OlgerSiebinga commented 10 months ago

Yes, you have two options: 1) you can hardcode the preset in joanjoystick.py (line 126 to set the settings, line 206 to add to the dropdown). 2) you can make a simple experiment with all the base settings (for all modules) and load that when you start JOAN.

This probably has to do with the vehicle dynamics, these are not very well defined at this point. We increased the power of the engine but did not adjust the brakes accordingly. I just fixed this for one of our own experiments yesterday, so I pushed that fix now (commit 897655c).

StijnOosterlinck commented 10 months ago

Thanks, that commit indeed made it better.