Sunday, December 1, 2013

Robotics from a software perspective : Degree of Freedom (DOF)

Another critical term to the understanding of how robot works is the degree of freedom usually abbreviated as DOF. Of course you are already asking yourself that what is even this degree of freedom that we talk about. Fine, generically it is defined , in a mechanics context, as a defined modes in which a mechanical device or system can move. The number of degrees of freedom is equal to the total number of independent displacements or aspects of motion.
  But for non technical people what does it really mean ?

DOF  are the amount of movable joints that a robot has. Essentially the more DOF that a robot has the more it can move and interact with its environment. Degrees of freedom are measured as the total amount of all the degrees of freedom of every moving part. For example let us consider a robot arm built to work like a human arm. Shoulder motion can take place as pitch (up and down) or yaw (left and right). Elbow motion can occur only as pitch. Wrist motion can occur as pitch or yaw. Rotation (roll) may also be possible for wrist and shoulder.
    Finally the DOF  is a term used to describe a robot’s freedom of motion in three dimensional space—specifically, the ability to move forward and backward, up and down, and to the left and to the right. For each degree of freedom, a joint is required. A robot requires six degrees of freedom to be completely versatile. The number of degrees of freedom defines the robot’s configuration. For example, many simple applications require movement along three axes: X, Y, and Z. The three degrees of freedom in the robot arm are the rotational traverse, the radial traverse, and the vertical traverse.

Robotics from a software perspective : Components

When all you have is a hammer, everything looks like a nail. I am sure you have heard this at least once. Most often, when people hear about a robot, they immediately think of some kind of human-like mechanically connected pieces of steel. Yeah it is true that a robot generally may be view as a set of mechanical components powered by some sophisticated electronic circuits. But my objective throughout these series of posts is to shift the debate from the hardware to the software perspective. As a matter of fact a software engineer working in robotics does not really need those stuffs. However even though it does not seem important, definitely I don't always appreciate the black box methods. Instead of just considering  a robot that we may be asked to work with as a black box that suite our need it is  worth stopping for a while and look up what is even happening inside. 


   Today I am really interested in looking at different components constituting a robot:
Robots consist of a number of components, that work together: the controller, the manipulator, an end effector, a power supply, and a means for programming.
  • Controller:  the part of a robot that coordinates all movements of the mechanical system. It also receives input from the immediate environment through various sensors. The heart of the robot’s controller is generally a microprocessor linked to input/output and monitoring devices.
  •  Manipulator:  consists of segments that may be jointed and that move about, allowing the robot to do work. The manipulator is the arm of the robot which must move materials, parts,
    tools, or special devices through various motions to provide useful work. The manipulator is made up of a series of segments and joints much like those found in the human arm. Joints connect two segments together and allow them to move relative to one another. The joints provide either linear (straight line) or rotary (circular) movement
  • End effector: The end effector is the robot’s hand, or the end-of-arm tooling on the robot. It is a device attached to the wrist of the manipulator for the purpose of grasping, lifting, transporting, maneuvering, or performing operations on a workpiece. The end effector is one of the most important components of a robot system. The robot’s performance is a direct result of how well the end effector meets the task requirements.
  • Power supply: The power supply provides the energy to drive the controller and actuators.
  • Means for programming: The means for programming is used to record movements into the
    robot’s memory. A robot may be programmed using any of several different methods. In fact this where we as software people come in to play by writing some programming code or computer instructions that will direct or affect different components of the robot as well as its surrounding environment.

Thursday, November 28, 2013

Important issues about computer vision

 Who doesn't like robot, who resists Star Wars caracters and I will not even mention curiosity rover (our dude exploring MARS and sending to us on earth some smart and fancy photos). Are those things magical ? Are they Scientific ?
As one old man told me another, this technology of yours will never stop surprising us...
 If I may say something or ask something who will resist the charm of computer vision ?

Today I was just reading this famous book of Linda S and G. Stockman on computer vision till I came across these important points.  Among some critical issues to the understanding of computer vision are the following:
  •  Sensing: How do sensors obtain images of the world ? How do the images encode properties of the world, such as material, shape, illumination and spatial relationships ?
  •  Encoded Information: How do images yield information for understanding  the 3D world (geometry, texture, shading, motion and identify of object in it) ?
  •  Representations: what representations should be used for stored descriptions of objects, their parts, properties and relationships ?
  • Algorithms: what methods are there to process image information and construct descriptions  of the world and its objects?
When we see all these numerous applications of machine vision in different aspect of our daily life, it is clear we have move from fiction to reality...then what neXt ???????

Sunday, November 24, 2013

Glassfish or Tomcat for your Production Project ?

This post is dedicated to those new in J2EE especially in JSF who are certainly wondering what will their choice of web application to deploy maybe their first ever enterprise web application on production. From my experience to make your life easier, Glassfish is the way to go, and I may mention that I have nothing against Uncle Tommy. Glassfish offers everything from development to the administration out of the box and free to you to smoothly deploy your application.
Such as :
  •  Command line utilities
  • Easy to use administration GUI
  • Multiple security features
  • Clustering features
  • Very good documentation
  • Stability
 For more details information feels free to google Glassfish Vs Tomcat to hear what other folks out there are gossiping about.
The following paragraph is taken from Chapter  3 of the Book entitled: " Java EE 6 Cookbook for Securing, Tuning, and Extending Enterprise Applications" by Mick Knutson.

   GlassFish is a complete Java EE application server, in contrast to a Servlet container that would provide the Java EE web profile capabilities. GlassFish has an open source and supported version, and is described by the java.net project as:
   An open source, production-ready, Java EE-compatible application server. GlassFish version 3 provides a small footprint, fully-featured implementation of Java EE 6.
The Java EE 6 platform significantly improves developer productivity, introduces the lightweight Web Profile for Web-centric applications, and includes the latest versions of technologies such as JAX-RS 1.1, JavaServer Faces (JSF) 2.0, Enterprise JavaBeans (EJB) 3.1, Java Persistence (JPA) 2.0, Context and Dependency Injection (CDI) 1.0, and more. GlassFish is a Java EE open source application server.
    Apache Tomcat is maintained by the Apache foundation and described as:
Apache Tomcat is an open source software implementation of the Java Servlet
and JavaServer Pages technologies. The Java Servlet and JavaServer Pages
specifications are developed under the Java Community Process.
Tomcat is an excellent choice for projects that do not require enterprise services from Java EE.



Monday, November 11, 2013

getting day, month and year form java.util.Date

You may be trying to get for example the day, month and year from the java.util.Date directly such as:
Date date;
          int day =  date.getDay();
          int month = date.getMonth();
          int year = date.getYear();

         Just know that this previous way of getting them (d,m,y) is deprecated and only lead you to mess. However you should rather use the Calendar to get what you want from the date object, and here is how:

 Date date;
 Calendar calendar = Calendar.getInstance();
 calendar.setTime(date);
 int day = calendar.get(Calendar.DAY_OF_MONTH);
 int month= calendar.get(Calendar.MONTH);
 int year= calendar.get(Calendar.YEAR);

Hope you feel released...

Note: Of course importing from java.util.*;