Skip to content
slauter6 edited this page Jun 14, 2012 · 8 revisions

Introduction

This program is designed for use with the WEBots servo control board developed by Eugen Porter. It uses the custom protocol to communicate commands to the board and store information on the board.

Anyone who is interested can jump in an start adding features. If you are looking for somewhere to start, the TODO.txt is acting as a temporary bug database and future features file.

Getting Started

There are currently no binary distributions of the program so you will need to first compile the code. To do this you need to download the free QtSDK. If you are configured to use git hub, fork and clone the repository, otherwise the 'download as zip' option will work fine.

It is recommended to start with the master branch, as it is the least likely to be broken at any given time.

Compiling

Open the .pro file using QtCreator and click build and it should run cleanly. It has been currently tested to work with Windows 7(32 and 64 bit) using Mingw and MSVC, Windows XP (Mingw), and Puppy Linux. If you have difficultly compiling let us know and we will try to sort it out as fast as we can.

Using the Program

Connecting to the Board

The program consists of three tabs, the first one you will see is for connecting to the serial port that the board is attached to. There are other options there but they are not needed to use the servo board. Simply choose the COM port that your device is attached to.

Basic Commands

Switching to the Servo Board tab will give you access to the controls for the board. From there entering a position in a text box and clicking the play button will move a single servo, while selecting a collection of servos send instructions to all the checked servos.

Positions and Sequences

Click 'Store Positions' will store the selected positions in the text box below to be access later. The boxes can then be changed around to make another positions. A series of positions can then be played back, sent to the board with a a delay between them. This is mostly used for a allowing a statically stable robot to move, although can be used for any application that requires a pre-set series RC signals.

If you wish to edit a sequence by hand that is possible, but be sure that the edits you make conform the correct format or they may be rejected by the program. Comment lines can be added and start with the '#' sign, there are no inline comments allowed at this time.

Saving and Loading

A sequence can be saved for later use in a .SERVO file. If you have .SER files from an older version of the program they can still be opened, and saved to, but this is discouraged as comments and other new features cannot be saved in the old format.

If you wish to be able to use your files with the older ServoControllerR3.* program then you will have to save in the older format. Be warned that there may be issues with how the older programs handles different combinations of global values.

Sequence Delays and Repeats

Sequence delays can be set to change the amount of time between two lines in a sequence. The sequence repeats are the number of times that a sequence will be replayed once the play button is pressed.

To set a sequence replay go the Options > Set Global Values and choose a value from the drop down box. Clicking ok will accept and store the value that you have chosen.

To set a delay for all the lines in a sequence got through the Options > Set Global Values menu. To set the delay for a single line, then click Advanced Line Options choose the value you wish to have and then check the "Use Advanced Options" box before storing the position.

PWM Delays and Sweeps

PWM Delays and Sweeps are used to slow the motion of a servo between two positions and can be combined to give the appearance of a smooth, slow motion between two positions. The sweep value will be added (or subtracted) to the current PWM value every 8ms and the new position will be output to the servo. The delay (or repeat) is the number of 8ms increments between calculation of the next position.

There are three types of delays and sweeps. Line scope delays and sweeps are only active for the length of one line. They will be applied before the start of a line, and removed at the end of a line. Global scope delays and sweeps are active for the entire sequence, but can be overridden by line scope values. Default delay and sweep will be applied when there are no user specified values to use. The default value currently is no sweep at all.

The delay and sweep will be applied in the order of increasing scope, thus the line scope will be applied, if there is no line scope the global scope will be applied. If nothing has been set by the user, the default will be used.

To set a PWMDelay and Sweep for a position, click the advanced line options button and set the values you would like. Before storing the line check the 'Use advanced line options' checkbox. The sweep will only apply to that single line and will be overridden in following lines.

If you wish to set a global PWM delay and sweep then choose the options drop-down menu and click Change Global Settings. From there you can choose the values you like.

Playing a Sequence

A stored sequence can be played back by pressing the play button. The sequence will be sent to the board, one position at a time. The amount of time between positions being set it determined by the SeqDelay value at the end of a position line. If there is no SeqDelay value, then the global sequence delay value will be used.

Bugs and Problems

Every effort is made to ensure that there are no bugs in the master branch of the code, but that cannot always be guaranteed.

If you find a bug with the program or think that it is missing a feature, first check the TODO.txt file that is included, it may be in there waiting to be fixed. If no one has seen the issue or feature yet, patches are always welcome but so are thorough bug/feature messages.

Please include all relevant information about your system and how the bug occurred so that it can be fixed as quickly as possible.