uzh-rpg / rpg_svo

Semi-direct Visual Odometry
GNU General Public License v3.0
2.09k stars 863 forks source link

6D camera pose in RVIZ #85

Open MuiLe opened 9 years ago

MuiLe commented 9 years ago

Hi, I have tried to run SVO on a Dataset. Everything seems to work fine. I can see the video with tracked features, rostopic echo /svo/pose shows:

header: seq: 139 stamp: secs: 1363639163 nsecs: 93742847 frame_id: /cam pose: pose: position: x: -0.8084153964 y: 0.659773679633 z: 0.582992701941 orientation: x: 0.975842708504 y: -0.218375956154 z: -0.00647610573413 w: 0.0010050313575

means camera pose can be estimated successfully??? But rosrun rviz rviz does not show camera move as expected. I see on the Display tabs, there is error: Fixed Frame [map] does not exist

Also try to add TF topic but there are another error messages: No transform from [cam_pos] to frame [map] No transform from [world] to frame [map]

It seems that missing some topics.

There is anyone has the same issue? Could someone give an idea how to debug or fix this. Sorry, I am not familiar with ROS.

Thanks in advance.

bsubei commented 9 years ago

General advice: you can probably get way more people to help you with this on http://answers.ros.org/ (I don't think it's a specific issue with rpg_svo package)

I'm assuming the rpg_svo node is supposed to broadcast some TFs (check the ros wiki for TFs). Did you try checking what TFs are being broadcast? You can do this visually (using rqt) using rosrun rqt_tf_tree rqt_tf_tree. Here's what I get when I run svo and rqt_tf_tree. You can see that svo broadcasts the TF from the world frame to cam_pos frame. That means you need to tell RViz to use the world frame as the fixed frame.

I also suggest you use the awesome ROS tools/plugins within rqt. Like the node graph in the screenshot above (lets you know if you got all your topics correctly, etc.) Hope this helps! :)