In ORB-SLAM, finding Translation vector that is coming out a random value

I am trying to find out the translation vector (basically pose estimation) between two consecutive images. Here is what I did in OpenCV (.js):

-Take input from the webcam
-Get the consecutive images
-Find feature in both the image using ORB
-Applied BFMatcher to get the matching
-Applied ratio test for the good matches
-Now with the help of keypoint of both the images I found out the Essential matrix using cv.findEssentialMat(pt1,pt2...)
-Since I have an Essential matrix I can find out the Rotational matrix and translational vector b/w the consecutive two images

But this way I am getting a random value of translation vector, I am working on visual-inertial SLAM for that I need to find acceleration from the visual (and that can be found out If I have the correct translation b/w images).

I doubt if the matching is giving me a good result. Can someone please help me with this issue?

draw the matches at every step. look at the output.

likely ORB is a bad choice. SIFT and AKAZE perform better.

Also BFMatcher is brute force. FLANN performs faster.