JakobEngel / dso_ros

ROS wrapper for dso
GNU General Public License v3.0
323 stars 210 forks source link

ROS wrapper publishCamPose not working properly #21

Open JirkaHarasim opened 7 years ago

JirkaHarasim commented 7 years ago

I had a problem writing my own ROS wrapper. The publishCamPose function was for some reason receiving wrong memory address for the actual frame->camToWorld matrix. The problem presented itself as a very weird path the dso wrapper was publishing to ros - yet on the same dataset, it published perfectly valid data in pangolin viewer.

It took me quite a while to discover what the problem was, but I'm sure about that now. I ran the simulation on both the pangolin viewer and the dso wrapper and they were receiving correct memory addresses for the frame object but different memory addresses for the matrix (which is a member of the frame object). I don't know if I am supposed to specify some eigen alignments in the ROS wrapper or if it was something else (like specifics of my system), as I don't know that much about cpp.

Anyways, I made a workaround and modified the publishCamPose function in a wrapper to pass the matrix itself as a parameter and that works fine. But it is not a solution, just a workaround.

NikolausDemmel commented 7 years ago

Could be related to Eigen alignment, as you say. See my latest answer in the other issue. Maybe you can check if that fixes your corrupted data?