News

Robot Overlord: Robot Scratch

Since the last update

I’ve been fleshing out the undo/redo system.

I made every button and menu item into an Action, which encapsulates both the visible thing that is activated by the user and the behavior once it is activated. This way I can move Actions around the GUI to improve the layout with ease. Each Action issues a Command pattern, which forms the Undo/Redo stack. Actions also pass along their label name. So changing a position shows as “undo change position” instead of “undo change vector3f”. It obviously easier to understand.

Most Actions are variations of the same thing, so I made an ActionSelectFile, ActionSelectString, ActionSelectNumber, and ActionSelectVector3f. All robots are being updated to the new standard so that they look and behave uniformly. So… that’s nice.

What’s next: Robot Scratch

All that work was important and useful and Good… but also escapism. I’ve been dreading the next step for a while because it requires major skills and I’m not sure I’m up to the task. I get to the point: To program each robot in a human-friendly way I can see no better option than Scratch. Programming – as a discipline – sucks. I should know! I’ve been a programmer for 25 years. I’m 10 years past the average coder’s half-life.

Anything to make coding more intuitive and less error-prone is a good thing. The easiest thing to fix in programming is to remove syntax errors, which Scratch does with such grace… it’s poetic.

Critique my method

My theory is to make every robot run a RobotProgram which has a Events, Control, Sensing, Operators, and More blocks like Scratch. Move a robot to point X (which is an Entity in the world), wait for signal Y, send signal Z, Loop, Branch…. it a lot of work.Is there a faster way to get what I want?

Asked on Scratch forums, too.

https://scratch.mit.edu/discuss/topic/213147/?page=1#post-2147190

So I’ve run this up the flag pole. Now to give it a day or three to see if anyone salutes while I work on my other prototypes.

News

Robot Overlord: uArm support added

Arm3 on the left, uArm on the right.

In the last week I’ve seen three people trying to solve Inverse Kinematics in reddit.com/r/robotics for paletizing robots like the uFactory uArm. Since this model of robot arm already exists in Robot Overlord, I thought it might be fun to add support for the uArm and show how the code changes. Now you’ll be able to customize dimensions for your new designs.

In the java code There is a package of classes called com.marginallyclever.robotOverlord.arm3, which contains everything to create a basic three axis paletizing robot arm like the ABB IRB 460 / uArm / LiteArm i2. Most notably is the Arm3Dimensions class, which holds all the unchanging numbers about the machine’s size and starting position.

Adjacent to that package I created com.marginallyclever.robotOverlord.arm3.uArm, which has a UArm class and a UArmDimensions class. UArmDimensions were set thanks to reddit user thingythangabang and this link he sent in.

Lastly in src/main/resources/META-INF/services/com.marginallyclever.robotOverlord.Entity I added

com.marginallyclever.robotOverlord.arm3.uArm.UArm

So that RO knows uArm is an Entity that can be loaded when a user clicks the “Add…” button.

RO is young, so expect big improvements in the near future. Once I have STL files of each moving section of the uArm I’ll be able to replace the crude models above and it will look suh-weeeeeeet…. It will mean UArm will have to override drawIK() to display the correct Model files. If you made it this far, it shouldn’t be a challenge.

Also mad props to Freenode IRC #java users surial, dreamreal, and yawkat for helping me this morning with a “why java do dat?” question. Minimum viable product!

I just received my first donation for developing RO, for which I’m super pumped. Thanks, Elie!

Let me know what you think in the comments below, and please share with others.

News

Robot Overlord: Undo/Redo Adding and Removing Entities

Undo/Redo already covers movements inside individual robots. I just expanded it to cover adding and removing entities from the world. You can now add a robot, make it move, undo those moves, make some new moves, delete the whole robot, change your mind, and the undeleted object will have the same state that it had when it was deleted. When an entity is deleted it does not actually leave RAM, it is detached from the world and becomes a kind of dark matter.

I’ve also expanded it to cover changes to Model source file name. Load an STL, change the STL, undo to change back.

I’m working on expanding it to cover changes to Entity positions in the world, including the camera.

Edit the next day: no, not the camera. Just every Entity.

Look for these changes in the next official release.

Tutorials

Robot Overlord: How to load an STL file

Thanks for the suggestions, @QuasarAlpha!

Robot Overlord is a program to simulate real robots. It can also steer them. The goal is eventually to make a VR training simulator for robots. After starting the app, select World > Add object

Instead of one of the available robots, choose Model.

A placeholder appears at the origin. The model container is selected. clicking in the blank space next to Filename in the context-sensitive menu gives you a file choose dialog. Locate your STL file and click Open. The placeholder will be replaced with your STL model.

In this case the file is quite large, probably to the wrong scale. In a future update some intrepid young coder is going to add context sensitive dialogs to adjust the scale of a model. By double clicking anywhere on the background in 3D you can unselect the model and get back to camera controls. You can also double click on a model to re-select it.