Hello all,

  feedback is most appreciated. I had a lot of fun writing this small program 
(see bottom for details and repository link), and i want to improve my skills 
so i can write idiomatic Scheme/Racket code one day. Particularly helpful would 
be suggestions as to where i can use macros to reduce the amount of code the 
program has. There is also some seriously verbose stuff in "lst-utils.rkt" 
(find-entity-with-starting-node, find-entities-from-node ...) that i'm not sure 
how to refactor at the moment now.

  Also, I am a new programmer and have only seriously programmed in VB.NET and 
Racket and am thinking about building on this program to develop a GUI for a 
gantry robot teaching interface. But i am worried about any roadblocks that i 
may encounter on the way in using Racket. Please help me clear my doubts.

------------------------------------------------------------------------

WARNING: bottom is a long description which is as much for me as it for you. 
Skip to the below for a TL;DR.

  The first part of the GUI will be displaying a large image of a printed 
circuit board (PCB) consisting of stitched high-resolution images taken with an 
area-scan camera. The idea is to let the user "draw" on this background image 
the order of movements (commands) of the gantry robot. More detailed control of 
the robot movements has to be specified in a spreadsheet/display list of some 
sort. There will also be some commands involving machine vision for checking 
position markers (fiducials), and various sort of vision inspections. These 
commands are then saved as a "program" to be executed in the second part of the 
GUI.

 Those are the very basics, more fancy features that i can think of might 
include identifying components on the PCB, so as to facilitate easier teaching 
of motion commands, recognizing the PCB image so as to "snap" preloaded DXF/CAD 
files on top of it.

  The second part of the GUI will be the production run of the machine. The 
start-up involves downloading the program instructions to the motion controller 
that will read and execute the movements. The interface for communication may 
be an ActiveX interface or an C API depending on the choice of motion 
controller. Processes running during production run are:

1) statistical process control (SPC) logging
2) displaying the real-time camera
3) waiting on images of fiducials; on receiving it will process it and send the 
compensation values to the motion controller. This has to be done quickly as 
the motion controller will change its movement "on the fly", so if the 
compensation values are received late, it is possible the new position is 
behind the gantry and force it to "backtrack", which will do bad things to 
machine cycle times.

  It is also possible that the fiducial processing will be done in a smart 
camera instead of having to be done on the host environment.

TL;DR:
My biggest worry is about Racket performance or unexpected bugs when 
interfacing C libraries that come with the hardware with Racket code. Reading 
things like "FFI overhead" in the mailing list scares me a little also. I'm 
also a little fuzzy on the performance/details of implementing a canvas showing 
a giant high resolution image.

My understanding that Racket should be fine as a high level prototyping 
language and where performance is needed, we can drop down to C. And the 
biggest performance bottleneck in the whole application is the image processing 
speed in the library, which will come down to the image processing libraries. 
Is there anything i might have overlooked?

------------------------------------------------------------------------

Current program functionality:

 You drag dxf files in the DXF folder into the main window and interact with 
the 2d drawing as follows:

ctrl drag to select elements
esc to unselect elements
click and drag to pan about
scroll up and down to zoom in/out

most other features are data processing stuff and not that interesting.

https://github.com/xtrntr/DXF-Converter/tree/one-main-window

-- 
You received this message because you are subscribed to the Google Groups 
"Racket Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to racket-users+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to