Classes | Public Member Functions | Public Attributes | Static Public Attributes | Package Attributes | Private Member Functions | Private Attributes | Static Private Attributes
com.generalrobotix.ui.item.GrxModelItem Class Reference

item corresponds to a robot model More...

Inheritance diagram for com.generalrobotix.ui.item.GrxModelItem:
Inheritance graph
[legend]

List of all members.

Classes

class  MenuChangeType
class  NormalRender

Public Member Functions

void addLink (GrxLinkItem link)
 add a link
void addRobot (File f, GrxLinkItem parentLink)
 load and add a new robot as a child
void calcForwardKinematics ()
 compute forward kinematics
void cancelModified ()
int checkModifiedModel (boolean reload)
GrxModelItem clone ()
 Override clone method.
boolean create ()
 create a new model
void delete ()
BodyInfo getBodyInfo ()
 get BodyInfo
List< Camera_implgetCameraSequence ()
 get sequence of cameras
void getCoM (Vector3d pos)
 compute center of mass
int getDOF ()
double[] getInitialJointMode ()
double[] getInitialJointValues ()
double[] getInitialJointVelocity ()
double[] getInitialTransformArray (GrxLinkItem link)
double[] getInitialVelocity (GrxLinkItem link)
String[] getJointNames ()
double[] getJointValues ()
GrxLinkItem getLink (String name)
 get link from name
List< GrxModelItemgetSameUrlModels ()
String[] getSensorNames (String type)
List< GrxSensorItemgetSensors (String type)
double[] getTransformArray (GrxLinkItem link)
 get transform of link in array form
TransformGroup getTransformGroupRoot ()
ValueEditType GetValueEditType (String key)
 Return editing type of the key item.
 GrxModelItem (String name, GrxPluginManager item)
 constructor
boolean isModified ()
boolean isRobot ()
boolean load (File f)
 load a model from file
void makeAABBforSameUrlModels ()
void notifyModified ()
 notify this model is modified
boolean propertyChanged (String property, String value)
 check validity of new value of property and update if valid
boolean registerCharacter (BodyInfo bInfo)
boolean reload ()
void removeExtraJoint (GrxExtraJointItem extraJoint)
void removeLink (GrxLinkItem link)
 remove a link
void rename (String newName)
 rename this Model
void resizeBoundingBox ()
 resize bounding box which covers the whole body
void restoreProperties ()
 restore properties
GrxLinkItem rootLink ()
 get root link
boolean saveAndLoad ()
void setCharacterPos (LinkPosition[] lpos, double[] q)
 set transformation of the root joint and all joint values
void setFocused (boolean b)
 set/unset focus on this item
void setJointColor (int jid, java.awt.Color color)
 set color of joint
void setJointValues (final double[] values)
 set joint values
void setJointValuesWithinLimit ()
 modify joint value if it exceeds limit values
void setSelected (boolean b)
 set selected flag
void setTransformRoot (Vector3d pos, Matrix3d rot)
 set transformation of the root joint
void setTransformRoot (Transform3D tform)
 set transformation of the root joint
void setTransparencyMode (boolean b)
void setVisibleAABB (boolean b)
void setVisibleCoM (boolean b)
 set visibility of CoM
void setVisibleCoMonFloor (boolean b)
 set visibility of CoM projected on the floor
void setWireFrame (boolean b)
 switch display mode between fill and line
void setWireFrame (boolean b, Node node)
 switch display mode between fill and line
void updateCoM ()
 update CoM and projected CoM positions
void updateInitialJointValue (GrxLinkItem link)
 update joint value property from current joint value
void updateInitialJointValues ()
void updateInitialTransformRoot ()
 update initial transformation property from current Transform3D

Public Attributes

AppearanceInfo[] appearances = null
BranchGroup bgRoot_ = new BranchGroup()
Vector< GrxExtraJointItemextraJoints_ = new Vector<GrxExtraJointItem>()
Vector< GrxLinkItemlinks_ = new Vector<GrxLinkItem>()
MaterialInfo[] materials = null
Map< String, GrxLinkItemnameToLink_ = new HashMap<String, GrxLinkItem>()
ShapeInfo[] shapes = null
TextureInfo[] textures = null

Static Public Attributes

static final String DEFAULT_DIR = "/../model"
static final String FILE_EXTENSION = "*"
static final int MODIFIED_NG = 1
static final int MODIFIED_NOT = 2
static final int MODIFIED_OK = 0
static final String TITLE = "Model"

Package Attributes

MenuChangeType menuChangeType_ = new MenuChangeType()

Private Member Functions

void _globalToRoot (Vector3d pos)
 convert global position into robot local
void _initMenu ()
 initialize right-click menu
void _loadVrmlScene (LinkInfo[] links) throws BadLinkStructureException
 create shapes of links
boolean _saveAs ()
 save this model as a VRML file
void _setModelType (String value)
 set model type(robot or environment) from String
void _setModelType (boolean isRobot)
 set model type(robot or environment)
void _setTransform (int linkId, Vector3d pos, Matrix3d rot)
 set transformation of linkId th joint
void _setupMarks ()
 create spheres to display CoM and projected CoM
void addExtraJoint (String name)
void createLink (int index)
 make connections between links and gather cameras
BodyInfo getBodyInfoFromModelLoader ()
boolean load0 (File f)
void makeAABB (BodyInfo binfo)
boolean registerCharacter ()
void sameUrlModelLoad ()
void setTransparencyMode (boolean b, Node node)

Private Attributes

BodyInfo bInfo_
boolean bModified_ = false
List< Camera_implcameraList_ = new ArrayList<Camera_impl>()
boolean isRobot_ = true
int[] jointToLink_
Switch switchBb_
Switch switchCom_
Switch switchComZ0_
TransformGroup tgCom_
TransformGroup tgComZ0_

Static Private Attributes

static final double DEFAULT_RADIUS = 0.05
static final String envIcon = "environment.png"
static final String robotIcon = "robot.png"

Detailed Description

item corresponds to a robot model

Definition at line 52 of file GrxModelItem.java.


Constructor & Destructor Documentation

constructor

Parameters:
namename of this item
itemplugin manager

Definition at line 219 of file GrxModelItem.java.


Member Function Documentation

void com.generalrobotix.ui.item.GrxModelItem._globalToRoot ( Vector3d  pos) [inline, private]

convert global position into robot local

Parameters:
posglobal position It is overwritten by robot local position

Definition at line 1086 of file GrxModelItem.java.

initialize right-click menu

Definition at line 265 of file GrxModelItem.java.

void com.generalrobotix.ui.item.GrxModelItem._loadVrmlScene ( LinkInfo[]  links) throws BadLinkStructureException [inline, private]

create shapes of links

Parameters:
linksarray of LinkInfo retrieved from ModelLoader
Exceptions:
BadLinkStructureException

Definition at line 771 of file GrxModelItem.java.

save this model as a VRML file

Definition at line 350 of file GrxModelItem.java.

void com.generalrobotix.ui.item.GrxModelItem._setModelType ( String  value) [inline, private]

set model type(robot or environment) from String

Parameters:
value"true" or "false"

Definition at line 504 of file GrxModelItem.java.

set model type(robot or environment)

Parameters:
isRobottrue if this model is robot, false otherwise

Definition at line 515 of file GrxModelItem.java.

void com.generalrobotix.ui.item.GrxModelItem._setTransform ( int  linkId,
Vector3d  pos,
Matrix3d  rot 
) [inline, private]

set transformation of linkId th joint

Parameters:
linkIdid of the link
posposition
rotrotation matrix

Definition at line 990 of file GrxModelItem.java.

create spheres to display CoM and projected CoM

Note:
switches for CoM spheres and bounding box are attached to TransformGroup of the root link. As the result, this method must be called after the root link is created. And if the root link is re-created, this function must be called again.

Definition at line 536 of file GrxModelItem.java.

void com.generalrobotix.ui.item.GrxModelItem.addExtraJoint ( String  name) [inline, private]

Definition at line 1673 of file GrxModelItem.java.

add a link

This method is called by constructor of GrxLinkItem

Parameters:
linklink to be added

Definition at line 246 of file GrxModelItem.java.

void com.generalrobotix.ui.item.GrxModelItem.addRobot ( File  f,
GrxLinkItem  parentLink 
) [inline]

load and add a new robot as a child

Parameters:
ffile name of the new robot

Definition at line 810 of file GrxModelItem.java.

compute forward kinematics

Definition at line 1055 of file GrxModelItem.java.

Definition at line 157 of file GrxModelItem.java.

Definition at line 109 of file GrxModelItem.java.

Override clone method.

Returns:
GrxModelItem

Reimplemented from com.generalrobotix.ui.GrxBaseItem.

Definition at line 1505 of file GrxModelItem.java.

create a new model

Returns:
true if created successfully, false otherwise

Reimplemented from com.generalrobotix.ui.GrxBaseItem.

Definition at line 368 of file GrxModelItem.java.

make connections between links and gather cameras

Parameters:
indexindex of link in links_

Definition at line 737 of file GrxModelItem.java.

delete this item

Reimplemented from com.generalrobotix.ui.GrxBaseItem.

Definition at line 1283 of file GrxModelItem.java.

get BodyInfo

Returns:
BodyInfo

Definition at line 189 of file GrxModelItem.java.

Definition at line 1550 of file GrxModelItem.java.

get sequence of cameras

Returns:
sequence of cameras

Definition at line 1466 of file GrxModelItem.java.

compute center of mass

Parameters:
poscomputed center of mass

Definition at line 1100 of file GrxModelItem.java.

Definition at line 1196 of file GrxModelItem.java.

Definition at line 1244 of file GrxModelItem.java.

Definition at line 1216 of file GrxModelItem.java.

Definition at line 1226 of file GrxModelItem.java.

Definition at line 1162 of file GrxModelItem.java.

Definition at line 1182 of file GrxModelItem.java.

Definition at line 1202 of file GrxModelItem.java.

Definition at line 1209 of file GrxModelItem.java.

get link from name

Parameters:
namename of the link
Returns:
link if found, null otherwise

Definition at line 1546 of file GrxModelItem.java.

Definition at line 1591 of file GrxModelItem.java.

String [] com.generalrobotix.ui.item.GrxModelItem.getSensorNames ( String  type) [inline]

Definition at line 1126 of file GrxModelItem.java.

Definition at line 1116 of file GrxModelItem.java.

get transform of link in array form

Parameters:
linklink
Returns:
array. lenth = 12 = position(3)+rotation(9)

Definition at line 1146 of file GrxModelItem.java.

Definition at line 1137 of file GrxModelItem.java.

Return editing type of the key item.

Returns:
ValueEditType

Reimplemented from com.generalrobotix.ui.GrxBasePlugin.

Definition at line 1658 of file GrxModelItem.java.

Definition at line 102 of file GrxModelItem.java.

Definition at line 1254 of file GrxModelItem.java.

load a model from file

Parameters:
ffile that describes a model
Returns:
true if loaded successfully, false otherwise

Reimplemented from com.generalrobotix.ui.GrxBaseItem.

Definition at line 561 of file GrxModelItem.java.

Definition at line 586 of file GrxModelItem.java.

void com.generalrobotix.ui.item.GrxModelItem.makeAABB ( BodyInfo  binfo) [inline, private]

Definition at line 1571 of file GrxModelItem.java.

Definition at line 1602 of file GrxModelItem.java.

notify this model is modified

Definition at line 96 of file GrxModelItem.java.

boolean com.generalrobotix.ui.item.GrxModelItem.propertyChanged ( String  property,
String  value 
) [inline]

check validity of new value of property and update if valid

Parameters:
propertyname of property
valuevalue of property
Returns:
true if checked(even if value is not used), false otherwise

Reimplemented from com.generalrobotix.ui.GrxBasePlugin.

Definition at line 442 of file GrxModelItem.java.

Definition at line 624 of file GrxModelItem.java.

Definition at line 629 of file GrxModelItem.java.

Definition at line 169 of file GrxModelItem.java.

Definition at line 1668 of file GrxModelItem.java.

remove a link

Parameters:
linklinke to be removed

Definition at line 256 of file GrxModelItem.java.

rename this Model

Parameters:
newNamenew name

Reimplemented from com.generalrobotix.ui.GrxBasePlugin.

Definition at line 1622 of file GrxModelItem.java.

resize bounding box which covers the whole body

Definition at line 1319 of file GrxModelItem.java.

restore properties

Reimplemented from com.generalrobotix.ui.GrxBasePlugin.

Definition at line 386 of file GrxModelItem.java.

get root link

Definition at line 375 of file GrxModelItem.java.

Definition at line 176 of file GrxModelItem.java.

Definition at line 162 of file GrxModelItem.java.

void com.generalrobotix.ui.item.GrxModelItem.setCharacterPos ( LinkPosition[]  lpos,
double[]  q 
) [inline]

set transformation of the root joint and all joint values

Parameters:
lpostransformation of the root joint
qsequence of joint values

Definition at line 940 of file GrxModelItem.java.

set/unset focus on this item

When this item is focused, its bounding box is displayed.

Parameters:
trueto focus, false to unfocus

Reimplemented from com.generalrobotix.ui.GrxBasePlugin.

Definition at line 1275 of file GrxModelItem.java.

void com.generalrobotix.ui.item.GrxModelItem.setJointColor ( int  jid,
java.awt.Color  color 
) [inline]

set color of joint

Parameters:
jidjoint id
colorcolor

Definition at line 1475 of file GrxModelItem.java.

void com.generalrobotix.ui.item.GrxModelItem.setJointValues ( final double[]  values) [inline]

set joint values

Parameters:
valuesjoint values

Definition at line 1000 of file GrxModelItem.java.

modify joint value if it exceeds limit values

Definition at line 1012 of file GrxModelItem.java.

set selected flag

Parameters:
bflag

Reimplemented from com.generalrobotix.ui.GrxBasePlugin.

Definition at line 1258 of file GrxModelItem.java.

void com.generalrobotix.ui.item.GrxModelItem.setTransformRoot ( Vector3d  pos,
Matrix3d  rot 
) [inline]

set transformation of the root joint

Parameters:
posposition
rotrotation matrix

Definition at line 968 of file GrxModelItem.java.

set transformation of the root joint

Parameters:
posposition
rotrotation matrix

Definition at line 977 of file GrxModelItem.java.

Parameters:
b

Definition at line 1421 of file GrxModelItem.java.

Parameters:
b
node

Definition at line 1430 of file GrxModelItem.java.

Definition at line 1411 of file GrxModelItem.java.

set visibility of CoM

Parameters:
btrue to make it visible, false otherwise

Definition at line 1346 of file GrxModelItem.java.

set visibility of CoM projected on the floor

Parameters:
btrue to make it visible, false otherwise

Definition at line 1359 of file GrxModelItem.java.

switch display mode between fill and line

Parameters:
btrue to switch to line mode, false otherwise

Definition at line 1372 of file GrxModelItem.java.

switch display mode between fill and line

Parameters:
btrue to switch to line mode, false otherwise
nodetop of subtree to be processed

Definition at line 1381 of file GrxModelItem.java.

update CoM and projected CoM positions

Definition at line 1063 of file GrxModelItem.java.

update joint value property from current joint value

Parameters:
linklink

Definition at line 1037 of file GrxModelItem.java.

update initial joint value properties from current joint values

Definition at line 1045 of file GrxModelItem.java.

update initial transformation property from current Transform3D

Definition at line 1019 of file GrxModelItem.java.


Member Data Documentation

Definition at line 78 of file GrxModelItem.java.

BranchGroup com.generalrobotix.ui.item.GrxModelItem.bgRoot_ = new BranchGroup()

Definition at line 67 of file GrxModelItem.java.

Definition at line 64 of file GrxModelItem.java.

Definition at line 65 of file GrxModelItem.java.

Definition at line 75 of file GrxModelItem.java.

final String com.generalrobotix.ui.item.GrxModelItem.DEFAULT_DIR = "/../model" [static]

Definition at line 54 of file GrxModelItem.java.

final double com.generalrobotix.ui.item.GrxModelItem.DEFAULT_RADIUS = 0.05 [static, private]

Definition at line 56 of file GrxModelItem.java.

final String com.generalrobotix.ui.item.GrxModelItem.envIcon = "environment.png" [static, private]

Definition at line 60 of file GrxModelItem.java.

Definition at line 69 of file GrxModelItem.java.

Definition at line 55 of file GrxModelItem.java.

Definition at line 62 of file GrxModelItem.java.

Definition at line 71 of file GrxModelItem.java.

Definition at line 68 of file GrxModelItem.java.

Definition at line 79 of file GrxModelItem.java.

Definition at line 212 of file GrxModelItem.java.

Definition at line 107 of file GrxModelItem.java.

Definition at line 108 of file GrxModelItem.java.

Definition at line 106 of file GrxModelItem.java.

Definition at line 72 of file GrxModelItem.java.

final String com.generalrobotix.ui.item.GrxModelItem.robotIcon = "robot.png" [static, private]

Definition at line 59 of file GrxModelItem.java.

Definition at line 77 of file GrxModelItem.java.

Definition at line 91 of file GrxModelItem.java.

Definition at line 83 of file GrxModelItem.java.

Definition at line 87 of file GrxModelItem.java.

Definition at line 80 of file GrxModelItem.java.

Definition at line 84 of file GrxModelItem.java.

Definition at line 88 of file GrxModelItem.java.

final String com.generalrobotix.ui.item.GrxModelItem.TITLE = "Model" [static]

Definition at line 53 of file GrxModelItem.java.


The documentation for this class was generated from the following file:


openhrp3
Author(s): AIST, General Robotix Inc., Nakamura Lab of Dept. of Mechano Informatics at University of Tokyo
autogenerated on Thu Apr 11 2019 03:30:21