1. For downloading SimTools plugins you need a Download Package. Get it with virtual coins that you receive for forum activity or Buy Download Package - We have a zero Spam tolerance so read our forum rules first.

    Buy Now a Download Plan!
  2. Do not try to cheat our system and do not post an unnecessary amount of useless posts only to earn credits here. We have a zero spam tolerance policy and this will cause a ban of your user account. Otherwise we wish you a pleasant stay here! Read the forum rules
  3. We have a few rules which you need to read and accept before posting anything here! Following these rules will keep the forum clean and your stay pleasant. Do not follow these rules can lead to permanent exclusion from this website: Read the forum rules.
    Are you a company? Read our company rules

News Open source force feed back

Discussion in 'DIY peripherals' started by Hoantv, Oct 2, 2019.

  1. Hoantv

    Hoantv Active Member

    Joined:
    Jul 19, 2019
    Messages:
    107
    Balance:
    873Coins
    Ratings:
    +64 / 1 / -0
    My Motion Simulator:
    AC motor, Arduino
    I saw it seems servo controller code.
    I made a new code to create ffb effects based on several projects. It already uploaded on github
    Next phase is calculate torque. there are reference from here:
    https://github.com/nervTeh/ForceFeedback-core-library
    https://github.com/tloimu/adapt-ffb-joy
    • Like Like x 2
    • Useful Useful x 1
    Last edited: Oct 12, 2019
  2. Hoantv

    Hoantv Active Member

    Joined:
    Jul 19, 2019
    Messages:
    107
    Balance:
    873Coins
    Ratings:
    +64 / 1 / -0
    My Motion Simulator:
    AC motor, Arduino
    I have done torque calculation based on FFB report and test. It always zero.
    after debuging (Serial.println), When changing spring force type on Wheelcheck, Arduino already create new effects. But all effects are always in "Allocated" state.
    printing received data, I saw that it never change and report ID, effectID are too high change when compare with HID descriptor (reportID in [1..14], EffectID in [1..12]).
    Do you have any idea (code is on Github without torque calculation - on testing phase)?



    upload_2019-10-17_23-37-24.png
    • Like Like x 1
  3. Hoantv

    Hoantv Active Member

    Joined:
    Jul 19, 2019
    Messages:
    107
    Balance:
    873Coins
    Ratings:
    +64 / 1 / -0
    My Motion Simulator:
    AC motor, Arduino
    I explain in detail,
    According to page 49 pid1_01.pdf:
    1. When connect Arduino to pc, pc send to host a message to ask the device return blockpool ( report id = 7: how many effect, ram available) -> done (can printed on serial port)
    2. Pc send to the device set feature report (report id =5, can be printed on serial port)
    3. Now the device create a blockload with report_id =6 and send back to pc (can not be printed on serial, wheel check freeze)
    4. Pc start to send data with report_id = 1 (set effect)
    In sketch, main loop alway check enpoint rx availble or not, if availabe read data from serial.
    There are 2 strange here:
    1. Although pc doesnt send effect data, but endpoint rx alway available (report availble end need to receive)
    2. Received data never changes, according to the flow about, the first by must be 1 but i receive 33.
    I doubt step 3, arduino send back blockload to pc. But no idea to check because wheelcheck is freeze if using serial.print on this step.
    • Like Like x 1
  4. Hoantv

    Hoantv Active Member

    Joined:
    Jul 19, 2019
    Messages:
    107
    Balance:
    873Coins
    Ratings:
    +64 / 1 / -0
    My Motion Simulator:
    AC motor, Arduino
    I fixed it. just replace HID_ReceiveReport by USB_Recv (I don't know why, they are same functionality).
    Here is torque result. I use biquadSecondorder make torque smoother for damper/friction,..., but there are some NAN value because I haven't yet implemented wheel speed calculation. I will optimize code 1st beforing make PWM signal (my friend ask me use PID control, i dont know what it means atm :D )
    • Like Like x 1
    • Winner Winner x 1
    Last edited: Oct 18, 2019
  5. Hoantv

    Hoantv Active Member

    Joined:
    Jul 19, 2019
    Messages:
    107
    Balance:
    873Coins
    Ratings:
    +64 / 1 / -0
    My Motion Simulator:
    AC motor, Arduino
    Pedal in progress.
    [​IMG]
    [​IMG]
    • Like Like x 4
  6. cfischer

    cfischer Active Member Gold Contributor

    Joined:
    Sep 7, 2015
    Messages:
    193
    Location:
    Colorado
    Balance:
    1,304Coins
    Ratings:
    +111 / 0 / -0
    Those look familiar
  7. Hoantv

    Hoantv Active Member

    Joined:
    Jul 19, 2019
    Messages:
    107
    Balance:
    873Coins
    Ratings:
    +64 / 1 / -0
    My Motion Simulator:
    AC motor, Arduino
    Yes. There are few deferences between them.
    I download 2d CAD on grabcad. Modify somes to suitble with existing materials like ball-bearing,
  8. Etienne_GameSeed

    Etienne_GameSeed New Member

    Joined:
    Aug 23, 2009
    Messages:
    24
    Occupation:
    Game / Sim Devices / Motion cueing Developper
    Location:
    Pranles, Ardeche, France
    Balance:
    187Coins
    Ratings:
    +10 / 1 / -0
    My Motion Simulator:
    3DOF, 4DOF
    The problem is that you're not respecting original creators and licences. Open source doesn't work like that, you can't just take code that includes licences in the headers, remove them and publish it on github, which is what you did.
    You removed references in the headers, as well as the non commercial creative commons licence in the main folder I published.
    • Agree Agree x 1
  9. Hoantv

    Hoantv Active Member

    Joined:
    Jul 19, 2019
    Messages:
    107
    Balance:
    873Coins
    Ratings:
    +64 / 1 / -0
    My Motion Simulator:
    AC motor, Arduino
    I 've check again deleted files, i still keeped them in header (the original file ffb_pro.h doesn't has header- i didn't change). Maybe I miss HID descriptor because I move it from HID.cpp (not used in Arduino 1.8.10) to Wheel.h. (already add on local). it is 1st time i uploaded in github. Sorry for that!

    upload_2019-10-21_22-47-29.png

    upload_2019-10-21_22-48-50.png
    upload_2019-10-21_22-50-1.png

    upload_2019-10-21_22-50-21.png
  10. RaceRay

    RaceRay Administrator Staff Member SimAxe Beta Tester

    Joined:
    Nov 8, 2006
    Messages:
    4,644
    Occupation:
    Self-employed | Web and application development
    Location:
    Hamburg, Germany
    Balance:
    24,874Coins
    Ratings:
    +1,569 / 10 / -0
    My Motion Simulator:
    2DOF, DC motor, SimAxe, SimforceGT
    Do we have an infringement here? @Etienne_GameSeed are you the original creator of the code?

    If code is based on someone else property it's not allowed to change the header and to remove copyright references.
    If the license is not respected I will need to close the project here. I hope we can clarify this.
    If this is just a misunderstanding please let us know otherwise I ask you to restore the header and to make sure that the original developer is fine with the modified code and that it follows the license terms.

    Thanks, guys.
    • Agree Agree x 1
  11. Hoantv

    Hoantv Active Member

    Joined:
    Jul 19, 2019
    Messages:
    107
    Balance:
    873Coins
    Ratings:
    +64 / 1 / -0
    My Motion Simulator:
    AC motor, Arduino
    i think the problem was solved. I deleted his files last week.
    Last edited: Oct 22, 2019
  12. Etienne_GameSeed

    Etienne_GameSeed New Member

    Joined:
    Aug 23, 2009
    Messages:
    24
    Occupation:
    Game / Sim Devices / Motion cueing Developper
    Location:
    Pranles, Ardeche, France
    Balance:
    187Coins
    Ratings:
    +10 / 1 / -0
    My Motion Simulator:
    3DOF, 4DOF
    You think, but there's still some code from me in your project. Never mind, it's not a big deal, I should never have released it in the first place. I didn't expect that such kinda things happen, but I was very naive :).
    I've started the porting to other platforms (maybe someday I'll come back on this forum to present my work, in the commercial section to avoid problems :grin).

    I started my FFB project for Leonardo from the adapt-ffb-joy project which is hosted here :
    https://github.com/tloimu/adapt-ffb-joy

    This is also from this project that I've helped in the SimuCube firmware development...

    As you can see, licence info is present in ffb.c of this project, and not in ffb.cpp of your project (it was in the project I released).
    I have much better things to do than check all the files.

    Good luck with your project anyway
    Last edited: Oct 22, 2019
  13. Hoantv

    Hoantv Active Member

    Joined:
    Jul 19, 2019
    Messages:
    107
    Balance:
    873Coins
    Ratings:
    +64 / 1 / -0
    My Motion Simulator:
    AC motor, Arduino
    You said i can keep the descriptor. So i keep it in github. But in local i used other descriptors. I will remove it on next commit. So there is not your code in my project any more.
    Last edited: Oct 22, 2019
  14. Etienne_GameSeed

    Etienne_GameSeed New Member

    Joined:
    Aug 23, 2009
    Messages:
    24
    Occupation:
    Game / Sim Devices / Motion cueing Developper
    Location:
    Pranles, Ardeche, France
    Balance:
    187Coins
    Ratings:
    +10 / 1 / -0
    My Motion Simulator:
    3DOF, 4DOF
    You really don't understand. I never said you can't use my code (except if you want to use it commercially). You removed the original licences statements, including the ones of Tero Loimuneva. I'm not complaining only for my code reuse but also for other contributors.
    If you don't understand the principle of open source and can't read 10 lines of text explaining what the original authors expect, just keep the code you've found for yourself and avoid publishing it as if you were the author.
    • Agree Agree x 1
  15. Etienne_GameSeed

    Etienne_GameSeed New Member

    Joined:
    Aug 23, 2009
    Messages:
    24
    Occupation:
    Game / Sim Devices / Motion cueing Developper
    Location:
    Pranles, Ardeche, France
    Balance:
    187Coins
    Ratings:
    +10 / 1 / -0
    My Motion Simulator:
    3DOF, 4DOF
    Here is the original project I published in 2015 : http://www.electroseed.fr/downloads/ESP_WHEEL_0.3.zip
    At least everyone will be able to have a look at what I've shared.
    The original post where I presented my FFB wheel based on an HAPP hardware : http://www.racingfr.com/forum/index.php?showtopic=49384
    The evolution of it with an Ioni : http://www.racingfr.com/forum/index.php?showtopic=49848
    (this RFR forum is now closed, so images are not displayed)

    Other forks of this project :
    https://github.com/fernandoigor/BRWheel
    https://github.com/barsk/BRWheel

    There are probably other forks.
    Last edited: Oct 22, 2019
  16. Hoantv

    Hoantv Active Member

    Joined:
    Jul 19, 2019
    Messages:
    107
    Balance:
    873Coins
    Ratings:
    +64 / 1 / -0
    My Motion Simulator:
    AC motor, Arduino
    I deleted the reponsitory. Check all rule about license before release. Thank.
  17. Hoantv

    Hoantv Active Member

    Joined:
    Jul 19, 2019
    Messages:
    107
    Balance:
    873Coins
    Ratings:
    +64 / 1 / -0
    My Motion Simulator:
    AC motor, Arduino
    • Like Like x 1
  18. BANDICOOT

    BANDICOOT New Member

    Joined:
    Nov 3, 2019
    Messages:
    5
    Balance:
    73Coins
    Ratings:
    +1 / 0 / -0
    My Motion Simulator:
    Arduino
    Good luck in your project
  19. Hoantv

    Hoantv Active Member

    Joined:
    Jul 19, 2019
    Messages:
    107
    Balance:
    873Coins
    Ratings:
    +64 / 1 / -0
    My Motion Simulator:
    AC motor, Arduino
    Pending ffb software to finish pedal 1st.
    Test 2 load cell gas and brake.

    - using arduino micro
    - Using joystick library dynamic hid (for testing, i will write new joystick)
    - using hx711 multi
  20. Hoantv

    Hoantv Active Member

    Joined:
    Jul 19, 2019
    Messages:
    107
    Balance:
    873Coins
    Ratings:
    +64 / 1 / -0
    My Motion Simulator:
    AC motor, Arduino
    • Like Like x 1