Tom DeVito 1.25.2012

Start: 10:00

  • Made it so reciveData returns boolean.  This way the state will only change if it receives successfully.
  • After lots of troubleshooting, basic handshaking messages seem to be transferring properly.
  • Changed test to be able to test sending data.

End: 6:00

Mike 1.25.2011

  • Still waiting on the customer to suggest a beta test site, she said she would get back to me this week
  • Still backing up the database / checking on the server every day
  • Working with Kristi on the Documentation for Project Assistant,  hopefully we can get it up on SVN and deploy a first draft at site this week
  • Refreshed my memory on proper domain model diagrams and looked at a few free tools that do it, MySQLWorkbench seems to be the best, you can create your model/diagram then the program will create a database schema for you
  • Spent the rest of the day looking at PDF generation libraries as it would be a handy for lots of different tasks: generating reports for visibility, generating reports for PPM, etc.  There are several options:
    • iText seems to be the most widely adopted.  It has lots of documentation, examples and is pretty straightforward to use.  It has a very complicated licensing / pricing structure though.
    • PDFJet is a fairly established option with documentation, examples, and almost as many features as iText.  It also has a simple flat commercial licensing fee of $295.
    • PDF Clown is the last reasonable option I saw.  It is the least developed of the three lacking even an automatic layout however it is completely open source.

Phil 1.25.12

8:30 – 5:30  FP

  • More on the HandControlUi and RightHand proper.
  • Added a clock to calculate elapsed time between frames for physically-based modeling.
  • Got the basics of the hand working, but I need to rework the eyepoint/model control. Adding a popup menu to select the mode.
  • This is a great source for FLTK coding examples (Erco’s FLTK Cheat Page)
  • Done with the popup menu
  • Adding the matrix analysis to get the position  of the fingertips. Done for one finger. Need to add methods to store and access all the position information. May need orientation. If so then I could subtract the position from the current matrix, then multiply a vector by the resulting matrix.

Tom DeVito 1.24.2011

Start: 9:45

  • Finished up changes to comutil and commgr
  • Set up testing envioronment
  • Going to send string messages across and print them to the console, after testing the more basic functions.
  • Added some checks for null pointers so it doesn’t crash.

End: 6:00

Phil 1.24.12

8:30 – 2:30

  • Well, I was hoping to use the MODELVIEW_Matrix to determine the orientation vector of the camera, but no luck. Time for classical spherical coordinate transforms. Transposing Y and Z, since OpenGl likes to have Y as the up vector.
    • phi = angle from vertical, theta = angle from x axis
    • z = cos(theta)*sin(phi)
    • x = -sin(theta)*sin(phi)
    • y = cos(theta)
    • And that is now working. Note that we had to multiply the x component of the view vector by -1.
  • Oooo – new shader book: http://www.packtpub.com/opengl-4-0-shading-language-cookbook/book
  • Started on the HandControlUi fltk class.

Blog Search Tags

Many times I find it hard to find the information I want in to blog among the other entries.  These tags will help to flag important information, to filter some of the more trivial stuff out(if you want more added to the list I will edit this post):

#NOTE:  Something interesting that was found
#IMPROVE:  Something that needs optimization
#FUTURE: Something that you want to remember to look into

#ATTENTION:  Something that you want the other people on the project to read

#LIMITATION:  For noting limiting factors such as memory constraints and what not

Tom DeVito 1.23.2012

Start: 10:30

  • Working on changes to ComUtil.  Since the basic communication should work independent of all the other stuff sent over the wire, the state and size of the potential incoming packet will be transferred in the smallest way possible.
  • Made the following changes to ComMgr:
  1. Made send and recieve as simple as possible so ComUtil does all the heavy lifting
  2. Took out all buffers at this level.  The pointer to the buffer is passed into the methods
  • Changes to ComUtil:
  1. After trying to figure out how to do this and writing and rewriting the same part, I decided to model this class after the typical controller.
  2. This class does not inherit from controller because I wanted it to be lighter weight
  3. This class also runs in Master and Slave mode.  In the case of this program the PC will always be flagged master and the Arduino will be the slave.  The master controls the uid incrementing and the slave always echos.
  4. A large buffer will be broken into smaller packets
  5. decided since the buffer was a static size, it made sense to just send the packets in a way to match that size.  Its currently send 4 packets of 128 bytes regardless of if its full or not.  I can change this later if there are speed issues.
  • Finishing up ComMgr(Arduino)
  • Designated some flags for blog entries to make finding important information easier.

#IMPROVE:  ComMgr(PC) needs a non-blocking receive

#IMPROVE:  Send and recieve expect the whole 512 buffer split into 4 128byte parts.  This can be done more efficiently if needed.

Phil 1.23.12

8:30 – 5:30 FP

  • Fixing up a few things with eyepoint control, then adding the hand
  • Got sidetracked about adding text overlay capability. Also, to truly make the eyepoint controls work, the eye vector needs to be transformed by the view matrix rotational component
  • Big lesson of the day – if you declare a static variable in the header file, you must reference it outside the methods in the .cpp file. But Dprint() is now working as an overlay!
  • Filled out paperwork for Clif’s project, looks like there is progress.

Tom DeVito 1.20.2012

Start: 9:00

  • AVR studio is not really made for the arduino.  Supposedly you can drop the compiled .elf file into the debugger but I haven’t found where this is.
  • Fixed the problem where the arduino was not responding to the first packet the PC sent
  • Fixed the problems that were causing the data dictionary to crash on send and import if no data was there.
  • While doing the above I found where the .elf file is:  C:UsersThomasAppDataLocalVMicroArduinoBuildsDataCommunicationTestmega2560
  • User name and project name are case dependent of course.
  • Still not exactly sure what to do with the file.  Most forums I read just say drop it in the debugger….
  • Added a base class for the arduino sides communication.  This is so ComUtil can be the same on both sides despite having completely different base methods.  On the PC ComMgr serves this purpose.
  • Changing ComUtil to have states and send messages to ensure sychronization.  Once this is done I’ll try to figure out where the debugger thing is.

End: 5:00

Phil 1.20.12

8:30 – 5:30 FP

  • Since I have to change my insanely long FGM password, I swing by the customer to check all my passwords. They won’t need changing for a while. Looks like FGM’s password schedule is now at a different frequency. More stuff to remember. I think it’s crowding out the calculus.
  • Working on the Fl_GL_Window extension (Gl_View_Window) that will handle the drawing of all the items in the universe. Got the callback working nicely.
    • Add mouse functions for world and camera control – mostly done.
  • Working out how to set up callbacks using Fluid. Remarkably, it seems to be making sense.

Phil 1.19.12

8:30 – 4:30 FP

  • Gave Dong my copy of the OpenGl Superbible so he can have a good grounding
  • Set up a window in Fluid that has all the pieces needed for display and testing
  • Figure out timers in C++ (FLTK?) and incorporate. Working, though I can’t get a callback to work inside of a class. I may need to go to FLTK 3.0? Downloading and testing. Nope, doesnt work.
  • The way you do callbacks with classes is to have the callback be static. You pass the “this” address of the class in so that you can work with the class that is active at the moment. This is covered in detail here: http://www.fltk.org/articles.php?L379+I0+TFAQ+P1+Q, which is from the generally useful http://www.fltk.org/articles.php?L+TFAQ

Tom DeVito 01.18.2011

Start: 10:00

  • Trying to get AVR-Studio to work
  • In order to use it with c++ you have to install an extension from tools -> extention manager
  • Finally included all the dependent files, I can actually start debugging now.  There might be a better way to point it at the directory but for now I just dropped them all in.  The files were in arduino_roothardwarecoresarduino
  •  Apparently you can drop a built .elf file into the the debugger from the arduino.  I haven’t figured out where this file is located yet though.  Its supposedly in the temporary folder the arduino uses before deploying to the chip.

End: 6:00

Phil 1.18.12

8:30 – 4:30 FP

    • Asked Dong to look at setting up the first pass of the chart applet using the potatoland.org/gl code as a possible foundation, since it seems to be the best example of working text overlays.
    • Getting openGL running in FLTK, then porting the hand
    • Got the CubeView program compiling and linking. To do this, I pointed the “additional include directories” to point to C:/FLTK/branch1.3, which has FL/ underneath it. Then I pointed the “additional libraries directories” to C:/FLTK/branch1.3/lib. The last thing I had to do was point at the proper libraries (note that these are debug directories):
      • glu32.lib
      • fltkgl.lib
      • fltkd.lib
      • wsock32.lib
      • comctl32.lib
      • opengl32.lib
    • Once I got the system running, there were piles of “PDB” warning messages (i.e. “‘C:WindowsSysWOW64ntdll.dll’, Cannot find or open the PDB file “). You can fix these by getting the debug symbol tables from microsoft:
      •  tools->options…
        • Choose Debugging->Symbols from the list, then check “Microsoft Symbol Servers” then click OK and rebuild. Here’s a screenshot
    • Having an odd problem with setting the background color. I need to set the glClearColor() in the predraw, before every frame, otherwise it comes up as black. Not sure why.
      • Turns out that in FLTK GL windows, the graphics context is reset after things like a resize. THis means that the init code can’t be in the constructor, but rather needs to be in the draw function in the following way:
	drawUniverse(){
		if(!valid()){
			glEnv->init(w(), h()); 	// called when the context
						// has been (re)created
		}
		glEnv->predraw(w(), h());
		draw();
	}

Tom DeVito 01.17.2012

Start: 9:30

  • I don’t think there could be anything wrong with ComMgr but I am going to retest it to make sure.  ComMgr is the class that sets up the port on the PC side and has the most basic methods for sending and receiving data.  These seem to be working but it can’ t hurt to be sure.  This should not be confused with ComUtil which is the more specialized class.
  • I now know for a fact that the packet is built and sent properly from the PC.  The arduino doesn’t seem to be recieving properly.  I think the buffer might be getting overflowed even though I am only sending 128 bytes.
  • Might have found a better way.  Firmata is a firmware for the arduino which allows the computer to communicate to the arduino directly.  If this works it would mean that all of our software can be on the PC side which would make debugging much easier.
  • How to set it up: http://www.arduino.cc/playground/Interfacing/Processing
  • The cpp message host doesn’t seem to be available.  It would be pretty easy to make one but I would still need the communication to work between the PC and arduino to do this.  The firmata message protocols are straight forward so it might be worth doing at some point.
  • I found this shortly before leaving today: http://www.atmel.com/dyn/products/tools_card.asp?tool_id=17212&source=getting_started
  • Its is a IDE for AVR chips.  From what I read it has a good debugger.  I probably didn’t find it before because I was looking for something specific to the Arduino.

End: 5:30

Phil 1.17.12

8:00 – 5:00FP

  • Continuing on with collision detection
  • But first, I need to be able to see a text overlay. Looks like lwjgl has this with their Slick-Util lib. Ugh. This is getting harder than I was hoping….
  • Moving hand code over to MSVC, after installing updates
    • Building the debug and release dlls
  • Another take on 3D. This works in your iPhone: http://css-3d.org/. An example of a website that uses this is http://acko.net/. And there’s http://mrdoob.github.com/three.js/, also. It’s a JavaScript library that renders to WebGL or SVG
  • Getting Started with Three.js