Go Back to handibot.com
sign up or log-in

Advanced

Need Info/Suggestions on how to set up a Developer environment for creating Handibot Apps

Posted by gclayton 
I'm interested in setting up a Handibot Development environment using an Intel Edison and Arduino Due as described on the gofabmo.org site.

Are the tinyG2 board and stepper motors also required just to develop an App for the Handibot or can I get by without a complete system? I understand it would be best to have a complete system for checking the App but I am looking for a minimal system just to get familiar with building an Handibot App prior to getting the Handibot V2.

Would like to also know if the binary files for the FabMo Engine, G2 Core and Fabmo-Edison-Image could be provided for setting up the system for app development only. I'm not interested in changing anything in the core system software.

Again, it would be nice to have a step-by-step guide as to how to setup a development system and get all the correct images installed.

As I understand it, in order to get a development system setup it is required that I build the Intel Edison Image and install it, build the Fabmo-Engine and install it, and get the G2 Core built and installed on the Arduino Due. All this requires linux vm in order to build the component pieces as I understand it. I do not us Linux on a regular basis for any sort of development.
You should not have to build a linux image. If you get an edison and a due, we can provide you with the image that we use for handibots. Building the linux image is a serious undertaking, and is documented only as an internal process here at shopbot. You should not go that route.

Before you go too far down this path - what sort of development are you looking to do? Can you talk a little bit about what sort of apps you are intending to write? In many cases, you don't need a fabmo installation at all to develop and test apps, you can simply do it in a web browser. For apps that perform simple tool operations, or generate parts to cut, it's sufficient just to work in a browser. You only really need a smulator or real tool to develop apps if your apps are performing sophisticated interactions that require tool feedback.

We're excited you're looking to develop apps, and want to help wherever we can. If you let us know the sort of work you are doing, we'll be in a good place to point you in the right direction.

Thanks!

-R
Thanks for the response to my question.

I was thinking I would need to get some feedback from the engine/g2 core to fully test the App.

I don't know exactly what type of Apps that I will be developing yet but after reading through the FabMo docs on GitHub I saw where you could possibly setup an Edison and Arduino Due for development purposes and thought I would try that route.

I do have the Edison on the Arduino board and the Arduino Due. Just wasn't sure if I could get by without having a full rig with drivers and stepper motors.

I was looking at the instructions for building the FabMo-Edison-Image and that was throwing me. Particularly the statement "Pray that it builds".

I'm definitely a tinkerer and thought I would try putting together this "Development System" if I could figure out how to get all the software bits installed correctly.

Open source is a good idea but sometimes just collecting all the required software pieces used and getting them built and installed is a big task.

I was just getting ready to try building the Edison Image from the instructions and source provided on GitHub for fabmo. Haven't done it yet. Would definitely appreciate getting an already built image for the Edison if that is possible. I've looked at the Intel docs on getting started with the Edison and how to install their image using the various platforms. But any other suggestions are welcome.

If I interpreted the docs for the G2 Core, there is already a built binary that I can use on the Arduino Due.

Still trying to figure out how to get Fabmo Engine up and running also.

Thanks,

Gil
At this level, we can definitely help you get the software you need on the hardware you have. You shouldn't need the whole rig, so long as you have the motion controller and the edison. What operating system are you using mainly, for your development?

The pray that it builds is unfortunate verbiage, but true. The linux build system used to construct these images is extremely complex, and getting all the dependencies right is outside of what we'd expect anyone to do who wasn't a very experienced embedded linux developer, or an extremely interested tinkerer.

Having said that, the way to proceed is:

  1. You let us know what operating system you're developing from
  2. We'll get you a linux image and flash tools appropriate to your platform
  3. You flash your image, and hopefully it loads right up and runs
  4. You can proceed with app development as I have described in your other post

Thanks for your patience!



Edited 1 time(s). Last edit at 10/20/2016 01:14PM by ryansturmer.
I do most of my development on Windows PC. I'm running Windows 10 x64 (non-anniversary edition) at the moment.

I also have a MacBook Pro that I use for some development so I can use that also if needed.

I really like trying to figure out how to get things like this working, so I guess you can call me an extremely interested tinkerer.



Edited 1 time(s). Last edit at 10/21/2016 03:49PM by gclayton.
I also have the Raspberry Pi 3 Model B that I would like to try out for the SBC if possible.

Thanks,

Gil
Well I have attempted to build the FabMo-Edison-Image using RHEL and Ubuntu 16.04 but if fails and I haven't figured out how to correct the errors yet.

Just wondering if you have an estimated time of when the Edison Image would be available for getting the Edison setup for test purposes?

Thank you
If you are using linux, download the following image:
[drive.google.com]

That's a link to our latest (stable) image. Since you've gone to the trouble of attempting to build an image, I assume you've got the savvy to install this one. If you're on linux, you can run the enclosed flashall.sh script to install. You may have to run that as root or sudo on some systems, as permissions to DFU devices varies based on how your system is setup.

If you are on windows, get this image instead:
[drive.google.com]

A batch file for flashing is enclosed with instructions.

We have another image coming out soon with improved update capabilities that you may be interested in, but this should work for you for now.

-R
Thanks for the images.

I used the Windows batch file to install the image on my Edison Arduino Expansion board.

Now trying to get the board recognized on my network. Initially had a little problem trying to figure out what the login/password for the Edison was but found out it was go2fabmo.

Next step is to get it recognized on the network.
I got the Edison image loaded but when I went to flash the G2 Core to the Arduino Due, I cannot get it to load onto the Due.

I set the COM7 Baud=1200 as instructed and then issue the 'bossac.exe --port=COM7 -e -w -v -b ArduinoDue.bin -R' command to flash the Due but I get a message that "No device found on COM7". I downloaded the binary from the Synthetos site and renamed it to make it simpler to type in the command.

However, I can access COM7 when using the Arduino IDE to run a sketch. The sketch builds and is loaded to the Due and runs ok.

Evidently others on the internet have run into the same problem.

I am running this on Windows 10 x64.

Any ideas how to get around this problem?
I was able to use my MacBook Pro to setup the Arduino Due using a shell script provided by the Arduino IDE and substituting the .elf file downloaded from Synthetos for OSX.

At least I "think" it flashed the image to the Due ok.

After flashing the Arduino Due with the G2 Core, I connected the Arduino Due to the Edison board via the USB port and reset the Edison. After connecting to the Updater via my IP address the Engine status showed as "Idle". And I can Stop/Start the Engine using the Updater. I had to specify port 81 when accessing the Edison Server. ex: 192.168.1.16:81

Prior to getting the G2 Core installed on the Due and connected to the Edison, when I tried to access the Dashboard, I could not access that page. After connecting the Arduino Due, now when I try to access the Dashboard from the Updater menu I am presented with a window asking for a username/password to access the Dashboard.

What is this login info (username/password) for the Dashboard? How is it setup/changed?

I found out that even if you enter bad info on this username/password window, if you hit the back arrow on the web page, you are taken to the Dashboard anyway.

How can I tell if the G2 Core was installed correctly since I don't have the gShield and Stepper Motors hooked up?

I was thinking I would get some feedback when I issued some of the sample Jobs provided on the Dashboard. Even the Example App did not update the provided fields on that App.

Did I need to build the G2 Core instead of using an older binary that is provided by Synthetos? When I start reading the Synthetos docs about the different versions of G2, I get confused as to what I actually need.

So I'm at a standstill for now until I get some input.

Thanks for all the help
Ok, I found the log files on the Edison and it looks like the G2 is dead!

I have tried connecting to the Due using each of the USB ports on the Arduino Due but this did not help. I suspect that my flash of the G2 Code did not go well as I had thought but I don't know that for sure since the flash process indicated the flash was successful with verification of the write.

Here's a section of the log file on the Edison:

info: Connecting to G2... [engine]
info: Opening control port /dev/ttyACM0 [g2]
info: Dual USB since control port and gcode port are different. (/dev/ttyACM0,/dev/ttyACM1) [g2]
error: ERROR OPENING GCODE PORT Error: Cannot open /dev/ttyACM1 [g2]
warn: Setting the disconnected state [machine]
info: Got a machine state change: dead [machine]
error: G2 is dead! [machine]
error: !!!!!!!!!!!!!!!!!!!!!!!! [engine]
error: Could not connect to G2. [engine]
error: (Error: No connection to G2) [engine]

So, next question: What am I missing in my setup?

Thanks, Gil
I still have not been successful at getting the G2 to work when connected to the Edison.

On my last try I used the .elf from the FabMo-G2-Core/TinyG2/bin/SAM3X8E/TinyG2_SAM3X8E_flash.elf

I used my MacBook Pro to flash this to the Arduino Due and when I am connected to my MacBook using the serial port (Native Port) on the Due and using CoolTerm to access the G2 I can issue the stat command and get response from the Arduino.

If I hook this up to the Edison and reboot, I always get the message in the log file that G2 is dead! as in my previous post.

There is also an Error in the log file that there was an ERROR OPENING GCODE PORT: Cannot open /dev/ttyACM1.

If I check /dev for this ttyACM1 device it does not exist. Only ttyACM0 exists.

I really have a lot of questions after trying to get this going about how some of the updater options work. One in particular is how the Firmware update option finds the g2.bin to update the G2 Firmware. When I selected that option it seemed to go through the steps to flash the G2 code and I could see the write and verify steps complete successfully in the Updater Console but nothing seemed to happen on the Arduino Due.
If you had an 'idle' engine, than you got it. You've found the firmware update feature, so if G2 is dead, you can reflash and reboot. If you're seeing those steps in the updater console that it's updating - I think you're pretty much in the right place. Power cycle the system after doing a firmware update, and you should be in good shape. If you ever get to where you think your G2 firmware is garbaged up, you can hold the ERASE button on the due and hit the reset button, this will wipe the ATSAM and let you start fresh.

At this point you have an essentially working installation, and you can start testing around. You can treat this installation like a handibot, and you can use some of the handibot documentation to get up and started:

[handibot.com]

The default username/password for the dash is admin/go2fabmo - You should not have to connect to :81 except for certain update system maintenance activities (we are hoping to reduce the need for this in the future)

Stick with the released versions of the software for now. We've got some updates coming in the developer versions that we're pretty excited about, but it's not all merged in yet, and still needs some work.
Well, I'm a little confused about what I am seeing when I try to run some of the Apps like HoleCutter and Example App.

The engine does show that it's in an idle state when I am in AP Mode.

After connecting to my Wifi Network and going into Dashboard to submit some commands and Jobs I don't get the feedback that I was expecting to get. Maybe this is me not understanding things right now.

When I run the Example App and go to the Control tab, according to the info on that tab I am expecting that the boxes on the bottom should be updating with info after issuing the Move Tool command and also be updated when I move the tool from the DRO with the Arrow Buttons. But they do not update.

Am I incorrect?

I know you're busy and appreciate all the info.

I will see what I can do from here. At least it seems like G2 may be running but I still get the message in the log file about G2 is dead and the info about the GCode Port not being found.

Sometimes when I issue a command or Job I get the window that pops up and states that "Authorization Required" and to hit the Green button. I don't know how to get around this just yet since I don't have the physical HW.

Thanks again.

Gil
Yes,

with the example app loaded, you should be able to hit the "Move tool" button in the control tab, and see the tool position update, not just in the app view, but in the DRO (right hand panel) as well. When you click move tool, what happens? Do you get any kind of dialog or error message? Do you see the tool position updating anywhere? (Such as in the top bar, or in the side panel DRO?)
No, I'm not seeing any position updating anywhere, but when I hit the "Move Tool" button I get the "Authorization Required" dialog that pops up that I need to Press the Green Button for one second. The only option I have is to "Quit" out of that dialog since I don't have the Green Button to hit. I get the same "Authorization Required" when trying to move via the DRO arrow buttons.

On the physical Handibot tool the Green Button is connected to one of the digital inputs isn't it? I haven't looked at the API very closely yet, can you simulate an input on the individual digital inputs in any way? Or is there a function that will indicate that an authorization has been done?
Ah! There it is.

The green button is indeed on a digital input. It's a safety feature, to ensure that people who are not physically near the tool are not able to drive it around. (You wouldn't want someone to connect to the tool wirelessly from another room for instance, and begin to drive it around while you were changing the bit!)

For your simulation case, you can simply turn the authorization feature off. Go to configuration and under the machine tab, there is a drop down that lets you select which input is used for authorization. One of the options is to turn authorization off completely. Do that.

Try again with the setting changed, and you should be on the road again!
Yep, I can see the updates now.


I find that I have to refresh the page before I see the updating start to work though.

For example, on the Example App, when I select the Control tab and make a change to one of the fields and hit Move Tool button, nothing happens until I refresh the page one time. After that, I can make changes in the x,y,z boxes or use the arrow buttons in the DRO and changes update ok.

Same when I submit a job and try to Preview it. Must refresh the page one time and then the preview updates ok.

[Edit: Preview doesn't work most of the time. I have only seen it work once or twice using the Terrain App. No data shows, just the x,y,z arrows and lines. At first, I was on my MacBook Pro using Safari, and then on my PC using Edge.
Tried using Chrome and Preview seems to be more reliable in Chrome]

But I am at a point where I can start experimenting with some App Development I think.

Thanks



Edited 2 time(s). Last edit at 11/01/2016 06:14PM by gclayton.
I have purchased a gShield and installed it onto the Arduino Due that I had flashed the g2Core via FabMo Dashboard and have hooked up stepper motors to the gShield but I cannot get the stepper motors to respond to any commands.

The gShield seems to be powered ok with the blue led lit on the board. I am using a 24V power supply to power the gShield.

Is there any configuration changes that need to be made in the g2core to get the gShield to work on the Arduino Due.

When viewing the status of the Arduino Due using CoolTerm, the hardware platform status 'hp' indicates 3. For the Due this should be 2 instead of 3.

I've been trying to sort through the documentation on the Synthetos site for g2core but haven't been able to figure this out yet.

Any help getting the g2Core configured to work with the Due and gShield is appreciated.

Edit: I had an Arduino Uno that I loaded the grbl code and installed the gShield onto the Uno. Using Chilipepper on my MacBook Pro, I was able to connect to the Uno to get the stepper motors to activate and reposition by issuing g0 commands for the various axiis.

Still cannot get any stepper motor movements using g2 on the Arduino Due with the gShield.



Edited 2 time(s). Last edit at 11/24/2016 04:46PM by gclayton.
I downloaded the tinyg2.elf binary from Synthetos that was configured for the Due/gShield and now have the stepper motors moving and running via the FabMo UI.

This binary is version.078 of g2Core and sometimes the stepper motors stall and FabMo Engine stops responding. This could be due to my setup. After rebooting the Arduino Edison then it works again for a short time.

Is it possible to get the most recent g2Core binary for the Handibot that is configured for the Due/gShield?

Thanks again for your assistance.
Good show on getting everything setup and flashed!

I have attached the binary for the gShield version of the qualified edge firmware. This is the same version we ship on the handibots, but configured for a due with a gShield
Attachments:
open | download - gShield.bin (128.4 KB)
Thanks Ryan,

Hope you are having a great Thanksgiving.

I will set this up and do some testing.

Gil
Tried the new gShield.bin but cannot get the engine to start with that binary. File size after download was 130,892 bytes. Also, after flashing the Due with this binary, there are no COM ports created when it is connected directly to the PC as with the Synthetos file.

If I go back to the 078.02 binary downloaded from the Synthetos g2Core site, then the engine will start ok.



Edited 1 time(s). Last edit at 11/27/2016 11:31AM by gclayton.
I ended up compiling the synthetos/g2 master (ver. 098) source and after flashing it to the Due I have been able to get all three axis working on the gShield using the FabMo Dashboard.

Now I need to figure out how to configure the axis for accurate travel distances.



Edited 1 time(s). Last edit at 11/27/2016 10:19PM by gclayton.
I was looking at the instructions for building the FabMo-Edison-Image and that was throwing me. Particularly the statement "Pray that it builds".

I'm definitely a tinkerer and thought I would try putting together this "Development System" if I could figure out how to get all the software bits installed correctly.

Open source is a good idea but sometimes just collecting all the required software pieces used and getting them built and installed is a big task.
Sorry, only registered users may post in this forum.