Beta Test Version 2

36 views
Skip to first unread message

Steve Pendergrast

unread,
Jun 30, 2018, 10:56:55 AM6/30/18
to Vorpal Robotics Forum
Hello All,

A new version of the Beta test code is now posted on:

tinyurl.com/vorpalfiles  in the BETA-TEST-V2 folder.

This now contains the final functionality for our upcoming summer major release.  New features in this release include:

1) TRIM MODE.  This is a huge new feature that will help you get your robot tuned to perfection.  Servo horns only have 22 splines (grooves) on them, and this means you can't adjust the horn to make the legs perfectly straight. In fact you could be off by up to 8 degrees, and this means the robot won't sit perfectly straight, and will potentially drift one way or the other when walking.  It also means some servos get stressed more than others, so this may lead to premature servo wear.

Trim mode allows you to adjust each servo to within 0.1 degrees!  To invoke it, you boot the gamepad while simultaneously holding down W1 on the matrix buttons.  The gamepad now goes into "trim mode" which allows you to adjust the servos. These adjustments are saved in EEPROM on the robot and therefore you only need to do this once (or whenever you swap out a motor).

In trim mode, the gamepad can adjust the legs as follows:

DPAD BUTTONS:

Special (the button all the way up top) moves to the next leg. The leg raises and lowers for a moment to give you visual confirmation of which leg you are adjusting.

forward, backward: these buttons adjust the knee position, forward=higher, backward=lower

left, right: these buttons adjust the hip.

MATRIX BUTTONS:

Only the "R" row of buttons is used.

R1 (Record):  Holding this button down for 1 second saves the current settings into EEPROM. Note: nothing is saved until you hit this button!

R2 (Play):      This button toggles the pose of the robot between standing pose and adjust mode pose. Normally you want to be in adjust mode pose to set the trims, but you can use this button to confirm that the robot is standing nicely on the table.

R3 (Rewind):  If you hold this button down, the robot will show you what all the untrimmed positions look like. Releasing this button goes back to showing you trimmed positions.

R4 (Erase):    This button has to be held down for more than 1 second, and it resets all current trim values to 0 trim.  This lets you just "start over". NOTE: This does not save the erased trims back to eeprom! You still need to hit R1 to save the trims if you really want to wipe them back to all 0 trims.

When you are done, simply reboot the gamepad without holding down W1.

2) Potentiometer Feedback

The potentiometer now beeps when you turn it and cross from one mode to the next. This gives you  auditory feedback that you've crossed into the next mode. Also, any effect of the new mode is now delayed for 1 second. In other words, as you turn the dial the robot does not immediately flip into the different modes. You have to stop turning it for 1 second before things start to happen.

This might seem like a minor thing, but the current production code will actually start going into adjust, test, or demo mode as you turn the dial and this is quite annoying!  That one second delay gives you time to get to the mode you really want. As long as you keep turning the dial, the robot won't do anything new, but once you stop turning, one second later the robot will do what the mode commands.

3) LEG SAFETY WATCHDOG INFRASTRUCTURE

This beta has the infrastructure in place for a leg safety watchdog, however the code is not yet enabled as I'm still debugging it.  This will protect against a scratch program accidentally stalling the legs against each other and burning out motors or BECs.  This has happened in at least one camp this summer, we think a student wrote code that rammed two legs into each other, and that situation may have been in effect for quite some time, the BEC overheated and burned out.

The watchdog code, when we enable it, will monitor all commanded leg positions and it will adjust them if necessary to avoid collisions. Each leg that could collide is backed off just enough so they barely touch each other.  Of course, this assumes you've trimmed everything nicely. But even if you have not, the collisions will be much less impactful, as servos will increase current draw the farther they are stalled from the commanded position. Even with untrimmed legs the most you'll have is slight warming as the servos won't be off by more than a few degrees on average from the commanded position.

4) SIMPLE COMMAND MODE

The robot now accepts simplified command protocol. This is for people who want to implement their own apps but don't want to learn the entire protocol including checksums and the like.

The simplified protocol is simply 4 characters, starting with the character @ and followed by a matrix button spec and a dpad spec.  For example:

@W1f      means walk mode 1 forward

@D2r      means dance mode number 2, right (ballet dance right turn)

@F4w     means fight mode 4 (lean and tilt) with the special dpad button pressed (the top button) which resets the robot to standing stance.

In other words you're just saying which buttons are pressed and triggering the associated default functions.

This does not allow you to do fancy things like record/play or special scratch functions like pose or gait, or implement long clicks, etc.. However, it will get you up and running very quickly with basic gamepad modes without computing checksums or other complications.

Feedback welcome!

One thing: this beta code does have debug enabled.

Take care,
Steve Pendergrast
Vorpal Robotics, LLC


Dave Leiner

unread,
Jul 1, 2018, 5:29:04 PM7/1/18
to Vorpal Robotics Forum
Trim and Pot Feedback are very handy additions. Work well. Thanks!
Reply all
Reply to author
Forward
0 new messages