Skip to content

Commit 7ae0b39

Browse files
committed
check for params adhoc to publish path and w0_T_w1
1 parent 619029f commit 7ae0b39

1 file changed

Lines changed: 17 additions & 2 deletions

File tree

src/keyframe_pose_graph_slam_node.cpp

Lines changed: 17 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -402,10 +402,25 @@ int main( int argc, char ** argv)
402402
std::thread path_pub_th, w0_T_w1_pub_th;
403403

404404
if( nh.getParam( "adhoc_pubpath", __tmp_adhoc_pubpath ) == true )
405-
adhoc_pubpath=true;
405+
{
406+
cout << "[keyframe_pose_graph_slam_node] roslaunch param `adhoc_pubpath`\n";
407+
if( __tmp_adhoc_pubpath.compare("true") == 0 ) {
408+
cout << "[keyframe_pose_graph_slam_node] roslaunch param `adhoc_pubpath` is true, so will publish path\n";
409+
adhoc_pubpath=true;
410+
}else {
411+
cout << "[keyframe_pose_graph_slam_node] roslaunch param `adhoc_pubpath` is NOT true, so wont publish path\n";
412+
}
413+
}
406414

407415
if( nh.getParam( "adhoc_pubw0_T_w1", __tmp_adhoc_pubw0_T_w1 ) == true )
408-
adhoc_pubw0_T_w1 = true;
416+
{
417+
if( __tmp_adhoc_pubw0_T_w1.compare("true") == 0 ) {
418+
cout << "[keyframe_pose_graph_slam_node] roslaunch param `adhoc_pubpath` is true, so will publish w0_T_w1\n";
419+
adhoc_pubw0_T_w1 = true;
420+
}else {
421+
cout << "[keyframe_pose_graph_slam_node] roslaunch param `adhoc_pubpath` is NOT true, so will not publish w0_T_w1\n";
422+
}
423+
}
409424

410425
if( adhoc_pubpath )
411426
path_pub_th = std::thread{ &Composer::path_publish_thread, cmpr, 30 };

0 commit comments

Comments
 (0)