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

FlyPT 6DOF/Stewart/Hexapod Interface for linear and rotating actuators

Discussion in 'FlyPt Mover' started by pmvcda, Jan 2, 2019.

  1. hexpod

    hexpod http://heXpod.xyz

    Joined:
    Apr 18, 2016
    Messages:
    1,094
    Location:
    berlin
    Balance:
    7,099Coins
    Ratings:
    +337 / 5 / -0
    My Motion Simulator:
    DC motor, 6DOF
    For some strange reason in my case the legs doesn’t turn red while out of reach occurs.

    EFBF26F6-A560-4136-A6F3-88EC6F06EF45.jpeg
  2. pmvcda

    pmvcda aka FlyPT

    Joined:
    Nov 3, 2010
    Messages:
    1,869
    Location:
    Portugal
    Balance:
    14,210Coins
    Ratings:
    +2,185 / 16 / -0
    My Motion Simulator:
    6DOF
    If you have stay in last possible pose checked, the rig stays in the last possible position, so legs don't turn red.
    But you see the thin lines still moving and you still receive the message of out of pose.
    If you see the bit range output, the values are fixed, they don't change (there's a bug there, that makes info show with an error, but that's just the ! signal) because the rig stays in the last possible position.
    I can't see that option in the image, but I think that's what you have.
    • Informative Informative x 1
  3. hexpod

    hexpod http://heXpod.xyz

    Joined:
    Apr 18, 2016
    Messages:
    1,094
    Location:
    berlin
    Balance:
    7,099Coins
    Ratings:
    +337 / 5 / -0
    My Motion Simulator:
    DC motor, 6DOF
    Only to mention that I don’t see the small lignes moving but that’s also fine.


  4. BlazinH

    BlazinH Well-Known Member

    Joined:
    Oct 19, 2013
    Messages:
    2,145
    Location:
    Oklahoma City, USA
    Balance:
    16,575Coins
    Ratings:
    +1,831 / 32 / -1
    Could you also please add a network output option @pmvcda like Simtools has? Not everyone uses direct output to a microcontroller.
  5. pmvcda

    pmvcda aka FlyPT

    Joined:
    Nov 3, 2010
    Messages:
    1,869
    Location:
    Portugal
    Balance:
    14,210Coins
    Ratings:
    +2,185 / 16 / -0
    My Motion Simulator:
    6DOF
    You should see this (increased size):
    Sem nome.jpg
    They are really thin. I can increase them and show in red when out of range.

    Will take a look, but not for now.
    Need to rework some parts of the code because of auto calibration. It will bring benefits in other areas for some new features, like scripting movements.

    Right now I'm trying to put DCS in direct feed...
    But can't even make it work on SimTools.
    Seems like DCS ignores the lua script.... :mad: might be something stupid I'm making... not much experience with DCS
  6. BlazinH

    BlazinH Well-Known Member

    Joined:
    Oct 19, 2013
    Messages:
    2,145
    Location:
    Oklahoma City, USA
    Balance:
    16,575Coins
    Ratings:
    +1,831 / 32 / -1
    Maybe once you rework things you can include it then ;). It shouldn't take much effort and will allow greater compatibility.

    I'd offer help with DCS but they've reworked the Lua script since I had it working natively so I think I would have to start from the beginning again. I can take a look though.
  7. pmvcda

    pmvcda aka FlyPT

    Joined:
    Nov 3, 2010
    Messages:
    1,869
    Location:
    Portugal
    Balance:
    14,210Coins
    Ratings:
    +2,185 / 16 / -0
    My Motion Simulator:
    6DOF
    I'm looking at the new script right now... some minutes and I might get it working.
  8. BlazinH

    BlazinH Well-Known Member

    Joined:
    Oct 19, 2013
    Messages:
    2,145
    Location:
    Oklahoma City, USA
    Balance:
    16,575Coins
    Ratings:
    +1,831 / 32 / -1
    I know in the past you had to activate Lua scripting before using it.
  9. BlazinH

    BlazinH Well-Known Member

    Joined:
    Oct 19, 2013
    Messages:
    2,145
    Location:
    Oklahoma City, USA
    Balance:
    16,575Coins
    Ratings:
    +1,831 / 32 / -1
    This may no longer be valid though.

    -- Please, set EnableExportScript = true in the Config/Export/Config.lua file
    -- to activate this script!
  10. pmvcda

    pmvcda aka FlyPT

    Joined:
    Nov 3, 2010
    Messages:
    1,869
    Location:
    Portugal
    Balance:
    14,210Coins
    Ratings:
    +2,185 / 16 / -0
    My Motion Simulator:
    6DOF
    Got the script working to a text file.
    No need to edit the config.
    • Like Like x 1
  11. Gabor Pittner

    Gabor Pittner Active Member

    Joined:
    Oct 25, 2018
    Messages:
    190
    Location:
    Szekesfehervar Hungary
    Balance:
    1,294Coins
    Ratings:
    +84 / 0 / -0
    My Motion Simulator:
    6DOF
    Yes you are right, it needs more positive pitch to feel continous acceleration. Now I try to find the best motion feeling to use simtools tuning washout, etc. and the FlyPT filters... sometimes I can not find myself in the forest :grin. But I have to say it's a very interesting and enjoyable entertainment :thumbs. Its very hard to tweak alone by myself :think Very hard to recognise the real motion when I drive a car in VR. I feel something is wrong but can not know what it is. Im thinking to put a monitor on the rig, at least until I set all motions correctly.
    About crank lenght, I'm affraid if I increase that, it would have much noticable backlash.
    Last edited: Apr 7, 2019
  12. hexpod

    hexpod http://heXpod.xyz

    Joined:
    Apr 18, 2016
    Messages:
    1,094
    Location:
    berlin
    Balance:
    7,099Coins
    Ratings:
    +337 / 5 / -0
    My Motion Simulator:
    DC motor, 6DOF
    I don’t think you’re using the accelerations over 1G so logically, I don’t understand why the backlash could play a role there.

    For the washout you could wait couple of days as the simtools filtering will be reworked in the upcoming release
  13. Gabor Pittner

    Gabor Pittner Active Member

    Joined:
    Oct 25, 2018
    Messages:
    190
    Location:
    Szekesfehervar Hungary
    Balance:
    1,294Coins
    Ratings:
    +84 / 0 / -0
    My Motion Simulator:
    6DOF
    I think the rig becomes jerky because of backlash. Sometimes when pitch moves forward very slowly it gets jerky and feels weird during descend with an airplane. I think it happens because of backlash. However my wormgear drives have very small backlash approximately 1-2mm.
  14. hexpod

    hexpod http://heXpod.xyz

    Joined:
    Apr 18, 2016
    Messages:
    1,094
    Location:
    berlin
    Balance:
    7,099Coins
    Ratings:
    +337 / 5 / -0
    My Motion Simulator:
    DC motor, 6DOF
    Maybe for worm 1-2mm it’s “little” for planetary it would be huge.

    With pitch, it can happened with the arms which are going up and they don’t have any weight on them, however the acceleration has to be pretty important.

    You say it occurs with slow movement, I don’t see any reason for jerking there.

    Try to smooth this signal more or check your accelerations or pid of your motor
  15. BlazinH

    BlazinH Well-Known Member

    Joined:
    Oct 19, 2013
    Messages:
    2,145
    Location:
    Oklahoma City, USA
    Balance:
    16,575Coins
    Ratings:
    +1,831 / 32 / -1
    It depends on the lever length and where measured so its relative.

    Worms tend to have more friction so its possible that could cause some jerking at slow speeds.

    In any case this thread is not appropriate for tuning individual rigs imo just because it uses the FlyPT interface.
    • Agree Agree x 1
  16. pmvcda

    pmvcda aka FlyPT

    Joined:
    Nov 3, 2010
    Messages:
    1,869
    Location:
    Portugal
    Balance:
    14,210Coins
    Ratings:
    +2,185 / 16 / -0
    My Motion Simulator:
    6DOF
    OK, I have DCS working.
    (Only in the next version. To come out this week I hope)

    Code:
    -- DCS LUA SCRIPT FOR THE FLYPT HEXAPOD INTERFACE
    -- Copy this file to the folder %USER%/Saved Games/DCS/Scripts/Export.lua
    -- If the Scripts folder doesn't exist, create it.
    
    function LuaExportStart()
        package.path = package.path..";.\\LuaSocket\\?.lua"
        package.cpath = package.cpath..";.\\LuaSocket\\?.dll"
        socket = require("socket")
        host = host or "127.0.0.1"
        port = port or 4123
        c = socket.udp()
        c:settimeout(0)
        c:setpeername(host, port)
    end
    
    function LuaExportAfterNextFrame()
        local acceleration = LoGetAccelerationUnits() -- In g's
        local pitch, roll, yaw = LoGetADIPitchBankYaw() -- In radians
        -- Yaw output from 0 to 2*PI
        -- Roll and Pitch from -PI to PI
        --LoGetTrueAirSpeed() -- In m/s
        --LoGetModelTime() -- In s
        if c then
            -- The FlyPT Interface uses Z for vertical and Y to the front
            -- That's the opposite in DCS
            -- Besides that, vertical acceleration includes gravity, so we subtract 1 from the value (gravity is already present just by you sitting in the rig)
            socket.try(c:send(string.format("%.4f %.4f %.4f %.4f %.4f %.4f %.4f %.4f", acceleration.x, acceleration.z, acceleration.y - 1, yaw, roll, pitch, LoGetTrueAirSpeed(), LoGetModelTime())))
        end
    end
    
    function LuaExportStop()
        if c then
            c:close()
        end
    end
    
    Took some time to understand the values :oops: Well, not all this time.
    Just posting the script here for my or anyone reference.
    SimTools plugin is not working for me. I receive data with the script it's using, but for some reason I don't get anything in SimTools.

    Next, maybe X-Plane and Race Room
    • Like Like x 2
    • Winner Winner x 1
  17. SilentChill

    SilentChill Problem Maker

    Joined:
    Jul 19, 2014
    Messages:
    2,619
    Occupation:
    Railway Maintenance
    Location:
    Morecambe, Lancashire, England
    Balance:
    20,400Coins
    Ratings:
    +3,480 / 34 / -0
    My Motion Simulator:
    DC motor, Arduino, Motion platform, 6DOF

    iRacing would be a great addition too :D
    • Like Like x 1
  18. pmvcda

    pmvcda aka FlyPT

    Joined:
    Nov 3, 2010
    Messages:
    1,869
    Location:
    Portugal
    Balance:
    14,210Coins
    Ratings:
    +2,185 / 16 / -0
    My Motion Simulator:
    6DOF
    I don't have and never had iRacing.
    If you have a link or some info how they send telemetry, I could try. And testing is up to you ;)
    • Like Like x 1
  19. BlazinH

    BlazinH Well-Known Member

    Joined:
    Oct 19, 2013
    Messages:
    2,145
    Location:
    Oklahoma City, USA
    Balance:
    16,575Coins
    Ratings:
    +1,831 / 32 / -1
    If that doesn't work out I bet those that use iRacing would be willing to get together and gift you a subscription :sos. I don't like their business model myself so when I need some Nascar I just play good ole Nascar Racing 2003 Season which is what iRacing was built on.
    • Agree Agree x 1
  20. hexpod

    hexpod http://heXpod.xyz

    Joined:
    Apr 18, 2016
    Messages:
    1,094
    Location:
    berlin
    Balance:
    7,099Coins
    Ratings:
    +337 / 5 / -0
    My Motion Simulator:
    DC motor, 6DOF
    Xplane would be fantastic.

    The issue there is that we need a butter smooth heave while flying and raw rumble effect while on ground.

    I found a good solution for that in my experimental sim tools plugin.

    If you want help how to “bite” it I am available
    • Like Like x 1
    • Friendly Friendly x 1