Skip to content

Commit

Permalink
not publishing pose in relocalization mode and fix in dense input mes…
Browse files Browse the repository at this point in the history
…sage
  • Loading branch information
flaviofontana committed May 23, 2014
1 parent ab12143 commit 4001f6a
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions svo_ros/src/visualizer.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -161,7 +161,7 @@ void Visualizer::publishMinimal(
pub_images_.publish(img_msg.toImageMsg());
}

if(pub_pose_.getNumSubscribers() > 0)
if(pub_pose_.getNumSubscribers() > 0 && slam.stage() == FrameHandlerBase::STAGE_DEFAULT_FRAME)
{
Quaterniond q;
Vector3d p;
Expand Down Expand Up @@ -300,7 +300,7 @@ void Visualizer::exportToDense(const FramePtr& frame)

// publish cam in world frame
SE3 T_world_from_cam(T_world_from_vision_*frame->T_f_w_.inverse());
Quaterniond q(T_world_from_cam.rotation_matrix()*T_world_from_vision_.rotation_matrix().transpose());
Quaterniond q(T_world_from_cam.rotation_matrix());
Vector3d p(T_world_from_cam.translation());

msg.pose.position.x = p[0];
Expand Down

0 comments on commit 4001f6a

Please sign in to comment.