Feed on Posts or Comments

Category ArchiveSoftware



Driving simulator & Software Alexander Shyrokov on 30 Oct 2008

Clear vision with Gimp

Often times we include a picture of our simulator in our publications. It turned out to be an interesting problem, because if we want to show a cab - we need light; if we want to show the projected scenery - we need to have a dark room:

With light Dark room

The obvious solution is to compose parts that we need from both images:

Composition

But we decided to take it a little further and use actual screen shots from the simulation instead of the pictures of the screen in a dark room:

left

Gimp has a perspective tool that is designed to do something like that and here is the result:

Res

The extra benefit of this approach is that it’s possible to put any scenery into the picture using a template, without taking pictures, but by simply taking screen shots:

Alexander Shyrokov

IEEE Xplore & Science & Software & Tips and tools Alexander Shyrokov on 30 Sep 2008

Firefox and literature review

Literature review is a big part of a scientific underatkening. Thanks to the Internet, most papers are available on line. This resulted (at least for me) in a big number of papers that I read and stored for feature references… Welcome to the age of data mining. As a researcher I have yet another problem on my hands: after I solved the problem of finding information, how do I keep track of it?

This subject was touched upon in other posts (bookmarking, mind maps, references). Given that my major focus of attention (at this moment) is my disertation, I want to be able to have a solution for referencing the information I have found. This basically has some sub-problems: creating references, searching through references, adding them to my documents (thesis, publications, reports), and creating list of references in my documents. I’ll skip discussion of why I was not satisfied with the above mentioned tools. Instead I’ll tell you what I see myself using: Zotero.

zotero screenshot

Long story short, this is a common scenario: I found a paper using Google Scholar (acm/ieee/etc). Two clicks and my reference is created (with all the author, title, abstract, etc. information added properly). Another click and I’m actually reading the paper. One last click and the pdf is stored with my reference (for feature review). If I found something interesting I can add notes. I can tag the reference (for feature searches). I also can link other references as related. The bottom line: creation of references is a smooth, easy and quick process.

There are plugins for OpenOffice.org Writer and Microsoft Word that allows one to use Zotero reference in the documents. The process of adding references to the text and creating refere lists is a two click deal (also smooth and quick). Installation of both plugins (for firefox and for Writer) was very simple.

For more information take a Zotero tour.

Alexander Shyrokov.

Project54 & Software Michael Farrar on 23 Sep 2008

Windows CE Virtual Memory Management: It’s Influence on Project54

Here’s one for the books!  First, let me ask a few questions.  What do you do if your shiny new application causes your previously working system to crash?  Well, that’s simple, you search through your code for days, line by line, until some function returns an error, then correct for it.   What if you’ve searched through your code, turned days of searching into weeks, and your debugging techniques have only made things worse?  What if your system now fails randomly, or in applications which use to work?  What if it fails trying to load, trying to shut down, or at simple COM procedures in which failure is VIRTUALLY impossible?  What you should do is throw your application away and forget the whole thing ever happened, but we thought it would be better to take the other route, so let me shine some light on a very infrequent, system crippling, mobile disaster.

The majority of our deployments have been made on Symbol devices, with some running Window Mobile 2003 upon a Windows CE 4x framework and others utilizing Windows Mobile 5.0 upon Windows CE 5x.  The introductory paragraph held only when our system operated on the older version of Windows Mobile/Windows CE, which ended some of my frustrations since I could blame the failures on a possible limitation of an older operating system.  However, in doing so, my solution rested only upon an assumption, I had no evidence.  In hopes of seeking some expert advice, I created an MSDN forum entitle “Experiencing COM errors using Windows Mobile 2003”.  After some time, Christopher Fairbairn replied and referenced me towards an article entitled “Slaying the Virtual Memory Monster”.  The rest of this post may be a bit technical, but I’ll leave out as many details as I can.

What is virtual memory?  “Virtual memory is a computer system technique which gives an application program the impression that it has contiguous working memory, while in fact it may be physically fragmented and may even overflow on to disk storage.” – Wikipedia.  Basically, it’s a nice way of keeping everything in line.  In Windows CE 4x/5x, only 32 processes are allowed to be running at any one time, and a virtual memory (VM) space of 4GB is partitioned into many sections, allowing for each of the 32 processes to consume a possible 32MB.  These processes reside in locations called slots, where slot 0 houses the current process, slot 1 contains system (execute in place – XIP) DLLs, and the remaining 30 slots contain “resting” processes.  In the figure below, the “Active Process” section represents slots 0 and 1, and the “Reserved” section corresponds to slots 2-31. 

Now this is where things get tricky.  The figure below shows a more detailed layout of slots 0 and 1, and since it covers two slots, it represents 64MB of VM.  As I said before, the process to be executed is paged in from its “resting” slot to slot 0.  The base code of the process (executable – .exe) is loaded first and can be seen at the bottom of the figure, slightly above a small reserved portion.  Above this are various data and resource sections, along with dynamic heap and stack spaces, which grow upward as allocations are made within the process.  At the top of the figure, “COREDLL.DLL” and “Other XIP DLLs” can be found.  XIP DLLs begin loading at the top of slot 1 and continue in a downward manner, possibly overflowing into slot 0 (where the current process is).  Now, process specific DLLs are loaded at the top of slot 0 and also grow in a downward manner (shown by dashed arrows in the figure).  I’ve kept things somewhat simple in my description, so if you find yourself confused or want more VM detail, you may want to reference the articles at the end of this post.  To finish the thought, we have three different VM positions, all of which are moving toward a central location, a good recipe for a bad day.

Following the VM analysis methods proposed in part two of “Slaying the Virtual Memory Monster”, I created a script which visually and numerically organized the VM data of their dumpmem.exe program.  Shown in the upper portion of the figure below is slot 0 of the VM address space of Project54 under Windows CE 5x.  As we can see, there is space between the two blue, vertical lines, which is good!  The leftmost blue line represents the top of the process stack (which grows upward, or in this case to the right), while the blue line to the right marks the lowest DLL position (the lowest VM address occupied by system or process specific DLLs, which grows downward, or in this case to the left).  Segments shown in red are wasted memory segments due to a minimum VM page size, that is, the minimum allowable VM chunk granted when a DLL loads.  The bottom portion of the figure may depict the wasted VM space in a more appropriate manner, and is shown as an “Allocation request/return ratio”.  Confused?  Yes, so was I.

 

Slot 0 of Windows CE 4x, on the other hand (figure not shown), was entirely exhausted, and the two blue lines collide in VM.  This is what caused the craziness described in the introductory paragraph.  COM and memory related errors were occurring not because we were out of physical memory, but because we were out of VM.  The randomness of the errors was related to the way Project54 loads its applications, randomly.  The imaging application worked fine, it just happen to be that one application which used the last remaining pages of VM (the space between the blue lines). 

So, why would Windows CE 4x fail and not 5x?  Well, 4x has a VM page size of 64KB, compared to 16KB in 5x.  So as more DLLs were loaded, more VM was wasted, because most DLLs were much less than 64KB (remember that ratio I talked about?).  Desktop developers almost never have to worry about their utilization of VM.  They simply are not under the same restrictions.  But not to worry, Windows CE 6x aims to change everything…

References:

Slaying the Virtual Memory Monster - part 1

Slaying the Virtual Memory Monster - part 2

Windows CE .NET Advanced Memory Managment

Effective Memory, Storage, and Power Managment in Windows Mobile 5.0

Software & Tips and tools Owen Derby on 15 Aug 2008

Using Adobe Premiere

As many of you may know, I spent a good part of the summer in front of the video-editing computer transcribing data from videos of experiments. I used Adobe Premiere to organize and view the videos. However, Adobe Premiere was made for movie/cinematic editing, not data transcription, so I had to “invent” a few ways to import and export the data. I also found a few problems/bugs, so I wrote all of this up in a document which can be found here. I structured this as a sort of FAQ on using Premiere, so I also added some basic (yet vital) processes that took me a while to figure out (like capturing video and exporting videos). Enjoy!

Owen Derby

Software & Tips and tools Jonathan Oppelaar on 11 Aug 2008

Where did the multiple windows go in Excel 2007?

I have recently realized that when I open multiple documents in Excel they all show up separately on Taskbar but show up in the same window of Excel. This can be very aggravating for anyone who works with multiple documents and multiple monitors. After becoming fed up with Excel I did some research online and found a solution.

My Computer
Tools
Folder Options
File Types
Choose XLSX (XLSX for 2007 or XLS for 2003)
Go to Advanced

Uncheck “browse in same window” in advanced window.

Then highlight Open
Edit

Make sure in the Action box it says &Open

Copy one of the following and paste into “application used to perform action” (Check whether current path has OFFICE11 or OFFICE12 then copy and paste one of the following:

“C:\Program Files\Microsoft Office\OFFICE11\EXCEL.EXE” “%1″

“C:\Program Files\Microsoft Office\OFFICE12\EXCEL.EXE” “%1″

Check the box next to use DDE

Remove anything that is in DDE Message box and DDE Application Not Running box.

Make sure the application box says: EXCEL

And in the Topic box it says: System

http://techrepublic.com.com/5208-6230-0.html?forumID=101&threadID=234896&messageID=2510797

Thanks Jon.

Jonathan Oppelaar

Driving simulator & Software puneet_IITguwahati on 06 Aug 2008

Don’t hit the barrel !!

Hi Ecebloggers,

Around 2 weeks ago, I completed my summer internship at UNH. During a roughly two month timespan, I worked on how interacting with a keyboard and an attached display in the vehicle might effect the driver performance. At certain fixed locations, a text appeared on the screen for a few seconds and the subject was required to type that text using the keyboard. However, to make the study interesting, some events were designed that would be evoked when the subject would be diverted looking at the keyboard. One of the five designed events, which I call “A barrel falling from a truck”, was quite interesting. The name of the event itself indicates what actually happens during the event. A barrel from a moving truck would fall just short of the subject when he came close to the truck driving in the same lane. Here is a video that demonstrates the incident as it occurs in the Project54 driving simulator.

It was actually a little arduous to make a falling barrel look realistic as such a support is not provided in Hyperdrive , the software used for designing the scenarios. A barrel, as the ecebloggers might know, is a static entity. It was not possible to keep it in motion with the truck, a kinematic entity. I tried to create a barrel with dynamic properties and then relocate it along the roadway at a certain height above it. However, while Hyperdrive relocated the barrel along the roadway, the barrel could not be placed above the level of the roadway. A bug was noticed in Hyperdrive when the log files created indicated that the barrel was moved above the roadway level as well when actually it didn’t happen. I contacted Hyperdrive forums support and they clarified that all the kinematic and dynamic entities in the scenario were so designed to stay adhered to the roadway and such a displacement above the road was not possible for the barrel during the simulation.

To overcome this problem, I estimated the possible positions of the barrel, assuming it was in motion with the truck, and placed the barrels in midair at those specific coordinates. A script was then created to implement the planned scene. Initially, all the barrels placed in midair were made invisible and as the script progressed, the barrels were made to switch between visible and invisible states in a consecutive fashion to achieve synchronisation with the motion of the truck. Finally, when the subject came within a suitable distance relative to the truck, a separate set of barrels set for a projectile-like motion was triggered in the same visible and invisible fashion to achieve an appropriate declivity. Since the barrels that were pre-placed were limited and not certain,  the desired effect might not be obtained in case the number of barrels in midair reduced to zero when a subject approached the truck too slowly or he went on to a different lane. Thus, the person had to stay in that lane for achieving the desired effect, which otherwise, is quite a cool event to watch and enjoy.

Puneet Lakhanpal

DSP & Introduction & Project54 & SDR & Software Ivan Elhart on 31 Jul 2008

Radio Testing Lab

As a part of Project54, we have a newly formed Radio Testing Lab which is used for performing tests on projects related to the usage of Land Mobile Radios. Currently we are working on two projects that attempt to solve problems associated with the utilization of mobile radios. While the first project provides a solution for the interoperability problem using radio patching, the second project is based on the implementation of APCO Project 25 radio standard.

In the lab, for test equipment, we have more than fifteen radios made by different manufacturers (Motorola, Kenwood, and E. F. Jonson), several digital phosphor oscilloscopes (Tektronix TDS3000B series), a vector signal analyzer (Agilent 89441A with RF section), and a bunch of PCs and laptops. With this equipment and our experience we can assure that our projects are well tested and verified. Below are two pictures from the lab.

Radio Testing Lab

Using the radio patching method, we have developed a solution for the radio interoperability problem. It is based on more affordable off-the-shelf devices and represents an adequate solution for small public agencies. The system supports full radio patching with proper PTT functioning and has audio signal latency bellow what is specified by ITU-T standard. It turned out that radio patching is the cheapest and fastest solution to the radio interoperability problem. More information about the system can be found in this technical report, and here about its precursor system.

Project 25 seems a perfect solution to constant growing needs for data communications in cruisers because it supports both data and voice transmissions over radio channels. Also, most public safety agencies already have and use Project 25 compliant radios. However, in order to fully utilize their radios and Project 25 data capabilities those agencies have to purchase very expensive Project 25 data capable base stations. Small public safety agencies usually cannot afford such expensive pieces of equipment. To address this problem, we have developed a software-based Project 25 data base station as an affordable way for small agencies to bring the data into their cruisers. The project is in its final testing stage and very soon will be ready for deployment. You can read more about our base station in this previous post. More technical information about the implementation of the transmission side can be found in Eric’s thesis.

Project 25 development station

Ivan Elhart

R&D & Software & Technology Alexander Shyrokov on 18 Jul 2008

Automation solution

Hello,

As you know, we have multiple computers that we use during our experiments. We have to prepare every computer before the experiment and then collect the data after the experiment is done. The usual procedure is to use a check list so we do not forget something. NASA have been using this approach for some time:EVA-1 Elapsed Time 0+0 to 0+23

We still manage to forget things, though. And given that all our computers are connected into a network I decided to automate some of the procedures.

Setup: Multiple computers, each of each must have a set of properly configured applications running. The settings may be changed during different experiment stages. For example: Pre-experiment stage (all applications are launched, subject id is provided),  Experiment part 1, Experiment part 2, Post-experiment stage (save data files, close applications).

Solution: Imagine that all the applications that we use can be controlled from a command line. Then all we need to do is to execute proper commands on every computer. That is simple: every computer runs a “command execution server” on startup. The experimenter creates a batch file for every stage of the experiment that connects to the “command execution server” to run commands with proper parameters.

Problem 1. Most applications are GUI based. But AutoHotKey provides a solution for this problem. AutoHotKey can control mouse and send key presses to the windows. It even comes with a recorder that allows easy creation of the scripts.

Problem 2. What to use as an “command execution server”? Programs similar to Remote Desktop are GUI based. Telnet and ssh require user permission settings and could be cumbersome to configure, but they could provide additional security. Given that we are not worried about security (it’s a local isolated network), I implemented a server and a client in perl (thanks to the Network Programming with Perl, a great tutorial by James Lee). The server will execute any perl script that a client sends to it (yes, it can be dangerous, but it is also very flexible).

Solution: The server runs on every computer. Every computer also has a set of AutoHotKey script files that control the applications (this is an example of an AutoHotKey Script, which executes a notepad and writes a message in it). The experimenter executes a client that informs the server to run the proper commands (assuming AutoHotKey is installed properly):

my @args = (”AutoHotkey.exe ScriptExample.ahk _SUBJECT_”);
system(@args) == 0 or die “Failed to execute given command\n”;

Notice that the client substitues _SUBJECT_ for a given parameter and ahk script uses it. This code is saved in a file such as ExecuteScriptExample and is piped to the client. This is what the experimenter does to run a script on a remote computer:

perl NetCli.pl Subject1 IPADDRESS_1 <ExecuteScriptExample

I hope this will help you to automate your own tasks. One can execute or even dynamically create batch or perl scripts and then run them on the remote computer.

Thank you.

Alexander Shyrokov

Software & Tips and tools Alexander Shyrokov on 15 Jul 2008

AutoHotKey - free, open-source utility for Windows

Hello,

AutoHotKey is a handy utility that can be used for automation tasks. This program can move the mouse or send key events to different applications. It also can show dialogs. I mostly use it as a macro recorder that works across all the applications. It supports a simple (as in easy to learn), but powerful scripting language. You can learn more about it by watching this video:

Blue skies!

Alexander Shyrokov

DSP & Just for fun & Software & Speech processing & User interface Ivan Elhart on 30 Jun 2008

Sony’s MP3 dancing robot - Rolly

Sony revealed an egg-shaped digital music player named Rolly (picture below) at the end of 2007, but I haven’t had the chance to see it until last weekend. It plays MP3 and AAC music files and supports direct music streaming over a Bluetooth connection. And it is able to dance.

Sony Rolly

The Rolly is more than an ordinary music player. Thus, it is motion-controlled robot with a bunch of sensors, color lights, and two flapping wings. It uses two wheels that surround the body to roll, wiggle, and spin. In vertical position the wheels can be used to change songs and adjust volume. The Rolly creates motion automatically by analyzing the music, so it can dance to any song. Also, there is a possibility of creating new motions or customizing exiting ones using PC software. You can see the Rolly’s dance in the video below. It is amazing how the sound and motion are synchronized.

Ivan Elhart

Next Page »