r/KerbalSpaceProgram • • Jun 26 '22

Self assembling space station

14.5k Upvotes

427 comments sorted by

979

u/lodurr_voluspa Jun 26 '22

My latest science station has a full crew compliment of 40, replete with a fuel depot, communications pod, and docking zone. The hab area doubles as life rafts, as they can each detach and survive re-entry.

Also, it puts itself together for me, which is nice.The assembly is sped up to be respectful of the viewers time.

Actual assembly is about 6 minutes. One of the biggest issues was that the physics engine seems to impart some excess energy to the docking vessels immediately after they are docked. Normal physics don't seem to affect it, as even very clean docks to large objects result in some violent rocking motion. So the pods had to be able to account for that and reset if their path was interrupted by the reaction of another pod docking.

71

u/15_Redstones Jun 26 '22

Just excess energy or also momentum out of nowhere?

Energy I could understand if docking ports have a strong attractive pair potential between each other.

111

u/lodurr_voluspa Jun 26 '22

It seems to teleport ever so slightly and also aquire some rotational momentum.

I tried turning the docking magnets way down but it could still rock heavily during the lightest docking. I think the game engine just has some artifacts as it recalculates the size of the vessel.

→ More replies (2)

15

u/viperfan7 Jun 26 '22

Does it do collision detection of any kind? Or is it just predefined paths?

39

u/lodurr_voluspa Jun 26 '22

Rudimentary collision detection. No predefined paths at all. You can pack it into pretty much any configuration and it will sort itself out.

→ More replies (5)

6

u/MightBBlueovrU Jun 27 '22

So what did you do to make this happen? I'm sorry I am a vetnoob , I've been playing for years but am still such a novice. Can you do a video or link me something to learn it. I am at like a skylab level rn I have alot of research but that many do king's at once. I mean dang

4

u/lodurr_voluspa Jun 27 '22

It's using kOS plus some scripting I wrote for it.

https://ksp-kos.github.io/KOS/

They have some decent getting started tutorials if you are interested.

2

u/snozzberrypatch Jun 27 '22

Can't you turn off or reduce the docking force on the docking port?

→ More replies (1)

2

u/Abla90 Jul 02 '22

It probably doing that because time is sped up. That tends to make the physics act a little wack.

→ More replies (1)

4

u/photoengineer Jun 27 '22

Oh my goodness this is phenomenal engineering! Well done!

→ More replies (25)

1.4k

u/Elise211212 Jun 26 '22

Why are you wasting time on space stations with skills like that, you should be building the Iron Giant

1.6k

u/Electrical_Prior_374 Jun 26 '22

This is entirely under appreciated. This is some of the coolest engineering i have ever seen, and with fantastic programmong to boot. Good job

343

u/karantza Super Kerbalnaut Jun 26 '22

Right? I see how it's being done (though I wish I knew which autopilot!) and that makes it all the more impressive. It's like Penn & Teller's clear cups and balls trick.

189

u/LeHopital Jun 26 '22 edited Jun 26 '22

I don't see how it's being done. How is it being done?

EDIT: Just read one of the later comments. Very cool! Why does this not have thousands of upvotes?

327

u/lodurr_voluspa Jun 26 '22

Short answer is kOS and vector math.

59

u/LeHopital Jun 26 '22

Also, would this process continue if you switched focus to another craft while it was assembling? Could you just start the process, go do something else, and then come back and have it be assembled?

79

u/lodurr_voluspa Jun 26 '22

As long as the craft you switched to was inside physics range of the other pods it will continue apace. Get out of physics range and it will suspend everything.

→ More replies (2)

66

u/LeHopital Jun 26 '22

Got it. Are those Vernor engines? Do you get those from a mod? I'm playing an earlier version so maybe I just don't have them.

88

u/lodurr_voluspa Jun 26 '22

Mosty ants and spiders with an occasional cub. All stock parts other than the kOS control part.

→ More replies (2)
→ More replies (4)
→ More replies (1)

23

u/_EveryDay Jun 26 '22

I think everyone is appreciating it just fine

→ More replies (1)

0

u/[deleted] Jun 26 '22

[deleted]

→ More replies (3)

140

u/norsebeast Jun 26 '22

Clearly he must have been distracting the Kraken on the far side of the planet by jingling some keys or something.

62

u/lodurr_voluspa Jun 26 '22

2

u/Neither-Monk Jun 29 '22

Oh, you made the Picasso rocket! This was much less horrifying.

3

u/lodurr_voluspa Jun 29 '22

Haha, yep.

Less viscerally problematic.

17

u/norsebeast Jun 26 '22

Ah that definitely makes sense now

→ More replies (2)

194

u/No_Guidance1953 Jun 26 '22

Is it possible to lean this power?

148

u/lodurr_voluspa Jun 26 '22

KOS official documentation and youtube have some great tutorials to get started with.

0

u/[deleted] Jun 26 '22

[deleted]

→ More replies (1)

201

u/Superalpha1 Jun 26 '22

Not from a console player.

19

u/communiqui Jun 27 '22

Its not a story a console player would tell you..

34

u/Magdalus7 Jun 26 '22

So awesome .. but how do the parts know where to go?

83

u/lodurr_voluspa Jun 26 '22

It uses kos tags on each pod to set a control from dock and a target dock. Right after staging it searches all neighboring pods for its named target dock.

18

u/HektorInkura Jun 26 '22

Nope, that's clearly black magic... you can't convince me otherwise ^

48

u/Arcadius274 Jun 26 '22

....well I can get to the mun like 90 percent of the time so there.

30

u/lodurr_voluspa Jun 26 '22

Hey, that's nothing to scoff at. KSP is hard.

18

u/Arcadius274 Jun 26 '22

Lol I joke I been playing since before release but this I could never pull this off. This is impressive as hell

20

u/wookiee_goldberg Jun 26 '22

Did you have to program in collision-avoidance logic for the initial break-up-and-organize phase so the swarm didn't RUD itself before starting the dockings?

20

u/lodurr_voluspa Jun 26 '22

Yep, though the collision avoidance logic is pretty elementary. Since they aren't moving quickly relative to each other I could keep it simple.

2

u/3636373536333662 Jun 27 '22

I'm curious how it works, as I don't remember anything in KOS for checking for nearby vessels. Do they transmit their positions to eachother?

5

u/lodurr_voluspa Jun 27 '22

There is an API call that will give you a list of ships nearby. Once you have a reference to the ship you can get the ships position and that position reference will keep getting updated with each physics slice.

→ More replies (2)

14

u/[deleted] Jun 26 '22

Can you share that on the workshop? I'd love to see it in action on my machine. It's beautiful!

10

u/lodurr_voluspa Jun 26 '22

Going to put the scripts out on github. May upload the ship as well, but it will require knowing how kOS and boot scripts work and tying them back together.

11

u/anaximander19 Jun 26 '22

Agreed; can't wait to watch the slideshow of its assembly process.

6

u/SpaceHub Jun 26 '22

You'll probably have to individually tag the parts and dock though, this looks like a custom main script for this specific station with reusable functions (docking etc.)

→ More replies (1)

10

u/evilroyslade420 Jun 26 '22

do you work for actual NASA

11

u/lodurr_voluspa Jun 26 '22

No though that would be fun.

→ More replies (2)

10

u/YourNetworkIsHaunted Jun 26 '22

...This may be the first recorded case of Rapid Planned Assembly.

2

u/lodurr_voluspa Jun 26 '22

RPA. Love it.

9

u/manticore116 Jun 26 '22

I want to know how much monoprop you used lmao. Probably 2km/s in dV in rcs lol

Still though, cool af and definitely an awesome project!

17

u/lodurr_voluspa Jun 26 '22

Not an ounce of monoprop if you can believe it. The engines are mostly ants and spiders. Once assembled it can fly itself around like one of my eggships.

4

u/manticore116 Jun 26 '22

Still though, that's a lot of propellant lost during tracking. Out of curiosity, I've never messed with the kerbal programming, could you sequence it to just maintain a standoff until a previous component has docked? So you have a core and instead of all trying to dock at the same time, they go in order?

4

u/lodurr_voluspa Jun 26 '22

It's fuel use isn't as dramatic as it looks since most of the activity you see is at single digit percent of thrust limit.

I was looking more for rapid assembly rather than efficient assembly though there are multiple ways to make it use less fuel if that's desired too. Most efficient would be for it to hold at a somewhat fixed distance from the station and have the station rotate each docking port towards the next in line.

7

u/CasualBrit5 Jun 26 '22

Now that’s cool. How long did it take to program?

Also I expect someone to use this for a stickbug meme.

8

u/lodurr_voluspa Jun 26 '22

7 or 8 hours but its built on a lot of knowledge from my previous projects.

6

u/[deleted] Jun 26 '22

How the hell are you getting that many frames? My standard RP1 install slaughters my PC.

7

u/lodurr_voluspa Jun 26 '22

Video is sped up a bit. Actual FPS is about 9.

→ More replies (1)

5

u/skillie81 Jun 26 '22

This is insane! Time to download and learn KOS. You deserve a million upvotes. Coolest thing ive ever seen in ksp

1

u/lodurr_voluspa Jun 26 '22

Thanks! Happy journeys with kOS. I've had a lot of fun woth it.

5

u/SilkieBug Kerbonaut Jun 26 '22

Beautifully done, the skill required to accomplish this is off the charts.

You’re the person I’ve seen upload those eggships?

5

u/lodurr_voluspa Jun 26 '22

Thanks!

Yes, the eggships are mine as well. The code driving the pods is derived from the eggships.

→ More replies (1)

5

u/amalgam_reynolds Jun 26 '22

Kessler syndrome called, they want their collisional cascade back.

7

u/lodurr_voluspa Jun 26 '22

The ship can fly itself using the combined engines. So when doing it "for real" it can be assembled in a collision path with the atmosphere and then pull itself back up. That way the debris will burn up on reentry.

→ More replies (1)

4

u/ronban14 Jun 26 '22

I knew Eggtech was evolving but I didn't expect this.

4

u/lodurr_voluspa Jun 26 '22

So many curious use cases. :)

3

u/thegovortator Jun 26 '22

I will literally cash app you $20 to show me your scripts for this I’m guessing this is KOS mod

1

u/lodurr_voluspa Jun 26 '22

Getting some other requests, so I'm going to toss something on github.

3

u/niks_15 Jun 26 '22

50% of the ship is RCS thrusters

4

u/lodurr_voluspa Jun 26 '22

Ants and spiders. Not a single RCS thruster on it. :)

→ More replies (1)

3

u/LikesBreakfast Jun 26 '22

Well, if you want something to improve, that solar panel arrangement is kinda poor. In almost all attitudes (except two), you'll be getting less than full power at all times... I believe your best case static attitude would get you an average of about 70% throughout a year.

I recommend placing your panels so that they all rotate along the same axis. That way you can get close to 100% (except on a couple of days) throughout an entire year.

1

u/lodurr_voluspa Jun 26 '22

Makes sense., thanks.

3

u/GC3PR Jun 26 '22

BURN THE WITCH

5

u/lodurr_voluspa Jun 26 '22

But..... I weight less than a duck!

→ More replies (1)

3

u/Nix_Frame Jun 26 '22

How did you make them assemble? I would love to do something like this on a much smaller scale haha

5

u/lodurr_voluspa Jun 26 '22

kOS, math, and scripting for the short answerr.

3

u/[deleted] Jun 26 '22

Craft file?

3

u/lodurr_voluspa Jun 26 '22

Going to put the scripts out on github. May upload the ship as well, but it will require knowing how kOS and boot scripts work and tying them back together.

3

u/concorde77 Jun 26 '22

With all that debris from the fairing, I guess it's a self Kesslering space station too

2

u/lodurr_voluspa Jun 26 '22

Since the station can fly itself using all the small engines it can disassemble on a collision path with the atmosphere and then pull itself back up when complete.

3

u/phrogdontcare Jun 27 '22

is this kind of space station technology being considered in real life? it seems like a really good way of building space stations without needing a skilled astronaut onboard each compartment to control docking

3

u/lodurr_voluspa Jun 27 '22

Not that I am aware of, but it's completely technologically feasible.

→ More replies (1)
→ More replies (1)

3

u/UnitatoPop Jun 27 '22

How'd you ensure the docking port alignment to be accurate?

2

u/lodurr_voluspa Jun 27 '22 edited Jun 27 '22

The "direction" that kOS gives me for where the target dock is pointing also includes rotational information. So I'm telling the ship to match the "direction" towards the target dock which will include rotating the ship to match the target dock rotation.

3

u/UnitatoPop Jun 27 '22

Oh wow really ? Is it dead on precise? Or there's a smidge of rotation ?

2

u/lodurr_voluspa Jun 27 '22

Seems to be pretty close. I've never been able to visually notice it being off.

→ More replies (2)

3

u/stoobah Jun 27 '22

Tell me that this isn't dark sorcery so I can tell you you're full of shit.

3

u/lodurr_voluspa Jun 28 '22

I would never use dark sorcery...

Uh, more than once.

→ More replies (1)

2.0k

u/vonbrauneye Jun 26 '22

This guy's out here playing Kerbal 3 while we're all still waiting for 2 to drop.

238

u/[deleted] Jun 26 '22

mans is playing American Ninja Warriors while we're playing pogo stick over here

21

u/Banaam Jun 27 '22

I jumped once

→ More replies (1)

194

u/ShadowFiendSashimi Jun 26 '22

what are you iron man?

71

u/ChiefBroady Jun 26 '22

Was about to say, that’s some iron man level shit right there.

→ More replies (1)

9

u/TheMightyGamble Jun 26 '22

Was thinking more TLK Bumblebee but that works too

2

u/Feeling_Gap_7956 Jun 26 '22

I’m assuming this is modded?

1

u/lodurr_voluspa Jun 26 '22

kOS plus some scripts I wrote.

2

u/Sweaty_Prompt5260 Jun 26 '22

And I can’t land on minmus without trying 10 times…

1

u/lodurr_voluspa Jun 26 '22

If I videoed my first minmus landings it would be a comedy reel.

2

u/avalisk Jun 26 '22

I landed on the moon yesterday and walked around with a strut of accomplishment until this video.

1

u/lodurr_voluspa Jun 26 '22

My first moon landing is still my second favorite kerbal achievement in terms of how awesome it felt.

2

u/Kergeon Jun 26 '22

nice work! also how?

1

u/lodurr_voluspa Jun 26 '22

kOS, scripts, and vector math.

2

u/[deleted] Jun 26 '22

This is so well executed, been watching this over and over picking up little details each time. Good excuse for me to jump back on and stress myself out for hours without ever leaving the launch pad, thanks for the inspiration!

1

u/lodurr_voluspa Jun 27 '22

Thanks! Glad to be some inspiration!

2

u/bagginsses Jun 26 '22

Are you a control engineer IRL? This is above all else the coolest thing I've seen in KSP! Great work! I hope to even be able to dock two ships with kOS some day.

1

u/lodurr_voluspa Jun 26 '22

No, I should probably learn some because I think I am reinventing the wheel a lot.

2

u/IAmFullOfDed Jun 26 '22

Where is the spaghetti? Where are the explosions?

1

u/lodurr_voluspa Jun 26 '22

The spaghetti is in the code that drives this. No explosions though.

2

u/[deleted] Jun 26 '22

What happens to all the debris?

4

u/lodurr_voluspa Jun 26 '22

Heads back down into the atmosphere while the station uses the engines to pull itself back to full orbit.

2

u/ez2cyio Jun 26 '22

Could be used for orbital ovoidance!!?

2

u/caelorcaaaa Jun 26 '22

Okay…..now how the F@$&# did you build that perfection of kerbal engineering

1

u/lodurr_voluspa Jun 27 '22

kOS and experimentation: )

2

u/zpiercy Jun 27 '22

This is awesome, this reminds me a lot of the book SevenEves! Check it out.

2

u/lodurr_voluspa Jun 27 '22

Never heard of it, but I'll look it up, thanks!

2

u/Ali_Army107 Jun 27 '22

How do you control multiple ships at once?

2

u/lodurr_voluspa Jun 27 '22

The pods are controlling themselves via kOS scripts. Only thing I'm doing in the video is hitting the spacebar to set it off.

2

u/TheMasterShrew Jun 27 '22

How was this done? A mod?

1

u/lodurr_voluspa Jun 27 '22

kOS plus scripting

2

u/ap2patrick Jun 27 '22

Have you played From the Depths?

1

u/lodurr_voluspa Jun 27 '22

Nope, don't have much gaming time these days so mostly just play Kerbal when I have a spare leisure minute.

2

u/xylvera Jun 27 '22

So you're an actually rocket scientist, right? If not, you could be.

1

u/lodurr_voluspa Jun 28 '22

Nope, job is pretty unrelated to this.

2

u/QueenOrial Jun 27 '22

It seemed so chaotic at first. I can't believe it's actually works how it intented and smooth. Did you use some sort of script and mod for those?

2

u/lodurr_voluspa Jun 28 '22

kOS which allows me to write some scripts to control the individual pods.

2

u/QueenOrial Jun 28 '22 edited Jun 28 '22

Can I use this to launch stuff from mothership plane? or it won't work for stuff in atmosphere an/or outside of physics loading rage?

2

u/lodurr_voluspa Jun 28 '22

Atmospheric docking and/or docking in a gravity well is considerably harder and requires loads more fuel to pull off. It's not impossible, but this particular script won't do it.

It will also only work in physics loading range, but kOS can set physics loading range for individual craft to make it longer than normal (be warned of strange consequences though!)

2

u/[deleted] Jun 28 '22

How? Mechjeb?

1

u/lodurr_voluspa Jun 29 '22

kOS and some scripts I built

2

u/Chlorine_consumer Jun 29 '22

how?

1

u/lodurr_voluspa Jun 29 '22

kOS, scripting, and vector math in a nutshell

2

u/cheese123544 Aug 10 '22

just, how?

1

u/lodurr_voluspa Aug 10 '22

kOS, and lots of vector math. :)

2

u/[deleted] Dec 11 '22

Excuse me HOW

(I am late I’m sorting by top post of all time)

1

u/lodurr_voluspa Dec 12 '22

:) kOS and vector math mostly.

→ More replies (2)

60

u/[deleted] Jun 26 '22

This is amazing. The KSP community never ceases to amaze me.

58

u/kalpyy Jun 26 '22

time to install kos

54

u/Mr-Logic101 Jun 26 '22

Congratulations. You have official beat Kerbal Space Program

101

u/[deleted] Jun 26 '22

Was this designed by Tony Stark

50

u/Aironught Jun 26 '22

In a cave with a bunch of scraps

20

u/gerusz Jun 26 '22

And here I am, being proud of my self-deploying relays that just use Smart Parts and basic robotics. Good job!

8

u/ManuBender Jun 26 '22

as you should be!

19

u/[deleted] Jun 26 '22

Guess you win KSP. I suspect you are Scott Manley.

27

u/GoBuffaloes Jun 26 '22

Scott Manlier

18

u/SUPER_REDDIT_ADDICT Jun 26 '22

Okay that was fucking awesome!

17

u/kasmith2020 Jun 26 '22

I haven’t played KSP since 1.0 finally launched. When I left the modding community was going nuts (in a good way), the asteroids had been added, and the career mode was new. I put 500 hours into the sandbox before that.

THIS fucking blows my mind.

13

u/Unknownblueuser Jun 26 '22

Witchcraft!

11

u/Mekbab Jun 26 '22

everytime i see something like this i think to myself i must be fucking dumb

7

u/that_baddest_dude Jun 26 '22

Holy fucking shit, dude. This is straight up the most insane thing I've ever seen in this game, bar none.

And I've seen some insane things. What the fuck?

7

u/ArakiSatoshi Jun 26 '22

I'm so glad I opened Reddit today, this is beautiful

7

u/147896325987456321 Jun 26 '22

I swear, if we put the top 10% of Kerbal space players in NASA, we would have a Metroplex Transformer on the moon, Gundams on Mars and unlimited resources on earth within 5 years.

6

u/ksp_HoDeok Jun 26 '22

Very cool!

6

u/LeHopital Jun 26 '22

WHAAAAAA.....?

6

u/CastleBravo45 Jun 26 '22

This might be the coolest thing I've ever seen on Kerbal.

6

u/CaptRonnie Jun 26 '22

Take my upvote you damn genius

6

u/snake8head Jun 26 '22

Some serious proto-molecule vibes here. Thing explodes into pieces and reassembles itself into something else.

6

u/[deleted] Jun 27 '22

We have reached peak kerbal here. Pack it up boys, OP wins.

2

u/_ara Jun 26 '22

Best build and some of the worst camera work

6

u/lodurr_voluspa Jun 26 '22

Every time you dock it resets the camera. So not a lot that can be done there.

→ More replies (1)

5

u/CSWorldChamp Jun 26 '22

Wow. THAT must’ve taken a while to program. Nice work!

5

u/[deleted] Jun 26 '22

I'm still trying to get a communications satellite relay in orbit :(

5

u/M7orch3 Jun 26 '22

Quite literally the top of peak Kerbal. Holy crap

5

u/Radprosium Jun 26 '22

Great job man, every so often, someone in here just pushes the limit of what we thought could be done in this game and inspire us all, today it's you, huge kudos !

GG

5

u/s1hrlpmysanity Jun 27 '22

I cant even dock shit in orbit and people be out here automating that shit🥹🔫

4

u/HODOR00 Jun 26 '22

How the fuck did you do this?

13

u/that_baddest_dude Jun 26 '22

There's a mod called kOS that lets you write your own scripts to automate ships and whatnot. They used that.

Which of course is a gross oversimplification, but that's the gist.

14

u/GoBuffaloes Jun 26 '22

Step one: install kOS

Step two: ???

Step three: self-assembling space station

→ More replies (1)
→ More replies (1)

4

u/DrTomT18 Jun 26 '22

Holy shit dude. This is amazing.

4

u/no-parachutes Jun 26 '22

Loved the final solar panel extension. Like a final flourish with a Tadaaaaaaa!

4

u/Starchaser_WoF Jun 26 '22

It's like watching an explosion and then all the fragments come back together to form something new

4

u/NotStanley4330 Jun 26 '22

NASA be like: "WRITE THIS DOWN!!!"

4

u/Avenwhell Jun 26 '22

Aaaannd now I’m missing The Expanse. Thx

4

u/Apache_Sobaco Jun 26 '22

This is possible with Kos and actually not that hard, just takes time. You need to compute trajectories and make kos code that shifts you to the position. Then just pass (time; waypoint) data to each part and it will work.

3

u/Nokijuxas Jun 26 '22

Holy fuck that's glorious. Well done.

3

u/iTh0r Jun 26 '22

Sir are u Tony stark

3

u/Kittyman56 Jun 26 '22

Thats fucking incredible

3

u/elitepancakes69 Jun 26 '22

Ok tony stark

3

u/Elektriman Jun 26 '22

At first i thought you decoupled you station and reversed the footage. But this is real ! Omg that is sooo cool !

3

u/ArsenalOwl Jun 26 '22

I don't really understand how to build a space station manually.

3

u/Dedboy Jun 26 '22

I haven’t played this game in years cause it makes my brain hurt but my god y’all get up to some of the wildest shit, it’s always a joy to watch

3

u/megabass713 Jun 26 '22

Is there a way you can share or upload it?

3

u/WastedKleenex Jun 26 '22

Now what do we do?

We finally get to play the game.

3

u/The_Dr_Robert Jun 26 '22

Any sufficiently advanced technology is indistinguishable from magic.

3

u/tyttuutface Exploring Jool's Moons Jun 26 '22

Burn the witch!

3

u/QuebecLimaSierra Jun 27 '22

I accidentally got into orbit the last time I played and felt like a rocket scientist... You might actually be a rocket scientist.

3

u/woolywoo Jun 27 '22

This is really fucking impressive, and furthermore I have no idea how it was done despite being at 1500+ hours in KSP.

3

u/LucifersViking Jun 27 '22 edited Jun 27 '22

What kind of Adderall do I have to take to make this.

Damn it's impressive

3

u/Wackybaby007 Jun 27 '22

How?????????????????

3

u/Kawawaymog Jun 27 '22

This is the coolest shit I have seen.

3

u/Napo5000 Jun 27 '22

Meanwhile I struggle to land on the fucking mun

3

u/[deleted] Jun 27 '22

How do you make this???????

3

u/[deleted] Jun 27 '22

Man how did you do it Is it a mod ?

3

u/Comfortable-Gas4425 Jun 27 '22

Me: most of the time doesn't get my rockets into orbit. Other players: Building working Dyson spheres in their lunch break.

3

u/Krezny Jun 27 '22

This is what I expect from KSP 2 multiplayer