Space Engineers

Space Engineers

Spug's Easy Auto-Docking 2
Syphond 20 Nov, 2020 @ 9:27am
Ship wont avoid collisions.
Hello, first off, thank you for providing the community with this. Im sure its alot of hard work to make these. I am however experiencing an issue that I'm not sure if its a setting I need to change or a as intended feature. If I am a good distance away from my dock say 5k , and I press the dock button, the ship will raise till it has a straight approach to the connector. It won't avoid anything in its way in either its raising of altitude or in flying to the connector. If a ship or base or land is in the way it will try to go through it. This has cause a few issues even when near base (100 meters or less). The ship also doesn't fly nose forward, which is where a significant amount of my deceleration thrust is (this is a mining ship) Is there a away to correct both behaviors? Thank you in advance for any help.
< >
Showing 1-12 of 12 comments
alenoi 1 Dec, 2020 @ 5:11am 
The same issue here with collision avoidance, I tried out the script with a welder ship. It tried to go through the new build and crashed to it hard
Spug  [developer] 1 Dec, 2020 @ 4:14pm 
Hi, I'm afraid this script does not use collision avoidance! It just used clever maths to estimate where a clear path might be, but it can't actually sense things.
If you really need collision avoidance, you can use a remote control block to fly you near, and you can set the last Waypoint to activate this script.

The flying nose forward issue you raise is just down to the way I chose to do movement. It's too complex to work out which way "forwards" is, so it just continues in the rotation you start it in.
Alternatively, you can set a waypoint just before the connector using the scripts Waypoint feature and it will remember set rotation then
Cypherus 5 Dec, 2020 @ 7:23am 
I just got this script and I`m having the same issue. It only works if the path is clear, otherwise it will run into mountains, trees, ships, and whatnot. I have a high landing pad with 4 connectors. The left, front and back paths are clear but the right one leads to my base which is full of wind turbine towers. I tried setting waypoints way up (the screens says 2-3 waypoints added) but they are ignored. The ships will always fly in a bee-line to the connector and descend or ascend depending on the altitude you activate the docking script.
Too bad it doesn`t avoid collision like the game`s autopilot feature. I even set waypoints high above the connector but the ship will always fly straight to the connector no matter what---while hitting on everything in it`s path.
I wonder why the ship doesn`t use the waypoints created and why it doesn`t maintain its initial altitude until it reaches the connector.
Spug  [developer] 5 Dec, 2020 @ 8:21am 
Originally posted by Cypherus:
I just got this script and I`m having the same issue. It only works if the path is clear, otherwise it will run into mountains, trees, ships, and whatnot. I have a high landing pad with 4 connectors. The left, front and back paths are clear but the right one leads to my base which is full of wind turbine towers. I tried setting waypoints way up (the screens says 2-3 waypoints added) but they are ignored. The ships will always fly in a bee-line to the connector and descend or ascend depending on the altitude you activate the docking script.
Too bad it doesn`t avoid collision like the game`s autopilot feature. I even set waypoints high above the connector but the ship will always fly straight to the connector no matter what---while hitting on everything in it`s path.
I wonder why the ship doesn`t use the waypoints created and why it doesn`t maintain its initial altitude until it reaches the connector.
hi, as I said in my reply above ^ the script doesn't have collision avoidance.

"Hi, I'm afraid this script does not use collision avoidance! It just used clever maths to estimate where a clear path might be, but it can't actually sense things.
If you really need collision avoidance, you can use a remote control block to fly you near, and you can set the last Waypoint to activate this script."

If your waypoints aren't working, that's another matter entirely! One I can help you try to fix.
If the screen says 2-3 waypoints added then it sounds like you are successfully writing them to memory. Check you are saving the waypoints to a particular argument that you then use in the future, perhaps you are doing this step wrong?
kamilmomot 22 Jan, 2022 @ 2:22am 
I try to combine it with this mod:
https://steamhost.cn/steamcommunity_com/sharedfiles/filedetails/?id=2559461462

But with no success, maybe you can look at it?
It's placing dynamic gps(to use with collison avoidence by RC), but it place gps directly on PB.
If it would be possible to set GPS related to PB by some Vector and direction, it may fix ann issue with collision on your script.

Let me know what to you think about it! :)
Spug  [developer] 18 Feb, 2022 @ 5:49am 
Originally posted by kamilmomot:
I try to combine it with this mod:
https://steamhost.cn/steamcommunity_com/sharedfiles/filedetails/?id=2559461462

But with no success, maybe you can look at it?
It's placing dynamic gps(to use with collison avoidence by RC), but it place gps directly on PB.
If it would be possible to set GPS related to PB by some Vector and direction, it may fix ann issue with collision on your script.

Let me know what to you think about it! :)
Hey man, not a bad shout! But inside my script I already have a system that works the same way as this, which does help with my guidance system. Sadly it doesn't help me detect and avoid other floating blocks around as there's no way to know the position/shape of everything you might hit. Only the remote control block knows this.
kamilmomot 18 Feb, 2022 @ 9:23am 
Originally posted by Spug:
Originally posted by kamilmomot:
I try to combine it with this mod:
https://steamhost.cn/steamcommunity_com/sharedfiles/filedetails/?id=2559461462

But with no success, maybe you can look at it?
It's placing dynamic gps(to use with collison avoidence by RC), but it place gps directly on PB.
If it would be possible to set GPS related to PB by some Vector and direction, it may fix ann issue with collision on your script.

Let me know what to you think about it! :)
Hey man, not a bad shout! But inside my script I already have a system that works the same way as this, which does help with my guidance system. Sadly it doesn't help me detect and avoid other floating blocks around as there's no way to know the position/shape of everything you might hit. Only the remote control block knows this.


But your's don't place any GPS coords in game, and this one do.
I was thinking for a hybride that's use gps created by this script to avoid collisions, and when ship will find ship/station in sensor range will execute your's
Frogmaster 18 Aug, 2022 @ 7:00am 
Even with its faults it is a brilliant piece of coding! So what if I have to fly a bit manually, it eliminates having to align the darn docking port! If used with a tiny bit of thought it saves a ton of time.

A hardy thank you and a slap on the back for a job well done! keep up the good work!
DM-Ratman 14 Sep, 2022 @ 3:51pm 
Originally posted by Spug:
Hi, I'm afraid this script does not use collision avoidance! It just used clever maths to estimate where a clear path might be, but it can't actually sense things.
If you really need collision avoidance, you can use a remote control block to fly you near, and you can set the last Waypoint to activate this script.

The flying nose forward issue you raise is just down to the way I chose to do movement. It's too complex to work out which way "forwards" is, so it just continues in the rotation you start it in.
Alternatively, you can set a waypoint just before the connector using the scripts Waypoint feature and it will remember set rotation then

Love the script, and I use it exactly as you recommend with remote control autopiloting to a set approach point, followed by recorded docking route waypoints in this script. But one thing bugs me. The (not) nose forward issue is actually because you have it rotate to attitude of next waypoint first, then you translate to the waypoint--hence sideways flying. If you could possibly reverse that--translate first THEN rotate on arrival--it'll more closely replicate what was flown during the original waypoint recording. I tried flying one run with the bool rotate_during_waypoints set to false, to see if it would correct the attitude sequencing ... that was a disaster, with a wonky attitude held throughout the waypoint route even onto the connector at the end; I immediately set that back to true. Anyway, script still works swell as is, as long as there are a couple of recorded waypoints with good attitudes just prior to the final docking connector. It just disturbs my sensitive pilot's ego to see my ship careening around the approach pattern off-angle until the very end. Cheers!
DM-Ratman 20 Sep, 2022 @ 7:54am 
Since then, I have figured out an operational work-around for off-angle flight by utilizing "double-waypoints."

1) From stop, at initial approach location, point ship in the direction you want to fly to NEXT position in the approach pattern.
2) Run w/ "record" argument; run again with "approach name" argument; run again with same argument to set initial script waypoint (which already has correct attitude for pathing to next waypoint).
3) Fly to next approach position & stop (minimize rotational movements as much as possible). Run to set 1st part of "double-waypoint."
4) Rotate to point at NEXT approach position. Run to set the 2nd part of "double-waypoint."
5) Fly to next position, and repeat "double-waypoints," until docked.

Now in practice, fly to initial approach point either manually or via auto-pilot (I have a GPS marker there, so I can always find it, or easily plop it into auto-pilot route in remote control block). When you activate the auto-dock script, ship rotates to point at next position, flies straight at it, then rotates after arriving at that position. Same for each leg of the pattern where you've set the "double-waypoints." Ahhhhhh ... precision.
Spug  [developer] 20 Sep, 2022 @ 10:47am 
Originally posted by DM-Ratman:
Since then, I have figured out an operational work-around for off-angle flight by utilizing "double-waypoints."

1) From stop, at initial approach location, point ship in the direction you want to fly to NEXT position in the approach pattern.
2) Run w/ "record" argument; run again with "approach name" argument; run again with same argument to set initial script waypoint (which already has correct attitude for pathing to next waypoint).
3) Fly to next approach position & stop (minimize rotational movements as much as possible). Run to set 1st part of "double-waypoint."
4) Rotate to point at NEXT approach position. Run to set the 2nd part of "double-waypoint."
5) Fly to next position, and repeat "double-waypoints," until docked.

Now in practice, fly to initial approach point either manually or via auto-pilot (I have a GPS marker there, so I can always find it, or easily plop it into auto-pilot route in remote control block). When you activate the auto-dock script, ship rotates to point at next position, flies straight at it, then rotates after arriving at that position. Same for each leg of the pattern where you've set the "double-waypoints." Ahhhhhh ... precision.

Hi DM-Ratman
I like this haha. I agree this double waypoint solution is not ideal. Sadly I don't have time to make feature changes to this script, I'm just maintaining it and ensuring it doesn't break for everyone.
I bet it looks glorious when it does pilot your double waypoints route.
All the best,
Spug
DM-Ratman 21 Sep, 2022 @ 3:02pm 
Thanks Spug! One small addition to my previous post: with a large ship (that is really long) the default rotation rates are kind of high, so the ship kind of flails & "over-rotates" at the turning part of the double-waypoint. I'm using cinematic speed setting for that big guy, so I turned the rotation way down in your variable "double rotation_speed" and set it at 0.05. Now it does a stately slow-mo pirouette that's just right for the 10 m/s strut of that cinematic arrival! Thanks for an excellent script that allows for fine-tuning ... I find new uses for it every day, to make my space station work like Chicago/O'Hare!
< >
Showing 1-12 of 12 comments
Per page: 1530 50