javax.robotics.xml
Class XmlRobot

java.lang.Object
  extended by javax.robotics.xml.XmlRobot

public class XmlRobot
extends java.lang.Object

XML handler class for robot configuration file.

Since:
1.1.0
Version:
30/10/2005
Author:
Carmine Lia

Constructor Summary
XmlRobot(java.io.File robotXml)
          Constructor of the xml handler from file.
XmlRobot(java.io.InputStream robotXml)
          Constructor of the xml handler from input stream.
XmlRobot(java.lang.String robotXml)
          Constructor of the xml handler.
 
Method Summary
 double[] getA()
          Gets the DH parameters a.
 double[] getAlfa()
          Gets the DH parameters α.
 double[] getD()
          Gets the DH parameters d.
 java.lang.String getDescription()
          Gets the tag description of the file.
 int getDof()
          Gets the tag dof of the file.
 boolean[] getImmobile()
          Gets the immobile flags.
 double[] getLinkData()
          Gets the array of data about all the links of the robot.
 double[] getMotorData()
          Gets the motor data of the links.
 java.lang.String getName()
          Gets the tag name of the file.
 int getNLinks()
          Gets the number of links
 double[] getQMax()
          Gets the array of theta-max or d-max tags of the links.
 double[] getQMin()
          Gets the array of theta-min or d-min tags of the links.
 double[] getQOffset()
          Gets the array of offset tag of the links.
 double[] getTeta()
          Gets the DH parameters θ.
 boolean[] getType()
          Gets the joint type flags.
 robotML.RobotConfigurationDocument getXmlHandler()
          Gets the handle of xml configuration file.
 boolean isDynamicsSet()
          Gets the tag dynamics of file.
 boolean isMotorSet()
          Gets the tag motor of file.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

XmlRobot

public XmlRobot(java.lang.String robotXml)
         throws org.apache.xmlbeans.XmlException,
                java.io.IOException
Constructor of the xml handler.

Parameters:
robotXml - the path of xml configuration file.
Throws:
org.apache.xmlbeans.XmlException
java.io.IOException

XmlRobot

public XmlRobot(java.io.File robotXml)
         throws org.apache.xmlbeans.XmlException,
                java.io.IOException
Constructor of the xml handler from file.

Parameters:
robotXml - the path of xml configuration file.
Throws:
org.apache.xmlbeans.XmlException
java.io.IOException

XmlRobot

public XmlRobot(java.io.InputStream robotXml)
         throws org.apache.xmlbeans.XmlException,
                java.io.IOException
Constructor of the xml handler from input stream.

Parameters:
robotXml - the path of xml configuration file.
Throws:
org.apache.xmlbeans.XmlException
java.io.IOException
Method Detail

getDescription

public final java.lang.String getDescription()
Gets the tag description of the file.

Returns:
the tag description value.

getDof

public final int getDof()
Gets the tag dof of the file.

Returns:
the value of the tag dof.

getQMin

public final double[] getQMin()
Gets the array of theta-min or d-min tags of the links.

Returns:
the value of the tags theta-min or d-min.

getQMax

public final double[] getQMax()
Gets the array of theta-max or d-max tags of the links.

Returns:
the value of the tags theta-max or d-max.

getQOffset

public final double[] getQOffset()
Gets the array of offset tag of the links.

Returns:
the value of the tag offset.

getLinkData

public final double[] getLinkData()
Gets the array of data about all the links of the robot.

Returns:
the array nLinks-by-19 of the links data.

isMotorSet

public final boolean isMotorSet()
Gets the tag motor of file.

Returns:
true if file contains the motor data.

isDynamicsSet

public final boolean isDynamicsSet()
Gets the tag dynamics of file.

Returns:
true if file contains dynamics data.

getMotorData

public final double[] getMotorData()
Gets the motor data of the links.

Returns:
the nLinks-by-4 array of motor data.

getName

public final java.lang.String getName()
Gets the tag name of the file.

Returns:
the value of the tag name.

getNLinks

public final int getNLinks()
Gets the number of links

Returns:
the number of links.

getA

public double[] getA()
Gets the DH parameters a.

Returns:
the array of parameters a.

getAlfa

public double[] getAlfa()
Gets the DH parameters α.

Returns:
the array parameters α.

getD

public double[] getD()
Gets the DH parameters d.

Returns:
the array of parameters d.

getImmobile

public boolean[] getImmobile()
Gets the immobile flags.

Returns:
the array of immobile flags.

getTeta

public double[] getTeta()
Gets the DH parameters θ.

Returns:
the array parameters θ.

getType

public boolean[] getType()
Gets the joint type flags. true if prismatic.

Returns:
the array of joint type flags.

getXmlHandler

public final robotML.RobotConfigurationDocument getXmlHandler()
Gets the handle of xml configuration file.

Returns:
the xml handler.