今天看啥  ›  专栏  ›  机器人规划与控制研究所

C++基础 boost planner_cond_.wait(lock) 报错1225

机器人规划与控制研究所  · 公众号  ·  · 2023-12-25 16:27
1.如下程序段 boost unique_lock doesn’t own the mutex: Operation not permitted问题:其中makePlan是一个线程。这里的unlock导致错误这个报错 boost unique_lock doesn’t own the mutex: Operation not permitted bool navigation::makePlan(){ //cv::namedWindow("Dynamic Image", cv::WINDOW_AUTOSIZE); // 创建一个窗口 global_cost_map_ = planner_costmap_ros_->getCostmap(); costs_ = global_cost_map_->getCharMap(); unsigned int cx = global_cost_map_->getSizeInCellsX(), cy = global_cost_map_->getSizeInCellsY();//xwidth y height //int x[9] = {748,1332,713,539,535,1424,1577,712,1007}; // x width cx //int y[9] = {cy-343,cy-312,cy-333,cy - 288,cy - 287,cy - 61,cy - 282,cy - 266,cy - 771};//y height cy int x[2] = {363,424}; int y[2] = {cy - 694,cy - 1061}; //int k =8;// 6; int k = 0; boost::unique_lock lock(planner_mutex_); while(1) { // while(!runner_){ //std::cout planne ………………………………

原文地址:访问原文地址
快照地址: 访问文章快照