1. 11 May, 2005 2 commits
    • Leigh B. Stoller's avatar
    • Leigh B. Stoller's avatar
      Add a "withwebcams" option to the tracker applet. When turned on, the · 179cf519
      Leigh B. Stoller authored
      mini images from the webcams (240x180) are displayed in the mechanical
      area in the lower right of the floormap. The frame rate is 2fps to
      avoid pummeling the node, as its all done with Java, including the
      jpeg conversion and display (I grabbed most of this code from my
      tools/webcamapplet that I wrote a while back).
      
      My first attempt at this performed really bad cause I was redrawing
      the entire display whenever a new frame came into any camera. Ack,
      this was chewing 98% of the CPU.
      
      So, I restructured things so that each camera is in its own JPanel and
      has its own paint callback. However, in order to have overlapped
      JPanels (since the base image is also a JPanel) I needed to shift to
      using the LayeredPane instead of the ContentPane of the applet. This
      meant creating a wrapper JPanel to hold the base image, and then
      combining everything together on the layered pane. The result is that
      the repainting system paints only what needs to be painted, and
      everything runs much much faster (about 15% CPU on my desktop).
      
      Also got rid of my inline double buffering; JPanels do that by default
      for you. I did not realize that at the time I wrote the applet cause I
      missed the tiny footnote in the Graphics2D tutorial that says Swing
      components do that for you!
      179cf519
  2. 01 Apr, 2005 1 commit
  3. 31 Mar, 2005 1 commit
  4. 04 Mar, 2005 1 commit
    • Leigh B. Stoller's avatar
      Add checks to make sure that a robot destination does not overlap a · 84c4f96b
      Leigh B. Stoller authored
      current robot location (or its destination if the other robot is
      moving or being dragged to a new location).
      
      Oh, I should mention that to make the calculation easier, I am
      treating robots as rectangles not circles. This is not ideal, but I
      was not sure how to calculate overlap of two circles in a reasonably
      efficient manner. I'm sure a high school student can tell me though.
      84c4f96b
  5. 03 Mar, 2005 2 commits
  6. 02 Mar, 2005 1 commit
  7. 01 Mar, 2005 2 commits
  8. 18 Feb, 2005 1 commit
  9. 17 Feb, 2005 2 commits
  10. 16 Feb, 2005 2 commits
  11. 15 Feb, 2005 1 commit