Giter Site home page Giter Site logo

Comments (3)

linpeisensh avatar linpeisensh commented on August 14, 2024

It's weird for me.
The ATE of slam is bigger than vo.
image
Here is my definition of trajectory of slam:

trajectory = []
n_his = len(st_his.relative_frame_poses)
for i in range(n_his):
	if st_his.slam_states[i] == SlamState.OK: #OK
		cur_pose = CameraPose(st_his.relative_frame_poses[i])
		cur_tra = [str(round(st_his.timestamps[i], 4))] + list(map(str, np.round(cur_pose.Ow, decimals=4))) + \
				  list(map(str, np.round(R.from_matrix(cur_pose.Rcw).as_quat(), decimals=4)))
		trajectory.append(cur_tra)

Do I misunderstand something?
@luigifreda
Thank you in advance!

from pyslam.

luigifreda avatar luigifreda commented on August 14, 2024

Hi,

  1. you cannot compare main_slam.py with main_vo.py.
    Did you study the two methods? As explained in the README

main_vo.py combines the simplest VO ingredients without performing any image point triangulation or windowed bundle adjustment. At each step $k$, main_vo.py estimates the current camera pose $C_k$ with respect to the previous one $C_{k-1}$. The inter-frame pose estimation returns $[R_{k-1,k},t_{k-1,k}]$ with $||t_{k-1,k}||=1$. With this very basic approach, you need to use a **ground truth** in order to recover a correct inter-frame scale $s$ and estimate a valid trajectory by composing $C_k = C_{k-1} * [R_{k-1,k}, s t_{k-1,k}]$. This script is a first start to understand the basics of inter-frame feature tracking and camera pose estimation.

Therefore, main_vo.py is using the ground truth in order to retrieve the interframe scale!
On the other hand, main_slam.py is estimating the trajectory up-to-scale given it's a pure monocular approach, without using any information coming from the ground truth.

  1. you cannot compare the slam/vo trajectories directly with the ground truth.
    In order to compare trajectories, you need to align them by using a package like
    https://github.com/MichaelGrupp/evo
    and considering the manifolds ( SE(3) or Sim(3) ) in which the methods compute their estimates.

  2. in slam.tracking.tracking_history there are keyframes references and relative frame poses.
    There is not a function that dumps the final computed trajectory at the end of the run (after all the bundle adjustments). But it easy to code it if you need it.

from pyslam.

linpeisensh avatar linpeisensh commented on August 14, 2024

Thank you for your reply!
Here is my estimation trajectory code after slam process is done :

trajectory = []
n_his = len(st_his.relative_frame_poses)
for i in range(n_his):
	if st_his.slam_states[i] == SlamState.OK: #OK
		cur_pose = CameraPose(st_his.relative_frame_poses[i])
		cur_tra = [str(round(st_his.timestamps[i], 4))] + list(map(str, np.round(cur_pose.Ow, decimals=4))) + \
				  list(map(str, np.round(R.from_matrix(cur_pose.Rcw).as_quat(), decimals=4)))
		trajectory.append(cur_tra)

Could you help me to check, whether it is correct? Or could you show me what could you generate this trajectory file?

from pyslam.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.