Skip to content

Commit c132678

Browse files
committed
in composer in adhoc publish the pose in imu frame as needed by surfelmapping code
1 parent 7ae0b39 commit c132678

1 file changed

Lines changed: 4 additions & 2 deletions

File tree

src/Composer.cpp

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -473,7 +473,9 @@ void Composer::path_publish_thread( int looprate )
473473
)
474474
continue;
475475
}
476-
Matrix4d wi_T_latest = global_lmb.at( n-1 );
476+
477+
Matrix4d imu_T_cam = manager->get_imu_T_cam();
478+
Matrix4d wi_T_latest = global_lmb.at( n-1 ) * imu_T_cam.inverse();
477479

478480
if( rand()%100 > 2 ) {
479481
//add to msg
@@ -501,7 +503,7 @@ void Composer::path_publish_thread( int looprate )
501503
path_msg.header.frame_id = "world";
502504
geometry_msgs::PoseStamped pxl;
503505
pxl.header.stamp = stamp_of_it;
504-
auto ___wi_T_c = global_lmb.at( h );
506+
auto ___wi_T_c = global_lmb.at( h ) * imu_T_cam.inverse();
505507
PoseManipUtils::eigenmat_to_geometry_msgs_Pose( ___wi_T_c, pxl.pose );
506508
path_msg.poses.push_back( pxl );
507509
}

0 commit comments

Comments
 (0)