Pandai no collision

I’m trying to integrate physics (gravity and collisions with objects) with pandai
but it crosses my obstacle instead of going around it.
the object doesn’t seem to see gravity anymore too when I use it in pandai why?

import direct.directbase.DirectStart
from panda3d.core import *
from direct.showbase.DirectObject import DirectObject
from direct.task import Task
from direct.actor.Actor import Actor
from panda3d.ai import *
from pandac.PandaModules import *
from direct.interval.IntervalGlobal import *

class World(DirectObject):

    def __init__(self):
        base.disableMouse()
        base.cam.setPosHpr(0,0,55,0,-90,0)

        base.cam.setPos(0, -30, 10)
        base.cam.lookAt((0,0,4))

        base.cTrav = CollisionTraverser()
        base.enableParticles()

        self.collisionHandler = PhysicsCollisionHandler()

        collisionPlane = CollisionPlane(Plane(Vec3(0, 0, 1), Point3(0,0,0)))
        plane = base.render.attachNewNode(CollisionNode('planecnode'))
        plane.node().addSolid(collisionPlane)
        plane.show()

        globalForcesForceNode = ForceNode('world-forces')
        globalForces = base.render.attachNewNode(globalForcesForceNode)

        globalForcesGravity = LinearVectorForce(0, 0, -9.81)
        globalForcesForceNode.addForce(globalForcesGravity)

        base.physicsMgr.addLinearForce(globalForcesGravity)
        self.target = self.addObject('smiley', (6, 0, 15))[0]
        self.obstacle = self.addObject('smiley', (0, 0, 15))[5]
        self.pursuer = self.addObject('smiley', (-6, 0, 15))[0]
        self.setAI()

    def addObject(self, modelname, pos, scale=1.):
      # road_tex = self.loader.loadTexture("texture.jpeg")
      # ts = TextureStage('ts')
      ball = NodePath(PandaNode('object'))
      ballActor = ActorNode('object')
      ballActorNP = ball.attachNewNode(ballActor)
      ballModel = loader.loadModel(modelname)
      ballModel.reparentTo(ballActorNP)
      ballModel.setScale(scale)
      ballModel.setPos(0, 0, 0)

      ballCollider = ballActorNP.attachNewNode(CollisionNode('object'))
      min, max = ballModel.getTightBounds()
      box = CollisionBox(min, max)
      ballCollider.node().addSolid(box)

      base.physicsMgr.attachPhysicalNode(ballActor)

      self.collisionHandler.addCollider(ballCollider, ballActorNP)
      base.cTrav.addCollider(ballCollider, self.collisionHandler)
      hash = "hash_" + modelname
      actorPhysicsNode = NodePath("object")
      actorPhysicsNode.reparentTo(base.render)
      actorNode = ActorNode("object")
      actorNP = actorPhysicsNode.attachNewNode(actorNode)
      base.physicsMgr.attachPhysicalNode(actorNode)
      ball.reparentTo(actorNP)
      ballActorNP.setPos(pos)
      object = (ballModel, ball, actorNode, ballCollider, ballActor, actorNP)
      return object

    def setAI(self):
        #Creating AI World
        self.AIworld = AIWorld(render)

        self.AIchar = AICharacter("pursuer",self.pursuer, 100, 0.05, 5)
        self.AIworld.addAiChar(self.AIchar)
        self.AIbehaviors = self.AIchar.getAiBehaviors()

        self.AIbehaviors.pursue(self.target, 50)

        # Obstacle avoidance
        self.AIbehaviors.obstacleAvoidance(100.0)
        self.AIworld.addObstacle(self.obstacle)
        self.AIworld.addObstacle(self.pursuer)

        #AI World update
        taskMgr.add(self.AIUpdate,"AIUpdate")

    #to update the AIWorld
    def AIUpdate(self,task):
        self.AIworld.update()
        return Task.cont

w = World()
run()

I made some tests, pandai removes the physics of my objects
I’m losing collision management and gravity, is there a solution to use pandai without losing that?

i think pandai is “abandoned”, we should rather use a more modern library like tensorflow