Space Engineers

Space Engineers

WCCS - Dock
51 条留言
Wicorel  [作者] 2020 年 1 月 23 日 下午 3:28 
This part is the drone side. The mothership is in the Antenna Receive script.

It can be mobile.. however. the ship needs to be non-moving while docking is taking place.
Black.icE 2020 年 1 月 22 日 下午 9:50 
Can this script be used on a mobile mothership, please?
no 2019 年 5 月 31 日 下午 2:04 
I've added the antenna receive script and the master control script, it turns out I only needed to recompile it :steamfacepalm: . I think the instructions should be a bit clearer though since I had to look through some stuff to find the answer, thanks for your help though :steamhappy:
Wicorel  [作者] 2019 年 5 月 31 日 上午 7:44 
The 'base' also needs the Antenna receive script and the master control script so it can tell the drone its available connectors.
no 2019 年 5 月 31 日 上午 6:18 
Hello, I seem to be having a problem with this script. I have followed the instructions and my drone won't move at all. I have an antenna attached to the drone and an antenna attached to the base or "mom" . Is this script not working? Also, could I have access to the world you used for the demo just to compare? Thanks :cozyspaceengineersb:
Vĕnŕøm™ 2019 年 2 月 27 日 上午 4:36 
Thanks for the info.
On our server someone made the docking port inside a tunnel/passage so the ship has to turn before the entrance, because it cant turn inside.

On my carrier i had to rework the whole hangar so it can rotate but if the drone only turned 20m earlier i would not need to do anything.

It would be nice if there was a parameter/variable to change the distance.
Wicorel  [作者] 2019 年 2 月 26 日 上午 9:00 
The docking start position is set to the length of the ship +50%. Are you having a problem with this distance?

The drone will align it's connector to the docking connector no matter which side of the drone the connector is on. This is so it can connect when moved closer.

The rest of the drone is aligned to the base ship if the alignment is set in the target connector.
if align= is not found in CustomData of the target connector, no alignment is done

0 = forward
1 =up
2 = down
3=left
4=right
5=back

These are oriented according to the orientation of the ShipController in the base.
Vĕnŕøm™ 2019 年 2 月 26 日 上午 6:22 
Can i change the distance where the drone turn for docking?
Can I determine how the drone is aligned to the docking port like 90°?
sonicrules1234 2018 年 11 月 19 日 上午 11:39 
I'm having problems with this again. Everything looks fine except for the speed of the spinning progress indicator. The ship doesn't move when I tell it to dock.

Here's a link to the world:

https://psteamcommunity.yuanyoumao.com/sharedfiles/filedetails/?id=1569165496
sonicrules1234 2018 年 7 月 24 日 上午 8:11 
I'd love to see this working on planets as well. :D
zernon 2018 年 7 月 23 日 下午 9:29 
oh ok, no worries, :) I know planets can be a pain, I can test for you if and when you get it up and running.
Wicorel  [作者] 2018 年 7 月 23 日 下午 9:28 
I'll have to make changes to get it working on planets.
zernon 2018 年 7 月 23 日 下午 7:53 
ok, so how do I get it to dock? I was hoping to use this for a freighter solution planet to asteroid, and small drones from my planetary mines, I will link you one when I am finished with it,
Wicorel  [作者] 2018 年 7 月 23 日 下午 6:52 
I see the problem.

It's not moving up/down to the waypoint because it's trying to maintain level flight in gravity.. and it's too far away when it's right above/below the target point...
zernon 2018 年 7 月 22 日 下午 9:33 
as soon as I figure out how to make a blueprint since update... I hit cntrl b and then I cant save it :(
Wicorel  [作者] 2018 年 7 月 22 日 下午 8:44 
ah, planets... I haven't tested much there with docking..

Either blueprint is fine. I'll use it for testing to ensure I don't have bias for my own test drones :)
zernon 2018 年 7 月 22 日 下午 8:24 
I have moved the connector from front, middle, back, left side, right side, behind, and on top, seems to only happen on planets, space it docks just fine, I even made some little drones, they spin also, just a lot faster. and as far as blueprint, you want my little drones or slightly larger frieghter?
Wicorel  [作者] 2018 年 7 月 22 日 下午 5:16 
Hmm. Where is the connector? Are there any ships in the way?

Can I get a blueprint so I can test?
zernon 2018 年 7 月 22 日 上午 8:28 
Ok so my ship on docking approaches, then spins in a circle.. moves a little bit and spins, what am I doing wrong?
Wicorel  [作者] 2018 年 3 月 15 日 下午 3:19 
Precision matching of velocities is not only complicated, it will be subject to clang/desync/etc.. So I have not even attempted it.

Note that the co-ordinate of the moving connector is just an updated GPS point...

To get this to work, you need to have current position and also the current linear and angular velocity (velocity) of that object.. Then the drone would have to match velocity, but then move relative to that velocity to the docking approach and then dock itself.. All the while the velocity of the target ship can change.
woostyboy 2018 年 3 月 15 日 下午 2:24 
:( Sadly I know nothing about coding. What I'm really after is for the co-ordinate of the moving connector, rather than a fixed GPS point be transmitted to the approaching connector
Wicorel  [作者] 2018 年 3 月 15 日 下午 1:46 
It does not support moving "mother" ships.
woostyboy 2018 年 3 月 15 日 上午 4:24 
Can you use the script to dock onto a moving large grid ship? Thanks.
Wicorel  [作者] 2017 年 12 月 4 日 上午 6:33 
do you have a blueprint I can look at? I want to fix that bug.

You do need craft controller to keep it running.

I do have manually choosing the connector on my list of wanted features.

With the current system, you should be able to make trips between stations: "Dock" has a "launch" command. Then you can travel to the other station (using my NAV module or Keen's autopilot), and then "godock" which will choose the nearest base to dock to.
rol4400 2017 年 12 月 4 日 上午 5:16 
Whenever I send a docking request from a ship the ant recieve programming block on my station generates an "Object reference not set to an instance of an object" error. I thought this may have been because I didn't have the craft controller running however this script didn't work when run on a static station. Is there some way it can be run on stations rather than mother ships? Also, it would be good if we had the option of manually specifying which connecter or station to dock at. This would essentially allow much more complex drones to be developed easily using timer blocks as they could be set to regularly make trips between stations (e.g. mining base and headquarters).
tom 2017 年 11 月 7 日 上午 11:44 
adding to the comments below it does seem the launch function is not working in the current version (or previous). As sonicrules says it appears maybe a timing issue with the connector magnet kicking back in before the thrust? possibly!

As per novacores comment we now are able to acheive the ideal docking behaviour we were hoping for (dock to the nearest 'mom') but it seems the only way to make it consistantly avoid a trip back to another mothership is with a sequence of godock, pause, launch, pause, godock.

that sequence resets it if it was going to the wrong target but doesn't cause a problem if it was going to the right target so can be worked around, as can the launch issue, but happy to help testing!

novacore_ae 2017 年 11 月 6 日 下午 4:51 
I should have been clearer below - V3.0L of the dock script seemed to still thrust the ship away from the dock when I tested it yesterday, later versions don't appear to thrust away. Didn't test it tonight though. Cheers
novacore_ae 2017 年 11 月 6 日 下午 4:44 
Perhaps more along the lines of the original purpose of your script, the second test flew 'Lobster' to a co-ordinate closer to one ship than another, then switched the motherships positions around. Pleasingly, in this situation the' Lobster' targeted the nearest ship every time after only a single 'godock' command was issued. Thanks man!
novacore_ae 2017 年 11 月 6 日 下午 4:44 
Unfortunately I can confirm issuing the 'launch' command the ship still doesn't thrust away from the connector, nonetheless this is the best iteration of this script so far....
Very nice work, dude, thanks!

We did a couple of tests tonight, firstly we manually moved the 'Lobster' between the two motherships which were kept stationary. At one end 'Lobster' would dock without issue, at the other end 'Lobster' would start to dock at the ship but then change its aim aim for the further ship, travelling the distance to the further ship then returning to the dock it was closest to initially. Watching the output of the dock PB, you can see when it changes target.
Quite by accident we discovered a sequence which ensured 'Lobster' would dock at it's nearest ship every time - by issuing 'godock', then issuing ' launch' then 'godock' again, we achieved functional transfer between two stationary docks without the long journey.
Wicorel  [作者] 2017 年 11 月 6 日 下午 4:40 
hmm. it should wait unti it moves farther away before turning the connector back on.

But there may have been recent changes in SE for that. I'll test it again.
sonicrules1234 2017 年 11 月 6 日 下午 4:35 
Yep, that fixes it. Last thing, I don't know if it's a bug with my computer or not, as it happens to me too sometimes. When I use launch, it unlocks but doesn't thrust in time before the connector magnet turns back on. All I needed was the auto dock, but if you have a solution to the auto launch, that'd be great
Wicorel  [作者] 2017 年 11 月 6 日 下午 4:30 
The ship is missing the [WCCT] timer so it cannot do precise movements.

I added it and it docked fine.

Please add a timer with [WCCT] in the name that runs the main Craft Control PB with the argument wcct

sonicrules1234 2017 年 11 月 6 日 上午 8:47 
Ok, finally got back to my computer. The symtoms are a bit different, now it just moves back and forth twisting a bit. Other tests it would just change it's angle. I suppose it's because it has different starting points. I updated the scripts, although I didn't use the new docking script, I used this one. Here's the world:

http://psteamcommunity.yuanyoumao.com/sharedfiles/filedetails/?id=1193642494
Wicorel  [作者] 2017 年 11 月 5 日 下午 5:38 
oh. also make sure to turn on the WCCM timer on Roddy... it was off in that world.
Wicorel  [作者] 2017 年 11 月 5 日 下午 5:38 
Found and fixed the problem.. Sorry about that.
Script updated.
Wicorel  [作者] 2017 年 11 月 5 日 下午 5:16 
did yhou also update the Dock script?

I will take a look at the world in a minute.
novacore_ae 2017 年 11 月 5 日 下午 3:38 
Confirming updated Small Void world at http://psteamcommunity.yuanyoumao.com/sharedfiles/filedetails/?id=1163110234

Focusing on the ship at co-ordinates x = -4364.52, y = -2230.71, z = -990.45 ('Rowdy Roddy' with 'Lobster'), updating the Master Control script and Ant Receive on both ships does not affect behavior of docking.

Adding to tom's description below, we've found that Dock script V3.0L performs as per our previous discussions over at the now outdated DockMGR script; also as you know V3.0S would complete the docking sequence but not launch properly.
V3.0T2 no longer completes the docking sequence, and further testing shows that it, like V3.0S, no longer thrusts away from the dock.

Thanks again, dude, you've been racking up some serious Kudos Points with your efforts here!
Wicorel  [作者] 2017 年 11 月 5 日 下午 2:21 
hmm. ok. I'll check back in a bit to see if it's updated.
tom 2017 年 11 月 5 日 下午 2:18 
Hi Wicorel,

We are finding a problem with the updated scripts... updating the craft control and and ant receive scripts is working fine but when we update the dock script on the drone it is not able to dock with its mothership.

it sits there with repeated messages on the pb dock that it knows its mothership but it doesn't start to dock when the godock command is issued. Ant receive shows 'no [BASE] connectors'

There are [BASE] connectors on the mothership and if we revert the pb dock code to an earlier version it works fine.

Think novacore is going to upload a new version of the test world to demo it.

Wicorel  [作者] 2017 年 10 月 30 日 下午 9:44 
Ah, there's the "problem". The dock request and reponse don't limit themselves. so whoever is first message received is the dock that is used..

This may also tie up docking ports on bases that think a ship should be in-bound.. I'll have to do major changes to fix all that.

Also: you should check out the NAV sub-module. It lets you move the ship easily with just program arguments: http://psteamcommunity.yuanyoumao.com/sharedfiles/filedetails/?id=797020890
Wicorel  [作者] 2017 年 10 月 30 日 下午 8:07 
Camera naming shouldn't matter. Except if it has [VIEW] in the name/CustomData then the camera scanner code won't use the camera.

The sensors do need to be facing 'front/up' for the sensors to be manage correctly.. That's a limitation of my script currently
tom 2017 年 10 月 30 日 上午 5:06 
for what its worth as we've been testing this a lot recently...

i found that i needed to use the exact same camera / sensor layout and named them the same as on one of wicorels mining ships. e.g Camera Front Scan (possibly not necessary)

Any additional cameras on the ship must be turned off during docking or launch sequences, sensors the same i think otherwise it causes navigation issues.

We have ported this setup on to a few different ships now and it works consistantly for us if we keep that layout, naming and other sensors/cameras off

Make sure the miner and base connecters have [DOCK] and [BASE] respectively.
Wicorel  [作者] 2017 年 10 月 24 日 下午 9:42 
maybe the sensors are hitting part of your ship? Do you have a world I can look at to see what's going on?
sonicrules1234 2017 年 10 月 24 日 上午 9:14 
I put a bunch of camera's and sensors on it, and reverted it so that it uses the back part for the connector again, and cleared out the mobile base. It'll approach the connector, flip around a couple times, fly out, and repeat. It gets pretty close to the connector, but not all the way. What am I doing wrong?
Wicorel  [作者] 2017 年 10 月 21 日 下午 3:56 
It does have collision detection/avoidance, but it needs camera and sensors.
sonicrules1234 2017 年 10 月 21 日 下午 12:13 
So I tried having my mining ship dock with this script, but it just crashes into my mobile base on the way there. Does this have collision avoidance?
Wicorel  [作者] 2017 年 9 月 15 日 下午 12:09 
gravity, no. This script doesn't handle orbital descent. I have a seperate script for that.
FPC 2017 年 9 月 15 日 上午 7:29 
Awesome! So to confirm- This and the dock manager can be used to have a transport ship go back and forth between a connector in space and a connector in gravity, continuously?
Wicorel  [作者] 2017 年 9 月 15 日 上午 6:40 
I do have a version that works, but it looks like I haven't updated the workshop in a while. The workshop version likely DOES work still. The mother ship needs to have the DOCK MGR script.