Academic Gitlab

Skip to content
Snippets Groups Projects

Add planner buttons

Merged Li, Guanrui (901036353) requested to merge users/mrunal/add_planner_buttons into feature/ros2

Created by: mrunaljsarvaiya

Add buttons to directly execute circle and lissajous planners. Arguments are passed in through comma separated string in rviz gui. This fixes https://github.com/arplaboratory/arpl_quadrotor_control/issues/224

here's a screenshot of what the gui should look like. the ui file has a alot of changes but I've only added buttons/text, not edited anything that was already present

Screenshot from 2024-01-21 15-37-33

Merge request reports

Merged by Li, Guanrui  (901036353)Li, Guanrui (901036353) 1 year ago (Jan 23, 2024 8:02pm UTC)

Loading

Activity

Filter activity
  • Approvals
  • Assignees & reviewers
  • Comments (from bots)
  • Comments (from users)
  • Commits & branches
  • Edits
  • Labels
  • Lock status
  • Mentions
  • Merge request status
  • Tracking
  • requested review from @gli7

  • requested review from @gli7

  • Created by: Jm7752

    Review: Changes requested

    There are some problems with just writing in both Line 812/841 of waypoint_nav_frame_ros2.cpp

     auto result = client->async_send_request(request);

    If the request is sent without a wait, then there is a possibility it will not be serviced. This gets worse if the two nodes are on a different computers. Like controller on drone and waypoint on your laptop. Please add an intelligent wait like the following

    Please add the following line to after the

     auto result = client->async_send_request(request);
    //Additionally wait change 300 mS to your desired wait value
     if(rclcpp::spin_until_future_complete(node->get_node_base_interface(), result,
       std::chrono::duration</*TimeRepT*/int64_t, /*TimeT*/ std::milli>(300))==
      rclcpp::FutureReturnCode::SUCCESS){
        RCLCPP_INFO(node->get_logger(), "%s Success callback", srvs_name.c_str());
      }
      else{    
        RCLCPP_ERROR(node->get_logger(), "%s Failed callback", srvs_name.c_str());  
      }
    }
  • Created by: mrunaljsarvaiya

    There are some problems with just writing in both Line 812/841 of waypoint_nav_frame_ros2.cpp

     auto result = client->async_send_request(request);

    If the request is sent without a wait, then there is a possibility it will not be serviced. This gets worse if the two nodes are on a different computers. Like controller on drone and waypoint on your laptop. Please add an intelligent wait like the following

    Please add the following line to after the

     auto result = client->async_send_request(request);
    //Additionally wait change 300 mS to your desired wait value
     if(rclcpp::spin_until_future_complete(node->get_node_base_interface(), result,
       std::chrono::duration</*TimeRepT*/int64_t, /*TimeT*/ std::milli>(300))==
      rclcpp::FutureReturnCode::SUCCESS){
        RCLCPP_INFO(node->get_logger(), "%s Success callback", srvs_name.c_str());
      }
      else{    
        RCLCPP_ERROR(node->get_logger(), "%s Failed callback", srvs_name.c_str());  
      }
    }

    Got it, thanks for catching that! Just added it

  • Created by: Jm7752

    Review: Approved

  • Created by: Jm7752

    There are some problems with just writing in both Line 812/841 of waypoint_nav_frame_ros2.cpp

     auto result = client->async_send_request(request);

    If the request is sent without a wait, then there is a possibility it will not be serviced. This gets worse if the two nodes are on a different computers. Like controller on drone and waypoint on your laptop. Please add an intelligent wait like the following Please add the following line to after the

     auto result = client->async_send_request(request);
    //Additionally wait change 300 mS to your desired wait value
     if(rclcpp::spin_until_future_complete(node->get_node_base_interface(), result,
       std::chrono::duration</*TimeRepT*/int64_t, /*TimeT*/ std::milli>(300))==
      rclcpp::FutureReturnCode::SUCCESS){
        RCLCPP_INFO(node->get_logger(), "%s Success callback", srvs_name.c_str());
      }
      else{    
        RCLCPP_ERROR(node->get_logger(), "%s Failed callback", srvs_name.c_str());  
      }
    }

    Got it, thanks for catching that! Just added it

    Ok sure thanks additional final edit in your picture here.

    I think you forgot to add yaw_amp as one of the arguments on top. Everything else looks fine. Though I think the main branch of waypoint navigation plugin is master for both ROS1/ROS2. We can directly merge it in feature/ros2 for now, but the

    master and feature/ros2 branches unfortunately have different plugin names. This is why station/simulator launch files do not automatically load your plugin because they are geared I think for the master version of the plugin names. We can fix this when we merge this branch to Master later on. Or you can stick to feature/ros2 and just manually load the plugin each time.

    image

  • Merged by: Jm7752 at 2024-01-23 20:02:58 UTC

  • merged manually

Please register or sign in to reply