This is al5app_readme.txt Upd 1::B::2016::9::30 W E L C O M E ! ! ! ! ! What this is: the bridge between the G15ROBOT package (containing RS232 control routines) and pure G15 PMN apps meant to be used with the Lynxmotion Robotshop.com SSC32-U card incl the AL5D SSC32-U arm. So this is one of three .zips you would want to blend, as explained below, the other two are: g15robot.zip and app, eg 1618999.zip. Check out genifun.com/openrobotics for all three and more. ***THIS PACKAGE CAN BE EASILY USED FOR OTHER USES OF THE SSC32U CARD, AND, WITH SOME STRAIGHT-FORWARD REPLACEMENTS, THE AL5APP.ZIP CAN BE USED EVEN WITH OTHER CONTROLLERS. IT IS ALWAYS AVAILABLE AT genifunc.om/al5app.zip Robotics is a great thing, especially when done in a first-hand way, and with awareness of all broader issues. Read about the main thoughts about this in genifun.com/openrobotics and in the philosophical links from it. The G15 Open Robotics Manifest: "Robots aint smart, only handy" "A pretty robot is an ugly robot" "Only an ugly robot is good-looking" "Human jobs are exclusively for humans; the only jobs robots can do are the inhumane ones" "Robots don't understand--ever They just react" --S.R.Weber [formulated in 2016] see also about FCM in eg yoga4d.org/arguments_against_AI The A L 5 A P P is free open source software which is compatible with the inexpensive standard light-weight robotic arm at robotshop.com called "Lynxmotion AL5D SSC32U kit without software". You get some free software with it to check that it works, then you can start up this G15ROBOT compatible app to do neat stuff with it. All open source, so you can elaborate on it yourself. *********************************************** RESPONSIBILITY: Your own. This software comes in the hope it will be useful, but without guarantee. You must yourself take care that the robot, also when powered by this package, doesn't do any harm to people or life or things and that anything about this package doesn't do any harm to the robot. ACKNOWLEDGEMENTS: Respect the normal open source principles. We are rather doing this in a scientific spirit and when you use stuff that comes from here that's fine but it is the norm, that obviously must be asserted, that you do this with proper acknowledgements. And when there are additional licenses included in subfolders, respect how these apply for that subfolder. ************************************************ Certainly, if you use the SSC32U card or a compatible card, then this setup can be used as starting-point to control much more and much other than just the AL5D-arm. The SSC32U card can control quite powerful servos when one has a separate powersupply for the servos, with a common ground plus signal wire (but not power wire) going to any of the 32 possible control outlets of the elegant SSC32U card. OTHER HARDWARE, in addition to PC and AL5D w/SSC32: get a separate webcam, a light and inexpensive one, and, in case you already use a lot of USB connectors-- I always use for mouse pointer device and for big keyboard--you may want a 'USB multiplier' or splitter or what we call it--that gives you eg 4 USB where itself it requires only one. More about essential use of G15 PMN and apps at norskesites.org/fic3. Mount the webcam onto the AL5D somewhat like the photos to the setup linked to or shown at the genifun.com/openrobotics page. Adjust it so that what is within half a meter or so around the arm, and including the outer ten centimeters (four inches) or so, of it--including its robotic gripper--are in the center of the camera input. In each app which decodes camera input there should be, in the documentation somewhere, a pointer to an image that demonstrates roughly how it is supposed to look. This is about how big the arm versus the surroundings should be. Find this in the documentation for the app, study it, and imitate it in real life, when you mount the camera and access it as shown beneath. Note that the image that is actually given to the app is called frame500.bmp and produced as shown below, when the BMPCAM and BMPCAM3 both perform in the background in Terminals. Here are setup instructions: Software: unzip G15ROBOT.ZIP afresh and rename it into such as aldapp. Maybe you have it as c:\al5app Unzip content of this AL5APP.ZIP into it also. This contains the bridges between the G15 PMN app and the G15ROBOT G15 PMN platform. Here, CONFIRM OVERWRITE connected to one file: robotput.bat which, in G15ROBOT, is a fairly empty .bat, meant to be replaced, just as we do it now. *** BE SURE YOU USE THE ROBOTPUT.BAT THAT IS *** IN THE AL5APP.ZIP PACKAGE BECAUSE THIS IS *** THE ONE THAT ACTUALLY SPEAKS TO THE ROBOT *** SO BE SURE YOU CONFIRM OVERWRITE WHEN YOU *** UNZIP THE AL5APP.ZIP INTO THE FOLDER *** THAT ALREADY HAS G15ROBOT CONTENT. unzip, thirdly, the relevant G15 PMN app, usually a seven-digit number followed by '.zip', so that the content files get into the same folder. The one we are working on as we are writing this is called #1618999 but there may be alternatives also, listed beside it, if you look at where it's found at genifun.com/openrobotics. This app is pure G15 PMN source. It runs in G15ROBOT (and, as info inside the sources in AL5APP indicate, inside G15CONTROL in Linux) and assumes that AL5APP batch functions are run in the background. That's it. We have set up the essential software. *************************************************** Then, we will configure software to fit with the exact hardware you have in front of you: First, where is your camera? Type roboteyez /devlist Often, an inbuilt mini-camera inside a PC laptop shows up as device number 1. You may find that the plugged in camera shows up as device number 2. If it is the first camera, you may find that no modification as next pointed out is necessary. So, If it is number 2 or higher, type this, in a Terminal, after having done cd into the folder that has the content, eg cd \a5lapp notepad cambmp.bat You see there's a line there that begins with "roboteyez". Add this (after a space, eg, a press on the spacebar): /devnum 2 Then test it. Place the webcam somewhere and plug it in and type cambmp and after a while, if you see 'frame.bmp' listed repeatedly, press ctrl-c and open up frame.bmp eg by typing it in: frame.bmp Don't worry if Microsoft skewes the width of images when opened in this fast way. Does it look farily all right? Well, then, you have done it right! A small image is all we need because the G15 PMN gets a lot of images as the arm moves, and when its pixels are scanned, lots of info can be fetched out of it. It does this in monochrome, by the way. To actually see the finished FRAME500.BMP that is inputted to G15 PMN, run CAMBMP3 in another Terminal at the same time. Compare with documentation for the app as to whether you have arranged the camera right. In extended setups, with more or different .bat's, there can be, of course, more cameras and/or sensors. Then you can go ahead and find out how the camera should be mounted so that it looks best. ************************************************** Second and completing configuration of software to fit your hardware: what's the right com-port? If it happens to be COM4 that is the port, you don't have to change anything. You can simply start the app after having started the background processes, as described in the next part of this text. The present setup is for COM4: but it is easily reconfigured to any other COM-port. When you have the Al5D SSC32U product from Robotshop.com it will use a USB cable to do the RS232-job, quite elgantly; and this requires some drivers, easily enough installed, that set up this stuff as a COM-port. When you power up the robotic arm the card will light up with many leds and as you then plug it in, you will find that it is connected to a certain COM-port. Which port? Both the free programs provided by Robotshop, both the Lynxterm and the SSC Servo Sequencer (set baud to 9600 first and wait some seconds) can tell you which. They can also tell you that you have a working setup. When you do have a working setup, you can control it by this G15 PMN software. Let's imagine that you find that COM5 is right, instead of COM4. This is what you do: cd al5app cd g*comstart copy comstart5.exe ..\comstart.exe cd .. Obviously, if you have another comNN than 5, you put in that number instead of the '5' in the line which says 'comstart5.exe'. (If it's higher than 14, compile yourself with Mingw) Next, open the following three .bat files in Notepad or similar editor and find all the places where it says COM4 and carefully modify each to COM5: notepad nowcomup.bat notepad comdone.bat notepad robotput.bat It can be of value to note that when the cables aren't plugged or the COM-ports aren't found, when the next section performs, the somewhat mysterious message 'File not found' is given on the Terminal (instead of, 'Port not found'). This is just a feature of the messages that Windows Terminal usually gives. ******************************************* HOW TO CHECK THAT YOU CAN CONTROL THE SSC32U AND THE SERVOS BY THESE BACKGROUND ROUTINES 1. Unpower the controller card and plug free servos (with total attention to getting ground right as it says in the manual, and not damaging any pins) into channel #0, #7, #15, #16 and #31. (Don't do this with a robot that isn't supposed to have its servos moved that far. If you want to do a more moderate check, go into nexttors.bkp with notepad and adjust the parameters according to the SSC32U .pdf manual from Robotshop.com.) 2. Reboot PC without the USB plugged in. Power up SSC32U. Plug it in USB to the PC. Wait some seconds. 3. Type in a Terminal, inside the folder, copy nexttors.bkp nexttors.txt This command will move all the servos to one extreme side over a period of 1,8 seconds. 4. Type NOWCOMUP The servos are purring. 5. Type ROBOTPUT The christmas-like leds of the SSC32 are responding The servos are obeying, when you have a working card and working connections and correctly installed drivers and working servos. And, of course, the servos are all moving. 6. Type COMDONE And the servos are going back to home position. Unplug the USB. Unpower the controller card. Get the G15 PMN app up and running so we get both input and output and sophisticated, refined, meaningful FCM robotics movements! ******************************************* HOW TO START THE G15 PMN APP WITH THE ROBOT: *** BEFORE YOU BEGIN, READ THROUGH DOCS INSIDE THE *** APP, IN THE B9EDITOR INCLUDED IN THE PLATFORM. *** THESE WILL TELL YOU WHAT, IF ANYTHING, YOU SHOULD *** ATTEND TO AS FOR THE ROBOTIC PART AND/OR *** CONTROLLER CARD AND/OR WHICH CHANNELS ARE USED *** BEFORE YOU RUN THE APP ITSELF. 1. Unplug the robotic USBs and reboot the PC and repower the robotic stuff and when the PC has well booted, plug in the relevant USBs. 2. Open up several Terminals, eg command 'cmd' or such in Windows. 3. In one Terminal, initialize the RS232 connection and affirm the 'home position' of the robotic equipment, by typing this one command: NOWCOMUP The servos should start to purr :-) In any other case, you do the normal checking of cables, power, and reboot; and, if need by, try with LynxTerm and SSC Servo Sequencer, the free utilities that goes along with this robotarm and that ought to work, when set to baud 9600. When they work well, the odds are very high indeed that all this works well! But normally we don't have to start these first in order to initialize. We have our own perfectly functioning initialization in this G15ROBOT world. 4. Start the camera process. This can be done in the same Terminal. Type CAMBMP 5. In another Terminal, Type CAMBMP3 which converts the camera image to the most easy-to-read format for the G15 PMN app, and which relays the nexttors.txt, when it has been produced by the G15 PMN app, to the robot, at (ir)regular intervals. Don't worry if there's occasional messages of the frame.bmp not found or the like--after all, there's no big reason why every camera image must be relayed to the G15 PMN app; and we have on purpose made this so that it performs in a leisurely way, easy to look into and maintain and improve. 6. In a third Terminal, start the G15 PMN itself, of the type that is enabled with the extra controls we find in the G15ROBOT package. Type NOWG15 and it starts. Press Delete button to get fullscreen for it. Type MNT and type in the number of the app you are wanting to start. As you press enter, having typed these seven digits, you are on the menu. 7. Press CTR-W to enable mouse in G15 PMN. Press on the arrow-like twig or flower (looking like a slash / with a little more) that is on that main menu in front of the relevant place. Depending on the setup, this will either start the robot app at once, or you are required to type in something like ^k1 cc to start it, once inside the G15 PMN Terminal. The menu should tell you what to do and point out where additonal docs can be found, usually by opening the B9edit editor and then opening documentation inside it by pressing on the F3 button on the keyboard, and type '1' to Load a document, and specify the location of the document, such as 'h100'. This should be indicated on the menu of the app. The G15 PMN Terminal that is used with robots is usually the Third Foundation terminal but with a couple of extensions to handle the input/output things. 8. To complete the circle, when you have used the robot for enough minutes and not for more minutes than it was designed for--it is your own responsibility to watch out for questions of heat and stability and that the robot doesn't do any harm, just so it is said--you exit the G15 PMN. You exit the program, then press CTR-Q to get back to the G15 PMN starting-point command line, and type REB there to reboot G15 PMN (ie, exit the virtual G15 PMN CPU that is running on top of the operating system). 9. If anything is near or at the robot of a sort that should be removed before the robotic servos go back to their 'home' or middle positions, remove them now, but careful, since power is still on it. Press CTRL-C inside the Terminal that runs the CAMBMP3 and answer with a Yes if it asks whether it should stop. Do the same inside the Terminal that runs CAMBMP. Finally, and importantly, before you unplug the USBs and turn off the robot, type, in a terminal, COMDONE so as to set the robot servos back to home position. After a suitable brief pause it's ready to be unplugged and turned off. Reboot the PC before next run (unless you have very carefully indeed checked many times that this isn't necessary). A practical note: if you have a USB-splitter, that gives you several USB for just one, you can unplug this one instead of any of the cables that are nearer you equipment, causing less wear and tear on the equipment cables, which should be absolutely in tip-top shape all the time. Also, the robot itself shouldn't have cables replugged all the time, so that its fine connections remain stable. Check screws and movability and balancies and such daily for robots much in use, alongside standard maintenance instructions found in Pirsig's 1970s classic Zen and the Art of Motorcycle Maintenance ;-) GOOD LUCK! Stein R. Weber srw@avenuege.com http://www.genifun.com/openrobotics Art and commercial work: www.avenuege.com Twitter (two-way follow): twitter.com/avenuege Norwegian art catalogue, be welcome to follow, like whatever: facebook.com/avenuege