sarbian

[1.6.x] Anatid Robotics / MuMech - MechJeb - Autopilot - [2.8.3] [3 March 2019]

Recommended Posts

Attempted another SpaceX style launch, 1st stage didnt even try to boostback to the pad, just followed through with the trajectory for a soft landing on the ocean, which promptly destroyed it when it toppled over

Share this post


Link to post
Share on other sites
11 hours ago, sarbian said:

Can I get a bit more info on the problem ? Is it that 2 test with PatchedConics and the same param gives different answers ?

Well we do the "Simulation" with the PatchedConics API here:

https://github.com/MuMech/MechJeb2/blob/dev/MechJeb2/Maneuver/TransferCalculator.cs#L394-L398

Everything will look like it works correctly, and I can drop Debug.Log's in there showing that what the optimizer calculates is a maneuver which leaves e..g. Kerbin and has one patch there, then the next patch is heliocentric.  then the next patch is in the SOI of the target and hits it exactly.

Then it drops a maneuver node with exactly that dV and UT and what comes off the maneuver node is a trajectory which interacts with the Mun and throws off the rest of the trajectory.

So what it looks like is that our "Simulation" is missing some extra glue code which "finds" that Mun encounter on the way out.  It vaguely smells like some of the changes that went into the orbit class to deal with closest-approaches might be responsible?

There's other cases where it just fails to find any solution and I've tried to debug those and gotten nowhere and can't seem to understand what is going on there at all.  I think those tended to get trajectories that would get to the right point (via "TruePositionAtUT"), but wouldn't find an SOI there at all, like Moho was missing in the Sim which made no sense to me.  All you'd get was a heliocentric orbit which hit the right point, but nothing was there.  Then I even included the attempts to roll it forwards a couple orbits and recompute and it still fails.

Most of my testing was done on Kerbin->Duna transfers where the interactions tended to fairly often show up because everything (Kerbin-Mun-Duna) is fairly coplanar so interactions are common.  Kerbin->Moho was more useful to find trajectories which just barfed (particularly without checking 'include capture burn' -- it was more sane when that was ticked).

AFAIK this bit never gets hit so is unlikely to be responsible:  https://github.com/MuMech/MechJeb2/blob/dev/MechJeb2/Maneuver/TransferCalculator.cs#L440-L445

I experimented around with various different ideas for this as well:  https://github.com/MuMech/MechJeb2/blob/dev/MechJeb2/Maneuver/TransferCalculator.cs#L446-L449  I think I tried reusing the SolverParameters object rather than making a new one, but fell back (i think) on just the way it was before...

I might have just started at it all too long and started hallucinating though...  not the first time i missed something simple and relatively stupid...

 

  • Like 1

Share this post


Link to post
Share on other sites

So, I'm trying to land on Minmus using Landing Guidance, and...well, the UI widget seems to collapse all of its contents to the upper-left corner after the initial deorbit burn ("land somewhere" option), and become unresponsive. The burn still continues as normal, interestingly.

Screenshot: https://imgur.com/CgaaSVm

KSP.log: https://drive.google.com/file/d/1cdx4AVSOvBStcenYbQYOp35wZKMfbRCP/view?usp=sharing

Another issue, unfortunately not in this log: If you delete a waypoint that you're navigating to with Rover Autopilot, it'll get stuck at its current speed and heading, and say "Index 1 of 0" (perhaps an IndexOutOfBoundsException, or whatever C# calls it?). For a while, setting a new waypoint fixed it, but eventually my rover autopilot just completely died - it doesn't try to navigate to any waypoints, and is stuck at "Index 0 of {n}".

Share this post


Link to post
Share on other sites

This is definition of entitled whining, but...

Is there any way the Docking Autopilot could be modified so that it doesn't go through monopropellant like a drunken sailor goes through his paycheck?

Share this post


Link to post
Share on other sites
9 hours ago, coolguy8445 said:

So, I'm trying to land on Minmus using Landing Guidance, and...well, the UI widget seems to collapse all of its contents to the upper-left corner after the initial deorbit burn ("land somewhere" option), and become unresponsive. The burn still continues as normal, interestingly.

Screenshot: https://imgur.com/CgaaSVm

KSP.log: https://drive.google.com/file/d/1cdx4AVSOvBStcenYbQYOp35wZKMfbRCP/view?usp=sharing

Another issue, unfortunately not in this log: If you delete a waypoint that you're navigating to with Rover Autopilot, it'll get stuck at its current speed and heading, and say "Index 1 of 0" (perhaps an IndexOutOfBoundsException, or whatever C# calls it?). For a while, setting a new waypoint fixed it, but eventually my rover autopilot just completely died - it doesn't try to navigate to any waypoints, and is stuck at "Index 0 of {n}".

  1. You have a lot of errors in that log, most of them unrelated to MJ. The  UI crashed because it tries to find out the biome of your landing point and the stock code has an exception while doing it. Can't really do much about it since I don't want to blanket my code with try/catch clause to protect about something that the stock code should deal with properly. ( IndexOutOfRangeException: Array index is out of range. CBAttributeMapSO.GetAtt ). I suggest you cleanup your mods install because you have a few that are broken
  2. Fixed 3 days ago in the dev release, so in an official release sooner of later
8 hours ago, Duke Leto said:

This is definition of entitled whining, but...

Is there any way the Docking Autopilot could be modified so that it doesn't go through monopropellant like a drunken sailor goes through his paycheck?

No, it was designed to do exactly that.

Edited by sarbian
  • Like 3

Share this post


Link to post
Share on other sites
9 hours ago, Jim DiGriz said:

I might have just started at it all too long and started hallucinating though...  not the first time i missed something simple and relatively stupid..

I'll have a look :) A fresh pair of eyes can't hurt. Others mods do that (but those I know used MJ code back then) but they may have fixed it.

Edited by sarbian

Share this post


Link to post
Share on other sites

I'm going to probably asking a really stupid question about using mechjeb to launch to target. Using FASA Apollo mod going to the mun and back using my buddy Mechjeb all the way. Have Apollo  CSM orbiting the mun. Land LEM on Mun. Here's where my issues begin. I use Ascent Guidance and set it to target (after setting CSM as target.)   This is where it gets weird. It's a hit or miss thing on this.   About 2 out of every 3 times I try this the LEm blasts off in the opposite direction of orbit of the CSM.   So to try to  get on matching  a  plane   to one thats  going the opposite direction in orbit,  that's going take a lot work and fuel. So my stupid question is how do i know which direction the rocket is supposed to be going when I launch it to be able to rendevious with it? And why is Mechject when choosing to launch to Rendevious, sending the ship in the wrong direction?

Edited by MikeO89

Share this post


Link to post
Share on other sites
On 2/15/2018 at 5:14 AM, sarbian said:

No, it was designed to do exactly that.

Alright, I probably deserve that response for being so flip, and it's possible that there's some overriding design concern that I don't understand or I've just been creating badly designed craft, but it really does seem to me like the docking autopilot uses way more MP than is necessary, particularly during the "moving to starting point" phase.

In some cases, the near constant burning of the MP thrusters to effect no change in relative velocity is just so prodigious that I turn off the autopilot while the craft is going through that docking phase and turn it back on when it gets close enough to the docking port access to save MP.  Often I get rewarded with the AI restarting the process by backing up again. 

It's very, very discouraging and the only complaint I have about a Mod that otherwise works very well.  :(

  • Like 1

Share this post


Link to post
Share on other sites

How do you post a log file? Im trying to figure out a crash problem i have. I sent the file to a friend though email and he said it was mech jeb, but i dont think that is right. I uninstalled all my mods except MJ and it did crash, i reinstalled everything except chatter and FMRS. I was hoping someone could take a look at the log for me.

Share this post


Link to post
Share on other sites
5 hours ago, viperwolf said:

How do you post a log file? Im trying to figure out a crash problem i have.

The best way is to upload the file to a file sharing service, such as Dropbox or Google Drive, get a sharable link and post that link here.  To help yourself out, read this link for future issue posts: How To Get Support (READ FIRST) - Technical Support (PC, modded installs) - Kerbal Space Program Forums

MJ is reasonably well behaved so I suspect that your KSP install is corrupted somehow.  Try starting from a clean install by downloading another copy of KSP to a new directory and see if it runs.  Then add MechJeb and run again.  What happens?

Are you installing via CKAN or manually?  Which versions of MechJeb and KSP are you running?

Share this post


Link to post
Share on other sites
3 hours ago, Brigadier said:

The best way is to upload the file to a file sharing service, such as Dropbox or Google Drive, get a sharable link and post that link here.  To help yourself out, read this link for future issue posts: How To Get Support (READ FIRST) - Technical Support (PC, modded installs) - Kerbal Space Program Forums

MJ is reasonably well behaved so I suspect that your KSP install is corrupted somehow.  Try starting from a clean install by downloading another copy of KSP to a new directory and see if it runs.  Then add MechJeb and run again.  What happens?

Are you installing via CKAN or manually?  Which versions of MechJeb and KSP are you running?

Thank you, Ill look over and read the information you provided. Im running version 781 dev build, 1.3.1 KSP build, and did a clean install. I just played again forcing it to run in 64bit, it did not crash during this time. Im not sure if that is the cure or not. I too suspect its something else other than MJ, I never had a problem in the past with it. I dont use ckan for installs, I always do it manual.

Edited by viperwolf

Share this post


Link to post
Share on other sites

A small enhancement request, if I may?...

I usually leave the display of the CoM and CoL red and blue dots on, as set in the Attitude Adjustment screen. The only time I'd like them to disappear is for screenshots after hitting F2 but they are the only interface element to remain. This means messing with a bunch of screens to disable them, take the screenshot, and then re-enable them. 

Could they be made to disappear when F2 is pressed please? 

 

  • Like 1

Share this post


Link to post
Share on other sites

How do I setup the ascent guidance so it works with the Power Explicit Guidance?

No matter what ship or settings I use it always crashes head first into the ground.

As you can see in my screenshot all the numbers are completely random.

https://imgur.com/a/MEFen

Share this post


Link to post
Share on other sites
On 2/15/2018 at 5:14 AM, sarbian said:
  1. You have a lot of errors in that log, most of them unrelated to MJ. The  UI crashed because it tries to find out the biome of your landing point and the stock code has an exception while doing it. Can't really do much about it since I don't want to blanket my code with try/catch clause to protect about something that the stock code should deal with properly. ( IndexOutOfRangeException: Array index is out of range. CBAttributeMapSO.GetAtt ). I suggest you cleanup your mods install because you have a few that are broken
  2. Fixed 3 days ago in the dev release, so in an official release sooner of later

Yeah, I've been meaning to sift through my mess of mods (especially since some of them were built against 1.2.2). I got most of them up to 1.3.1, at least, but I'' take a look through that logspam and see if I can figure out what's going on and where from (I also have *something* that just continually spams the log with an incrementing integer that resets on scene changes...). Thanks for the info!

EDIT: based on the "[x] Science!" thread, #1 is actually a Kopernicus issue. 

Edited by coolguy8445

Share this post


Link to post
Share on other sites
7 hours ago, viperwolf said:

I just played again forcing it to run in 64bit, it did not crash during this time. Im not sure if that is the cure or not. I too suspect its something else other than MJ, I never had a problem in the past with it.

So, you could be running out of memory in the 32-bit version although that seems odd if you only have the stock game and one non-parts mod. There's no reason not to run the 64-bit game always.

 

Share this post


Link to post
Share on other sites
23 hours ago, Duke Leto said:

It's very, very discouraging and the only complaint I have about a Mod that otherwise works very well.  :(

If I could fix it easily it would have been done ages ago. It needs to be reworked in depth and that will not happens overnight.

7 hours ago, Foxster said:

A small enhancement request, if I may?...

I usually leave the display of the CoM and CoL red and blue dots on, as set in the Attitude Adjustment screen. The only time I'd like them to disappear is for screenshots after hitting F2 but they are the only interface element to remain. This means messing with a bunch of screens to disable them, take the screenshot, and then re-enable them. 

Could they be made to disappear when F2 is pressed please? 

 

Now implemented in the dev version.

  • Like 4

Share this post


Link to post
Share on other sites
6 hours ago, DuckyBert said:

How do I setup the ascent guidance so it works with the Power Explicit Guidance?

No matter what ship or settings I use it always crashes head first into the ground.

As you can see in my screenshot all the numbers are completely random.

https://imgur.com/a/MEFen

Have a look at https://github.com/lamont-granquist/MechJeb2/wiki

 

  • Like 1

Share this post


Link to post
Share on other sites
2 hours ago, sarbian said:

Now implemented in the dev version.

Wow! Thanks for the excellent turn-around on that.

Edited by Foxster

Share this post


Link to post
Share on other sites

Does the person supporting MecJeb have a Patreon page? I love this game, but am a terrible pilot. Will give cash for continued support.

Also, I can't get landing to autopilot to work correctly. I believe this is a know issue. Is there a work-around or an possible fix date for this?

JK

Share this post


Link to post
Share on other sites
On 2/17/2018 at 1:27 PM, sarbian said:

If I could fix it easily it would have been done ages ago. It needs to be reworked in depth and that will not happens overnight.

Understood.  I think in the meantime I need to work on some of the more fundamental issues I have with getting my ginormous SpaceY fuel freighters to dock successfully.

Share this post


Link to post
Share on other sites

I think my crash was just not running in 64bit, I have not had a single crash sense then. I thought it was playing in 64bit automatically, I do have a another question. Im not sure how to word this though, there use to be a way to adjust tolerance when mechjeb would be close to an end burn on a maneuver. Did that make sense, like the tolerance for the burn could be set to .9 instead of it trying to reach 0. Is that still available?

Share this post


Link to post
Share on other sites
8 hours ago, viperwolf said:

I think my crash was just not running in 64bit, I have not had a single crash sense then. I thought it was playing in 64bit automatically, I do have a another question. Im not sure how to word this though, there use to be a way to adjust tolerance when mechjeb would be close to an end burn on a maneuver. Did that make sense, like the tolerance for the burn could be set to .9 instead of it trying to reach 0. Is that still available?

It s at the bottom of the maneuver planner window

7 hours ago, Shnr said:

Does mechjeb support sstos and spaceplanes?

To do what ? Ascent works fine. Landing was added recently and seems to work too.

Share this post


Link to post
Share on other sites

Using ascent guide to launch me to target is still launching me in the opposite direction. I know I have to be doing something wrong but I can't figure out what. I've tried it with target in different positions of orbit with same result.  Sometimes it will launch in right direction but I can't nail down what I did different when it happens. It's got to point of frustrating me so much, now I usually wait for target to be overhead and then just launch manually and follow it to orbit. After reaching any orbit the Rendezvous Pilot works fine.

Edited by MikeO89

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now