对于residual[1] = T(0.0);的情况,如果不加T,编译就会报错 error: no match for ‘operator=’ (operand types are ‘ceres::Jet’ and ‘double’) . Jet类型是ceres内置类型,我们要把double转成Jet类型,也就是T(0.0)
方案:一台机器运行local optimization,另一台运行 global optimization
Cloud-based mapping ,using a gRPC streaming connection between local and global SLAM to propagate sensor data and local SLAM updates, which does not support ACKs and resending, hence this is not going to work over spotty WiFi.
先安装protobuf和ceres
安装 grpc
一开始下载grpc后进行编译,结果报错:
1 2 3 4
CMake Warning at cmake/abseil-cpp.cmake:30 (message): gRPC_ABSL_PROVIDER is "module" but ABSL_ROOT_DIR is wrong Call Stack (most recent call first): CMakeLists.txt:188 (include)
std::string cells; for (const Eigen::Array2i& xy_index : XYIndexRangeIterator(cell_limits)) { if (!IsKnown(xy_index + offset)) { cells.push_back(0/* unknown log odds value */); cells.push_back(0/* alpha */); continue; } // We would like to add 'delta' but this is not possible using a value and // alpha. We use premultiplied alpha, so when 'delta' is positive we can // add it by setting 'alpha' to zero. If it is negative, we set 'value' to // zero, and use 'alpha' to subtract. This is only correct when the pixel // is currently white, so walls will look too gray. This should be hard to // detect visually for the user, though.
[/cartographer_node node.cc:886] Expected topic "scan" (trajectory 0) (resolved topic "/base_scan") but no publisher is currently active. [/cartographer_node node.cc:895] Currently available topics are: /constraint_list,/submap_list,/scan_matched_points2,/rosout,/tf,/rosout_agg,/map,/trajectory_node_list,/landmark_poses_list,
Warning: TF_REPEATED_DATA ignoring data with redundant timestamp for frame odom at time 1301326803.532597 according to authority unknown_publisher at line 278 in /tmp/binarydeb/ros-noetic-tf2-0.7.5/src/buffer_core.cpp
[ WARN] Could not compute submap fading: Could not find a connection between 'map' and 'base_link' because they are not part of the same tree.Tf has two or more unconnected trees
Exception thrown:Lookup would require extrapolation 367325588.004024029s into the past. Requested time 1301326755.953867912 but the earliest data is at time 1668652343.957891941, when looking up transform from frame [base_link] to frame [map]
[ERROR] [1648276979.504876032]: BUG: Got a transition to CommState [PENDING] when our in SimpleGoalState [DONE] [ERROR] [1648276979.504963821]: BUG: Got a transition to CommState [RECALLING] when our in SimpleGoalState [DONE] [ERROR] [1648276979.514087412]: BUG: Got a transition to CommState [PREEMPTING] when in SimpleGoalState [DONE] [ERROR] [1648276979.515084871]: BUG: Got a second transition to DONE
结果导致move_base漏接了一个目标,最后取消两个cancelAllGoals就好了
cancelAllGoals()[inline]: Cancel all goals currently running on the action server. This preempts all goals running on the action server at the point that this message is serviced by the ActionServer.
cancelGoal()[inline]: Cancel the goal that we are currently pursuing