ethz-asl / ethzasl_ptam

Modified version of Parallel Tracking and Mapping (PTAM)
http://wiki.ros.org/ethzasl_ptam
235 stars 184 forks source link

/vslam/pose coordinate system #38

Open gariepyalex opened 10 years ago

gariepyalex commented 10 years ago

Hi, I am trying to understand the coordinate system of /vslam/pose. I have a few questions:

1) I have read on other issues' threads that ethzasl_ptam uses a right handed coordinate system, following the ros standards. However, z decreases when I moved toward the tracked plane, y increases when I move the camera up and x increases when I go left, making it a left handed coordinate system.

2) What is the difference between /vslam/pose and /vslam/pose_world ? Only the x coordinate seems to be flipped.

3) When I click "Map View" in the PTAM gui, there are coordinates named "Camera Pos" displayed in the bottom of the screen. However, these coordinates are completely different from /vslam/pose. What those coordinates represents? Can I have access to this via a ros topic?

4) The orientation of /vslam/pose is always around x ~= 1, y ~=0, z ~=0 and w ~=0.1. Even when I roll the camera, the axis the the Quaternion doesn't change. It doesn't make sense to me.

What I want to achieve is augmented reality over the video feed of the camera. I want to get an absolute position and orientation of my real camera in any referential, and set it to the camera of my 3D engine (I use Ogre).

Thanks in advance!

stephanweiss commented 10 years ago

Hi,

1) /vslam/pose (i.e. PTAM) publishes the pose of the world coordinate system w.r.t. the sensor. That may be the reason for the confusion in your case. All coordinates are right hand systems in ethzasl_ptam and ethzasl_sensor fusion

2) /vslam/pose publishes the pose of the world coordinate system w.r.t. the sensor. /vslam/pose_world publishes the camera pose w.r.t. world.

3) They should be the same as /vslam/pose_world. If this is not the case, please let us know.

4) Is the tracking robust while you turn the camera? Simplest way to test if the attitude changes is to yaw the camera.

Your project sounds interesting, I hope the above helps you to advance it - let us know.

Best, Stephan


From: gariepyalex [notifications@github.com] Sent: Thursday, June 19, 2014 2:12 PM To: ethz-asl/ethzasl_ptam Subject: [ethzasl_ptam] /vslam/pose coordinate system (#38)

Hi, I am trying to understand the coordinate system of /vslam/pose. I have a few questions:

1) I have read on other issues' threads that ethzasl_ptam uses a right handed coordinate system, following the ros standards. However, z decreases when I moved toward the tracked plane, y increases when I move the camera up and x increases when I go left, making it a left handed coordinate system.

2) What is the difference between /vslam/pose and /vslam/pose_world ? Only the x coordinate seems to be flipped.

3) When I click "Map View" in the PTAM gui, there are coordinates named "Camera Pos" displayed in the bottom of the screen. However, these coordinates are completely different from /vslam/pose. What those coordinates represents? Can I have access to this via a ros topic?

4) The orientation of /vslam/pose is always around x ~= 1, y ~=0, z ~=0 and w ~=0.1. Even when I roll the camera, the axis the the Quaternion doesn't change. It doesn't make sense to me.

What I want to achieve is augmented reality over the video feed of the camera. I want to get an absolute position and orientation of my real camera in any referential, and set it to the camera of my 3D engine (I use Ogre).

Thanks in advance!

— Reply to this email directly or view it on GitHubhttps://github.com/ethz-asl/ethzasl_ptam/issues/38.

gariepyalex commented 10 years ago

First, thank you for your fast answers, I am always amaze about how active projects like this are on github.

For question 3), I was wrong, the coordinates are the same as /vslam/pose_world. I was comparing it with /vslam/pose, and maybe moving a bit when looking back and forth between the two.

For the orientation, I think the problem was that the "no rotation" quaternion was not aligned with the one of the pose. It now looks just fine.

Thank you very much for your help!

AlanTurnage commented 10 years ago

Hello,

This may be unrelated to this conversation, but I noticed in the response to question 2 you mentioned /vslam/pose_world. Is this a topic I can subscribe to? It's not mentioned in the wiki under published topics.

I'm attempting to use your version of PTAM in a project similar to the sFly project. Instead of multiple quadcopters, I'm using a custom blimp indoors.

Thanks for any help.

simonlynen commented 10 years ago

@AlanTurnage yes this represents the orientation of the camera w.r.t. the ptam map (world) expressed in the map-frame of reference.

5aou commented 9 years ago

Hi all, I installed PTAM on ubuntu 14.04 and it works well,now I want to have more informations about results like : tracking running time, parameters shown in ptam GUI (like : Camera Pos in view map off, Map:..,..KF)...

PS: I don't know in which file I have to search for explanations, I don't have /vslam/pose_world or /vslam/pose.

Thank you a lot.

stephanweiss commented 9 years ago

@5aou please don't open another issue for new questions.

To answer this one, you would need to add your timings in the code using one of the many timing tools (https://github.com/ethz-asl/Schweizer-Messer among others). To change the GUI, you would need to modify the code as well -- the main file is system.cc.


From: 5aou [notifications@github.com] Sent: Monday, May 18, 2015 7:31 AM To: ethz-asl/ethzasl_ptam Cc: Stephan Weiss Subject: Re: [ethzasl_ptam] /vslam/pose coordinate system (#38)

Hi all, I installed PTAM on ubuntu 14.04 and it works well,now I want to have more informations about results like : tracking running time, parameters shown in ptam GUI (like : Camera Pos in view map off, Map:..,..KF)...

PS: I don't know in which file I have to search for explanations, I don't have /vslam/pose_world or /vslam/pose.

Thank you a lot.

— Reply to this email directly or view it on GitHubhttps://github.com/ethz-asl/ethzasl_ptam/issues/38#issuecomment-103080001.

flankechen commented 9 years ago

@gariepyalex Have you finished this in Ogre? how to extract position and orientation from PTAM 4*4 world to camera matrix? I use original version of PTAM and trying to port it to Unity3D.

gariepyalex commented 9 years ago

@flankechen I don't remember how I did it and I don't have access to my project's source code anymore; it was a project I did during an intership. Sorry!

flankechen commented 9 years ago

@gariepyalex thanks anyway. sticking on this for a while...