Jump to content

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


Ziw

Recommended Posts

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

States was an idea I proposed to Ziw towards the end of development. My thought was that states would be arbitrary things that you as a player define, but you can then assign sequences to states so they will only run when within it, and when finished can trigger a state change. If you're familiar with how state machines are represented then sequences would be the transitions between states, rather than the states themselves.

The example I came up with at the time was having Folded and Deployed states on a craft. When folded all you can do it play the Unfold sequence that then triggers a change to the Deployed state when it finishes. Once in Deployed the Unfold sequence is locked from playing, but other sequences such as Spin Antenna and Refold become unlocked.

Link to comment
Share on other sites

Ahh that's why i did not recognize the term, i did not directly learned about this (there is no shame in admiting ignorance, only in refusing to learn if needed). Here is wikipedia article on finite state machines for anyone interested.

PS: triggers i proposed earlier are form of states and transitions, so pretty much IR Sequencer is going in that direction :)

Edited by fatcargo
Link to comment
Share on other sites

Unfortunately for now I cannot find a way to save sequences to be reusable, sequences are very intimately tied to a craft they were created on. I understand that this is a very needed feature, but due to the way KSP and IR works I don't see a way to do it right now, but I'll keep looking.

Link to comment
Share on other sites

I've just spent a few hours trying to make a robot walk with these sequences... :-), it's a very nice mod, it allows for complex operations, but the inability to configure the preset in the SPH makes it really hard.

Anyway, considering the tinkering you have to do all the time with IR timers and speeds, it would be really good if the sequence could be modify, and not just replaced with a new order, so instead of adding a new order with a few more degrees and speed, you can just modify the current one. Moving orders in the middle of 20+ other orders is kinda messy and boring :-P

But after all, I'm just amazed of what a wonderful addition this is!!

Link to comment
Share on other sites

I've just spent a few hours trying to make a robot walk with these sequences... :-), it's a very nice mod, it allows for complex operations, but the inability to configure the preset in the SPH makes it really hard.

Anyway, considering the tinkering you have to do all the time with IR timers and speeds, it would be really good if the sequence could be modify, and not just replaced with a new order, so instead of adding a new order with a few more degrees and speed, you can just modify the current one. Moving orders in the middle of 20+ other orders is kinda messy and boring :-P

But after all, I'm just amazed of what a wonderful addition this is!!

What do you think about this solution?

dz5kIuk.png

Command numbers are toggles, and yellow line indicates where the new commands will be inserted. Thus you can delete a command you don't like and easily insert a new in its place without much clicking.

Link to comment
Share on other sites

Being able to quickly add a new one in the correct spot makes editing an existing one not that much needed, so as a solution, I think it could be very handy!

BTW, I forgot to report a bug I found while tinkering with the mod. It's about the "wait for moves". Sometimes it gets stuck waiting "for moves", while nothing is moving. I found it to happen when you give 2 orders to the same part, one in one direction and the other in the other direction, and the second order takes place before the first is complete (before the first movement reached the value you set). I didn't try it further but happened to me several times that day!

thanks for the time and effort! :D

Link to comment
Share on other sites

I've been testing it a bit more. There's an issue with the loop option. The script pauses at the last order, before going to the first one. As you can see in the GFY I add below, it doesn't matter that I remove the "wait XX" at the end, it still waits for something, making the walk animation wrong!

http://gfycat.com/FeistyWillingFerret

Still, a wonderful mod to come :-D

About the save scripts, could it be possible to save the script to the .craft of the ship you are using? (so no need to tinker the list in the editor, just make it available to future launches of the same .craft)

thanks!

Link to comment
Share on other sites

I've been testing it a bit more. There's an issue with the loop option. The script pauses at the last order, before going to the first one. As you can see in the GFY I add below, it doesn't matter that I remove the "wait XX" at the end, it still waits for something, making the walk animation wrong!

http://gfycat.com/FeistyWillingFerret

Still, a wonderful mod to come :-D

About the save scripts, could it be possible to save the script to the .craft of the ship you are using? (so no need to tinker the list in the editor, just make it available to future launches of the same .craft)

thanks!

It is the intended behaviour, the sequence always waits for all queued commands to finish before looping. It is best to construct sequences around this fact.

Saving on the craft for now is difficult, but I'm still looking for a ways to do it (problem is in identifying IR servos, as their unique IDs are assigned to them only on vessel creation). I'm going to release an updated version with the ability to insert commands at the arbitrary point in the sequence tomorrow though, just ironing out some minor details.

Link to comment
Share on other sites

Errrrm... Am I just too stupid, or is there no way to open the sequencer in the VAB/SPH?

There is no way to create sequences in-editor. This is due to many technical differences between in-editor and in-flight craft, and is something that may not ever be resolved.

Link to comment
Share on other sites

As you can't create sequences in-editor, could you please, please, please add a "save sequence" functionality? So we can program something and when we have to edit the craft, or maybe build a new craft with the same functionality (aka, all the rotapivowhatever-trons would move the same), we can just load the old program?

Also, a bigger window would be appreciated (maybe adjustable?). Currently, the left window is "two-rowed" for me... well, the names are :D

I'm also experiencing either a bug or pebcak when it comes to foldatrons.

I'm trying to rebuild the "walker" seen in the video, using Pivotrons to move the legs forwards and backwards, and foldatrons to lift the legs.

Commands like 1: Pivotron 1 Left to 35 at 2x work like a charm. But Foldatron 2.1 Left to 100 at 1x doesn't (the indicator stays green and the program stops (wait for moves).

Manually moving the Foldatron works without a problem.

FVygsnK.png

Edited by cy-one
Link to comment
Share on other sites

As you can't create sequences in-editor, could you please, please, please add a "save sequence" functionality? So we can program something and when we have to edit the craft, or maybe build a new craft with the same functionality (aka, all the rotapivowhatever-trons would move the same), we can just load the old program?

Also, a bigger window would be appreciated (maybe adjustable?). Currently, the left window is "two-rowed" for me... well, the names are :D

I am working on it. There are certain limitations of IR API and KSP API making this not so easy.

Link to comment
Share on other sites

I am working on it. There are certain limitations of IR API and KSP API making this not so easy.

That is awesome to hear... Well, the first part is XD

Let's hope I'm just too stupid for the Foldatron-problem mentioned above and that there is an easy fix :D

Edit: And as an idea (you probably already had that one, but hey, no harm in mentioning it :D) for the "load/save" program...

There could be an Export-button, which opens a Popup with a serialized list of commands (like "1:Pivotron 1 Left:35:1" for "1: Pivotron 1 Left to 35 at 1x"), with each command as a new row. People could then save that exported list of commands either to an out-of-game notepad or to an ingame-notepad.

The Import-function would open an empty popup to paste the commands into. While not perfect (as this would obviously rely on IR-parts being uniquely named, so the Import can assign each command by name to a IR-part), it would work good enough, I think.

Edited by cy-one
Link to comment
Share on other sites

That is awesome to hear... Well, the first part is XD

Let's hope I'm just too stupid for the Foldatron-problem mentioned above and that there is an easy fix :D

Edit: And as an idea (you probably already had that one, but hey, no harm in mentioning it :D) for the "load/save" program...

There could be an Export-button, which opens a Popup with a serialized list of commands (like "1:Pivotron 1 Left:35:1" for "1: Pivotron 1 Left to 35 at 1x"), with each command as a new row. People could then save that exported list of commands either to an out-of-game notepad or to an ingame-notepad.

The Import-function would open an empty popup to paste the commands into. While not perfect (as this would obviously rely on IR-parts being uniquely named, so the Import can assign each command by name to a IR-part), it would work good enough, I think.

Currently I'm not relying on unique names of servos in favor of PartIDs, which are unfortunately assigned to a vessel when it is launched and are unique, that is why serializing in editor is not possible at the moment.

Link to comment
Share on other sites

Good news. I've found a proper way of saving sequences in editor, we just need to wait until IR releases an update, after which I can release an update to Sequencer which will make creating and saving sequences possible in Editor.

But there will be some limitations to running sequences in Editors:

1) Servos will move to positions instantly

2) Action groups will not work (obviously)

3) Adding/removing parts to your craft may interfere with current sequences, so it would be best to leave the sequence creation as a last step of creating a ship.

Link to comment
Share on other sites

Cool, and thank you for this mod.

I have a problem with looping and "Go To Command". Go to command is apparently treated as a "Wait for moves" (try to copy the sequence).

I also noticed that Wait for moves get sometimes stuck, the move is done, but it keeps waiting.

Looping also doesn't seem to work.

I'm using a Rotatron, trying to make it spin continuously.

Edited by OzoneGrif
Link to comment
Share on other sites

Cool, and thank you for this mod.

I have a problem with looping and "Go To Command". Go to command is apparently treated as a "Wait for moves" (try to copy the sequence).

I also noticed that Wait for moves get sometimes stuck, the move is done, but it keeps waiting.

Looping also doesn't seem to work.

I'm using a Rotatron, trying to make it spin continuously.

Can you post some screenshots/animated gifs?

Link to comment
Share on other sites

I HAVE MASTERED THE ART OF ROBOCRAWLING! Okay not really, lol

screenshot5_zpsasmnqyxl.png

I made a primitive (emphasis on primitive) crawler thing as I wanted to mess around with a walking robot.

Also, I have a question and a suggestion or two:

1. How do I edit the commands that are already in the list while in flight? Would be nice if I could.

2. Would it be possible to have it detect the angle of a IR part as you set it in the editor and have it show that angle while creating a command sequence? To give an example of what I mean, say I put one set of joints into a position that I want them to have as a step, would it be possible for the mod to see that the angle is now 45 degrees or whatever and display that in the commands to be added list? It already instantly sees and mirrors changes to the name of a part or group.

screenshot6_zps0n6duzyv.png

Link to comment
Share on other sites

To edit commands you can set a pointer by clicking on command number and add a new command below and remove old command via delete button

parts position is read upon adding new parts, but I can make it re-read them more often

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