Saturday, December 11, 2010

Failed to download repository information

GPG error 'NO PUBLIC KEY FOUND':

Still, I am not sure that how public keys were deleted, but these keys can be recovered by running the following command in terminal.

sudo apt-key adv --keyserver keyserver.ubuntu.com --recv-keys AF5ED91C56978EF9

Replace hexadecimal numbers with the number written in the error while updating ubuntu. If there are more than one error then run the above command by changing the hexadecimal numbers associated with each error. At the end run the following command,
sudo apt-get update

I hope it will work :)

Saturday, December 4, 2010

Base64 – Encode and Decode JAVA Functions

Find information on Wikipedia about Base64
privatestatic String toBase64Encode(Serializable o)
{
ByteArrayOutputStream baos = new ByteArrayOutputStream();
ObjectOutputStream oos;
try
{
oos = new ObjectOutputStream( baos );
oos.writeObject( o );
oos.close();
}
catch (IOException e)
e.printStackTrace();

returnnew String(Base64.encodeBytes(baos.toByteArray()));
}

privatestatic Object toBase64Decode(String s)
{
byte [] data = Base64.decode(s);
ObjectInputStream ois;
try
{
ois = new ObjectInputStream(new ByteArrayInputStream(data));
Object o = ois.readObject();
ois.close();
return o;
}
catch (IOException e)
e.printStackTrace();
catch (ClassNotFoundException e)
e.printStackTrace();

returnnull;
}

Thursday, November 18, 2010

Distributed Locking Manager (DLM)

Abstract

The race of high-speed communications and high quality service provisioning is compelling the market to move towards less expensive and far reaching ways to provide services to the stakeholders. Evolution of distributed computing in consistency with extremely large networks abstracting the underlying equipments and protocols, leads the way into the world of concurrent access of available resources, at frequencies far higher than ever. Concurrency control, at present day, is being molded into a solution module called “Distributed Locking Manager” or commonly “DLM”, which is aimed to manage the concurrent access of resources while preventing network chaos. This paper is aimed to provide the reader a thorough insight into the functionality and evolution of the Distributed Locking Manager, from educational and development point of views. We present the reader with a generalized overview about the operation of DLM module. Apart from the fact that at present, different solutions for implementation of DLM are available in the market, the insight presented applies to all, in general. The vendor specific solutions differ in terms of attribute provisioning, levels of granularity or establishing communication for resource access, however, the main principles and core logics are intact in each of them. We describe the evolution of DLM from past to the present and reach some conclusions at the end of this paper which are quite essential for the integration of DLMs into distributed networks allowing for heterogeneous hardware functionalities and convergence of technology into large footprints.

Saturday, June 19, 2010

Intelligently Present Info Screen (IPIS) [Human Computer Interaction]

Abstract

The IPIS (Intelligently Present Info Screen) application will guide a user to find important places, important persons, ongoing cultural events, moral stories and histories of a place and talent hunt events. Application will show user current location automatically in a map. It will indicate important places, persons, cultural activities and moral stories & histories in a map which are closest to user current position. Suppose users are in Duomo, Milan, Italy, application will suggest users “Roman Catholic” as a historical place showing in map to visit that place. Also in application user can tag places, important persons, cultural events and moral stories. General user or foreigner who want to search for a particular place or want to join in local cultural activities, application will help them. Application will show available transportation, shortest path and brief history of that place if available. Moral histories, user experience and comment will preserved by this application. This will be a digital preserve system where user can share each other experiences. User can broadcast their talent in a second. Application will help users to participate in a talent hunt event remotely .Suppose user current position is Milan and talent hunt event is ongoing in USA, Hollywood then user will perform in front of i-phone and that will be shown in a TV screen in talent hunt event in front of judge for judgment. Now if user want to move Milan to Rome and want to visit some tourist places on the way, application will guide them and draw road map according to tourist places. This application will be integrated with i-phone’s existing application.

Friday, June 18, 2010

Customized Function Module Integration in PerLa for WSNs

Abstract

PerLa or Pervasive System language is a declarative language for application in pervasive computing. This concept behind PerLa is to provide the user with the opportunity to manage heterogeneous pervasive devices while avoiding the complexity of underlying hardware. At present, PerLa provides the users with a declarative approach towards the network to be managed. However, a limitation which arose with increase of applicability of the language was the absence of any mechanism to induct customized user functions to perform need-based operations on the data e. g. filtering operations, performing statistical functions on the data and special-case procedural code inductions. In this report, we propose a way to introduce the possibility of integrating procedural functions in the existing declarative approach offered by PerLa. In order to allow for this approach, it is necessary to embed the custom-code in the system such that the existing architecture is disturbed at a minimum and maximum functionality is achieved. We present the solution in which the system capabilities can be extended with the design point of view. The implementation of these functionalities is separated from the design phase, covered in this report.

Saturday, June 5, 2010

SESC: Design Space Exploration of Architectural Simulators using MulticubeExplorer

During the last decade, researchers realized that increasing transistors to microprocessor in order to increase clock rate is not the solution to increase applications performance rather focusing on research optimize programming models and effective use of microprocessor will be the better solution. The increase in Power/Density ratio of microprocessors is leading towards the situation from where there will be no way to resolve heat dissipation.
One solution can be utilizing specialized hardware dedicated to accelerate specific applications of system which is known as heterogeneous processing; for example, GPUs for graphics applications, DSPs for complex mathematical applications, FPGAs for performance critical applications, Intel Microprocessors for general purpose computing. Although, accommodating specific hardware for specific application provides high performance with better power efficiency. In return heterogeneous systems become difficult to program, mostly because of taking care of managing data flow between different architectural processors from the execution point of view.
Other one is known as homogeneous processing consisting processors of the same architecture. In multi-processing, processors work together in tightly coupled manner in order to process one or more jobs simultaneously. All processors have strong connection to each other by sharing common clock, instruction set etc. By increasing processors never create any problem for the designer due to same architecture pattern. Multi-processors increased reliability of the system, if one of the processor goes down then load is transferred or shared between other processors. On the other hand, in heterogeneous systems it will be complete shutdown of the system.
In order to achieve optimum performance of the system, we need architecture which is capable of accommodating both heterogeneous and homogeneous processing units. Multiple processing usages are becoming essential part of the embedded systems development nowadays. While considering multi-core architectural pattern, each core can be dedicated to perform certain specific task. The important task is to plan and map work load on different cores need to be done before writing algorithms. This article is to explain one of the Multi-core Architecture Simulator (SESC) and Multicube Explorer which helps the designer in order to explore design space of multi-core architecture.

SESC Simulator:
Simulator or Architectural Simulator is basically a software model which actually replicates actual hardware/software resources of the actual system. The core purpose of simulator is to predict system behavior and performance metrics relevant to specific inputs. This Architectural Simulator can either model microprocessor or complete system consists of microprocessor, memory, and I/O devices.
SESC is one of the architectural simulators that can model different processor architectures, such as single processors, chip multi-processors and processors-in-memory. It models a full out-of-order pipeline with branch prediction, caches, buses, and every other component of a modern processor necessary for accurate simulation. SESC is an event-driven simulator. It has an emulator built from MINT, an old project that emulates a MIPS processor. Many functions in the core of the simulator are called every processor cycle. But many others are called only as needed, using events.

More information about SESC Simulator is available on http://sesc.sourceforge.net/. SESC project started at University of Illinois at Urbana‐Champaign.

Multicube Explorer:
Multicube explorer is an interactive program that lets the designer explore a design space of configurations for a parameterized architecture for which an executable model (use case simulator) exists. Multicube explorer is an advanced multi-objective optimization framework which is entirely command-line/script driven and can be re-targeted to any configurable platform by writing a suitable XML design space definition file and providing a configurable simulator. Multicube Explorer is supported by the EC under grant FP7-216693 MULTICUBE (http://www.multicube.eu).

The tool and the documentation can be currently found at the following address: http://home.dei.polimi.it/zaccaria/multicube_explorer.

Integration files required for design space exploration of SESC Simulator consist of:
  • Python Script: The script used for generating of input/output configuration file of the SESC Simulator.
  • XML Driver: Design space exploration file.
  • Multicube Script: The m3explorer script file which actually automated the exploration process.
  • Shell Script: The shell script which automates the whole integration process of SESC Simulator and Multicube Explorer.

Wednesday, February 25, 2009

Python integration with Bioloid (An Overview)

What is Python:
Python is scripting language as paradigm. The Python features are the combination of programming language like C, JAVA and Functional languages, which are;
- Imperative (procedural oriented like C)
- Object Oriented (like JAVA)
- Functional (like Haskel, LISP)

What is Bioloid:
Bioloid is a robotic kit made up of interchangeable block-shaped parts. By using these parts, we can build different types of robots performing various tasks. The name Bioloid comes from words “Bio” + “all” + “oid” meaning that any living thing can be built in the form of a robot.

Bioloid Hardware:
The hardware of the Bioloid consists of three types.
- CM-5: The main central processing unit and power source of Bioloid robotics system resides in CM-5 unit. The main purpose is to program execution and storage that interact with AX series Dynamixel (AX-12 Actuator and AX-S1 Sensor). Atmel’s Atmega128 microcontroller, containing four Dynamixel serial ports, programmable control buttons, and status LED's (including one auxiliary programmable led).
- Dynamixel: This is the basic unit of the Bioloid which acts as a joint or a sensor. The AX-12 Dynamixel is an actuator that is used as a joint. The AX-S1 Dynamixel is a sensor unit that can sense both distance and sound.
- Frame: The frame connects the robot units. The Dynamixels can be connected together with the use of the frame. Also, the frame connects the Dynamixels and the CM-5 unit.
More detailed information can be found in manuals of CM-5, AX-12, and AX-S1 Dynamixel.
Most of the research in robotics focuses not on specific industrial tasks, but on investigations into new types of robots, alternative ways to think about design robots, and new ways to manufacture them. A first particular new innovation in robot design is the open sourcing of robot-projects.

There is some group of developers who made interpreters for robots integration. Some are PyRo (www.purorobotics.org), PyMite (http://pymite.python-hosting.com/wiki/PyMite), Swig (www.swig.org), MyRo. By using these interpreters we can integrate robot with Python language to perform different operations.

Discussion on PyRo:
Still Bioloid hardware has some integration problems. Associate Professor Douglas Blank, one of the PyRo developers told me that there is no support for Bioloid in PyRo. His student, Teyvonia Thomas, is working on controlling the Bioloid's CM5 from Python, through an add-on board called the Fluke. Furthermore, he elaborates a new software project, called Myro, which is a simplified interface for robotics. Teyvonia is working on further documentation so that anyone can build a serial over Bluetooth interface with the Bioloid kit. Once you have a serial connection established, then you will need a method of programming the Bioloid motors. I suspect that Teyvonia will have an interface that allows setting gestures/poses, and also gives individual joint control as well. This is a combination of a firmware program on the CM-5, and a series of commands given over the serial line.
Once you have a serial interface, creating a PyRo object is very easy. However, there isn't any support in Pyro for articulated joints. This will be all new interfaces created by Teyvonia. (Although Player/Stage has recently created an act array, an array for controlling articulated arms.)

http://wiki.roboteducation.org/Designing%2C_Building_and_Programming_a_Hexapod:_From_King_Spider_to_TevBot#Electronic_Components
http://wiki.roboteducation.org/Exploring_Search_and_Rescue_with_TevBot

But the point is what is the serial communication protocol of Fluke board and CM-5 Unit?, and if some communication is established between Fluke and CM-5 using Python then it means that Python can be directly communicate with CM-5.

Fluke Hardware: The Fluke is a small electronic board that contains wireless Bluetooth, camera, IR (infrared) sensors, LEDs (light emitting diodes) and an ARM microprocessor. By itself (with a battery), it is a complete (although immobile) robot that can receive simple commands and send back IR readings, camera images, and turn on its LED lights. Connect it to a robot and you can control the robot wirelessly, and add vision and sensors to it. The more detail of the Fluke hardware and its integration is given the website http://wiki.roboteducation.org/Hacking_the_Fluke.

Discussion on PyMite:
I have another discussion with Dean Hall, working in Apple Macintosh and core-developer of PyMite. PyMite is a Python interpreter in order to execute on 8-bit and larger microcontrollers with resources as limited as 64 KB of program memory (flash) and 4 KB of RAM. A brief introduction of PyMite is given in the report. As Bioloid contains AVR microcontroller having total 4KB RAM and PyMite itself require 4KB RAM, so it will quite hard to run Bioloid on PyMite interpreter. I am quoting his rough outline of what I would need to do:
“1. Learn how to build PyMite for ATmega128 (you'll have to learn how Makefile works and edit the arguments to avr-gcc to tell it that you want the ATmega128 processor)
2. Adapt the general AVR platform to your ATmega128 (clocks, interrupts, heap size all have to be tuned to your platform).
3. Learn how to make PyMite native functions (C code wrapped by Python function) so you can call functions to control the Bioloid.
4. Learn PyMite internals so you can remove functions/libraries you don't need in order to have enough RAM to run your program. And I've already made PyMite as small as possible, so there isn't much you will be able to do with only 4 KB of RAM.
I am going to say this again for emphasis #4 is almost a show-stopper. The ATmega128's 4KB of RAM will not leave you with much room to run a program (toggle some pins, ramp a PWM maybe; but nothing elaborates).”

Bioloid Hardware Limitations:
Bioloid hardware is still in the research phase to explore the way to make its connection with Python language. PyRo a Python interpreter still have no support for Bioloid hardware. PyRo, supports some robots like Pioneer, Aibo, Khepera, Soccer Robots, having server client based architecture. From PyRo Robotics website, I did not find any clue to connect AVR microcontrollers through Python. An email conversation with Associate Professor Douglas Blank, core developer of PyRo, elaborates that there is software named as MyRo, and Fluke board, by using both CM-5 unit integration is possible.
PyMite is another python interpreter which provide interface between AVR controllers and Python. PyMite interpreter required 4KB of SRAM at the time of execution and deployment of program code, but on the other hand ATmega128 controller has total 4 KB SRAM which is also impracticable solution.

Related Articles:
- Install Python on Linux and how to try Python? (hackerz4u.com)
- Ruby, Python, and Science (johndcook.com)

Integration of SQLite3 and Netbeans C/C++ IDE

Few days back, I wanted to use SQLite database for one of my project. I spend couple of hours to find a way to integrate with Netbeans. Mayb...