tum-vision / lsd_slam

LSD-SLAM
GNU General Public License v3.0
2.6k stars 1.23k forks source link

lsd_slam/pose topic #131

Open NilsL3 opened 9 years ago

NilsL3 commented 9 years ago

Hello,

I have two questions concerning the lsd_slam/pose topic. Does the topic show the estimated position and orientation of the each frame provided by the camera or of the last keyframe?

My other question is if once lsd_slam has been initialized and the first keyframe has been grabbed, will the position at which the first keyframe was grabbed remain as position 0,0,0 (origin) during the entire camera movement?

I would appreciate your help a lot. Thanks.

weblucas commented 9 years ago

Q1. The topic "lsd_slam/liveframes" provides the camera pose.

Q2. The first keyframe is in the origin with no rotation this means. Translation = (0,0,0) and orientation quaternion = (0,0,0,1)

anuragajay commented 9 years ago

@weblucas I had some confusion regarding lsd_slam output. Does lsd_slam/liveframes shows estimated position and orientation of camera(w.r.t first image) in each of the images? If thats true, then would the final liveframe published by lsd_slam contain final estimated position and orientation of camera in each of the images? If I understanding the above things wrong, can you explain me what is the output of lsd_slam and whether there is a way to get final estimated position and orientation of camera in each of the images.

Also, any guideline on how to save those liveframes as there is no "liveframes" message in ROS.

weblucas commented 9 years ago

liveframes is a TOPIC. That is something like an information channel. The type of the message is keyframeMsg. Inside of this message there is a parameter called camToWorld that is the transformation from the camera coor system to the world system. My suggestion is to check the viewer code. There you can find how to save camera position. Again, The viewer shows the camera position in real time.

NilsL3 commented 9 years ago

Thanks for the help. I shall try a few things out and let you know how it works out. My other doubt would be, if the lsd_slam/liveframes topic provides camera pose, then what information does the lsd_slam/pose topic provide?

anuragajay commented 9 years ago

@weblucas Sorry for repeated questions, but I am still somewhat confused. camToWorld transformation is published for every image. Is it right that if we have to find transform a pose from cam to world frame in a particular image, we use camToWorld published for that image? I am asking this because I am still not sure how to find camera pose using camToWorld transform?

weblucas commented 9 years ago

The difference between liveframe and pose is the format. liveframe topic provide a KeyframeMsg. KeyframeMsg has the intrinsics parameters as well and the camToWold is the serialization of a instance of Sophous Sim(3). Sim(3) is a lie group with 7DoF. In other words is a fancy way to write a rigid body transformation with scale. the lsd_slam/pose only has extrinsic parameters using a quaternion and a vec3 translation.

The easiest way to undestand how to use the lifeframe is the viewer code. or just use the pose.

anuragajay commented 9 years ago

@weblucas By viewer's code, do u mean main_viewer.cpp?

weblucas commented 9 years ago

KeyFrameDisplay.cpp is where you can find the stuff

NilsL3 commented 9 years ago

Thanks. Indeed I found the camToWorld parameter in the KeyFrameDisplay.cpp. How could I get the 7DoF printed out for each image in the terminal or publish it on a separate topic?

weblucas commented 9 years ago

you can use only the pose topic for this.

On 9 August 2015 at 00:52, NilsL3 notifications@github.com wrote:

Thanks. Indeed I found the camToWorld parameter in the KeyFrameDisplay.cpp. How could I get the 7DoF printed out for each image in the terminal or publish it on a separate topic?

— Reply to this email directly or view it on GitHub https://github.com/tum-vision/lsd_slam/issues/131#issuecomment-129060278 .

anuragajay commented 9 years ago

@weblucas So, pose topic gives transformation from cam to world frame in PoseStamped format, right?

weblucas commented 9 years ago

Yes

On 9 August 2015 at 03:30, anuragajay notifications@github.com wrote:

@weblucas https://github.com/weblucas So, pose topic gives transformation from cam to world frame in PoseStamped format, right?

— Reply to this email directly or view it on GitHub https://github.com/tum-vision/lsd_slam/issues/131#issuecomment-129081507 .

NilsL3 commented 9 years ago

Thanks for the responses. I have another question not exactly related to the topic of this issue. I am curious about what the constraints are and what the green and red lines mean, which are in between the keyframes in the viewer window?

weblucas commented 9 years ago

They are the links(edges) used on the g2o for graph optimization. http://ais.informatik.uni-freiburg.de/publications/papers/kuemmerle11icra.pdf

On 12 August 2015 at 00:06, NilsL3 notifications@github.com wrote:

Thanks for the responses. I have another question not exactly related to the topic of this issue. I am curious about what the constraints are and what the green and red lines mean, which are in between the keyframes in the viewer window?

— Reply to this email directly or view it on GitHub https://github.com/tum-vision/lsd_slam/issues/131#issuecomment-130091903 .

SergioGarG commented 8 years ago

Hi @weblucas , I've read the code and I'm comparing the data given by lsd_slam/pose and lsd_slam/liveframes topics. Pose is giving the pose and rotation of the camera (x, y, z and w, x, y, z). Should liveframes be giving the same (I know that 3 of the 7DoF are the pose x, y, z... but the other 4?)?

Any help will be welcome, thanks.

weblucas commented 8 years ago

Liveframe give you more information. point cloud e other stuff. It is all about the type of the message.

On 9 November 2015 at 13:05, SergioGarG notifications@github.com wrote:

Hi @weblucas https://github.com/weblucas , I've read the code and I'm comparing the data given by lsd_slam/pose and lsd_slam/liveframes topics. Pose is giving the pose and rotation of the camera (x, y, z and w, x, y, z). Should liveframes be giving the same (I know that 3 of the 7DoF are the pose x, y, z... but the other 4?)?

Any help will be welcome, thanks.

— Reply to this email directly or view it on GitHub https://github.com/tum-vision/lsd_slam/issues/131#issuecomment-155046617 .

SergioGarG commented 8 years ago

Ok, thank you very much

hashim19 commented 8 years ago

@weblucas the pose topic does not give accurate distance travelled or orientation made.... how is it correct then ?

ank700 commented 8 years ago

@hashim19 Since it is a monocular algorithm, you will not get pose in metric scale, if that is what you mean by not accurate.

hashim19 commented 8 years ago

@ank700 what do pose here tell us ? whats the values in the x,y and z direction ?