ORB_SLAM icon indicating copy to clipboard operation
ORB_SLAM copied to clipboard

scale changed after turnning

Open liqile opened this issue 10 years ago • 20 comments

hi, @raulmur thanks for your sharing your orb-slam code .sorry to trouble you but I have a trouble while tracking I firstly go straight towards north and then turn to east orb-slam can calculate the degrees very well, but the scale of distance changed obviously after turning to east. the walking distance towards north and towards east are nealy the same, but on the rviz, the distance to east is obviously shorter than that to north could you give me some suggestions ? thanks and best

liqile avatar May 04 '15 06:05 liqile

I know what's the reason now. orbslam will use the velocity of last 2 frames, this influence may be remained after changing a direction, so I just remove the utilizing of velocity, and it works well.

liqile avatar May 04 '15 14:05 liqile

Hi @liqile I notice the same problem, can you tell me what kind of changes you done?

Gingol avatar May 06 '15 08:05 Gingol

hi @Gingol in the source file "Tracking.cc", you can find the function void Tracking::GrabImage(const sensor_msgs::ImageConstPtr& msg) on the line 229~236, you can find following code:

229: if(!mbMotionModel || mpMap->KeyFramesInMap()<4 || mVelocity.empty() || mCurrentFrame.mnId<mnLastRelocFrameId+2) 230: bOK = TrackPreviousFrame(); 231: else 232: { 233: bOK = TrackWithMotionModel(); 234: if(!bOK) 235: bOK = TrackPreviousFrame(); 236: } what I have done is that to change the code above to following: bOK=TrackingPreviousFrame();

liqile avatar May 06 '15 12:05 liqile

@Gingol you can try to combine orb slam with imu, this may also deal with that problem

liqile avatar May 06 '15 13:05 liqile

@Gingol do you have QQ?

liqile avatar May 06 '15 13:05 liqile

@liqile

  1. I've tried to change the code like you said but it doesn't work. After a turning the distance between the poses of the camera in rviz are very small or in some cases it seems that the camera doesn't move at all.
  2. In our project we want to use only the camera.
  3. No I haven't QQ.

Gingol avatar May 07 '15 09:05 Gingol

@Gingol what's the number of features in your proj.? I set the feature amount to 8000

liqile avatar May 07 '15 09:05 liqile

@liqile I kept the default number 1000. Can you tell me which camera and which lens you are using?

Gingol avatar May 07 '15 09:05 Gingol

@Gingol 720 x 1280

liqile avatar May 08 '15 04:05 liqile

@Gingol can you give me your ros bag with the camera calibration? [email protected]

liqile avatar May 08 '15 04:05 liqile

@Gingol I think you can use the camera on your iphone

liqile avatar May 09 '15 04:05 liqile

Hello @liqile, You mentioned combining Orbslam with an IMU. How do you propose to implement that, perhaps with a Kalman filter?

Oblynx avatar May 09 '15 21:05 Oblynx

@Oblynx the easiest the approach would be to replace the constant velocity motion model with imu motion model.

versatran01 avatar May 13 '15 04:05 versatran01

@versatran01 Can you elaborate on how we can do that? Would metric scale estimation be possible with such a approach?

mhkabir avatar May 17 '15 17:05 mhkabir

I am also facing the same problem . Has anyone come up with a solution .I donot have the IMU in my case.

shabhu18 avatar May 17 '15 17:05 shabhu18

@shabhu18 hi, I think you can take utilization of a new camera. I used the camera on a xiaomi phone , and it worked well

liqile avatar May 19 '15 03:05 liqile

@mhkabir To start with, you could just integrate the inter-frame gyro readings as the guess of inter-frame rotation. The accelerometer readings are probably too noisy to estimate translation.

versatran01 avatar May 19 '15 19:05 versatran01

@liqile hello, about your comment here: ####### "in the source file "Tracking.cc", you can find the function void Tracking::GrabImage(const sensor_msgs::ImageConstPtr& msg) on the line 229~236, you can find following code:

229: if(!mbMotionModel || mpMap->KeyFramesInMap()<4 || mVelocity.empty() || mCurrentFrame.mnId<mnLastRelocFrameId+2) 230: bOK = TrackPreviousFrame(); 231: else 232: { 233: bOK = TrackWithMotionModel(); 234: if(!bOK) 235: bOK = TrackPreviousFrame(); 236: } what I have done is that to change the code above to following: bOK=TrackingPreviousFrame(); " #######

how did you observe this line was in charge of the model velocity? and how did this velocity been determined? could you please give me some hints? i still could't find out how the scale of map been calculated. thx

haoanw avatar Oct 11 '15 12:10 haoanw

Hi @mhkabir, did you end up looking in to changing the velocity motion model? I've experimented the combinaition of ORB_SLAM with MSF but the results are still inconclusive.

AlexandreBorowczyk avatar Jan 26 '16 15:01 AlexandreBorowczyk

@AlexandreBorowczyk No, I gave up on it. Rolled our own visual-inertial odometry system.

mhkabir avatar Jan 26 '16 15:01 mhkabir