AirSim icon indicating copy to clipboard operation
AirSim copied to clipboard

Steering wheel with Airsim

Open JyNing04 opened this issue 8 years ago • 19 comments

"PhysXCar" : { "RC": { "RemoteControlID": 0 } }

After adding above settings to the json file, a wired thing happened. I can only control the direction of car by accelerator pedal. The steering angle was -1.25 when I release the pedal, and the value would change with the change of force I gave to the pedal. Besides, there was no value of speed, steering, or throttle in the record file.

Did anyone meet this kind of issue? Thank you!

JyNing04 avatar Apr 16 '18 19:04 JyNing04

BTW, I'm using Logitech G29 as a steering wheel controller. I put the x360ce exe in the same directory as the AirSim binary as well.

JyNing04 avatar Apr 16 '18 22:04 JyNing04

For the record, we solved the problem in this issue. tl;dr: if you're using the x360ce route, make sure the x360ce executable is run from the same directory as the binary. This might be nested within subfolders.

mitchellspryn avatar Apr 24 '18 05:04 mitchellspryn

FYI - AirSim now has out-of-support for Logitech G920 wheel (i.e. don't put x360ce in folder). We don't have G29 so we haven't tested that one but you can try remove x360ce and see if that works. If it doesn't, it might be just matter of extending this code a little bit.

sytelus avatar Apr 25 '18 21:04 sytelus

I am currently using G29 and code below worked for me with a PS3 setup:

joystick_controls_.steering = joystick_state_.left_x;
joystick_controls_.throttle = joystick_state_.left_y;
joystick_controls_.brake = (joystick_state_.left_y < -0.5f) ? 1.0f : 0.0f;

rohjunha avatar Apr 26 '18 23:04 rohjunha

Would you mind to get pull request for this?

sytelus avatar Apr 27 '18 00:04 sytelus

Sure, I would do after cleaning my repository.

rohjunha avatar Apr 27 '18 06:04 rohjunha

Hi @mitchellspryn , did you try to use Thrustmaster in the new released city map? I failed to do that.

JyNing04 avatar Apr 30 '18 21:04 JyNing04

Nope. It was broken for me, too (also for Hawaii). I haven't gotten time to debug it.

mitchellspryn avatar May 01 '18 00:05 mitchellspryn

I am using the city environment (precompiled windows binary) on windows 10. I am trying to use Logitech G920 with following settings:

{
  "SeeDocsAt": "https://github.com/Microsoft/AirSim/blob/master/docs/settings.md",
  "SettingsVersion": 1.0,
  "SimMode": "Car",
  "PhysXCar" : {
    "RC": {
      "RemoteControlID": 0
    }
  }
}

I see that the settings file is being picked up by the simulator but it still shows input mode to be keyboard. I can drive with arrow keys. I have downloaded the environment 2 days ago. Device manager shows the controller as Xbox Gaming Device.

kuasha avatar May 28 '18 17:05 kuasha

I tried to do the same as kuasha and have been getting the same results. Kindly help

hrishikeshtawade04 avatar Aug 30 '18 20:08 hrishikeshtawade04

I have Logitech G920 steering wheel and tried connecting it to the blocks environment. I edited the settings.json file and now it looks like this. { "SeeDocsAt": "https://github.com/Microsoft/AirSim/blob/master/docs/settings.md", "SettingsVersion": 1.2, "PhysXCar" : { "RC": { "RemoteControlID": 0 } }

}

But when I stop and play the unreal engine I am still getting the control mode as keyboard. Is there something else to be done?

hrishikeshtawade04 avatar Sep 06 '18 18:09 hrishikeshtawade04

There had been change in settings.json schema. The PhysXCar should be under Vehicles section. Please see settings.md in docs folder.

sytelus avatar Sep 24 '18 12:09 sytelus

So if I add the vehicles section in the settings.json file and connect my controller and open the blocks environment it will connect right?

hrishikeshtawade04 avatar Sep 27 '18 04:09 hrishikeshtawade04

These are my current settings. Are they proper? { "SeeDocsAt": "https://github.com/Microsoft/AirSim/blob/master/docs/settings.md", "SettingsVersion": 1.2, "SimMode": "Car", "ViewMode": "", "Vehicles": { "PhysXCar": { "VehicleType": "PhysXCar", "DefaultVehicleState": "", "AutoCreate": true, "PawnPath": "", "EnableCollisionPassthrogh": false, "EnableCollisions": true, "RC": { "RemoteControlID": 0 }
} } }

hrishikeshtawade04 avatar Sep 27 '18 18:09 hrishikeshtawade04

Hi, Im having the same issue. I am using a G920 and followed the instructions however I can't use the pedals to move the vehicle. The simulator picks up on the steering angles. What changes should be made to the setting.json file to enable the steering wheel to fully control the vehicle? Thank you

tfromb avatar Feb 22 '19 11:02 tfromb

Hi, Im having the same issue. I am using a G920 and followed the instructions however I can't use the pedals to move the vehicle. The simulator picks up on the steering angles. What changes should be made to the setting.json file to enable the steering wheel to fully control the vehicle? Thank you

HI, do you solve the problem? i have the same problem now

wintersoom avatar Jul 09 '19 02:07 wintersoom

Hi, Im having the same issue. I am using a G920 and followed the instructions however I can't use the pedals to move the vehicle. The simulator picks up on the steering angles. What changes should be made to the setting.json file to enable the steering wheel to fully control the vehicle? Thank you

HI, do you solve the problem? i have the same problem now

wintersoom avatar Jul 09 '19 02:07 wintersoom

I have Logitech G920 steering wheel and tried connecting it to the blocks environment. I edited the settings.json file and now it looks like this. { "SeeDocsAt": "https://github.com/Microsoft/AirSim/blob/master/docs/settings.md", "SettingsVersion": 1.2, "PhysXCar" : { "RC": { "RemoteControlID": 0 } }

}

But when I stop and play the unreal engine I am still getting the control mode as keyboard. Is there something else to be done?

HI, do you solve the problem? i have the same problem now

wintersoom avatar Jul 09 '19 02:07 wintersoom

Closed due to age. Please feel free to open a new issue (referring to this one) if you still have this problem. Thanks!

jonyMarino avatar Feb 05 '21 17:02 jonyMarino