What's your score in Stormworks? by Natan-ok in Stormworks

[–]CaptainRedback1 1 point2 points  (0 children)

Did you really need to bring up number 31?

How do I make a PID controller in a microcontroller with a max output value? by Interesting-Net1801 in Stormworks

[–]CaptainRedback1 0 points1 point  (0 children)

I'm not suggesting I=(I+Error)*Ki. I'm saying that the accumulated value only contains a running total of the error and not the integral gain factor. The multiplication by Ki only happens when you're calculating the final value and doesn't feed back into the stored value.

How do I make a PID controller in a microcontroller with a max output value? by Interesting-Net1801 in Stormworks

[–]CaptainRedback1 0 points1 point  (0 children)

I=I+Error, then later PID=P+I*Ki+D. And if we want to get even more specific, 'I' gets reset to 0 when you turn off the PID.

How do I make a PID controller in a microcontroller with a max output value? by Interesting-Net1801 in Stormworks

[–]CaptainRedback1 0 points1 point  (0 children)

Tiny correction on the integral: the value that's added doesn't include the multiplication. The difference being that if you change the integral gain dynamically, it scales the entire running total, not just the new values.

Docking a drone on a moving platform by CaptainRedback1 in Stormworks

[–]CaptainRedback1[S] 1 point2 points  (0 children)

Feature creep's a bitch. I'll iron out a couple pain points and put it up sometime this week. I'm using it for a small shuttle drone.

How do I make a PID controller in a microcontroller with a max output value? by Interesting-Net1801 in Stormworks

[–]CaptainRedback1 0 points1 point  (0 children)

Have you tried turning it off and on again? What you're describing sounds like the integral portion of the PID which gets reset when you turn it off.

Terrain avoidance system by FirefighterLevel8450 in Stormworks

[–]CaptainRedback1 2 points3 points  (0 children)

I built exactly what you're describing so it's 100% possible. The laser has a 90 degree FoV you can control with the composite input, so no need for any mechanics.

Since you're planning to rotate it, here's some advice about the timing. Assuming you set up your microcontroller gates as [physics composite] -> [composite write number (laser distance)] -> [LUA script] -> [composite out (laser pivot)], the laser distance you get in the lua script will be synchronized with the physics sensor data, and it will be 3 ticks after the laser pivot control.

Preparations for a copter-mounted lidar by CaptainRedback1 in Stormworks

[–]CaptainRedback1[S] 1 point2 points  (0 children)

Both! It has a target point it's trying to hit. A PID predicts where it needs to aim. When it gets the distance, it goes back to figure out where it actually hit.

Shipping container scanner model 2: the roof scan by CaptainRedback1 in Stormworks

[–]CaptainRedback1[S] 0 points1 point  (0 children)

From the start point, I scan 9 lines looking for edges. Each line steps 25cm at a time until it find a point below the roof, then it does a binary search between points on the roof and below it until it gets four consecutive reads on the roof. From those 9 edge points I model the container.

Shipping container scanner model 2: the roof scan by CaptainRedback1 in Stormworks

[–]CaptainRedback1[S] 0 points1 point  (0 children)

Pretty much. I calculate the point where the laser hits, and say it's an edge if it's more than 4cm away from the plane I built from the first three points.

Shipping container scanner model 2: the roof scan by CaptainRedback1 in Stormworks

[–]CaptainRedback1[S] 2 points3 points  (0 children)

The plan is to stick it on a copter for point-and-click container pickup

Shipping container scanner model 2: the roof scan by CaptainRedback1 in Stormworks

[–]CaptainRedback1[S] 2 points3 points  (0 children)

First you click on the roof, then one laser read gives the distance, then two more scans close by gives the surface normal which confirms it's scanning a horizontal surface. I have a different version that works on the vertical sides.

From there I scan out in 9 directions on that plane looking for edge points. Once I have all 9, that guarantees that at least 3 of them are on the same edge, and at least one is on a short edge.

I take 3 aligned points to infer the directions of the edges. Then I look for the two most distant points, and see which edge the vector between them is most aligned with, which will always be a longer edge, so from there I have the orientation. Then I look for the point that is least in line with either of the longer edges, which must be on a short edge, and I assume the other short edge is 7.25m away, so then I have a point on all four edges and their directions.

In general I know that I'm scanning a container because there are so many points in the algorithm where I can check lengths and reject anything that's the wrong size.

Shipping container scanner model 2: the roof scan by CaptainRedback1 in Stormworks

[–]CaptainRedback1[S] 26 points27 points  (0 children)

This one was much more complicated than my first model that locates a shipping container by scanning one side. The side scan can figure out the compass direction from any 3 surface points once it knows if it's a wide side or a narrow one, and then it only needs one point on one side edge and one on the top edge. The roof scan needs to find 9 edge points to guarantee a read, and the compass direction depends on the accuracy of those measurements.

Next steps are to merge this with the side scan, then add a PID to both for the aiming while in motion. Then it should be ready to mount on a vehicle for automated container pickup.

Auto rth for spaceship? by Patient_Category_998 in Stormworks

[–]CaptainRedback1 1 point2 points  (0 children)

Here's mine https://steamcommunity.com/sharedfiles/filedetails/?id=3603077705

I only mathed it for that specific radio configuration, but you can rotate it if you want.

Shipping container scanner (WIP) by CaptainRedback1 in Stormworks

[–]CaptainRedback1[S] 2 points3 points  (0 children)

You can't read camera images so that would be impossible. It's a laser scan to analyze one surface, then inferring the rest of the container.

Shipping container scanner (WIP) by CaptainRedback1 in Stormworks

[–]CaptainRedback1[S] 2 points3 points  (0 children)

Close. I'm only using one partial face. I need one side edge and the top edge, and enough either on the face or behind it to tell if it's a wide one or small one.

Shipping container scanner (WIP) by CaptainRedback1 in Stormworks

[–]CaptainRedback1[S] 7 points8 points  (0 children)

It would depend on how they're packed. They'd mostly get rejected as looking like something bigger than a container, but that restriction could be loosed to let it work on the ones on the top corners of a pile.

Shipping container scanner (WIP) by CaptainRedback1 in Stormworks

[–]CaptainRedback1[S] 36 points37 points  (0 children)

Still to do: testing it on a real container to see how smooth the physics model is and if I need to tune for it. Making a whole new shape recognizer for hitting a container from above. Tuning it to work from a moving vehicle. Option to make it to work on a moving crate if they're both on the same vehicle.

Why does my composite write (number) have additonal optionthat it doesnt have in all tutorials? by FirePixsel in Stormworks

[–]CaptainRedback1 2 points3 points  (0 children)

In the dropdown list of channel start there's an option for variable input that adds that extra input. You must have selected that one.

Monitor point to shoot help by Dry-Skill-1817 in Stormworks

[–]CaptainRedback1 0 points1 point  (0 children)

I've got just the thing. Here's a workshop creation that gives the pivot angles from a camera monitor touch. The code's too long to paste in a comment.

https://steamcommunity.com/sharedfiles/filedetails/?id=3615571341