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

Writing a motion cueing software from scratch.

Discussion in 'DIY Motion Simulator Projects' started by Dirty, Feb 28, 2019.

  1. Trip Rodriguez

    Trip Rodriguez VR Pilot

    Joined:
    May 8, 2016
    Messages:
    675
    Location:
    Lake Ariel, Pennsylvania
    Balance:
    3,922Coins
    Ratings:
    +330 / 6 / -0
    My Motion Simulator:
    6DOF
    The 8bit vs 12bit I'm discussing here is for speed apparently.

    I will definitely give it a try, hopefully in just the next few days. I have the sim running now, next I have to figure out all the measurements.

    Last night I found that I have about a touch under 60 degrees of available travel on the torque arms, with 190mm radius. The biggest negative on my new setup is that the middle of travel is at 75.75 degrees, far below the ideal center where the torque arm is perpendicular to the actuator rod. I had to make this compromise in order to prevent interference between the actuator rods and the supporting structures. I think I will make a post to show my modifications tonight or tomorrow. I'm not ready for the final update post, but I can share the big "secret" mod here in this thread and/or my 6DOF issues thread for you guys I think.
  2. hexpod

    hexpod http://heXpod.xyz

    Joined:
    Apr 18, 2016
    Messages:
    1,185
    Location:
    berlin
    Balance:
    7,636Coins
    Ratings:
    +369 / 5 / -0
    My Motion Simulator:
    DC motor, 6DOF
    Not sure if the speed difference is relevant.

    I don’t notice any delay on raw output with 12 bit
  3. harwoodr

    harwoodr New Member

    Joined:
    Dec 9, 2013
    Messages:
    28
    Balance:
    441Coins
    Ratings:
    +11 / 0 / -0
    My Motion Simulator:
    Motion platform, 6DOF
    Sorry - been focused on working on my simulator and writing up a report for it.

    My filters (provided by scipy) let me specify the frequency they operate at - so they expect that any update is within that frequency period. So I have that matching the rate at which simtools sends commands.
  4. Trip Rodriguez

    Trip Rodriguez VR Pilot

    Joined:
    May 8, 2016
    Messages:
    675
    Location:
    Lake Ariel, Pennsylvania
    Balance:
    3,922Coins
    Ratings:
    +330 / 6 / -0
    My Motion Simulator:
    6DOF
    Hello again my friends. Tonight I'm here to pick a fight! @apointner this time it's MY turn to be the one told "you're doing it wrong!".

    I just got my first little test ride on my sim since installing the gas shocks, and it felt VERY promising! The amount of travel felt plenty adequate, and it feels to me like the shocks made a HUGE difference. The only problem is that due to the "fake kinematics" feature of heXpod being bugged I had to use BFF software to run it.

    And... that's what I'm here to argue about!

    I feel that the benefit of allowing cues to play even when one (or more) actuator is out of range FAR outweighs the negatives. Yes, yes, yes, false cues.. I know. Well guess what? I call BS! Ok yeah I know I'm still technically wrong, but with some tuning I found it pretty easy to get things (the past few years with BFF) tuned to where the false cues were essentially unnoticeable to me. I had complaints about other things, but not about false cues. And, as Dirty recently stated, you have to accept some false cues no matter what anyway.

    On the other hand, doing it correctly and having an expected cue simply not happen; there's no way that's ever going to be anything but jarring. The right thing to do is tune so that you never (or at least rarely) run out of travel, but the cost of doing that in terms of the strength of the cues is HUGE on our small Stewart rigs. Far more than I could accept, even before I sacrificed about 30% of my travel on most axes.

    What am I getting at? I just want to make sure you guys all know that I feel this is an option that all our your softwares should have. If you don't agree with me, don't turn it on. =D You can even have a tooltip telling anyone who turns it on that they are an idiot.. I'm ok with that! I'm very grateful that Hexpod added it, and I hope it's fixed soon so I can really enjoy the benefits of SimTools and heXpod. I simply can't live without it.

    Just so we are clear, Hexpod has been fantastic about communicating with me and making sure I'm able to get my sim working great with his software, so this isn't a complaint. He does have this feature, and I'm certain he'll fix it soon enough. I'm just posting about this trying to make sure that Nutkicker and FlyPT give us this option as well!

    Side note: I can't say for sure yet but I think that BFF (maybe because of all the filters) generates a really large amount of latency compared to Simtools and heXpod. It's fine for airliners and air-taxis, but man try a snap-roll and ugh the lag is horrible. I noticed it in racing sims really bad in the past as well.

    Trip
  5. pmvcda

    pmvcda aka FlyPT

    Joined:
    Nov 3, 2010
    Messages:
    2,096
    Location:
    Portugal
    Balance:
    14,906Coins
    Ratings:
    +2,504 / 17 / -0
    My Motion Simulator:
    6DOF
    The FlyPT Interface has it almost from start:
    Sem nome.jpg

    And the FlyPT Mover already has it. First build almost ready:
    Sem nome2.jpg
  6. Trip Rodriguez

    Trip Rodriguez VR Pilot

    Joined:
    May 8, 2016
    Messages:
    675
    Location:
    Lake Ariel, Pennsylvania
    Balance:
    3,922Coins
    Ratings:
    +330 / 6 / -0
    My Motion Simulator:
    6DOF
    You are amazing @pmvcda ! Do you care to weigh in on the argument at all, just for discussions sake?

    Unfortunately I won't be able to play with FlyPT until there is the ability to set my (very) custom min and max servo angle and start position. =( I'm so excited for this! So much customization.... I love it!
  7. pmvcda

    pmvcda aka FlyPT

    Joined:
    Nov 3, 2010
    Messages:
    2,096
    Location:
    Portugal
    Balance:
    14,906Coins
    Ratings:
    +2,504 / 17 / -0
    My Motion Simulator:
    6DOF
    Why I made it?

    In my opinion, normal use should stay inside the limits. But in extreme situations, the ones that happen maybe 10% of the time, it's a shame to suddenly loose any feedback.
    I'm more on the race car sims side.
    We want to keep inside the track. It's smooth. So to feel the small variations, we might want to have a gain that when used outside of the track, goes completely out of limits.
    Now imagine going out of track and the rig stops moving while the car is jumping everywhere.

    That's a simplistic point of view/explanation, but the option is there.
    (note: car sims don't need huge amounts of movement to feel good. They need fast reactions and low lag)

    Another feature I incorporated is the auto gain. What that makes is decrease gain (in actuators) each time the rig goes out of range.
    That's a feature to help adjusting the rig like the above example.
    You start with a gain of 5 and check auto gain (if you make it, you don't need to connect the rig. It's better not, because gain of 5 is huge and with fast dislocations. To use the rig, start with a gain of 1.5 or 2.0).
    The actuators start going out of range and the gain decreases.
    You make some laps on the track, without going out of the track and without collisions.
    After those laps, the gain might be stable at 0.95 for example.
    Now, let's disable auto gain.

    What might happen is that each time you go out of track, the rig can go out of range, but you maximised the feeling while you are in the track, making what really matters.
    Maybe we can compare this to a comercial air plane vs acrobatics. In those cases, gain could be completely different, because the "range" of use is completely different.
    It's like having more or less detail.

    I like to compare this to the wheels FFB. Less range of effects represented, with more strength, but saturating really fast or more range but with less strength.
    In a comercial air plane, I think we want to feel the small details, while in combat/acrobatics, that's a fast action, more violent and less detailed. (apointner is not completely out of reason... It's preferences)

    In my case, I always allow the rig to go outside of range (not actuator outside of range). I'm warned by the interface and if I find it necessary, I can adjust the settings.
    And as I said, auto gain, is a tool to work on it and help define the 10% value I spoke above. Do you want 10%, 50% or 0% of out of range situations? It's up to the user to decide.

    An alert, using just auto gain and no filters, is completely wrong.
    For example, yaw in a car around a track, goes from -180 to 180º. If we don't use a filter for yaw, the rig is out of range most of the time, and you end with a gain of zero and no movement.
    This is a good example of why we need filters. We want to represent full rotations in a rig range of maybe 15º.
    • Agree Agree x 1
    • Informative Informative x 1
    Last edited: Jun 18, 2019
  8. Trip Rodriguez

    Trip Rodriguez VR Pilot

    Joined:
    May 8, 2016
    Messages:
    675
    Location:
    Lake Ariel, Pennsylvania
    Balance:
    3,922Coins
    Ratings:
    +330 / 6 / -0
    My Motion Simulator:
    6DOF
    I agree 100%, though I'd say more like 25% maybe than 10% but that's only a guess. Also though, keep in mind I'm more into aerobatics, dogfighting, and rally racing. =).

    Your example of going off the track on a road course is perfect though. Good stuff.
  9. Dirty

    Dirty Well-Known Member Gold Contributor

    Joined:
    Oct 15, 2017
    Messages:
    744
    Occupation:
    All the way up front.
    Location:
    Germany
    Balance:
    7,905Coins
    Ratings:
    +877 / 3 / -0
    Agree!

    Stopping the whole rig when one actuator goes out of limits is a showstopper that will ruin the experience. But tuning the filters and gains in a way that will prevent this from happening will inevitably mean that you limit the movements of the rig down to almost nothing.

    Allowing the other actuators to keep moving when one stops will create some unwanted rouge-cues :) but in the end I think it is the lesser evil.

    So far, my default will be: "Rig keeps moving" :thumbs
    • Agree Agree x 1
  10. harwoodr

    harwoodr New Member

    Joined:
    Dec 9, 2013
    Messages:
    28
    Balance:
    441Coins
    Ratings:
    +11 / 0 / -0
    My Motion Simulator:
    Motion platform, 6DOF
    Nice thing about my bizarre pneumatic actuators - no hard stops... at least when they're getting shorter - they just get diminishing returns.
  11. hexpod

    hexpod http://heXpod.xyz

    Joined:
    Apr 18, 2016
    Messages:
    1,185
    Location:
    berlin
    Balance:
    7,636Coins
    Ratings:
    +369 / 5 / -0
    My Motion Simulator:
    DC motor, 6DOF
    Well, the main issue with driving “out of workspace” is its unpredictable pose. One has to be very careful and aware that it can put your rig in a bizarre position which is out of the limit of your joints !

    So if you decide to leave it on, you have to test empirically all your dofs at their limits in every combination.

    If your joints support it you can use it. I know that in my rig it would destroy my mechanics although I am using custom high bank joints.

    So good luck guys!
  12. hexpod

    hexpod http://heXpod.xyz

    Joined:
    Apr 18, 2016
    Messages:
    1,185
    Location:
    berlin
    Balance:
    7,636Coins
    Ratings:
    +369 / 5 / -0
    My Motion Simulator:
    DC motor, 6DOF
    Cool, that’s make me think that it could be added as a feature. Like an exponential slow down on the output close to each actuator limit.

    @pmvcda , make it sense ?

    You can pick up the bit output limit and add a ramp
  13. Trip Rodriguez

    Trip Rodriguez VR Pilot

    Joined:
    May 8, 2016
    Messages:
    675
    Location:
    Lake Ariel, Pennsylvania
    Balance:
    3,922Coins
    Ratings:
    +330 / 6 / -0
    My Motion Simulator:
    6DOF
    On my sim when I was using standard servo arm orientation and 180 degrees travel it was safe from mechanical damage as long as I had the arms set to only 100 or 130 degrees. If I used 160mm or 190mm settings on my arms this would be a problem.

    With my current setup it is 100% impossible for my sim to have any collision issues. The only way would be for an arm to go past the limit switches and then somehow break the shock which it can not do. As it sits, if it goes past the limit switch the shock stops the arm and then after a moment the VFD reads an overload and turns off. Don't ask me how I know, or how many times this has been tested! =D
  14. Trip Rodriguez

    Trip Rodriguez VR Pilot

    Joined:
    May 8, 2016
    Messages:
    675
    Location:
    Lake Ariel, Pennsylvania
    Balance:
    3,922Coins
    Ratings:
    +330 / 6 / -0
    My Motion Simulator:
    6DOF
    I was thinking the same thing, but the second and third order filters in FlyPT seem to do a good enough job already, at least for my sim. I won't know 100% for certain until I get my filter settings figured out and see if I can achieve a balance of gradual enough start to motion and still have it move fast enough to feel the cue well. It looks very very good though, I'm pretty sure I will be able to achieve that.
  15. hexpod

    hexpod http://heXpod.xyz

    Joined:
    Apr 18, 2016
    Messages:
    1,185
    Location:
    berlin
    Balance:
    7,636Coins
    Ratings:
    +369 / 5 / -0
    My Motion Simulator:
    DC motor, 6DOF
    Last time I looked, flypt filters ordering wasn't present there.
    Don’t mixe up second order with double.
    The math behind is completely different and so is the output.
    Simtools 2.4 have it on assignments sliders .
    • Informative Informative x 1
    Last edited: Jun 21, 2019
  16. pmvcda

    pmvcda aka FlyPT

    Joined:
    Nov 3, 2010
    Messages:
    2,096
    Location:
    Portugal
    Balance:
    14,906Coins
    Ratings:
    +2,504 / 17 / -0
    My Motion Simulator:
    6DOF
    You have both now

    • Like Like x 1
  17. pmvcda

    pmvcda aka FlyPT

    Joined:
    Nov 3, 2010
    Messages:
    2,096
    Location:
    Portugal
    Balance:
    14,906Coins
    Ratings:
    +2,504 / 17 / -0
    My Motion Simulator:
    6DOF
    Can make it, but then we are limiting even more the range.
  18. hexpod

    hexpod http://heXpod.xyz

    Joined:
    Apr 18, 2016
    Messages:
    1,185
    Location:
    berlin
    Balance:
    7,636Coins
    Ratings:
    +369 / 5 / -0
    My Motion Simulator:
    DC motor, 6DOF
    Which one from the list is a third order LP - EMA ?

    TEMA ?

    I just want to insure there’s no misunderstanding
  19. pmvcda

    pmvcda aka FlyPT

    Joined:
    Nov 3, 2010
    Messages:
    2,096
    Location:
    Portugal
    Balance:
    14,906Coins
    Ratings:
    +2,504 / 17 / -0
    My Motion Simulator:
    6DOF

    From what others say,

    LP(LP(LP())) is a third order low pass.
  20. hexpod

    hexpod http://heXpod.xyz

    Joined:
    Apr 18, 2016
    Messages:
    1,185
    Location:
    berlin
    Balance:
    7,636Coins
    Ratings:
    +369 / 5 / -0
    My Motion Simulator:
    DC motor, 6DOF
    Yes but you can tune and compensate it by increasing the range a bit than.

    The purpose of the concept is to gently hit the limit.