How can I connect Logitech G27 with Simulink?

28 views (last 30 days)
EUIHYUN HAN
EUIHYUN HAN on 17 Oct 2018
Commented: Desirae on 14 Sep 2023
I'm trying to interface Logitech G27 driving wheel with Simulink in Matlab 2018b.
I found some references below.
1. Logitech G29 block is available in Matlab 2018b but I have some problems when I try connecting it to G27 instead of G29. Is it possible to do in this way?
2. I've found one paper where G27 was connected to Simulink by Joystick block. https://docplayer.net/48892672-Building-a-matlab-simulink-based-truck-simulator-t-a-h-lousberg.html#show_full_text I use only the driving wheel and pedals, not the gear selector. In this case, what selector parameters should be used to receive the data?
Thanks.
  3 Comments
Ahmad Mateen Chohan
Ahmad Mateen Chohan on 21 Jun 2022
Hy! Sir, I'm Ahmad Mateen Chohan, an Automotive Engineer from Pakistan.
Can you share it's source file at ahmedmateen681@gmail.com
Sheshu Marshetty
Sheshu Marshetty on 10 Aug 2022
Hello,
I am working on same issue with different Vehicle dynamic model
Can you share some source file at Marshettysheshu28@gmail.com

Sign in to comment.

Answers (4)

HUSAIN KANCHWALA
HUSAIN KANCHWALA on 28 Mar 2019
If anybody got a way to do it kindly share.

Behnam Nasirian
Behnam Nasirian on 1 Apr 2019
Hello everyone,
Please let me know if you found the answer to this question.
Thanks,

AYUSH MAHESHWARI
AYUSH MAHESHWARI on 16 Mar 2021
Edited: AYUSH MAHESHWARI on 3 Apr 2021
Hello,
You can have following options :
  1. Use Joystick Input block in MATLAB. From the game controller (control panel settings in windows) provide the ID. This ID you can give as a paremeter in the block and recieve signals from axes, buttons and point of view. For example in my case it's 2 and I am getting my steering signal, throttle, brake and clutch from axis while my gear # and other button values (boolean) on g27 from button output. Check accordingly.Once checked by actuating the axis and button on hardware make sure to callibrate the system.
  2. Create joystick object and setup it in similar fashion as mentioned in option 1.
In option 1 and option 2 you can't change steering parameters from the MATLAB / Simulink and everytime has to switch to Logitech Gaming Software. This is not a good way if your project is research oriented. Some example of these parameters are : wheel linearit, wheel range, overall gain , spring gain , damper gain , combined pedals etc. (you would have seen these parameters in Logitech Gaming Software). Joystick Input is a s-function. I f you will right click on block and select Block Parameters you will see parameters over there are joyid, adjust ports and force feed. This will not help much in in-depth analysis of the rersearch work.
3. Intermediate but flexible operability: Design you own s-function. First study the logitech SDK kit (easily avaialble). Over there you have documentation of classes their properties and functions. You can use these in MATLAB using S-function furthermore defining your own parameters (as mentioned above) and then tuning it in simulink itself and see the effect. In SDK file go into src file you will see multiple src snippets etc. You can use these in your level 2 s-function customized blocks. Read document name "LogitechGamingSteering WheelSDK" and you will find wrapper and .dll (dynamic link library). You can use it further in C sharp based tools such as unity game engine too.
I will though suggest to start from option 1 and if you feel to go in-depth, try developing s-function.
Good Luck
Ayush
  1 Comment
Desirae
Desirae on 14 Sep 2023
I am trying to use your Option 1, but am having trouble finding the ID from the game controller. Can you explain in more detail how I find this information and then how do I use it to connect the Logitech driving wheel/pedals to Simulink?

Sign in to comment.


Vitaliy
Vitaliy on 13 Sep 2023
Hi!
How can I connect Thrustmaster T300 RS GT Edition with Simulink?
I can’t connect this gaming steering wheel with pedals to Simulink, please help

Categories

Find more on Simulink Environment Customization in Help Center and File Exchange

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!