Jump to content

[1.0.5]AutoRove - autonomous rovermovement in the background


Wotano

Recommended Posts

Im not familiar with modding in KSP, but I have looked at the cfg files. Have you considered determing the speed from the torque curve instead of the overSpeedDamage?

OverSpeedDamage is the speed in which the wheels would be broken, not the max speed of the 'motor'. The last key in the torque curve would be the absolute max speed on a flat surface.

Some people, using RoverSpeed or a personal patch, change the overSpeedDamage so other things (gravity, rockets, etc) can make the wheeled vessels go faster without damage (from speed alone). RoverSpeed sets overSpeedDamage to 1000, which was making the automated rover trips travel at 1000/6 m/s! I made my own patch to use a more moddest increase in overSpeedDamage, resulting in less outrageous AutoRove speeds.

As I said, I don't know how to change to code to use the new values, but below is a snippet from one of the stock rover wheels, showing the torque curve

PART
{
	name = roverWheel1
    //  snipped for clarity
	MODULE
	{
		name = ModuleWheel
		hasMotor = true
		resourceName = ElectricCharge
		resourceConsumptionRate = 1.0
		// snipped for clarity
		overSpeedDamage = 60		// 60m/s is the speed in which the wheels break
		WHEEL
		{
			// Snipped for clarity
		}
		steeringCurve
		{
			// Snipped for clarity
		}
		torqueCurve
		{
			key = 0 250 0 0
			key = 20  100 0
			key = 30 14 0 0
			key = 34 0 0 0     // 34m/s is the max speed it can rev up to
		}
	}
	// Snipped for clarity
}

 

Link to comment
Share on other sites

On 06/02/2016 at 1:24 PM, drtedastro said:

Hello to all.

H'mm, I am having no luck with this at all...

The rover has been built, and when launched it has option to start autorove.

When AutoRove icon is selected, different things may happen.  Total lockup, new window (empty) or same window but contents off to one side.

When little window comes up for target, unable to enter any numbers into it.

When trying to close little window, new little window comes up, but only with LAT box.

Sometimes complete lockup of ksp.

 

and log full of; [...]

do you use the ALT + F2 debug window? that causes some issues with active GUI-elements

Link to comment
Share on other sites

On 24/01/2016 at 8:17 PM, lodestar said:

But it wasn't driving over water. it was on the plains next to KSC. It might be working perfectly for you, but even the UI doesn't work for me. In fact, the UI gets corrupted to the point that I had to kill KSP and restart.

I'm running the Linux 64 KSP, heavily modded. Maybe it's some mod interaction, maybe it's something wrong with running it on Linux 64 bits, but it's simply unplayable.

 

 

 

it stops before hitting water and since it updates the position by default every 60 frames  the distance to the water might be relative large dependent on speed and time warp

Link to comment
Share on other sites

On 06/02/2016 at 6:11 PM, Kowgan said:

Is anyone else noticing a small sutter every 1 second while at the KSC? I suspect this is caused by the mod updating the rovers' locations every second. Once I removed the mod, the stutter disappeared.

the mod query's all vessels for the AutoRoveModule, that might be an issue if you have a lot of landed vessels (including debris). You could try adjusting the update frequency fpu (frames per update) in the config file.

the next version uses a more conservative index based system.

Link to comment
Share on other sites

On 07/02/2016 at 5:26 AM, LabRats said:

Im not familiar with modding in KSP, but I have looked at the cfg files. Have you considered determing the speed from the torque curve instead of the overSpeedDamage?

[...]

I did, but as I understand it the torque curve only gives you torque per speed, which is meaningless if you have no information about friction. KSP then uses Unitys WheelColider module once you drive the vessel in the physics box, including friction and slip. So I don't have a good way to get the infos in the background.

The planned fix is to hard cap everything (speed, possible slope, waypoint range) depending on tech levels.

 

The other thing is, that Squad announced that they have rewritten ModuleWheel for KSP 1.1 so I am not really into building something big around this module without knowing the changes they made.

Edited by Wotano
update to ModuleWheel
Link to comment
Share on other sites

20 hours ago, Wotano said:

the mod query's all vessels for the AutoRoveModule, that might be an issue if you have a lot of landed vessels (including debris). You could try adjusting the update frequency fpu (frames per update) in the config file.

the next version uses a more conservative index based system.

Yeah, I increased the update rate to every 60 seconds. Feels much better.

Link to comment
Share on other sites

On 2/10/2016 at 8:05 PM, Wotano said:

it stops before hitting water and since it updates the position by default every 60 frames  the distance to the water might be relative large dependent on speed and time warp

It was moving away from the water. The mod is bugged, pure and simple. Even the UI gets messed up.

Link to comment
Share on other sites

I have a problem with the mod: I'm playing RSS and just landed my first Rover on the Moon, after I took the first scientific data I wanted to go to the next biome using AutoRove, so I put in the coordinates AutoRove should move to, started AutoRove and switched to the spacecenter, there I opened the AutoRove window. The Rover was in the list and still had around 400km to go, but after a second or so it just dissapeared out of the list and I wasn't using timewarp.

Edit: On stock KSP planets and moons the mod seems to work as intended. It's really helpful for planet exploration.

Edited by Schetefan
Link to comment
Share on other sites

On 2/10/2016 at 5:37 PM, Wotano said:

I did, but as I understand it the torque curve only gives you torque per speed, which is meaningless if you have no information about friction. KSP then uses Unitys WheelColider module once you drive the vessel in the physics box, including friction and slip. So I don't have a good way to get the infos in the background.

The planned fix is to hard cap everything (speed, possible slope, waypoint range) depending on tech levels.

 

The other thing is, that Squad announced that they have rewritten ModuleWheel for KSP 1.1 so I am not really into building something big around this module without knowing the changes they made.

First, its your mod, its your way, so I respond respectfully. And thank you for your time and effort in making the mod.

OverSpeedDamage also means nothing (in relation to how fast you _can_ go, without friction). The torque curve at least shows at which speed (given kerbin conditions) the engine can no longer increase power/speed without external assistance. You currently use OverSpeedDamage and estimated friction (based on gravity) to determine top speed. My suggestion was to use the "max powered speed on level Kerbin ground" (the last key of the torque curve) AND the estimated friction (based on gravity).

I do agree with your thought of there being a hard cap (by itself, in addition, or in scale to the "max speed"). The autopilot would have to travel cautiously (slowly) and maybe even the long way.

Again, I appreciate the mod. I don't know if its just me, or everyone, but the game will not let me time warp of kind while driving on the Mun. This combined with my computer taking 2 to 5 seconds real life for 1 second to pass in the game makes any significant travel extremely annoying. Your mod, even if it makes me "cheat" by traveling too fast, is a godsend.

Link to comment
Share on other sites

  • 2 weeks later...

After pulling all my hair out trying to figure out how to make a Rover out of the weirdest stock piece I've ever had the misfortune to try to use (The main problem being it wants to stand upright for it compass to be aligned correctly, though it doesn't help much that everything you want to put on the side of it, fall into the piece and attach around some center, like it's visual box and what we can use it not coded correctly.).

 

I did manage to make something okayish in the end, by creating a skeleton of structure parts to put inside it, but that creates a horrible heavy rover, that only AutoRove can drive.

 

I finally decided that maybe MM adding it to command seat might work better.

 

Create a file named something like AutoRoverHack.cfg and put it in the GameData folder.

@PART[seatExternalCmd]:NEEDS[AutoRove]:FINAL
{
	MODULE
	{
		name = AutoRoveModule
	}
}

 

Example of a few other parts change seatExternalCmd to:

Probodobodyne QBE: probeCoreCube

Probodobodyne HECS: probeCoreHex

Probodobodyne OKTO: probeCoreOcto

Probodobodyne OKTO2: probeCoreOcto2

Link to comment
Share on other sites

Man, is there an "AutoRove for dummies" anywhere out there???

I have had zero luck getting this mod to do anything with my rovers.

I am currently testing on a stripped down, testing version of ksp with mechjeb mod.

if anyone can blast me a craft file and a set of cheat sheet instructions, i will try again.

I really was wanting to get this going and I am at a loss as to what is not working.

thanks.

Link to comment
Share on other sites

What's worked for me:

  1. Click on autorove-enabled part.  Click autorove.
  2. Enter coordinates in boxes.  Note that coordinates are in decimal degrees, not degrees-minutes-seconds.
  3. Leave ship.  Go do something else.  Ignore the ship.  (Ignore the autorove status box too - it's somewhat flakey, and doesn't always show moving rovers.)
  4. Come back to ship after a significant period of time has passed.  It's in a new location!  (And will spend a bit of time on load working out what orientation and elevation it should now be at...)

That's really all there is to it.

Link to comment
Share on other sites

Oh, this is glorious

It leaves me wondering just one thing: Would you have interest in an AutoPilot function too? "Straight ahead and level" and "Fly to this waypoint then (theoretically) in circles at the current speed.

This would be just as useful for getting planes where you need them as it would be for launching AWAC craft for probe launches when running RemoteTech :D

Link to comment
Share on other sites

Hello again.

Would it be possible to get this to work with "kebal foundries" wheel and track systems?

Is there a possible MM type config that I can use to 'add' whatever might be missing or being looked for.  

Now that i have this mod working, i am trying to get all of my rovers to be able to get out there and go places while I am away.

thanks in advance for any and all help.

Cheers.

Link to comment
Share on other sites

This is an idea for another related mod, for which this mod provides lots of the ingredients (and more explicit details I what I think Reiver is also talking about).

Mod would be an atmospheric version of autorove, called say autofloat, with use cases long airplane trips, lighter-than-air airships (using negative weight airship parts someone will need to make), and most exciting for me: Eve floating cloud cities!

Requirements for the mod:

  • allow activation for vessels that are in atmosphere, not moving vertically more than say 2m/s, and not accelerating vertically much either, i.e, stable altitude
  • modify KSP behaviour to allow swapping focus away from this vessel, and when it does so, prevent the vessel from being unloaded (ie destroyed) -- there are mods that eg extend physics range, so I guess looking at how they catch the atmosphere unload step would help. This is probably the biggest new work compared to autorove
  • on swapping focus, take a snapshot of the horizontal velocity of the vessel compared to surface -- that's the speed of the craft. Assume altitude remains constant
  • move the craft at that speed towards target, and also have an option to not require a target, in which case just continue to move the craft on current velocity around and around the planet (useful for airships, cloud cities)
  • when user swaps back to craft or physics range of craft, restore as autorove currently does (though obviously in atmosphere, not on surface)

So main change compared to autorove is to catch and change KSP behaviour when trying to swap focus away from atmospheric vessels.

Shortcomings: this obviously doesn't take fuel into account, or aerodynamic ability to change direction and hover/circle at destination. One option (for version 2) would be to check flow rate for fuel, and only allow activation if it's zero (ie require electric propulsion or lighter than air parts), or even reduce it over time that the craft if moving.

So yeah, hopefully Wotano or someone has time to do this! Unfortunately I don't have time or skills right now :(

Link to comment
Share on other sites

36 minutes ago, langabi said:

s: this obviously doesn't take fuel into account, or aerodynamic ability to change direction and hover/circle at destination. One option (for version 2) would be to check flow rate for fuel, and only allow activation if it's zero (ie require electric propulsion or lighter than air parts), or even reduce it over time that the craft if moving.

 

Simpler solution? Mechjeb for example can estimate how much flight time you will get out of a jet engine. So just maintain whatever altitude and heading the powered craft had, set a KAC alarm for 10 minutes before burnout, and run the jet for whatever it's fuel range is. If the player dosen't return when the jet runs out of fuel then run a stagereovery like parameter, asking if it has enough parachutes to land under the gear impact rating, if yes recover with funds, if no, destroy craft.

 

Link to comment
Share on other sites

Working nice! Has seen actually how it moved on map in real time.

  1. ScanSat, WaipointManager and/or MechJeb integration will be magnificient. Also it would complement for "target marker" issue.
  2. Full speed is a bit too much. When you pilot a rover by yourself it's usually around 4/5 of full speed or even 1/5 when climbing uphill, not concidering "darkness time stops".
  3. Also this small config will add support for all mods that properly treat rover command parts as "vesselType = Rover" (including my ChopShop)
  4. @PART[*]:HAS[@MODULE[ModuleCommand]]:HAS[#vesselType[Rover]]:HAS[!MODULE[AutoRoveModule]]
    {
    	MODULE
    	{
    		name = AutoRoveModule
    	}
    }

    P.S. That extra check for [!MODULE[AutoRoveModule]] is for ChopShop compatibility, as it makes roverBody part actually a ROVER - with proper orientation and assignment.

Edited by Dr. Jet
Link to comment
Share on other sites

Spoiler
On 3/14/2016 at 10:01 AM, Dr. Jet said:

Working nice! Has seen actually how it moved on map in real time.

  1. ScanSat, WaipointManager and/or MechJeb integration will be magnificient. Also it would complement for "target marker" issue.
  2. Full speed is a bit too much. When you pilot a rover by yourself it's usually around 4/5 of full speed or even 1/5 when climbing uphill, not concidering "darkness time stops".
  3. Also this small config will add support for all mods that properly treat rover command parts as "vesselType = Rover" (including my ChopShop)
  4. 
    
    @PART[*]:HAS[@MODULE[ModuleCommand]]:HAS[#vesselType[Rover]]:HAS[!MODULE[AutoRoveModule]]
    {
    	MODULE
    	{
    		name = AutoRoveModule
    	}
    }

    P.S. That extra check for [!MODULE[AutoRoveModule]] is for ChopShop compatibility, as it makes roverBody part actually a ROVER - with proper orientation and assignment.

Thanks for the MM config Dr. Jet! I'm trying it out, but for me it seems to add Autorove to ALL pods. Is there a way to make it only work on rovers?

 

Link to comment
Share on other sites

7 hours ago, Nightside said:

Thanks for the MM config Dr. Jet! I'm trying it out, but for me it seems to add Autorove to ALL pods. Is there a way to make it only work on rovers?

":HAS[#vesselType[Rover]]" is meant to filter it. Other command parts has "vesselType = Probe", "vesselType = Lander"  or "vesselType = Ship"

Config line basically tells MM to add AutoRoveModule to any part that is command part AND rover part AND NOT has that module already.

On the other hand it may be better to check vessel type for each vessel ingame rather then check for specific parts in them. I mean, right where the vessel name is set there are small icons that set if vessel type is probe, ship, rover, etc... Lots of players do build rovers from no-rover parts.

Link to comment
Share on other sites

Nice mod! This definitevly empowers rovers much more than before. A few observations and feedback after having tried it out a bit:

  • The first steps are indeed not intuitive. Intuitively I hit the AR button on the top of the screen and it took me quite a while and some reading and a bit of luck to find the start autorove menu entry in the context menu. I suggest to include three or four lines in the initial post how to get started.
  • The speed it definitively a bit OP. I'm sure there will be possiblities to reduce that in future versions
  • I found another conveient way to find the coordinates. Instead of Waypoint Manager, the Landing Assistant of MJ gives you coordinates of any point on the map, when using the haircross to select a landing place.
  • I tried to send my rover to Moho's South Pole. I assumed that entering -90°N would be a good idea, so I chose -89.9°N -> The probe disappeared and many weird things happened. Second try with -89°N was fine. I suggest to handle those critical values in the code.

Thats all for now. Thank you for your effort!

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