stella-cv / stella_vslam_ros

ROS package for stella_vslam
https://stella-cv.rtfd.io/en/latest/
Other
117 stars 77 forks source link

Relocalizing only supported for horizontal looking cameras. #163

Open robin-zealrobotics opened 1 year ago

robin-zealrobotics commented 1 year ago

https://github.com/stella-cv/stella_vslam_ros/blob/a7a7ae31a9132be159a5c999f1553eaa63261be7/src/stella_vslam_ros.cc#L206C5-L209C6

Correct me if I'm wrong, but the normal vector here means relocalization happens in the XZ-plane in optical camera frame. For a camera that is looking horizontal, this means the XY-plane in base-link frame. So far this makes sense for robots moving in the XY-plane.

However if the camera is mounted differently, e.g. looking at the ceiling or any angle, doesn't this code look for keyframe matches in a plane completely different than the baselink XY-plane?

My guess is the normal vector would need to be transformed using tf2 as well to guarantee that it aligns with the XY-plane in baselink -frame (and optionally even a user-configurable plane)

ymd-stella commented 1 year ago

I think you are right. I guess we should also fix rot_cv_to_ros_map_frame. This should be the transform from the initial camera pose to the map frame.

It would be nice if users could specify the conversion between stella_vslam map and map frame as a parameter or tf.

ymd-stella commented 11 months ago

I have created draft #168.

@robin-zealrobotics If you can confirm that it works, please try.

robin-zealrobotics commented 11 months ago

Can't run it right now, but I reviewed the code.