broadphase = BulletSpaceFilter(bouncingBox)

# insert a non smooth law for contactors id 0
broadphase.insert(nslaw, 0, 0)

# add multipoint iterations to gather at least 3 contact points and
# avoid object penetration
broadphase.collisionConfiguration().setConvexConvexMultipointIterations()
broadphase.collisionConfiguration().setPlaneConvexMultipointIterations()

# The ground is a static object
# we give it a group contactor id : 0
broadphase.addStaticObject(ground, 0)

# (6) Simulation setup with (1) (2) (3) (4) (5)
simulation = BulletTimeStepping(timedisc)
#simulation.setNewtonOptions(1)
simulation.insertIntegrator(osi)
simulation.insertNonSmoothProblem(osnspb)


# simulation initialization
bouncingBox.initialize(simulation)

# Get the values to be plotted
# ->saved in a matrix dataPlot

N = (T - t0) / h
dataPlot = zeros((N+1, 4))

#
Ejemplo n.º 2
0
broadphase = BulletSpaceFilter(bouncingBox)

# insert a non smooth law for contactors id 0
broadphase.insert(nslaw, 0, 0)

# add multipoint iterations to gather at least 3 contact points and
# avoid object penetration
broadphase.collisionConfiguration().setConvexConvexMultipointIterations()
broadphase.collisionConfiguration().setPlaneConvexMultipointIterations()

# The ground is a static object
# we give it a group contactor id : 0
broadphase.addStaticObject(ground, 0)

# (6) Simulation setup with (1) (2) (3) (4) (5)
simulation = BulletTimeStepping(timedisc, osi, osnspb)
#simulation.setNewtonOptions(1)


# simulation initialization

bouncingBox.setSimulation(simulation)
bouncingBox.initialize()

# Get the values to be plotted
# ->saved in a matrix dataPlot

N = (T - t0) / h
dataPlot = zeros((N+1, 4))

#