1. Do not share user accounts! Any account that is shared by another person will be blocked and closed. This means: we will close not only the account that is shared, but also the main account of the user who uses another person's account. We have the ability to detect account sharing, so please do not try to cheat the system. This action will take place on 04/18/2023. Read all forum rules.
    Dismiss Notice
  2. 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!
  3. 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
  4. 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

Roll and Pitch swapped, how to change this?

Discussion in 'DIY Motion Simulator Projects' started by xytras, Jun 11, 2017.

  1. xytras

    xytras Member Gold Contributor

    Joined:
    May 28, 2015
    Messages:
    92
    Location:
    germany
    Balance:
    587Coins
    Ratings:
    +23 / 0 / -0
    My Motion Simulator:
    2DOF, DC motor, Arduino
    Now I got this damn thing running again, started LFS, drove a lap but something was clearly wrong.
    The default single player starts with the car standing slightly downhill but my sim starts with a roll right. Driving some meters you get to a hill, instead of that my sim rolled to the left. Grrr...

    So roll and pitch is swapped.

    Okay so I swapped the axis assignments,
    Now DOF1 is pitch and DOF2 is roll but I still get the same result ?

    In the output testing everything looks good to me,
    roll + rolls right
    roll - rolls left
    pitch + goes downhill
    pitch - goes uphill

    I even tried swapping A und B in the interface output but it doesn´t change a thing :-/

    What am I doing wrong? Guess I was in luck with my old motors and drivers all directions were correct but this time I f..... it up somehow.
  2. noorbeast

    noorbeast VR Tassie Devil Staff Member Moderator Race Director

    Joined:
    Jul 13, 2014
    Messages:
    20,549
    Occupation:
    Innovative tech specialist for NGOs
    Location:
    St Helens, Tasmania, Australia
    Balance:
    145,112Coins
    Ratings:
    +10,778 / 52 / -2
    My Motion Simulator:
    3DOF, DC motor, JRK
  3. xytras

    xytras Member Gold Contributor

    Joined:
    May 28, 2015
    Messages:
    92
    Location:
    germany
    Balance:
    587Coins
    Ratings:
    +23 / 0 / -0
    My Motion Simulator:
    2DOF, DC motor, Arduino
    Now I am completely confused ;-)
    If I output test roll to the left (that would be a driving to the right) I get a virtual axis roll going to the left as expected but no yaw to the right ? Huh, I have no yaw axis (yet).

    On pitch right, virtual axis pitch goes right, my Axis 1a goes right, Axis 2a goes left
    On pitch left, virtual axis pitch goes left, my Axis 1a goes left, Axis 2a goes right

    Now I just set it back to simtools default expectations and now pitch and roll are clearly wrong. It rolls on pitch and it pitches on roll.
    And LFS is still rolling to the right instead of pitching forward.

    With this setting this is clearly correct behaviour of course but just wrong ;-)

    Now playing with some DIR:

    [o][o]
    [x][o]
    pitch and roll swapped

    [0][x]
    [x][0]
    both (roll and pitch) do pitch, roll does pitch right downhill, pitch does pitch uphill

    [x][x]
    [x][x]
    both do roll in wrong direction

    [x][o]
    [x][o]
    roll does roll in wrong direction
    pitch does roll in right direction

    [x][o]
    [x][x]
    roll in wrong direction
    pitch is right

    now as conclusion this seemed right to me:
    [o][o]
    [x][x]
    but both do pitch in correct direction with this

    [x][o]
    [o][x]
    both do pitch , pitch does it right, roll does it wrong

    [o][x]
    [o][x]
    roll does roll right,
    pitch does roll wrong

    [o][x]
    [o][o]
    roll does right,
    pitch does pitch in wrong direction

    [x][x]
    [o][o]
    both do pitch in wrong direction

    [o][o]
    [o][o]
    roll right
    pitch does rol right


    [o][o]
    [o][x]
    correct but LFS still swaps pitch and roll :(
  4. noorbeast

    noorbeast VR Tassie Devil Staff Member Moderator Race Director

    Joined:
    Jul 13, 2014
    Messages:
    20,549
    Occupation:
    Innovative tech specialist for NGOs
    Location:
    St Helens, Tasmania, Australia
    Balance:
    145,112Coins
    Ratings:
    +10,778 / 52 / -2
    My Motion Simulator:
    3DOF, DC motor, JRK
    Your really should be starting with surge and sway, doing one axis/force at a time: https://www.xsimulator.net/community/faq/steps-to-create-a-motion-profile.228/

    Just to be clear, roll would be to the right if you mounted a curb on the left side, sway is the opposite, the seat leans away from a corner, for each on a traditional 2DOF one motor goes up and the other goes down. With surge and pitch on a traditional 2DOF both motors move the same way, surge is for acceleration and braking, pitch is for up and down hills.

    Adding pictures of your actual settings is far easier to troubleshoot and give advice.
  5. xytras

    xytras Member Gold Contributor

    Joined:
    May 28, 2015
    Messages:
    92
    Location:
    germany
    Balance:
    587Coins
    Ratings:
    +23 / 0 / -0
    My Motion Simulator:
    2DOF, DC motor, Arduino
    My setup is following racingmats 2DOF guide.
    https://www.xsimulator.net/community/threads/my-2dof-xytras.9802/#post-127306
    Just like this, only replaced the motors and the driver now.

    I don´t quite understand this:
    ### With surge and pitch on a traditional 2DOF both motors move the same way, surge is for acceleration and braking, pitch is for up and down hills. ###

    Isn´t acceleration/breaking the same like up and downhill ? Also known as "pitch" in my case ?
  6. noorbeast

    noorbeast VR Tassie Devil Staff Member Moderator Race Director

    Joined:
    Jul 13, 2014
    Messages:
    20,549
    Occupation:
    Innovative tech specialist for NGOs
    Location:
    St Helens, Tasmania, Australia
    Balance:
    145,112Coins
    Ratings:
    +10,778 / 52 / -2
    My Motion Simulator:
    3DOF, DC motor, JRK
    Surge and pitch are simulated separately for the stated effects.