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

6DOF anti collision algorithms

Discussion in 'DIY Motion Simulator Building Q&A / FAQ' started by Aerosmith, Dec 29, 2024.

  1. Aerosmith

    Aerosmith Active Member

    Joined:
    May 30, 2024
    Messages:
    325
    Occupation:
    self employed
    Location:
    Germany
    Balance:
    1,903Coins
    Ratings:
    +182 / 0 / -0
    My Motion Simulator:
    3DOF, AC motor
    While designing my rig I ran into the problem that there are poses possible that cause collisions. There are internal collisions where the actuators hit the rig structure.
    Collision1.jpg
    Or external collisions where parts of the rig hit the floor or the ceiling.
    Collision2.jpg
    I know, my rig is very special. It has two seats so it's larger than most others from the beginning. I also made the decision (against all advices) not to use VR but instad install a big curved screen. I have to admit that it would be much easier to avoid collisions if I made it like most others do: use VR and place the actuators in a circle around the rig instead of below the platform. But with two seats (1.4m width) that would require even more space and an actuator stroke of >1m to achieve reasonable roll and pitch ranges.

    And even with the "easy" way of placing the seat between the actuators it is still possible to have collisions.
    Rig-PW.jpg
    With pitch down and yaw at the same time the pedal board could hit one of the actuators. So I'm sure I'm not the only one with this problem.

    I have heared that there are plans to implement an anti collision feature in FlyPT Mover. I'm not sure how it works. But calculating the whole mechanical model of the rig and do a object-by-object collision detection would surely be too complicated. And it's not enough to detect a collision. That would be already too late. Velocity and acceleration have to be continous both for each actuator (rotating motor intertia) and the pilot (too much jerk -> risk of injury). So potential collisions have to be foreseen to be able to slow down before it actually happens.

    So I'm looking for a mathematical model to avoid collisions by not only limiting variables like heave or pitch seperately but by monitoring them all simultanously and apply some sort of "dynamical soft limit".
    • Like Like x 1
    Last edited: Dec 30, 2024
  2. Aerosmith

    Aerosmith Active Member

    Joined:
    May 30, 2024
    Messages:
    325
    Occupation:
    self employed
    Location:
    Germany
    Balance:
    1,903Coins
    Ratings:
    +182 / 0 / -0
    My Motion Simulator:
    3DOF, AC motor
    The collision in the first picture in post #1 can be avoided by limiting pitch to +/-30° which should be enough for most cases. If you want to do loopings you need a cardanic suspension with +/-360° range instead of a stewart platform, anyway.
    Most collision cases happen where multiple extreme poses occur simultanously, for example extreme pitch and extreme roll. In extreme heave positions (all actualtors fully extended or fully retracted) the stewart kinematics is self-limiting, e.g. no other movements like pitch, roll, sway or surge are possible, anyway. But with heave centered poses can add up to problematic positions.
    So what we need is to "cut the corners" of the space of possible movements. Let's consider the 3-dimensional space of heave, roll and pitch.
    Cube-limits.png
    The vertical and horizontal walls of the cube are the individual limits while the cut corners mean that the limits are stricter when two or more variables are at the extreme values simultanously.
    For a stewart platform the space of possible movements has 6 dimensions which is difficult to display on a 2D screen. But mathematically it's still possible to calculate distances, shapes and angles in 6d-space.
  3. pmvcda

    pmvcda aka FlyPT

    Joined:
    Nov 3, 2010
    Messages:
    2,171
    Location:
    Portugal
    Balance:
    15,333Coins
    Ratings:
    +2,547 / 17 / -0
    My Motion Simulator:
    6DOF
    For now, flypt mover controls colissions with tne pedals, but i plan to add custom collisions.
    It also limits singularity by not allowing angles bellow a specific value and compresses motion to fit limits
    • Informative Informative x 1
    • Useful Useful x 1
  4. Aerosmith

    Aerosmith Active Member

    Joined:
    May 30, 2024
    Messages:
    325
    Occupation:
    self employed
    Location:
    Germany
    Balance:
    1,903Coins
    Ratings:
    +182 / 0 / -0
    My Motion Simulator:
    3DOF, AC motor
    The possibility to calculate distances is important to foresee possible collisions. If the current position becomes closer to one of the walls of the limiting polyhedron we can slow down the movement before actually hitting the wall. A 6-dimensional "ball" would possibly be easier to calculate than a polyhedron with many surfaces.
    limit-sphere.png
    If the distance to the limiting sphere is greater than the braking distance for the given speed we have to do nothing at all. If it is smaller we have to check the vector component in the direction towards the sphere. If a "collision course" is detected it has to be slowed down. A perpendicular movement (parallel to the sphere) is harmless.

    The problem is that by cutting off the corners of a 3D cube we don't remove much volume. So the limitations are not that severe. Extreme positions for all degrees of freedom at the same time do not occur very often. But in 6D space the corners possibly have more volume than the enclosed sphere.
  5. Aerosmith

    Aerosmith Active Member

    Joined:
    May 30, 2024
    Messages:
    325
    Occupation:
    self employed
    Location:
    Germany
    Balance:
    1,903Coins
    Ratings:
    +182 / 0 / -0
    My Motion Simulator:
    3DOF, AC motor
    That's great!:thumbs The singularity/angle limit will surely solve my internal collision problem (see first picture in post#1). Do you already have an idea how to implement custom collisions? calculating a true 3D model of the collision sensitive parts of the rig would be the most universal aproach but computationally intensive and complex and error prone for the users to setup.

    The 6D-sphere method is mathematically elegant but very counter-intuitive. Most people would hate it. And it's also not necessary. I think, adding contraints to 2 or 3 degrees of freedom is enough in most cases. For example the condition
    ABS(surge)+ABS(sway) < 1.5*range
    with "range" representing the max. individual value of sway and surge would cut the square of reachable positions into an octagon. And in my case
    heave+ABS(roll)+ABS(pitch) < limit
    would prevent the curved screen from hitting the ceiling. It's possible to calculate angles and velocity vectors in the corresponding 3D subset-space which enables collision prediction and decelleration in advance.

    Setting up the conditions for collision prevention does not require math skills. You could just select the DOFs you want to limit. Then you can find the appropriate value for the range factor (1.5 in the example) by trying out. Carefully move the rig close to the point where the collision could occur with the test sliders in the pose window and the factor can be automatically be calculated from the current position.
  6. GRAP

    GRAP Member

    Joined:
    Nov 4, 2023
    Messages:
    32
    Occupation:
    Dog handler, Maitre chien
    Location:
    Montpellier
    Balance:
    214Coins
    Ratings:
    +36 / 0 / -0
    My Motion Simulator:
    6DOF
    Hi
    if you open the legs on the floor. You have place and no collision
    20241201_034021.jpg
  7. pmvcda

    pmvcda aka FlyPT

    Joined:
    Nov 3, 2010
    Messages:
    2,171
    Location:
    Portugal
    Balance:
    15,333Coins
    Ratings:
    +2,547 / 17 / -0
    My Motion Simulator:
    6DOF
    @Aerosmith ,

    Sorry, been on holidays. Now back.

    So What Mover does for now is colision with pedals and singularity.
    Singularity is to avoid the actuators being on the same plane of the top platform. We set the minimum angle allowed and the rig doesn't move.
    With the motion alghorithms you can allow movement making it work like a kind of logistic, decreasing movement near the limits.

    For the pedals you define a 3d vector (start and finish) and it's radius (also the radius of the actuators).
    If the axis are to close, there's risk of colision and the rig acts like in singularity depending on motion alghorithm.
    The axis is visible in the 3d view and enabled if you set the radius (radius=0 is disabled)
    upload_2025-1-4_12-45-25.png

    Here in colision
    upload_2025-1-4_12-56-41.png

    The axis/volume as a start and finish defined by 3D points and you can set any axis...
    What you can also do for now is use the pose filters to limit movement with crop, allowing different values for each of the dof's and minimum/maximum.

    What I plan to add is triangle and plane colisions. Planes/triangles will be assigned to fixed or moving parts.
    You set 3 points in space, assign it to base/top (fixed/moving) a say if that is a triangle or a plane.
    Any intersection is a colision. This is an idea for now and should have some problems, but would allow many solutions.
    Another idea is basic volumes like the cylinder, sphere, pyramid, cone, cube colisions where we define them like above. In reality they could be multiple triangles.
    This might take some time to be done. There's other priorities for now.
    • Like Like x 1
    • Useful Useful x 1