Example #1
0


#-------------------------------------------------------------------------------
#
# Create the robot with the desc module.
#
# The goal is to make a general description of the robot.
# The robot is then create in the physical scene with
# the deserializeWorld method.
#
#-------------------------------------------------------------------------------

import iCubcommon

world = iCubcommon.add_iCub(H_init=[0,0,0,1,0,0,0], fixed_base=True)


##### Deserialize world: register world description in phy & graph agents
import agents.graphic.builder
import agents.physic.builder

print "deserializeWorld..."
print "graphic..."
agents.graphic.builder.deserializeWorld(graph, gInterface, world)
print "and physic..."
agents.physic.builder.deserializeWorld(phy, ms, lmd, world)
print "done."


Example #2
0


#-------------------------------------------------------------------------------
#
# Create the robot with the desc module.
#
# The goal is to make a general description of the robot.
# The robot is then create in the physical scene with
# the deserializeWorld method.
#
#-------------------------------------------------------------------------------

import iCubcommon

world = iCubcommon.add_iCub(damping=1, H_init=[0,0,1,1,0,0,0], fixed_base=False)
iCubcommon.add_iCub_meshes(world, useCollisionMeshes=True, createComposite=True, compositeOffset=0.001)
iCubcommon.addGround(world)
iCubcommon.addContactLaws(world)
iCubcommon.addCollisionPairs(world)

##### Deserialize world: register world description in phy & graph agents
import agents.graphic.builder
import agents.physic.builder

print "deserializeWorld..."
print "graphic..."
agents.graphic.builder.deserializeWorld(graph, gInterface, world)
print "and physic..."
agents.physic.builder.deserializeWorld(phy, ms, lmd, world)
print "... done."