Close

Programming Control in Processing

A project log for Inexpensive 3D Printed Full Size Humanoid Robot

I'm designing a super cheap humanoid robot platform. It is going to be the same size as an adult person.

dan-dwroboticsDan DWRobotics 07/20/2017 at 10:220 Comments

So I have taken a few days off work and I am going to make good use of them to really get some groundwork programming done to start automating movements on this machine. I am also going to start thinking about the 'spine' and upper body. Ideally I would design one piece of the upper body first so that I can leave that printing and then work on the programming but designing a whole upper body is a daunting task and requires a lot of thought.

  Here is a snapshot of my current GUI in Processing:

It's very basic as I am still learning processing. The buttons on the left save the positions to the memory as integer values. The buttons directly next to them that are called 'do -xxx' are the ones that recall the positions that I have saved.

Last night I programmed two additional buttons, the first is labelled 'init' which stops power to the motors. This is needed in case the legs freak out, but is more useful when positioning the legs to save down a new position to the memory. The the 'Activ8' button enables the power to the leg motors again.

   The sliders are programmed to add a value to more than one joint so I can control multiple joints with one slider. This enables me to lean the legs to the left or right. The hips and ankles will all move by the same angle to make it lean.

 I am using 'controlP5' library to create the buttons and sliders as it seemed to have good documentation and lots of tutorials on youtube. The GUI is in it's infancy. Today I will aim to program a position sequencer that uses the millis() function to playback a set of preprogrammed positions. The big space you can see on the GUI is were the sequencer willl go. The goal is to get it to shift it's weight to one side and then lift one leg without falling over. If I can do this then it should be able to walk. The problem is, I have been programming loads in visual basic and this is making things confusing with the c++ of Processing. They are very similar languages but it's the syntax that is making me struggle.

Discussions