Jump to content

[1.12.x] Anatid Robotics / MuMech - MechJeb - Autopilot - [2.14.3] [4th March 2023]


sarbian

Recommended Posts

50 minutes ago, Bit Fiddler said:

Does "Land Somewhere" look for a "relatively flat, Level, devoid of obstacles LZ?"  or does it just land anywhere?

As far as I can tell from the source it simply puts you in final descent mode.  Kill horizontal velocity, get the rocket upright and light the engines a bit before suicide burn time.

Link to comment
Share on other sites

this is what it looked like to me in practice as well...  

there must have been another mod I used before, as I recall a message telling me it was looking for a safe landing spot before the landing sequence begins.  not sure what mod it was now, but maybe this could be incorporated into MJ?  in both land here and land anywhere modes.   if the spot is inclined over some threshold then move it a bit, or if it can see terrain obstacles like big boulders etc. then adjust a bit to avoid them.

 

The reason I ask, is my last 3 or 4 attempts to land on the Mun using MJ rather than manual steering have all ended in disaster.   either I am coming in too fast, or when I get to the ground it is too steeply sloped etc.     I have seen MJ landings work in the past however, so I am not sure what is going on here.

Link to comment
Share on other sites

1 hour ago, Bit Fiddler said:

this is what it looked like to me in practice as well...  

there must have been another mod I used before, as I recall a message telling me it was looking for a safe landing spot before the landing sequence begins.  not sure what mod it was now, but maybe this could be incorporated into MJ?  in both land here and land anywhere modes.   if the spot is inclined over some threshold then move it a bit, or if it can see terrain obstacles like big boulders etc. then adjust a bit to avoid them.

 

The reason I ask, is my last 3 or 4 attempts to land on the Mun using MJ rather than manual steering have all ended in disaster.   either I am coming in too fast, or when I get to the ground it is too steeply sloped etc.     I have seen MJ landings work in the past however, so I am not sure what is going on here.

check if version of mj2 and ksp are matching, also, what engine do you have on lander?

Edited by Acvila
Link to comment
Share on other sites

21 hours ago, LameLefty said:

 

Check in your Plugins folder (GameData/MechJeb2/Plugins) and make sure brain-dead Windows Defender didn't delete your MechJeb2.dll file. That stupid false-positive Trojan warning is still showing up, despite literally 60+ other anti-malware programs deeming it clean. It's also still flagging ModuleManager. Grrr ....

Yeah its there =/

I was really hoping this would be the fix seeing as WD is having troubles even updating KSP at the moment.

Link to comment
Share on other sites

On 3/23/2018 at 3:00 PM, StickyScissors said:

Docking things parallel to each other still broken it seems ;/

 

Not a docking AP problem. It's a control problem. I know you don't want to believe that but it IS. That craft has several balance issues and your video screams control problems and it doesn't matter if you made it work before.

@DerekL1963 is 100% right, you have a control reference point that is far off from your CoM but your thruster control scheme is arranged around that same CoM. The practical implications are that are:

  1. The attitude controller is going to try to roll around the docking port as a reference point but your thrusters are balanced for the craft CoM. So every attempt to roll is going to throw the ports out of alignment with each other. That's inevitable.
  2. Both the attempts to adjust roll and the attempts to compensate for the resulting alignment issue are using the same thrusters for each attempt and are likely using the same thrusters that are used for translation. (if you have thought of this latter point already and set up dedicated thrusters for translation then you should check them again as you will probably find that your settings for those parts have been changed due to MJ's 'Smart Rcs' setting)

I set up a pair of craft similar to the ones in your video and was able to make it work by

  1. Turning on RCS lever arm compensation (press caps lock so that pitch/yaw/roll indicators turn blue)
  2. Because of the above it was necessary to change attitude control settings. I set Tf min and max to 0.01 and 90. Those are unusual settings that I wouldn't ordinarily suggest but that was the only way MJ was able to control things.
  3. Set the Derivative term to 6. (PID). Set the maximum relative angular velocity to 0.01% from the default of 0.15% - This past part is important because you want to limit the impact of your rotational burns. Look at your video, it's yawing and rolling far too violently.
  4. MJ's RCS balancer can help or it can hurt you here. For part of the approach I had to turn it off but to help it close the distance I had to turn it on.

If you do get things lined up and stable and the docking craft actually approaching, it is still going to have trouble keeping the ports aligned and the docking AP is probably too strict about how far off it can be. The way it resolves this is by slowing your approach speed until the lateral port distance has been closed. I think it limits the approach to 10% of the lateral speed... I forget.

But you have got to get that control issue in hand.

 

 

Link to comment
Share on other sites

3 minutes ago, Starwaster said:

Not a docking AP problem. It's a control problem. I know you don't want to believe that but it IS. That craft has several balance issues and your video screams control problems and it doesn't matter if you made it work before.

is 100% right, you have a control reference point that is far off from your CoM but your thruster control scheme is arranged around that same CoM. The practical implications are that are:

  1. The attitude controller is going to try to roll around the docking port as a reference point but your thrusters are balanced for the craft CoM. So every attempt to roll is going to throw the ports out of alignment with each other. That's inevitable.
  2. Both the attempts to adjust roll and the attempts to compensate for the resulting alignment issue are using the same thrusters for each attempt and are likely using the same thrusters that are used for translation. (if you have thought of this latter point already and set up dedicated thrusters for translation then you should check them again as you will probably find that your settings for those parts have been changed due to MJ's 'Smart Rcs' setting)

I set up a pair of craft similar to the ones in your video and was able to make it work by

  1. Turning on RCS lever arm compensation (press caps lock so that pitch/yaw/roll indicators turn blue)
  2. Because of the above it was necessary to change attitude control settings. I set Tf min and max to 0.01 and 90. Those are unusual settings that I wouldn't ordinarily suggest but that was the only way MJ was able to control things.
  3. Set the Derivative term to 6. (PID). Set the maximum relative angular velocity to 0.01% from the default of 0.15% - This past part is important because you want to limit the impact of your rotational burns. Look at your video, it's yawing and rolling far too violently.
  4. MJ's RCS balancer can help or it can hurt you here. For part of the approach I had to turn it off but to help it close the distance I had to turn it on.

If you do get things lined up and stable and the docking craft actually approaching, it is still going to have trouble keeping the ports aligned and the docking AP is probably too strict about how far off it can be. The way it resolves this is by slowing your approach speed until the lateral port distance has been closed. I think it limits the approach to 10% of the lateral speed... I forget.

But you have got to get that control issue in hand.

 

 

I tried a similar situation with a single docking port mid-way down the tank, exactly on the CoM, with a probe core right behind it facing the same direction of the port, and still got the oscillations. The craft is balanced fine regardless of where the control point is, as i went back to 1.2, and the EXACT SAME craft docked flawlessly. Something changed in KSP 1.3 and i prefer to not have to use some janky workaround for a function that used to work as intended.

Link to comment
Share on other sites

10 minutes ago, StickyScissors said:

I tried a similar situation with a single docking port mid-way down the tank, exactly on the CoM, with a probe core right behind it facing the same direction of the port, and still got the oscillations. The craft is balanced fine regardless of where the control point is, as i went back to 1.2, and the EXACT SAME craft docked flawlessly. Something changed in KSP 1.3 and i prefer to not have to use some janky workaround for a function that used to work as intended.

If you get oscillations you have a control issue regardless of whether it worked in 1.2

You didn't have a control issue then

You have one now and you need to get it under control.

Link to comment
Share on other sites

2 minutes ago, Starwaster said:

If you get oscillations you have a control issue regardless of whether it worked in 1.2

You didn't have a control issue then

You have one now and you need to get it under control.

Nothing changed from the craft in 1.2 to now, same design. Obviously im not gonna change your mind and you wont change mine. the craft doesnt have an issue

Link to comment
Share on other sites

31 minutes ago, Starwaster said:

@StickyScissors

Here's my so-called janky craft docked together.

Have fun watching yours oscillate

ri76uPx.png

Nah, im just gonna go back to a version of KSP that didnt break thinsg. Never said the craft was janky, i said the method was. whats the point of autodocking if it requires manual input and babying to work right? 

Link to comment
Share on other sites

44 minutes ago, StickyScissors said:

Nothing changed from the craft in 1.2 to now, same design...

As you mentioned, quite a bit has changed in KSP that might interfere with MJ, or indeed any other mod that automates docking. One possibility might be that something has caused framerates to drop, such as changes to garbage collection: ie changes to default video and simulation settings. Any kind of automation will fail if the time between simulation ticks is too long - the AI starts a manoeuvre, then there is a delay, and by the time the AI has a chance to check what's up the craft has gone slightly too far. Before giving up on 1.4, try adjusting video and simulation settings to improve that - it might just be that this is all you need to do.

Good luck!

Link to comment
Share on other sites

9 minutes ago, StickyScissors said:

Nah, im just gonna go back to a version of KSP that didnt break thinsg. Never said the craft was janky, i said the method was. whats the point of autodocking if it requires manual input and babying to work right? 

Well, I hope you're happy with the outstanding issues in KSP 1.2, as you don't want to learn how to get things to work in current KSP.  Things change, like the changes in aero and thermo.  We accept the improvements and mod writers adapt their mods.

A group of changes happened around then about where to measure speeds and angular velocities, which I think is the source of the issue here.  Can't remember the details for sure (I think measure from the root part was the old one, from the control part is the new one), but Squad made those changes to fix other issues.  I remember @sarbian commenting on the tools he needed to craft to troubleshoot getting MJ right after that.

All autopilots have tuning parameters for their PID.  I'm very familiar with the ones for Ascent Guidance, which for different rockets do need some adjustment.  An autopilot can add another layer of adjustment over them, but that can be hard to get right, especially for something like docking where spacecraft design and control point selection really matter.

One workaround I use a lot is RCS Build Aid in the VAB to make the spacecraft balanced in rotation and translation, then manual control at close range (even if I use automatic tools for far and near rendezvous).  That way I'm the PID and I can adjust and use as much and as little speed and control authority and can adjust to the given spacecraft.  @Starwaster is a lot more experienced with docking larger craft so he knows close to the right settings for the PID to make autodocking work.

If you want autodocking to work, you've got to build and fly your craft right.  That means balanced RCS in rotation and translation.  And it means having and selecting a control part ("Control from here") near the CoM but certainly in line with the CoM of the two craft.  As @Starwaster has demonstrated, do that with adjusted PID settings and autodocking can work.

But if you're not willing to learn and adapt, well, there's nothing we can do about that.

Link to comment
Share on other sites

ksp with only one push of a button is not fun :), you have to improve yourself all the time, make 5 launches to get the right one, or more, with only one push of the button is boring :), i had no problems with current MJ2 in 1.4.1, but i know that if you adjust well rcs, you don't have any problems docking. adust also the power of those rcs...

Link to comment
Share on other sites

3 hours ago, Acvila said:

ksp with only one push of a button is not fun :), you have to improve yourself all the time, make 5 launches to get the right one, or more, with only one push of the button is boring :), i had no problems with current MJ2 in 1.4.1, but i know that if you adjust well rcs, you don't have any problems docking. adust also the power of those rcs...

Whats fun for you and me is different, i have more fun with stuff other than fully-manual flight. The RCS arrangement/power is not the cause of docking issues, how many times do i have to say it?? part-for-part this craft would dock as i want it with MJ Auto-docking EVERY TIME pre-1.3.

Link to comment
Share on other sites

5 hours ago, Jacke said:

If you want autodocking to work, you've got to build and fly your craft right.  That means balanced RCS in rotation and translation.  And it means having and selecting a control part ("Control from here") near the CoM but certainly in line with the CoM of the two craft.  As @Starwaster has demonstrated, do that with adjusted PID settings and autodocking can work.

That said I have a well written bug report that make me think there might be something wrong with the docking AP (beside the monoprop use that still require some love). 

Edited by sarbian
Link to comment
Share on other sites

7 hours ago, sarbian said:

That said I have a well written bug report that make me think there might be something wrong with the docking AP (beside the monoprop use that still require some love). 

Here's a craft file to contribute to the cause. It's the same basic configuration as in the video using all stock parts.

https://www.dropbox.com/s/j7or2tb33u874jx/Control Authority Tester.craft?dl=1

Don't try to dock it to anything though, not just yet. Just cheat it on up into orbit and put it through various attitude paces using SmartASS using all default Attitude Controller settings.

Control it from its probe core first and pick an attitude (Prograde, Normal, Radial), Force Roll: 0. 

Once you are satisfied that it can adopt an attitude with a particular forced roll setting then switch control to one of its docking ports.

Watch it thrash and roll and oscillate back and forth unable to reach its goal.

If it can't do that then it can't dock no matter what you do to the docking AP. Fix the control issue first and the docking AP will be able to dock it. Whether that means calling it a pilot issue and tweaking PID settings or whether that means you decide that the attitude controller should be able to control it just fine and that it needs a code fix is up to you. But one of those has to happen in order to dock a craft of this configuration no matter what code changes are made to the docking AP.

Link to comment
Share on other sites

3 hours ago, Starwaster said:

If it can't do that then it can't dock no matter what you do to the docking AP.

Well, obviously it can if the AP is adapted to whatever change was made in KSP 1.3, based on how it worked perfectly in 1.2

Edited by StickyScissors
Link to comment
Share on other sites

2 minutes ago, StickyScissors said:

Well, obviously it can if the AP is adapted to whatever change was made in KSP 1.3, based on how it worked perfectly in 1.2

Sort of, but to get a working version, well, I'm glad skilled modders like sarbian and Starwaster are looking at it.  Based upon what I've seen go by before about what sarbian dug up about the guts of some of this stuff and mentioned in passing as he finally got to putting out dev versions to have others test, it can be really crazy.  That he's been there before bodes well, but it could still take time.

Link to comment
Share on other sites

Anyone remember which dev version that the landing worked pretty good. I cannot remember which one it was, my craft is going crazy now when landing. I tried every combination of engines and the craft itself is well balanced. Anyway, i understand MJ is a constant progress, Im just cannot remember the version that worked good. normally i just run the latest dev version :)

Link to comment
Share on other sites

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