open-rmf / rmf

Root repository for the RMF software
Apache License 2.0
223 stars 57 forks source link

[Other issue]: full control error when we send another level task point to the robot #379

Open Sizen007 opened 11 months ago

Sizen007 commented 11 months ago

Before proceeding, is there an existing issue or discussion for this?

Description

Bug log is below

[rmf_task_dispatcher-1] [INFO] [1690445748.475783084] [rmf_dispatcher_node]: Received Task Submission [Photo2] [rmf_task_dispatcher-1] [INFO] [1690445748.475885316] [rmf_dispatcher_node]: Add Task [Photo2] to a bidding queue [full_control-9] [from FleetUpdateHandle ] generate photo requests [full_control-9] [INFO] [1690445748.579082801] [DaystarRobots_fleet_adapter]: Generated Photo request for task_id:[Photo2] [full_control-9] [INFO] [1690445748.579324042] [DaystarRobots_fleet_adapter]: Planning for [1] robot(s) and [1] request(s) [ERROR] [full_control-9]: process has died [pid 185, exit code -11, cmd '/root/server_ws/install/rmf_fleet_adapter/lib/rmf_fleet_adapter/full_control --ros-args -r __node:=DaystarRobots_fleet_adapter --params-file /tmp/launch_params_tso8329k --params-file /tmp/launch_params_fnpq0vj1 --params-file /tmp/launch_params_pp_7ga18 --params-file /tmp/launch_params_m6p4lbye --params-file /tmp/launch_params_fa_70jv4 --params-file /tmp/launch_params_rk6mfklc --params-file /tmp/launch_params_zdxavi0t --params-file /tmp/launch_params_ortiy6u4 --params-file /tmp/launch_params_6mgp6r2s --params-file /tmp/launch_params_56b1n6qf --params-file /tmp/launch_params_m02i7uai --params-file /tmp/launch_params_hwcdrce0 --params-file /tmp/launch_params_shi5xasd --params-file /tmp/launch_params_m7ad6rma --params-file /tmp/launch_params_9bwkrf2z --params-file /tmp/launch_params_o4bayi33 --params-file /tmp/launch_params_r7n2xq9h --params-file /tmp/launch_params__bgtu4k3 --params-file /tmp/launch_params_wfizfn2r --params-file /tmp/launch_params_5xooj1j9 --params-file /tmp/launch_params_j7gxn4ju --params-file /tmp/launch_params_cykwi1bj --params-file /tmp/launch_params_nwmuf_un --params-file /tmp/launch_params_1zbqlion --params-file /tmp/launch_params_stbluyft --params-file /tmp/launch_params_n8708z14 --params-file /tmp/launch_params_8b4cyuwb --params-file /tmp/launch_params_c_36267j --params-file /tmp/launch_params_5qiaprpb --params-file /tmp/launch_params_rjzb9iow']. [rmf_task_dispatcher-1] [INFO] [1690445748.778220007] [rmf_dispatcher_node]: Test 333 [rmf_task_dispatcher-1] [WARN] [1690445748.778303822] [rmf_dispatcher_node]: Dispatcher Bidding Result: task [Photo2] has no submissions during bidding, Task Failed

Below is my project.building.yaml

crowd_sim: agent_groups:

below is the nav graph generate by this project.building.yaml

building_name: project levels: L1: lanes:

I am not sure whether my project.building.yaml is right. For the tasks across floors, I have never succeed. However, for the tasks on the same floor, it works well.

Sizen007 commented 11 months ago

not solved

Yadunund commented 11 months ago

Could you share the task request that your submitted?

Sizen007 commented 11 months ago

Could you share the task request that your submitted?

I modified a task type named Photo.

below is the msg type in rmf_task_msg `string task_id

rmf_dispenser_msgs/DispenserRequestItem[] items

string camera_type string photo_type string photo_place_name string photo_upload_dir float64[] photo_poses float64 desired_yaw float64[] position float64[] orientation ` It has three phases. The first one is "GotoPlace" the original type in RMF. The second one is "PhotoPhase" which plays photo actions.

By the way, could you please tell me if my "project.building.yaml" is right for across floor tasks?

Sizen007 commented 11 months ago

Could you share the task request that your submitted?

Below is my code part. Thanks for your replay.

`auto photo = std::make_shared(); photo->photo_place_name = task._rqt_point_info.point_name;

  for(const auto &pose : task._rqt_point_info.ptz){
    photo->photo_poses.push_back(pose);
    std::cout<<"ptz pose: "<<pose<<std::endl;
  }

  std::string pic_file_path;
  pic_file_path = generate_pic_name(_plan_start_time, task._rqt_point_info.device_id, "CCD",_task_patrolled_id);
  // update photo dir
  task._rqt_point_info.upload_photo_dir = pic_file_path;

  photo->photo_upload_dir = pic_file_path;
  photo->camera_type = task._rqt_point_info.camera_type;
  photo->photo_type = task._rqt_point_info.photo_type;

  // position
  for(const auto &pos : task._rqt_point_info.nav_position){
    std::cout<<"pos: "<<pos<<std::endl;
    photo->position.push_back(pos);
  }

  // orientation
  for(const auto &ori :  task._rqt_point_info.nav_orientation){
    std::cout<<"ori: "<<ori<<std::endl;
    photo->orientation.push_back(ori);
  }

  task_description->priority.value = 0;
  task_description->task_type.type = TaskType::TYPE_PHOTO;
  task_description->start_time.sec = rclcpp::Time().seconds();
  task_description->photo = *photo;

  request->description = *task_description;
  request->requester = "TaskSubmitClientId";

  // call server
  try {
    auto result = _submit_task_client->async_send_request(request);
    auto response = result.get();
    if(response->success){
        RCLCPP_INFO(rclcpp::get_logger("rclcpp"), "New Dispatch task_id: %s",
            response->task_id.c_str());
            _rms_task_id_map.insert(std::pair<std::string, RMSTask>(response->task_id.c_str(), task));
            _current_task_id_map.push_back(response->task_id.c_str());
            _task_goal_map.insert(std::pair<std::string, std::string>(response->task_id.c_str(), task._rqt_point_info.point_name));
    }else{
        RCLCPP_INFO(this->get_logger(), "Failed to call service %s",
          response->task_id.c_str());
    }

  } catch (const std::exception &e) {
    std::cerr << e.what() << '\n';
  }`
Sizen007 commented 11 months ago

Could you share the task request that your submitted?

Actually, this task type can work well when the task point is on the same floor as the robot. However, when I ask the robot to go to another floor to do the photo task , the full control node died. So I guess maybe the different floors donot have the connection relationship. As a result, I added lift between these two floors which you can find in my "project.building.yaml", but i am not sure whehter I added correctly.