Jump to content

MechJeb, first impressions and head-to-head


Meltro

Recommended Posts

Intro:

I've been playing KSP for about a month now, and have gone from 'oh please oh please just get into orbit any orbit' to deorbiting fuel tanks that are near full and planning grand tours of the whole system. I usually have a distinct distaste for plugins, and I felt with autopilots available I had best learn how to do things myself before giving up control to a machine. I am comfortable docking, intercepting, matching orbits, transferring, and landing (at last). I felt it was time to see how I measured up, and see if I had some gaping holes in my game.

NOTE: WHILE FRAMED AS A COMPETITION, I AM NOT DENIGRATING THE HARD WORK THAT HAS BEEN PUT INTO MECHJEB! I have never written an autopilot myself, and have no idea how difficult it is or what it entails. These are merely my observations from using the system for the first time.

THE CONTESTANTS:

[table=width: 500, align: left]

[tr]

[td]

ASxKWy8s.png

[/td]

[td]

j14yJXds.png

[/td]

[/tr]

[tr]

[td]

MechJeb2 2.0.9.0

[/td]

[td]

Jebediah Kerman

[/td]

[/tr]

[/table]

THE SHIP:

uT2KzBj.jpg

ROUND ONE: ASCENT

MechJeb loses points right off the bat for causing the testing rig to explode. As I had no intention of making major modifications to my fleet designs to accommodate the plugin, the remaining option was to modify the plugin. A few launches later, I had my answer: MJ likes to oscillate. At staging, it would continue it's oscillation between separation and ignition, causing a strike with the falling tanks. Setting the separation delay settings to zero corrected the issue, however the oscillation issue would rear its ugly head later on in testing. Aside from that, MJ was able to figure out staging times and priorities without difficulty.

Of note was how quickly MJ began the lateral translation, almost half the altitude I typically use. Upon seeing this, I though 'man, I'm screwed, this thing is gonna have so much fuel left'. Incredibly, my much less aggressive launch profile produced almost the same efficiency to 100km: 2070dV remaining to MechJeb's 2156. The human gets an efficiency rating of 96% versus the machine, and with none of that oscillatory wall-to-wall crap. And before you ask, orbital declination < 0.1 degrees.

Winner: TIE

ROUND TWO: RENDEZVOUS

Setup consisted of two identical iterations of the testing platform, both in identical 100k orbits and slight declination difference, at approximately 90 degrees phase difference. Given the problem, Mechjeb chooses a high (>200k!) orbit to match phase. While I understand that it is possible to set one's own orbit to match phase, I cannot comprehend why it would by default burn so much delta-v. The amount of time saved doesn't justify the use of consumables. After arriving near the target, MJ reduced relative to 0 and then approach the target via main engine, albeit slowly and wobbly. Disconcerting, however unimportant in the final scheme. I would like to see an option to use RCS at this point but hey, it works.

Winner: MECHJEB (just remember to set your own orbit)

ROUND THREE: DOCKING

What began as a minor annoyance has become a killer. The oscillation with RCS at this point becomes incredible. While the docking was successful, it was a long and tedious process, regardless of how I adjusted the maximum speed allowed. It would have been downright graceful had my poor ships not been shaking like an epileptic watching anime. Small though it was, I was just waiting for those solar panels to get thrown off.

Winner: JEBEDIAH KERMAN

ROUND FOUR: LANDING

Possibly MJs best event, a precision atmospheric landing. This is difficult to eyeball properly but with some practice can be done with a steep descent angle and some cautious RCS use. As expected, MJ ended up at KSC with no intervention on my part, passing through 5000m and dead-on to hit just off the launchpad

4000m

3000m

Check, yup, autostage is on

2000m

Um, any time now...

1500m

?!?!?!?

1000m

SPACEBAR SPACEBAR SPACEBAR

Well, perhaps there's an option I missed somewhere. Craft landed successfully, albeit with quite a bit of screaming from the Kerbin B-team. Alas, Jebediah was also able to land on the complex, less than 1km away from his Cylon counterpart.

Winner: TIE

ROUND 5: BONUS ROUND

He's Jebediah Kerman. He's got the most awesome smile of any video game character created. He reminds you that, even when things are going badly, you're still riding on top of 100 tons of high-explosive awesome.

That being said, if you ask him exactly how MUCH explosive tonnage, what that means in delta-v, where it is right now, where it's going, what it's made of, or anything else of the like, he will have naught to offer.

Winner: MECHJEB, although not by much

Conclusions:

MechJeb is quite neat, mature, and certainly capable of some amazing feats. Especially interesting was how much of my intent it was able to accomplish without me actually putting an option in anywhere. Most of the steps it took to an open-ended problem were quite sound. That being said, it suffers enormously from oscillation relating to how it 'looks for zero', and doesn't seem to capitalize on all resources available. At a minimum, I would hope that it would make more use of gyros for attitude control instead of wall to wall thrustering, but it seems to be able to accomplish the goal most of the time.

That being said, I do NOT recommend MechJeb for a new player. The skills that I have picked up in the last four weeks have been invaluable to understanding the game overall. While I could certainly see utilizing such a utility for mundane, repetitive tasks that I have done before, I would strongly recommend never doing anything with MechJeb that you aren't already able to accomplish with a reasonable degree of efficiency.

Link to comment
Share on other sites

Can you share the staging? A few of your comments indicate yours is non-traditional -- for example, why would MechJeb stage when you expected it to stage? And what does it mean to oscillate between ignition and separation?

For ascent, both 10km and 5km are suboptimal turn starts; 8km seems better on most spacecraft. And you should end at about 40km or maybe a tiny bit lower, and don't allow MechJeb to accelerate quite as much as it likes to do.

MechJeb definitely has an issue with roll: it tries very very hard to keep a certain roll angle, even when you're flying a symmetric rocket. This can make it do stupid things. It also sometimes does weird things when you tell it to slew a lot (say from prograde to antinormal) -- it doesn't go along a great circle route but along something else, I'm not sure what.

Link to comment
Share on other sites

I've never tried MechJeb, since I want to do it all myself first (And I'm still a newbie!). But I've been wondering about it, about whether I might like it or not... but I do know pleny about the scientific method.

You remained pretty objective in your analysis and gave both the control and experimental group equal weighting. You had a clear goal in mind and a set of parameters you stuck with. The tests performed were more than fair and are indicative of typical day-to-day actions for KSP players - about my only nitpick is you didn't test how it finds escape vectors, but that nit to pick off is frankly really tiny. And I'll be honest, I've found your experiment here particularly enlightening, so definitely bonus points for your concise conclusions.

I've read scientific journal articles with less clarity and objectivity than this; that's not hyperbole, either. Aaaand now I know how MechJeb works. So there's that.

Link to comment
Share on other sites

That's good to know, as I am a new player sort of. l played a little bit last version after I bought it, and I was only able to make it to the mun and land. I then heard the new version would not keep saves and so stopped playing for a bit. Now I am thinking about using Mechjeb soon as I have troubles with landing(the mun landing took 3 tries). It probably is a good idea though to get comfortable with controlling my own ships first.

Edited by MaGicBush
Link to comment
Share on other sites

That being said, I do NOT recommend MechJeb for a new player. The skills that I have picked up in the last four weeks have been invaluable to understanding the game overall. While I could certainly see utilizing such a utility for mundane, repetitive tasks that I have done before, I would strongly recommend never doing anything with MechJeb that you aren't already able to accomplish with a reasonable degree of efficiency.

I don't know, that is why I would recommend MechJeb; it sucks as someone new to a game to fail the same thing repeatedly, and MechJeb gives you a "bugger it, i'll let the computer do it option". It gives you the option to get past something and keep having fun playing the game, rather than tearing your hair out while repeatedly crashing into the Mun. If you have tried and can't do something, then just let MechJeb do it and get on with the game.

That said, I really liked the post.

Link to comment
Share on other sites

I don't know, that is why I would recommend MechJeb; it sucks as someone new to a game to fail the same thing repeatedly, and MechJeb gives you a "bugger it, i'll let the computer do it option". It gives you the option to get past something and keep having fun playing the game, rather than tearing your hair out while repeatedly crashing into the Mun. If you have tried and can't do something, then just let MechJeb do it and get on with the game.

That said, I really liked the post.

I agree with this whole heartedly with one addendum. On occasion, go back and try and do it yourself. You can learn a lot by watching mechjeb. I was (and to a degree still am) horrible at docking. But I watched mechjeb do it for me a few times and then started to try doing it myself. Eventually I found myself using mechjeb to dock less and less until I started doing it myself almost every time because frankly, I was better at it (though not by much).

Link to comment
Share on other sites

Mechjeb can be good as a tutor as well though. It gives you the idea of how to do things because it now explains how it does it. How many new players thought that going into orbit meant just going up until thier apoapsis was over orbital height without raising the periapse as well. How many players forget that doing an approach to a target in orbit isn't about getting closer but about the relative velocity when getting close. Trying to do a docking without keeping an eye on the relative velocity is next to impossible.

Doing it yourself is more fun, yeah... but repeated identical launches to get fuel into orbit is borrrrrrrrrrrrrrrrrrring. My way of playing is "How would NASA do it".

Link to comment
Share on other sites

I agree with this whole heartedly with one addendum. On occasion, go back and try and do it yourself. You can learn a lot by watching mechjeb. I was (and to a degree still am) horrible at docking. But I watched mechjeb do it for me a few times and then started to try doing it myself. Eventually I found myself using mechjeb to dock less and less until I started doing it myself almost every time because frankly, I was better at it (though not by much).

Oh, totally. Watching MechJeb executing rendezvous manoeuvres really helped me learn how to do them.

Link to comment
Share on other sites

Mechjeb can be good as a tutor as well though. It gives you the idea of how to do things because it now explains how it does it. How many new players thought that going into orbit meant just going up until thier apoapsis was over orbital height without raising the periapse as well. How many players forget that doing an approach to a target in orbit isn't about getting closer but about the relative velocity when getting close. Trying to do a docking without keeping an eye on the relative velocity is next to impossible.

Doing it yourself is more fun, yeah... but repeated identical launches to get fuel into orbit is borrrrrrrrrrrrrrrrrrring. My way of playing is "How would NASA do it".

Link to comment
Share on other sites

Can you share the staging? A few of your comments indicate yours is non-traditional -- for example, why would MechJeb stage when you expected it to stage? And what does it mean to oscillate between ignition and separation?

For ascent, both 10km and 5km are suboptimal turn starts; 8km seems better on most spacecraft. And you should end at about 40km or maybe a tiny bit lower, and don't allow MechJeb to accelerate quite as much as it likes to do.

MechJeb definitely has an issue with roll: it tries very very hard to keep a certain roll angle, even when you're flying a symmetric rocket. This can make it do stupid things. It also sometimes does weird things when you tell it to slew a lot (say from prograde to antinormal) -- it doesn't go along a great circle route but along something else, I'm not sure what.

The staging on the test platform is as you'd likely guess from the picture, all three on plus boosters, release boosters, drop outboards, stage to upper. I was more referring to some other playing around I had done with some mid-stage boosters and drop-tanks. I'm not sure if it's merely a setup MJ can understand or if it just gets it right as long as you put the staging in the proper order for human useage.

The oscillation on separation and ignition was referring to the default delay in how staging was set, the 0.5 seconds between stage and engine ignition. When the two outboards dropped on my early ascent, the ship would lose attitude control for a moment before the engine ignited and the outboards had dropped free. since the craft was slightly skewed, when the throttle came up it gave it a slight lateral push into the dropped outboard tanks, resulting in Rapid Unplanned Dissassembly.

You remained pretty objective in your analysis and gave both the control and experimental group equal weighting. You had a clear goal in mind and a set of parameters you stuck with. The tests performed were more than fair and are indicative of typical day-to-day actions for KSP players - about my only nitpick is you didn't test how it finds escape vectors, but that nit to pick off is frankly really tiny. And I'll be honest, I've found your experiment here particularly enlightening, so definitely bonus points for your concise conclusions.

Heh, wow, I hadn't really planned it to be like that. Personally I felt the sample size was small, and the testing hardly rigorous. Thank you, though.

Link to comment
Share on other sites

My own observations of the current 2.0.9 version of MJ:

I find it does the following things extremely well:

  • Launch and ascent, whether you do it on autopilot or just have MJ project a target mark on the navball for you to follow the carefully tweaked ascent profile you've developed. If your rocket wobbles around, it's probably because it's unstable or improperly balanced to begin with. For instance, I see no tail feathers on the rocket used in the tests. I would blame that before I blamed MJ. But you MUST have MJ's antenna parallel with the long axis of your rocket and pointed at the nose. Otherwise, Bad Things happen.
  • Doing standard orbit tweaks (circularize, adjust Ap and/or Pe, change inclination, etc.). Results are accurate to more significant digits with MJ than with manual burns, which can be important if you have to place a satellite JUST SO. Otherwise, just a time-saver for easy but repetitive tasks.
  • Docking. This version of MJ, unlike the previous versions, is EXCELLENT at docking, getting it done safely, smoothly, and with minimal RCS usage. HOWEVER, you have to remember to turn on the RCS Balancer function for it, it doesn't do so itself (and remember to turn it off again after docking). If you don't, then MJ's docking is no better than before. Also, be sure you've selected "control here" on some centrally located part, like the docking port you're going to use. Otherwise, it defaults to the MJ part stuck on the side of the rocket, so it will line that up with the center of the target port so you'll be half a diameter off.
  • Executing LLLOOONNNNNGGGGGG burns common with nuclear and ion engines. Having to suffer through these manually is the exact opposite of fun. Just be sure to blip the throttle for a split second before giving MJ the go-ahead or else the burn time calculator will be screwed up and MJ will do an inaccurate burn.
  • Landing at a specific spot on an airless world. It usually comes down within about 200-300m and has no problems unless the ground is so sloped your rocket will tip over anyway.
  • Telling you all sorts of useful info about your ship, your orbit, where you are on the ground, etc.
  • Pointing your ship in the desired direction and holding it there (SmartASS).

MJ does the following things very badly:

  • Plotting a transfer to another planet. MJ seems too anal about synching your ship's orbit up with the ideal burn time for a given launch window. Rather than be a few minutes to hours early or late for the current window (which makes no real difference at all), it prefers to wait around for months until your ship's orbit synchs up. So if you want to go in the window open today, you have to plot it yourself.
  • Landing at a specific spot on a planet with an atmosphere. It doesn't like parachutes or seem to know how to use them, and it deliberately ditches them just before touchdown if you butt in to deploy them yourself. If you don't intervene, it will never use the parachutes even if the lander doesn't have enough TWR to land without them. And at Duna, it will NEVER actually land. It'll start to and make it look like it's lined up on the target. But then it gets confused and ends up raising the orbit far above where you started until it runs out of fuel.
  • Spaceplane guidance: Don't even try this. It's just broken.
  • Hohmann Transfer to Target: MJ ignores inclination differences and only plots the ejection burn, so never hits the target.

Also, a caveat. This version of MJ does something I don't remember in earlier versions. That is, the MJ part itself always steals the "control from here" function from the command pod. Thus, unless MJ is placed antenna-up on the side of the rocket facing your by default in the VAB, the navball will display incorrectly until you right-click the command pod and say "control from here" on it. Also, MJ always thinks the antenna on its part is pointing forward. So if you place the MJ part where the antenna is NOT pointing forward, MJ will try to fly your rocket sideways and Bad Things will happen. And as mentioned above, because MJ is on the side of the rocket instead of being centered on the axis, it will line the MJ part up with the center of the target docking port, instead of aligning the centers of both ports. So it's usually always a good idea, before you do anything else, to set "control from here" on some part other than MJ. But you have to do this every time you come back to that ship, like reloading a save or after flying something else for a while.

Also note that this version of MJ does not use the new SAS system of 0.21, which means that if your rocket is inherently wobbly (due to lack of struts, imbalanced weights, etc.) it will be rather more wobbly with MJ flying than if you were flying with SAS on.

Edited by Geschosskopf
Link to comment
Share on other sites

My own observations of the current 2.0.9 version of MJ:

I find it does the following things extremely well:

  • Launch and ascent, whether you do it on autopilot or just have MJ project a target mark on the navball for you to follow the carefully tweaked ascent profile you've developed. If your rocket wobbles around, it's probably because it's unstable or improperly balanced to begin with. For instance, I see no tail feathers on the rocket used in the tests. I would blame that before I blamed MJ. But you MUST have MJ's antenna parallel with the long axis of your rocket and pointed at the nose. Otherwise, Bad Things happen.
  • Doing standard orbit tweaks (circularize, adjust Ap and/or Pe, change inclination, etc.). Results are accurate to more significant digits with MJ than with manual burns, which can be important if you have to place a satellite JUST SO. Otherwise, just a time-saver for easy but repetitive tasks.
  • Docking. This version of MJ, unlike the previous versions, is EXCELLENT at docking, getting it done safely, smoothly, and with minimal RCS usage. HOWEVER, you have to remember to turn on the RCS Balancer function for it, it doesn't do so itself (and remember to turn it off again after docking). If you don't, then MJ's docking is no better than before. Also, be sure you've selected "control here" on some centrally located part, like the docking port you're going to use. Otherwise, it defaults to the MJ part stuck on the side of the rocket, so it will line that up with the center of the target port so you'll be half a diameter off.
  • Executing LLLOOONNNNNGGGGGG burns common with nuclear and ion engines. Having to suffer through these manually is the exact opposite of fun. Just be sure to blip the throttle for a split second before giving MJ the go-ahead or else the burn time calculator will be screwed up and MJ will do an inaccurate burn.

I'm not sure what I could do different to counter wobble during the ascent. The rocket is about as stable as a rocket can be and can be piloted manually without SAS. If you were to simply launch it with nothing on it would get into the third stage before moving past 45 degrees off vertical due to the imbalance between the docking port and MJ mod. I've eschewed tail fins long ago as unecessary weight, and once you reach 40-50k the craft changes control dynamics rapidly, so the rocket would have to be relatively controllable without them anyway. They also had a habit of tearing my rockets apart from control stresses. These days, I keep my aerodynamic surfaces to my spaceplanes.

As far as doing orbital tweaks 'Just So', I can see that yes, but at this point in the game my burns are all fleshed out afterwords with lateral RCS translation. I get within 1 m/s of my goal (sometimes more), remove the maneuver, then use RCS translation to pinpoint my target. In docking this gets me to 0.1km every time (One should never attempt 0.0, for obvious reasons) and in interplanetary travel it gets to the point where I can plan a slingshot past two orbital bodies before having to wait to refine. Unless I'm aiming outside of Kerbin/Mun/Minmus I never even use the standard maneuver tool.

I was not aware of a thruster balancing feature, I'll give it a shot.

Link to comment
Share on other sites

hmm, I've had MJ do successful parachuted landings on Kerbin and Duna, haven't tried Eve or Laythe as I've not deliberately landed yet on either :)

Yes, it's not perfect and sometimes gets the deployment wrong, think it depends in part on your staging. You can trick it by putting the chutes into the same stage as the descent engines, so MJ can't not deploy them :wink:

Link to comment
Share on other sites

I'm not sure what I could do different to counter wobble during the ascent. The rocket is about as stable as a rocket can be and can be piloted manually without SAS. If you were to simply launch it with nothing on it would get into the third stage before moving past 45 degrees off vertical due to the imbalance between the docking port and MJ mod. I've eschewed tail fins long ago as unecessary weight, and once you reach 40-50k the craft changes control dynamics rapidly, so the rocket would have to be relatively controllable without them anyway. They also had a habit of tearing my rockets apart from control stresses. These days, I keep my aerodynamic surfaces to my spaceplanes.

Well, looking at your rocket, it appears the primary means of control during ascent must be engine gimbals. Engine gimbals, especially on powerful engines at high thrust like during ascent, are not precision control systems. They're great for making actual turns but are total overkill, and thus induce lots of wobble, for making frequent, very minor tweaks to keep the rocket precisely on course, which is what the MJ autopilot is trying to do. If you're flying it manually, you're probably only giving it an occasional tweak when it gets reasonably far off course or, if it's nice and stable, only touching controls to make the gravity turn. Hence, you get less wobble.

Now, older versions of MJ were definitely spastic with aerodynamic control surfaces (just like the old SAS, too), which could lead to RUDs. But MJ 2.0.9 is no longer spastic. And the thing about tail feathers is that they provide it a means for the nearly constant stream of very minor control inputs that the autopilot likes to give to stay exactly on the ascent path. So, give MJ some tail feathers or even RCS to play with during ascent and I bet you won't see much, if any, wobble like you do now. In 0.20, I used FAR so got in the habit of putting big tail feathers on my rockets. Even though I haven't yet installed FAR in 0.21, I still make FAR-style, non-asparagus rockets with beaucoup control surfaces. Hence, I've never noticed any wobble with MJ on ascent.

As far as doing orbital tweaks 'Just So', I can see that yes, but at this point in the game my burns are all fleshed out afterwords with lateral RCS translation. I get within 1 m/s of my goal (sometimes more), remove the maneuver, then use RCS translation to pinpoint my target. In docking this gets me to 0.1km every time (One should never attempt 0.0, for obvious reasons) and in interplanetary travel it gets to the point where I can plan a slingshot past two orbital bodies before having to wait to refine. Unless I'm aiming outside of Kerbin/Mun/Minmus I never even use the standard maneuver tool.

That's the way to be. But for folks not yet at your level of proficiency, MJ's a great help here.

I was not aware of a thruster balancing feature, I'll give it a shot.

It's a separate entry on the main MJ menu, not an option within the docking autopilot box.

On the subject of RCS balancing, it seems a lot of folks don't realize that 0.21 has a built-in, although still preliminary, RCS-balancing system. You activate it when you turn on fine controls with CapsLock. MJ also doesn't know about this, and in fact totally fails if you have this turned on. So, for MJ to dock, you need to have CapsLock OFF and MJ's RCS balancer on.

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