File tree Expand file tree Collapse file tree 2 files changed +4
-2
lines changed Expand file tree Collapse file tree 2 files changed +4
-2
lines changed Original file line number Diff line number Diff line change @@ -39,7 +39,7 @@ BtNavigateAndFind::BtNavigateAndFind() : rclcpp::Node("bt_navigate_and_find") {
3939 for (auto & goal_pose_name : goal_poses_names_) {
4040 declare_parameter (goal_pose_name);
4141 }
42- declare_parameter (" spin_angle" , 0.7854 );
42+ declare_parameter (" spin_angle" , 0.785 );
4343 declare_parameter (" wait_time" , 3.0 );
4444
4545 if (ConfigureBT ()) {
@@ -87,7 +87,7 @@ bool BtNavigateAndFind::ConfigureBT() {
8787 double spin_angle;
8888 get_parameter (" spin_angle" , spin_angle);
8989 blackboard_->set <double >(" spin_angle" , spin_angle);
90- blackboard_->set <int >(" spin_cycles" , int (3.14 / spin_angle));
90+ blackboard_->set <int >(" spin_cycles" , int (std::round ( 6.28 / spin_angle) ));
9191 blackboard_->set <double >(" wait_time" , (get_parameter (" wait_time" )).get_value <double >());
9292
9393 // Get the BT filename to use from the node parameter
Original file line number Diff line number Diff line change @@ -121,6 +121,8 @@ void TaskMonitor::SetInitialPose() {
121121 while ((now () - start_time).seconds () < timeout_s_) {
122122 if (IsRobotAtPose (initial_pose_)) {
123123 LOG (INFO, " Robot is at initial pose" );
124+ // Wait until nav is properly initialized. TODO: Make it better subscribing to any topic
125+ rclcpp::sleep_for (std::chrono::milliseconds (5000 ));
124126 initialize_navigation_action_server_->succeeded_current ();
125127 return ;
126128 }
You can’t perform that action at this time.
0 commit comments