Jump to content

[1.0.5]AutoRove - autonomous rovermovement in the background


Wotano

Recommended Posts

AutoRove Mod for Kerbal Space Program
A KSP Mod to give the Protodyne Rove Body the ability to move a landed vessel towards a target coordinate autonomously in the background. Right click on the Rove Body and activate AutoRove. The speed of the rover is the maximum speed the wheels can tolerate, scaled down for lower gravity worlds (but not up for higher).

This mod is redistributing ModuleManager and Mini-AVC

License:  MIT

Source: Bitbucket

Download:

* Bitbucket

* Kerbalstuff

* CKAN File

 

Changelog:

  • v. 1.0.3:
  • - should now work if the Rove Body is not the root part
  • - fixed a bug with rovers having a speed of 0
  • v. 1.0.2:
  • - should now work if generators are attached
  • - minor cosmetic changes
  • v. 1.0.1:
  • - AutoRove works now properly around the KSC
  • - fixed the .version file
  • v. 1.0.0:
  • - initial release


Known Issues:

* does not track energy use for moving
* only numeric input for target coordinates, no mouse over
* does not move the active vessel, only unloaded vessels
* no visual display for the target

 

Edited by Wotano
1.0.3 update + CKAN File
Link to comment
Share on other sites

Welcome aboard, that's a heck of a first post!

Let me be the first to say: This has the potential to hugely increase the usefulness of rovers. I like using them for my ISRU setups, and roving to a tanker that landed a bit further away than desired is a real pain, this should help with that immensely.

Link to comment
Share on other sites

Simply amazing! 

10 minutes ago, Red Iron Crown said:

Welcome aboard, that's a heck of a first post!

Let me be the first to say: This has the potential to hugely increase the usefulness of rovers. I like using them for my ISRU setups, and roving to a tanker that landed a bit further away than desired is a real pain, this should help with that immensely.

Agreed totally, rovers can now scout out areas for potential landing sites or just let you focus on your manned missiona while your little unmanned rover on Duna drives long distances.

Also, kudos for making a nice, thorough description, answered all my questions. :)

Link to comment
Share on other sites

Oh this is nice. I take it this mod ignores (yet) any terrain features (climbs, chasms, water, ...) on the way or at the destination the rover wouldn't actually be able to master, correct?

Edited by Andersenman
Link to comment
Share on other sites

I like this mod, this will make rovers useful for a lot more things! Scaling down the speed at which a rover will travel based on the gravity is a good thing, though I would suggest lowering the speed further as there are other factors to consider:

  • The maximum speed that wheels will reach can be over 20 m/s for some wheels or even higher. While you can drive relatively safely on Kerbin at that speed, this only goes for flat terrain with no sudden bumps.
  • A rover that's designed to actually carry something with it will not reach this maximum speed due to the rover's mass.
  • Even when going downhill, you wouldn't want a safe autopilot to go above its regular driving speed because it is harder to brake or turn for obstacles.
  • It is reasonable to assume the autopilot would not merely drive a straight line from A to B but avoid obstacles, cliffs, valleys, travel up slopes at an angle to maintain speed. All of this reduces the average traveling speed.
  • For short distances, it leaves the player with a reason to still drive something themselves because they might be willing/able to take risks that the autonomous pilot wouldn't.

To summarize, lowering the max speed will make it a more believable abstraction, but also importantly, it doesn't hurt the player's time significantly because as with the rest of the game's space travel, you can timewarp through it. :)

Link to comment
Share on other sites

2 hours ago, The Yellow Dart said:

This sounds great! This might be a dumb quetions but how would one get the coordinates of a location in game? I know it tells you a landed craft's coordinates, but if it is a contract target, is there a way to get those coordinates?

I think if you have ScanSat installed, the maps that it lets you bring up will show coordinates wherever you mouse over. I think. 

Link to comment
Share on other sites

11 hours ago, Andersenman said:

Oh this is nice. I take it this mod ignores (yet) any terrain features (climbs, chasms, water, ...) on the way or at the destination the rover wouldn't actually be able to master, correct?

Depending on how planet altitude maps are stored, you might be able to calculate slopes and generate a very basic pass/no-pass matrix to use with a basic pathfinder algorithm...

Link to comment
Share on other sites

Suggestion: Put the AutoRoveModule into a part that we can attach to every rover.

For now I did add this MM config to add it into the MechJeb 2 (AR202 case) :

@PART[mumech_MJ2_AR202]
{
    MODULE
    {
        name = AutoRoveModule
    }
}

 

 

Edited by Kolago
Link to comment
Share on other sites

14 hours ago, Red Iron Crown said:

Welcome aboard, that's a heck of a first post!

Let me be the first to say: This has the potential to hugely increase the usefulness of rovers. I like using them for my ISRU setups, and roving to a tanker that landed a bit further away than desired is a real pain, this should help with that immensely.

Right now it only takes 3 digits for for longitude and latitude (only thought about biome hunting), if that's not enough precision i can give some more room.

 

7 hours ago, Lyneira said:

I like this mod, this will make rovers useful for a lot more things! Scaling down the speed at which a rover will travel based on the gravity is a good thing, though I would suggest lowering the speed further as there are other factors to consider:

  • The maximum speed that wheels will reach can be over 20 m/s for some wheels or even higher. While you can drive relatively safely on Kerbin at that speed, this only goes for flat terrain with no sudden bumps.
  • A rover that's designed to actually carry something with it will not reach this maximum speed due to the rover's mass.
  • Even when going downhill, you wouldn't want a safe autopilot to go above its regular driving speed because it is harder to brake or turn for obstacles.
  • It is reasonable to assume the autopilot would not merely drive a straight line from A to B but avoid obstacles, cliffs, valleys, travel up slopes at an angle to maintain speed. All of this reduces the average traveling speed.
  • For short distances, it leaves the player with a reason to still drive something themselves because they might be willing/able to take risks that the autonomous pilot wouldn't.

To summarize, lowering the max speed will make it a more believable abstraction, but also importantly, it doesn't hurt the player's time significantly because as with the rest of the game's space travel, you can timewarp through it. :)

I thought about a hard cap (adjustable in the config file) but would like some feedback on how to scale that (the real rovers are barely crawling...) without rendering the autopilot useless. I haven't found out how KSP calculates a terrain resistance (if it does) so it would be some kind of mass/wheel vs torque - factor.

 

 

2 hours ago, The Yellow Dart said:

This sounds great! This might be a dumb quetions but how would one get the coordinates of a location in game? I know it tells you a landed craft's coordinates, but if it is a contract target, is there a way to get those coordinates?

ScanSats map-overlays provide coordinates (which adds some not quite intended realism since one would need to map the body before using the autopilot) alternatively you could type coordinates in WaypointManager and see where the icon spawns.

 

10 hours ago, Andersenman said:

Oh this is nice. I take it this mod ignores (yet) any terrain features (climbs, chasms, water, ...) on the way or at the destination the rover wouldn't actually be able to master, correct?

It calculates the next position on a 'as the crow flies' distance and than sets the vessel on that position, ignoring the terrain in between. The update frequency is adjustable in the config file but on high time warp it will likely clip through to the next position. It does stop on the last position if the next update would have set it in water / splashed (again can be relative far away on high time warp).

I need some more sophisticated path calculating to get useful slope information to implement  a cap on that (and then find some acceptable number for the cap).

 

Link to comment
Share on other sites

Haven't yet tried the mod, but it's something I've wished we had a long time ago. I was wondering, does the mod automatically set the brake once the rover arrives at its destination? If not, this might be a good feature to have in case your target location is on a slope.

Link to comment
Share on other sites

I have some troubles, every time i try to use it i get exceptions and the mod don't work

[WRN 23:08:04.983] [AutoRove] Wheel: roverWheel1 (ModuleWheel), speed: 60, Charge: 1
[WRN 23:08:04.984] [AutoRove] Wheel: roverWheel1 (ModuleWheel), speed: 60, Charge: 1
[WRN 23:08:04.984] [AutoRove] Wheel: roverWheel1 (ModuleWheel), speed: 60, Charge: 1
[WRN 23:08:04.984] [AutoRove] Wheel: roverWheel1 (ModuleWheel), speed: 60, Charge: 1
[WRN 23:08:04.984] [AutoRove] WheelData: 60/4
[EXC 23:08:04.984] FormatException: Index (zero based) must be greater than or equal to zero and less than the size of the argument list.
    System.String.FormatHelper (System.Text.StringBuilder result, IFormatProvider provider, System.String format, System.Object[] args)
    System.String.Format (IFormatProvider provider, System.String format, System.Object[] args)
    System.String.Format (System.String format, System.Object arg0, System.Object arg1)
    AutoRove.AutoRoveModule.generatorCheck (System.Double& generatorCharge)
    AutoRove.AutoRoveModule.turnOnAutoRove (Double latitude, Double longitude)
    AutoRove.AutoRoveModule.OnGUI ()

KSP Linux x64

I'm doing some test on kerbin N5 E222

Thanks for this great mod

Regards Luca

Link to comment
Share on other sites

4 hours ago, AmoebaMan said:

Depending on how planet altitude maps are stored, you might be able to calculate slopes and generate a very basic pass/no-pass matrix to use with a basic pathfinder algorithm...

As an expansion on this idea, you could have 'levels' for the autopilot that you unlock through the tech tree in career/science mode.  A possible series might be:

Level 0 you set a waypoint for it to move towards, it stops when it gets there or hits a slope greater than $safelimit.

Level 1 has multiple waypoints, (say 3), but still tries to move in straight lines.

Level 2 adds another waypoint or two and can climb/descend steeper slopes at a reduced speed.

Level 3 again increases the number of waypoints and has actual pathfinding.

Level 4 can be told to seek things, (e.g. "go to $biome", ore of $concentration or better, move to nearest lander, etc.).

 

Link to comment
Share on other sites

On 06/01/2016 at 10:26 PM, jonrd463 said:

Haven't yet tried the mod, but it's something I've wished we had a long time ago. I was wondering, does the mod automatically set the brake once the rover arrives at its destination? If not, this might be a good feature to have in case your target location is on a slope.

It ignores breaks completely when moving, so you can leave them on before starting or set them in between. You can also drive around manually without turning AutoRove off it continuous towards the target when you leave the flight scene. It just can't move while you're looking... :P

 

22 hours ago, Captain Sierra said:

@Wotano How does the system handle me suddenly focusing a vessel currently set to autorove and is in-route? I assume you've set it up to automatically adjust the vehicle's position to just above the terrain on physics load.

every time it updates the position it sets the vessel to an altitude of 0m above terrain at that position, so it shouldn't collide more with the ground then usual when it loads. I haven't had problems so far but I could set some margin, just wanted to avoid heavy vessel crashing from the fall.

Link to comment
Share on other sites

On 06/01/2016 at 11:17 PM, Badsector said:

I have some troubles, every time i try to use it i get exceptions and the mod don't work


[WRN 23:08:04.983] [AutoRove] Wheel: roverWheel1 (ModuleWheel), speed: 60, Charge: 1
[WRN 23:08:04.984] [AutoRove] Wheel: roverWheel1 (ModuleWheel), speed: 60, Charge: 1
[WRN 23:08:04.984] [AutoRove] Wheel: roverWheel1 (ModuleWheel), speed: 60, Charge: 1
[WRN 23:08:04.984] [AutoRove] Wheel: roverWheel1 (ModuleWheel), speed: 60, Charge: 1
[WRN 23:08:04.984] [AutoRove] WheelData: 60/4
[EXC 23:08:04.984] FormatException: Index (zero based) must be greater than or equal to zero and less than the size of the argument list.
    System.String.FormatHelper (System.Text.StringBuilder result, IFormatProvider provider, System.String format, System.Object[] args)
    System.String.Format (IFormatProvider provider, System.String format, System.Object[] args)
    System.String.Format (System.String format, System.Object arg0, System.Object arg1)
    AutoRove.AutoRoveModule.generatorCheck (System.Double& generatorCharge)
    AutoRove.AutoRoveModule.turnOnAutoRove (Double latitude, Double longitude)
    AutoRove.AutoRoveModule.OnGUI ()

KSP Linux x64

I'm doing some test on kerbin N5 E222

Thanks for this great mod

Regards Luca

There is a bug in the function for getting the electric generator (like RTG) power on the vessel.

Could you try AutoRove 1.0.2_rc1.zip to see if it fixes the issue?

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...