Jump to content

[KSP 1.3.1] Bon Voyage 0.13.2.1 - Make your wheels rolling! 2017-10-15


RealGecko

Recommended Posts

What's the best way of getting science from celestial body? The answer is DRIVE!

What's the best way of delivering ore or supplies from distant location to your base? The answer is make your wheels rolling!

But did you try to drive for 110 km for two hours, avoiding obstacles (screw you Mun Highlands) and keeping your speed in sane limits? Well I did! And that was boooooooring! And who wants to be bored by super crazy explosion simulator called KSP? I guess no one!

Well, no more boredom! Bon Voyage is here and it will drive your rovers in background!
iUeRBio.png

Kerbal stories

Chapter 1: Fast and Furious

Spoiler

Valentina crash landed due to malfunction

Lohhy_G1_Imgur.png

It's OK! Jeb's on his way!

m_RLIf_Rt_Imgur.png

Wroom wroom

Du6y_Y2q_Imgur.png

Pick your target

m_OMzb_HM_Imgur.png

AND ATTACK .... emmmm.... I mean AND GO

b_MSRWa_L_Imgur.png

Obseeeerve!

5_DWKggj_Imgur.png

stb1_Re9_Imgur.png

E6obt_Hq_Imgur.png

xy_Qaca_L_Imgur.png

Oooops, outta power :D

LGgj6_QV_Imgur.png

Unstoppable!

s0_K609c_Imgur.png

Hey there!

8_H1_I5t_Q_Imgur.png

Y8fa6_Xv_Imgur.png

a_Cfa2_MC_Imgur.png

TJn_T8v_G_Imgur.png

My hero!

i_A7_Yg_X9_Imgur.png

FIN

uqw6l_LQ_Imgur.png

Chapter 2: Around the Mun in one munar day

Spoiler

Munar Survey Mission report (classified)

Crew roster:

Jebediah Kerman: most skilled pilot in the universe, mission commander.

Bob Kerman: Mun exploration pioneer, senior science officer.

Lagergrid Kerman: Junior science officer, first space mission assignment.

Arrival

screenshot564.png

Scouting for highest ore concentration spot

screenshot588.png

Drilla arrived, ore processing ready to be inititated, time to depart FOR SCEINCE

screenshot651.png

Systems green, departing

screenshot655.png

Meanwhile on Kerbin orbit

screenshot668.png

First munar arch

screenshot673.png

It's huge!

screenshot677.png

Jeb, why your camera does not have a flash?

screenshot681.png

After few hours of driving: munar arch number 2

screenshot691.png

What a view

screenshot692.png

- Hey Bob, how is that we're moving faster than sun?

- Shut up, Jeb, we're at Neil Armstrong Memorial!

screenshot714.png

Meanwhile back on Kerbin orbit

screenshot743.png

The lowest point on the Mun, too deep to just jump in

screenshot747.png

Let's try to go around, it's lower on that side

screenshot753.png

Bob, your time has come

screenshot758.png

Altimeter says I'm under water :D

screenshot759.png

Jeronimooo

screenshot760.png

Emmmm, do you see that too?

screenshot777.png

Proof of little green men existence.... wait.... we're little green men....

screenshot783.png

Mun's highest peak, South Pole

screenshot793.png

Meanwhile in KSP

screenshot806.png

screenshot814.png

screenshot820.png

- I told you to be careful, Jeb, polar regions are short of sunlight!

- Calm down, Bob, we're approaching munar arch number three.

screenshot850.png

Ok, I think we're done, time to return back to drilla

screenshot857.png

Honey!

screenshot867.png

I'm home!

screenshot871.png

So, we're staying for future ore deposits survey, have a nice trip with all this rocks in your pocket

screenshot877.png

Thanks, guys, I'll miss you!

screenshot878.png

See you back on Kerbin

screenshot879.png

Farewell!

screenshot885.png

Docking with KSS

screenshot932.png

Lagergid will return to Kerbin with the group of tourists currently visiting KSS

screenshot935.png

We don't need no water

screenshot941.png

screenshot942.png

screenshot951.png

screenshot957.png

Bulls eye!

screenshot958.png

Gravel from 12 Mun biomes??? What am I supposed to do with that???

screenshot959.png

PS meanwhile Kerbin Survey Mission:

Munar expedition already done and we're still half way to Kerbin deserts. Wait.... what's that???

screenshot964.png

screenshot967.png

screenshot974.png

screenshot979.png

Legal Information:

Superb "Bon Voyage Pathfinder" model was created by @Enceos and is licensed under CC-BY-NC-SA 4.0

Cool and colorized app launcher icon made by Madebyoliver and licensed under Creative Commons BY 3.0

Source code is licensed under GPLv3

How it works:

I don't know.... I honestly don't....

OK OK, just kidding.

  1. Rover must be landed
  2. It has to have BonVoyage controller aboard, seek in Control tab or use some cool rover mod (listed below)
  3. All rover wheels must be intact
  4. At least three of rover's operable wheels must be on the ground
  5. Rover must be landed
  6. Rover will move with average speed varying from 50% to 70% of wheels max speed (can be boosted up to 95% by skilled pilot :wink:)
  7. To start moving your power production must be at least 35% of wheels max consumption
  8. Rover can be solar powered
  9. Rover must be landed
  10. Rover can have alternative power source(RTGsNuclear Reactors, Fission Reactors, Antimatter Reactors, whole bunch of reactors is supported, if it has "reactor" in it's name than it will definitely work)
  11. If rover cannot move without solar power it will idle until Sun is 0 degrees above the horizon
  12. There must be a clear straight path to target not anymore...heheheee (just try not to overload pathfinding)
  13. ROVER MUST BE LANDED!!!

How to:

  1. Add BonVoyage module to your rover (seek in Control tab)
  2. If you have MM installed, then Malemute, Karibou, Buffalo, ARESPuma and FUR cabs get BV automatically, no need to use additional part. 
  3. Launch your rover
  4. If you're just playing with BV and launch a rover at KSC, then at start your rover state will be "Prelaunch", BV won't work at that state. Move your rover a little so that MET starts ticking and then BV is ready to be activated
  5. Right click on BonVoyage module (or rover cab if you use some cool rover mod listed above)
  6. Click "Pick target on map" or "Set to active target" or "Set to active waypoint"
  7. Path finding may take some time, be patient (C# is not the power horse :D).
  8. You can go to map mode and see built route for inspection
  9. If path was not found in ten seconds it will break, try some closer point
  10. Click "Poehali!!!"
  11. Go to tracking station...or launch a new vessel...or do whatever you want...
  12. ??????
  13. PROFIT!!!!!111oneoneone

Some math:

Power requirements calculations are really simple. Let's say you've built a rover on Malemute chassis with six Malemute Modular Wheels, each of 'em has max power consumption equal to 3.5. This means overall max consumption is 3.5 * 6 = 21. BV "requires" that your max power production is equal to 35% of max wheels' consumption 21/100*35 = 7.35 EC/s. So if your solar panels and/or RTGs provide 7.35 electric charge per second, then you're good to go. Your rover average speed will be 70% of wheels' max speed. In case of Malemute Modular Wheels it will be 35/100*70 = 24.5 m/s.

Of course 7.35 charge per second is not really easy to achieve in case of rovers. What other options do you have? The answer is pretty easy: shutdown motor on two of your wheels. This will reduce power requirement to 3.5*4/100*35 = 4.9 EC/s. But beware that your rover average speed will fall to 60% - 35/100*60 = 21 m/s.

If you disable two more wheels, then you power requirement will be just 3.5*2/100*35 = 2.45 EC/s, but average speed will fall to 50% - 35/100*50 = 17.5 m/s.

There few things to note:

  1. Pilots, USI Scouts and crew members with Autopilot skill can increase average speed dramatically, train your crew :wink:
  2. Low on power? Your rover will be sloooow
  3. Night rides are slooooooooow
  4. Unmanned rovers are sloooooooooooooooooow

There is a plan for average speed to vary according to gravity of celestial body and mass of rover. If you can propose some better math, then do it :wink:

Hey man! That's too complicated! How do I build rover that just rides???

  1. Build your rover as usual
  2. Add solar panels
  3. Add moar solar panels
  4. Grab some RTGs
  5. Don't forget couple of nuclear reactors
  6. KSPI antimatter reactors are pretty powerful, add at least one.
  7. Now for wheels: more wheels = better. Add a dozen of 'em, it does not even matter if your wheels point in different directions, just have a lot of 'em.
  8. Take your most skilled pilot and send him on vacation, he already got mental trauma while you were building the rover described above.
  9. Add probe core to your rover.
  10. Don't forget to add some powerful radiators to dissipate heat from probe core overloaded with the mess you've done building the rover described above.
  11. Done! Your rover will be able to deal with any slope and any crater in The Universe....if pathfinding algorithm won't fail first...

Wanna wanna wanna:

GitHub-Logo.png      logo4.png

Bonus:

Victims of the alpha test. Not for the faint of heart. Sponsored by HyperEdit(R)

http://imgur.com/a/Zq28v

Changelog:

Spoiler

Version 0.13.2.1 by @maja

Fixes

  • Fixed required power of wheels with KSPWheel module

Version 0.13.2 by @maja

Changes

  • KSP 1.3.1 compatibility
  • Tooltip change
  • Pilots, USI Scouts and anyone with AutopilotSkill affect speed

Fixes

  • Various fixes

Version 0.13.1 by @maja

Changes

  • Displayed information revision
  • Change in background processing (TAC-LS compatibility!)
  • Pilots and USI Scouts affect rover speed depending on their level

Fixes

  • Fixed drawing of the line to a target
  • Fixed wrong path to images on Linux
  • Various fixes

Version 0.13.0 by @maja

Changes

  • KSP 1.3 compatibility
  • WBI reactors and MKS power pack compatibility
  • Support for tricycles
  • Hide BV window in map view
  • Average speed change - reduction based on power
  • Shutdown/Activate BV Controller

Fixes

  • Fixed target longitude display
  • App launcher button fix
  • Adjusted vessel altitude from terrain
  • Night time ride fix

Version 0.12.0

Fixes

  • Change a few frequently called foreach loops to for by soulsource
  • Make Bon Voyage Autopilot part physicsless by Suprcheese
  • Close button calls appLauncherButton.SetFalse
  • Check for retracted solar panels
  • Average speed is now really average and not the maximum of any wheel's speed
  • Target 200 meters away from navpoint
  • Landing gears can be used as operable wheels by Kerbas-ad-astra
  • ModuleWheelBase used to determine if wheel is on the ground by Kerbas-ad-astra
  • Allow travelling "below" sea level if celestial body has no ocean

Changes

  • KSPWheels support
  • Separate UI for module control, no mess in right click menu
  • Integrated UIFramework
  • Path compressed with lz-string-csharp to use less space in save file
  • Show route only for active rover
  • Interstellar reactors support

Version 0.11.1

  • Fixes for KSP 1.2.2
  • Added "Close" button to main window
  • Toolbar button won't appear in editors

Version 0.11.0

  • New part, created by Enceos
  • Icon is now colorized, made by Madebyoliver and licensed under Creative Commons BY 3.0
  • Moved BV part to Space Exploration science node, where RoveMax Model S2 is
  • Parts that can contain BV module are not hardcoded anymore
  • Duplicate parts on the same vessel are ignored
  • Code cleanup
  • KSP skin for UI available
  • Dewarp done in two steps: instant to 50x and then gradual to 1x
  • Solar powered rovers will idle when Sun is 0 degrees above the horizon, no more stucking at poles
  • Serious average speed penalties at twighlight and at night time for manned rovers
  • Some colors in arrival report
  • Added toolbar support, fixed wrapper, no Contract Configurator conflict :D
  • Switching to vessel with interface button will go without scene reload if vessel is already loaded
  • 80% speed penalty for unmanned rovers
  • UI and label are hidden if game is paused
  • Label is hidden when all hidden (F2)
  • Fixed crazy torpedoes nuking active vessel, rover simply won't move closer than 2400 meters to active vessel
  • Fixed argument out of range caused sometimes and rover voyage end
  • Route visualized with red line
  • Route always visualized for active rover if exists
  • Target can be set to active navigation point
  • Added support for USI nuclear reactors
  • Added support for NFE fission reactors

Version 0.10.2

  • Recompile for KSP 1.2
  • Fixed last waypoint being last step of voyage

Version 0.10.1

  • Fixed control lock being applied to next switched vessel
  • Moved "Bon Voyage control lock active" message higher on screen
  • SAS is blocked by control lock too
  • Path markers displayed at correct positions
  • Fixed trying to build path to target closer than 1000 meters
  • Fixed "yet to travel" distance for rovers awaiting sunlight being incorrect after scene switch
  • Current rover changes in GUI list on vessel switch
  • Fixed distance to target being incorrect if path is not staright
  • Fixed errors raised at rover journey end when no/low time acceleration
  • Fixed error switching to rover from Space Center
  • Added ARES and Puma support

Version 0.10.0

  • Fixed BV controller part being not in Control tab
  • Shut down wheels are not treated as power consumers
  • At least two wheels must be on to start BV
  • Fixed utilites not being shown
  • Added "Calculate average speed" and "Calculate power requirement" utilities
  • Power production requirement diminished to 35% of powered wheels max
  • Average speed now varies according to number of wheels on: 2 wheels - 50% of wheels' max speed, 4 wheels - 60%, 6 and more - 70%
  • Rovers driven away from KSC by BV are not treated as landed at runway or launchpad anymore

Version 0.9.9.10

  • Fixed errors in editor
  • Fixed rover altitude being incorrect
  • Added Malemute and Karibou compatibility
  • Code optimization
  • Pathfinding fully functional
  • Interface revamp
  • Module Manager patch to add BonVoyage to Malemute, Karibou and Buffalo cabs

Version 0.9.9.9

  • Initial public release

Known issues:

Spoiler
  • Module solar power calculation won't work if Sun is not central body of the system.
  • Malemute and Karibou do not implement ModuleWheelDamage, so your rover can be turned upside down and BonVoyage will still drive it...isn't that FUN???? :D

 

Edited by RealGecko
Imgur albums still do not work????
Link to comment
Share on other sites

12 hours ago, Suedocode said:

Can you elaborate on that one?

Yeah, that was not explained clearly.

There' must be straight line to the target without any obstacles.

Here is the exampleWzCYzvc.png

As you can see there's no any obstacles like mountains or water on the way.

And here's what happens if way point is behind the mountains.

PhRrHOy.png

or water

IrxIjvs.png

As you can see in such cases you cannot just drive into direction of your target, you have to go sideways to bypass water or mountains.

I planned to use A* path finding algorithm to find the shortest way to the target, but currently I'm stuck with storing large number of way points directly on vessel and processing 'em fast enough once per second.

So I released mod with this limitation.

12 hours ago, DStaal said:

Anyone compare/contrast to AutoRove?  (Besides having a current update.  :wink: )

LOL. I was not the first with this great idea :D:D:D

I'll analyze autorove source code to see how it differs from BonVoyage :)

Link to comment
Share on other sites

Those generated paths look actually really cool. Hopefully you can figure out the algorithm to get them working. Do you program something specific about the planet, or does it just understand where water, mountains are? Could you make it instead take an alternate route around the mountains, or around craters as would be more realistic?

Does look like a great idea, though. I hardly use rovers for being a complete bore. In the same way that satellites can do science in background (with mods IIRC), could you make a science rover go slower but also do science while traveling whenever it gets to a new biome?

Also why can't I have tricycle rovers?

Edited by Z3R0_0NL1N3
Link to comment
Share on other sites

1 minute ago, Z3R0_0NL1N3 said:

does it just understand where water, mountains are?

Yes, algorithm is universal, here's the example from Eve

oOVmn6P.png

First: it finds the shortest way to the target

17zy1Jy.png

Second: it splits straight way to way points separated from each other with 1km distance

OnXNMO2.png

Third: It tests each way point if it's passable or not (altitude below 0, or difference in altitude between previous way point and current one is more than 500 meters - 26.5 degree inclination)

W61vbS2.png

Fourth: Algorithm seeks for alternative route

ifudjvs.png

Mod computes every active rover in background once per second.

If I'm to enable route found by A* the problem is that once per second mod has to load big amount of way points for every rover and process 'em.

Currently KSP API is not really programmer friendly in terms of accessing and saving remote vessels data :(

Link to comment
Share on other sites

1 hour ago, Z3R0_0NL1N3 said:

could you make a science rover go slower but also do science while traveling whenever it gets to a new biome?

Actually when you search for a new target you can see biome at that location, there's option in the mod to automatically dewarp when any rover reaches destination, you'll also receive message. So gaining science from new biomes is not a trouble at all, but it's not fully automagic :)

Link to comment
Share on other sites

I guess instead of holding 100+ points at once, you can calculate the route one time (to check if it's possible at all), then store some key-points, say, 10km apart, and calculate the "current" 10km on the fly - or store this, and calculate nearest kilometer on the fly. So - the rover, outside the initial calculation, only precisely knows the nearest leg of the journey, but also knows roughly the rest, and knows for a fact it's a valid route, making it more precise every time it runs out of currently processed data.

That way your database doesn't grow excessively, your realtime calculation load remains in check, and you can have a pretty finely-graded route.

Link to comment
Share on other sites

18 minutes ago, Sharpy said:

then store some key-points

Yep, I thought about that. Exclude way points that lead the same direction in some path segments and store only key ones that lead to another direction. However if you look the example from Eve above you can see that there might be too many key points.

 

21 minutes ago, Sharpy said:

So - the rover, outside the initial calculation, only precisely knows the nearest leg of the journey

The point of any path finding algorithm is that it calculates path once and then object follows once calculated route, so it won't stuck in some kind of dead end.

Here's the good example of how things work.

In case of KSP there's a big problem that initial grid is not present. When path finding calculation starts each point is calculated on the fly according to initial latitude-longitude and target latitude-longitude on top of celestial body. After route is found we have to store it somehow with all way points latitude-longitude, load 'em up when we process the rover and change rover location according time passed and route calculated.

Remote data vessel data is stored in ProtoVessel, so there's a lot of work to be done for even moving vessel:

  1. Move vessel, so it is moved in flight mode.
  2. Move vessels ProtoVessel, so it is moved on map mode and also vessel position is stored on scene change.

:D:D:D

I think I'd better open new thread in addon development section, so modders hivemind can solve this puzzle collectively :D

Link to comment
Share on other sites

1 hour ago, RealGecko said:

The point of any path finding algorithm is that it calculates path once and then object follows once calculated route, so it won't stuck in some kind of dead end.

That assumes cheap, ubiquitous storage, which we don't have.

In that case, you can sacrifice some CPU time to repeat part of the work already done. The "dead end" part is only a problem if we don't know if a route can be found - in this case we know for a fact it can, because we did it once already, and since the map doesn't change, we know we can do it again. With a small number of waypoints to find, the CPU load per recalculation is low, and the recalculation points are distant.

Link to comment
Share on other sites

2 hours ago, westamastaflash said:

As for the extraction from ProtoVessel - what if you cache the necessary objects so you don't have to load and unload the ProtoVessel each tick?

Man, you're reading my thoughts, yesterday I've came to exactly same conclusion: on scene load get all routes to the memory and keep 'em there for calculations :D

However this will increase scene load time and memory consumption and also we still have to work with ProtoVessel as I mentioned before:

2 hours ago, RealGecko said:

Move vessels ProtoVessel, so it is moved on map mode and also vessel position is stored on scene change.

 

48 minutes ago, Sharpy said:

In that case, you can sacrifice some CPU time to repeat part of the work already done.

Yeah man, you're right. But initially my bidding is really high: I want to do so that rovers can travel half of the equator easily while keeping CPU consumption as low as possible :D

It was really fun to observe how one of my alpha test victims rode for two days along Kerbin equator, at that time there was no obstacles detection and I successfully beat depth record of 1000 meters below surface :D:D:D

Link to comment
Share on other sites

17 minutes ago, RealGecko said:

How do I embed Imgur album into post??? Something has changed on forum while I was missing :D:D:D

You don't. The functionality is entirely broken. A few posts migrated from the old forum retained their albums, the rest must do without. :(

Link to comment
Share on other sites

4 hours ago, RealGecko said:

Remote data vessel data is stored in ProtoVessel, so there's a lot of work to be done for even moving vessel:

  1. Move vessel, so it is moved in flight mode.
  2. Move vessels ProtoVessel, so it is moved on map mode and also vessel position is stored on scene change.

:D:D:D

I think I'd better open new thread in addon development section, so modders hivemind can solve this puzzle collectively :D

I know this is tricky.

Hyperedit does something like this wrong, landed vessel in orbit is not "cleared" and can't dock, or something like this.

OTOH somewhere there's a fully functional warp drive mod that supposedly correctly teleports your vessel to a remote point (retaining the velocity vector unchanged, which makes the use somewhat challenging...)

Link to comment
Share on other sites

12 minutes ago, Sharpy said:

OTOH somewhere there's a fully functional warp drive mod that supposedly correctly teleports your vessel to a remote point (retaining the velocity vector unchanged, which makes the use somewhat challenging...)

Hmmmm, I used none of the warp mods, so I have a question: does it teleport active vessels only or can it also teleport background vessels?

I inspected source code of many mods while developing BonVoyage like Background Processing, Remote Tech, SCANsat, Snacks and maybe others that I cannot remember right now. But everywhere I saw that working with remote vessel (not loaded into memory) is a real pain.

Link to comment
Share on other sites

9 minutes ago, westamastaflash said:

Might be a good use case for some extension methods on the ProtoVessel object.

Unfortunately working with ProtoVessel is done with ConfigNode which is not really handy.

For example getting vessel data:

ConfigNode vesselConfigNode = new ConfigNode();
vessel.protoVessel.Save(vesselConfigNode);

Searching for BonVoyage module:

var BVPart = vesselConfigNode.GetNode ("PART", "name", "BonVoyageModule");
if (BVPart == null) continue;

var BVModule = BVPart.GetNode ("MODULE", "name", "BonVoyageModule");
if (BVModule == null) continue;

Setting remote vessel coordinates:

vesselConfigNode.SetValue ("lat", targetLatitude.ToString());
vesselConfigNode.SetValue ("lon", targetLongitude.ToString());
vesselConfigNode.SetValue ("alt", vesselAltitude.ToString ());

Saving remote vessel's data:

vessel.protoVessel = new ProtoVessel(vesselConfigNode, HighLogic.CurrentGame);

Such amount of code is hard to optimize, that's why update is done once a second.

Also I noticed that sometimes:

body.pqsController.GetSurfaceHeight()

May return weird values and rover will actually fly :D:D:D

Link to comment
Share on other sites

1 minute ago, westamastaflash said:

If those toStrings() are run every time, you're also creating a lot of garbage. Since the code's on github I'll see if I can play with it a bit too, if thats ok with you :-)

Yeah, man, any help is welcome. I'll be glad if someone finds a better solution :)

Link to comment
Share on other sites

1 minute ago, wasml said:

You've probably seen these mods that are doing did something similar (but in case you haven't)

Thanks for advice man, I've already started digging autorove source and see that @Wotano encountered same problems as I did with moving rovers around. However his rover processing is much better than mine :D

Need to check Boat Navigation too :)

Link to comment
Share on other sites

22 hours ago, DStaal said:

Anyone compare/contrast to AutoRove?  (Besides having a current update.  :wink: )

I've analyzed AutoRove source and here're some conclusions:

  • AutoRove is connected to Probodobodyne Rover Body, BonVoyage has it's own module (uses Seismic Accelerometer model :D )
  • AutoRove updates every N frames, where N is configurable, BonVoyage updates once per second, not configurable.
  • AutoRove does not have point'n'click targeting
  • AutoRove does not detect extreme elevations on rover's way (mountains)
  • If rover will have water on it's way AutoRove will be deactivated, BonVoyage won't let you start if there's water on the way
  • AutoRove does not compute electric charge in background, BonVoyage does not do it too, but it won't start if rover's current power production below 55% of wheels' max consumption
  • BonVoyage does many checks before it can be activated, if your rover is turned to upside down...bye bye :D
  • @Wotano wanted to implement path findingBonVoyage is on it's way :D
  • BonVoyage solar powered rovers idle at night time (sun below 5 degrees above the horizon)
  • Average speed calculations differ
  • @Wotano is offline since 12 February :(
Link to comment
Share on other sites

This thread is quite old. Please consider starting a new thread rather than reviving this one.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...