Ziw

[1.3] IR Sequencer v1.0.3 - Add-On to Infernal Robotics (updated 05/06/2017)

Recommended Posts

 

 

 

 

wMsw9nF.png

Development Release of the first official add-on to Infernal Robotics

This mod will NOT work without the latest version of Infernal Robotics.

ModuleManager is required as well and not included in the download.

 

What it does?

This add-on serves as an example on how to use IR's new API.

With this mod you can create and play sequences of servo movement commands and special commands, like GoTo, Toggle ActionGroup, Delay and Wait.

 

 
Other examples of what is possible with Sequencer:
 
wpA9mm.gif
 
Spoiler

Changelog

* Version 1.0.3
	* Recompile 1.0.3

* Version 1.0.2
	* Changes for CC and Toolbar compatibility.

* Version 1.0.1
	* Just a recompile for KSP 1.2 and IR 2.0.6+

* Version 1.0 
    * State machine functionality (can be optional, just having 1 state will replicate previous version behaviour)
    * New awesome UI
        * To select servo for Move command just Ctrl-Click it on your craft while Edit Sequence window is open
        * You can drag and drop States, Sequences between States (this will change Sequence's starting State) and Commands in Edit Sequence window.
        * Goto command now places an indicator where it points to, but please avoid using more than one GoTO command per sequence for now.
        * Cool looking progress indicators for commands in Edit Sequence window
    * You can have multiple Sequencers per craft and let them control different servos. Each Sequencer has it's own set of States. 

* Version 0.6
	* Some Commands (servo movement, delay, go to line) are now editable. 
	  Unfortunately UI restrictions interfere with making ActionGroups commands to be editable as well.

	* Added Action Groups Extended support, *version 1.34d or later is required*. Your custom ActionGroups 
      should appear in the list after the stock ActionGroups and behave identically. This feature is still 
      experimental, so please report any bugs you encounter on the forum thread.

* Version 0.5
   Mostly maintenance release, just one experimental feature added - you can now add keyboard shortcuts to sequences.

* Version 0.4
 Requires IR version 0.21.3 and higher ##


  * Works in KSP 1.0.4
  *  **Major:** You can now create and edit sequences in editor (VAB, SPH). But there are several limitations:
    * It is best to leave it as a last part of your craft building as adding or removing parts may create problems and reset your sequences.
    * You still need the probe core to create/edit/save sequences
  * For obvious reasons testing sequences in editor is not very accurate as all the robotic parts move to the designated positions instantly and Action Groups do not fire as well.

  * **Experimental:** Added the "Wait for ActionGroup" command, but please remember that it checks only if AG is enabled, not the toggle. So for example if you have "Wait for AG Lights" in your sequence then the sequencer will wait until the lights are on, BUT if they are already on it will not pause, so design your sequences accordingly (good practice would be to add "Wait for commands" after your "Wait for ActionGroup" to ensure that all previous servo commands have finished). 


  * **Minor:** a number of bug fixes and QoL improvements in UI.


* v. 0.3 - Update for KSP 1.0.2
    * Some minor launcher button code refactoring
    * Added the ability to insert new commands anywhere in the sequence. 

* v. 0.2 - Update for KSP 1.0 (29/04/15)

* v. 0.1 - Initial release (21/04/15).

 

 

This mod would not have been possible without invaluable help from @ZodiusInfuser & @erendrake

Download: https://github.com/MagicSmokeIndustries/IR-Sequencer/releases/tag/1.0.3

Source: https://github.com/MagicSmokeIndustries/IR-Sequencer

License: GNU GPL version 3, 29 July 2007.

Edited by Ziw

Share this post


Link to post
Share on other sites

OMG, you just blew my mind! Thank you for providing a way around using kOS for stuff like this.

Share this post


Link to post
Share on other sites

Hmm looks good but somehow I am starting to be a little bit confused. There are so many threads about IR now. For example here in add development I see at least 4. In add releases I see 1 or 2.

So which I should use ? Or which mod is the default mod ? Sorry to ask you this but really a lot of threads with / for IT popped up recently

Share this post


Link to post
Share on other sites
Hmm looks good but somehow I am starting to be a little bit confused. There are so many threads about IR now. For example here in add development I see at least 4. In add releases I see 1 or 2.

So which I should use ? Or which mod is the default mod ? Sorry to ask you this but really a lot of threads with / for IT popped up recently

It is simple - the link in the first post leads to the latest official version of IR from Addon Releases forum. So there will be only 2 threads for IR now - one in Releases (for questions and general discussion) and one in Development (to discuss new features). Old threads will be locked (or are locked already).

See my signature for all IR related links.

Share this post


Link to post
Share on other sites

OMFG!!! Totally necessary addition to IR!!! TONS OF THANKS!

Share this post


Link to post
Share on other sites
Hmm looks good but somehow I am starting to be a little bit confused. There are so many threads about IR now. For example here in add development I see at least 4. In add releases I see 1 or 2.

So which I should use ? Or which mod is the default mod ? Sorry to ask you this but really a lot of threads with / for IT popped up recently

To expand of Ziw's answer, there's two threads related to Infernal Robotics itself:

And two optional addons:

Think of the addons as a collection of mods that greatly enhance what you can do with core Infernal Robotics, hence them using the same brand name.

Share this post


Link to post
Share on other sites

Question: is it possible to make sequencer available in SPH/VAB? I haven't found how to get its' menu there.

Share this post


Link to post
Share on other sites
Question: is it possible to make sequencer available in SPH/VAB? I haven't found how to get its' menu there.

Not at present. Its only in flight and requires your craft to have a stock probe core to operate. I suspect there's some technical limitations with the IR plugin that prevent it working in VAB, but Ziw will be able to say for certain.

Share this post


Link to post
Share on other sites
Question: is it possible to make sequencer available in SPH/VAB? I haven't found how to get its' menu there.

Problem is that in VAB/SPH there is no Vessel, but only a Construct, which is basically a collection of parts with no internal logic running, no physics and etc, but we'll explore this possibility.

But even if we get past that limitation - creating sequences would be quite hard in VAB/SPH due to the way KSP works - IR servos only move at default speed in editor, ActionGroups are not firing and etc - so it would be nearly impossible to test your sequences properly.

Share this post


Link to post
Share on other sites

Either we need to have some sort of simulation available in the editor, or a save/load feature once we get things right.

On that note, though not related to this mod, I'd sorta like to have a preset and/or save/load for specific speed settings in IR so that you don't need to reset the speeds for your actions every time you launch...

Unless these two mods do all that already, I haven't actually used IR for anything in a long time.

Share this post


Link to post
Share on other sites

Too bad that there's a limitation that makes it unable to do sequencer setup in SPH/VAB.

But anyways this is really a nice mod addition :)

Share this post


Link to post
Share on other sites
Either we need to have some sort of simulation available in the editor, or a save/load feature once we get things right.

On that note, though not related to this mod, I'd sorta like to have a preset and/or save/load for specific speed settings in IR so that you don't need to reset the speeds for your actions every time you launch...

Unless these two mods do all that already, I haven't actually used IR for anything in a long time.

What kind of save/load? the one you can reuse on another craft? Because if it's just this craft - the sequences are auto-saved if you have a probe core on the craft.

Share this post


Link to post
Share on other sites

Oh boy do we need to be able to save sequences somewhere problem i have is .....launch ship, spend 30 mins setting up servo sequences, stage rocket, realise i forgot to put something on said ship, revert to VAB/SPH, add forgotten part,rinse and repeat.So im spending more time setting up sequences than anything else

EDIT: Maybe this could help IDK http://forum.kerbalspaceprogram.com/threads/107142-Possible-to-Save-Ship-from-Persistence-File

Edited by BrutalRIP

Share this post


Link to post
Share on other sites
To expand of Ziw's answer, there's two threads related to Infernal Robotics itself:

And two optional addons:

Think of the addons as a collection of mods that greatly enhance what you can do with core Infernal Robotics, hence them using the same brand name.

Thanks for the info :)

Share this post


Link to post
Share on other sites
What kind of save/load? the one you can reuse on another craft? Because if it's just this craft - the sequences are auto-saved if you have a probe core on the craft.

Apparently I'm missing how to save too. I'm probably just overlooking it but essentially I built a mechanical leg and attached it to a probe core, with the idea that I would then go back into the VAB and duplicate the leg after testing out both it and the sequence. But I can't seam to figure out how to save the sequence to the craft so I can make tweaks later.

Or do you have to re-setup the sequence each time you launch?

Thank you for your work though, even without the ability to save this can still be very helpful.

Share this post


Link to post
Share on other sites
Apparently I'm missing how to save too. I'm probably just overlooking it but essentially I built a mechanical leg and attached it to a probe core, with the idea that I would then go back into the VAB and duplicate the leg after testing out both it and the sequence. But I can't seam to figure out how to save the sequence to the craft so I can make tweaks later.

Or do you have to re-setup the sequence each time you launch?

Thank you for your work though, even without the ability to save this can still be very helpful.

Ziw means that once you launch a craft any sequences will stay with it through multiple quicksaves and loads. If you revert to launch or vab all your sequences get lost. As such its best to do your complete design first then do sequences in flight, at least for now.

Share this post


Link to post
Share on other sites

is there anyway i could get my hands on the vab file in the op, im a bit confused on what joints are suited to be paired for collapsible gear. also how to preconfig the control groups for deploying them. playing with a prebuilt ship would help me learn it.

Share this post


Link to post
Share on other sites
Apparently I'm missing how to save too. I'm probably just overlooking it but essentially I built a mechanical leg and attached it to a probe core, with the idea that I would then go back into the VAB and duplicate the leg after testing out both it and the sequence. But I can't seam to figure out how to save the sequence to the craft so I can make tweaks later.

Or do you have to re-setup the sequence each time you launch?

Thank you for your work though, even without the ability to save this can still be very helpful.

As Zodius said, the workflow is the following:

1) Build a craft

2) Launch it

3) Set up your sequences, they are only automatically saved on that particular Vessel.

a) they will persist through craft switching

B) they will persist through docking

c) they will persist with quicksaves

When you revert to VAB - you basically load a save where they don't exist yet.

We'll try to explore the possibility of enabling basic sequence editing in Editor, but it will be after IR and Sequencer are updated to 1.0.

Edited by Ziw

Share this post


Link to post
Share on other sites
is there anyway i could get my hands on the vab file in the op, im a bit confused on what joints are suited to be paired for collapsible gear. also how to preconfig the control groups for deploying them. playing with a prebuilt ship would help me learn it.

Here you go :)

https://www.cubbyusercontent.com/pli/IR_Athlete_Rover.craft/_d31820fe6ede4d3192784e16b9951af6

I had to recreate it since for some reason my previous version got lost. Plus it used tweakscale which the new one doesn't. All parts are named and given appropriate presets, meaning it's possible to deploy it with just 4 button presses (see if you can figure out which :P )

Share this post


Link to post
Share on other sites

Ok time for idea department to go to work :)

How about sequence BLOCKS ? I mean not just static blocks that can be repeated anywhere that reference specific parts, but also blocks that can be executed on different singular parts or collections of parts. Just feed target part(s) into block and let it work through it/them. Honestly, i see that retargetable blocks are not so easy to implement. And they may be too crude for any complex IR behavior that most likely requires math, loops and feedback.

Second is sequence TRIGGERS. Now, these are more kOS-like feature. These have virtually limitless diversity (and thus, sources) which will certainly make this challenging to implement. But starting small is always a good starting point.

If the above two are combined, one can make some pretty powerful automation tasks (docking procedures, emergency tasks if crashing craft in flight or rover on surface, touchdown events etc).

Share this post


Link to post
Share on other sites

We might bring a concept of STATES to sequencer, but as with BLOCKs it is quite challenging to implement, and this mod was supposed to be a simpler example of what could be done via IR API. As for triggers - I was considering adding another type of wait, such as "Wait for ActionGroup", and this concept is actually much easier to implement.

Share this post


Link to post
Share on other sites

I'm glad you considered my ideas. What will "states" represent ? Something like snapshots of current positions of all parts ? If not, here is (yet another) idea for Sequence Builder (with load/save) - set all parts to certain position and then take a snapshot, set them again then take another snapshot. This kind of workflow is similar to stop-motion animation. That way one can quickly build multiple sequences that are independent from each other. Making sequences that are dependant on each other is a bit non-sensical except for "archiving" purposes (reusing same code etc).

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