cartographer源码分析(53)-mapping-trajectory_connectivity.h

markdown文件可在https://github.com/learnmoreonce/SLAM 下载


文件:trajectory_connectivity.h


#ifndef CARTOGRAPHER_MAPPING_TRAJECTORY_CONNECTIVITY_H_
#define CARTOGRAPHER_MAPPING_TRAJECTORY_CONNECTIVITY_H_

#include <map>
#include <unordered_map>

#include "cartographer/common/mutex.h"
#include "cartographer/mapping/proto/trajectory_connectivity.pb.h"
#include "cartographer/mapping/submaps.h"

namespace cartographer {
namespace mapping {

/*

TrajectoryConnectivity用于解决不同轨迹线的连通性问题.

多条轨迹构成一颗森林,而相互联通的轨迹应该合并。

不可拷贝/赋值
包含3个数据成员
1,互斥锁lock_
2,forest_  不同轨迹线组成的森林
3,connection_map_ 连通图
成员函数
Add():添加一条轨迹线
Connect():将2条轨迹线联通
TransitivelyConnected():判断是否处于同一个连通域
ConnectionCount():返回直接联通的数量

the transitive connectivity:传递连通性

ConnectedComponents():由联通分量id组成的已联通分类组
*/
// A class that tracks the connectivity structure between trajectories.
//
// Connectivity includes both the count ("How many times have I _directly_
// connected trajectories i and j?") and the transitive connectivity.
//
// This class is thread-safe.
class TrajectoryConnectivity {
 public:
  TrajectoryConnectivity();

  TrajectoryConnectivity(const TrajectoryConnectivity&) = delete;
  TrajectoryConnectivity& operator=(const TrajectoryConnectivity&) = delete;

  // Add a trajectory which is initially connected to nothing.
  //添加一条轨迹线,默认不连接到任何轨迹线
  void Add(int trajectory_id) EXCLUDES(lock_);

 /*

 Connect two trajectories. If either trajectory is untracked, it will be  tracked.  This function is invariant to the order of its arguments. 
 Repeated calls to Connect increment the connectivity count.
将轨迹a和轨迹b联通
  */
  void Connect(int trajectory_id_a, int trajectory_id_b) EXCLUDES(lock_);

  // Determines if two trajectories have been (transitively) connected. If
  // either 
  • 1
    点赞
  • 1
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
FAILED: CMakeFiles/cartographer.transform.timestamped_transform_test.dir/cartographer/transform/timestamped_transform_test.cc.o /usr/bin/c++ -DBOOST_ALL_NO_LIB -DBOOST_IOSTREAMS_DYN_LINK -DGFLAGS_IS_A_DLL=0 -I../cartographer -I. -I../ -isystem /usr/include/eigen3 -isystem /usr/include/lua5.2 -O3 -DNDEBUG -pthread -fPIC -Wall -Wpedantic -Werror=format-security -Werror=missing-braces -Werror=reorder -Werror=return-type -Werror=switch -Werror=uninitialized -O3 -DNDEBUG -pthread -fPIC -Wall -Wpedantic -Werror=format-security -Werror=missing-braces -Werror=reorder -Werror=return-type -Werror=switch -Werror=uninitialized -O3 -DNDEBUG -std=gnu++11 -MD -MT CMakeFiles/cartographer.transform.timestamped_transform_test.dir/cartographer/transform/timestamped_transform_test.cc.o -MF CMakeFiles/cartographer.transform.timestamped_transform_test.dir/cartographer/transform/timestamped_transform_test.cc.o.d -o CMakeFiles/cartographer.transform.timestamped_transform_test.dir/cartographer/transform/timestamped_transform_test.cc.o -c ../cartographer/transform/timestamped_transform_test.cc In file included from ../cartographer/transform/timestamped_transform_test.cc:17: ../cartographer/transform/timestamped_transform.h:21:10: fatal error: cartographer/transform/proto/timestamped_transform.pb.h: No such file or directory 21 | #include "cartographer/transform/proto/timestamped_transform.pb.h" | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ compilation terminated. [44/380] Building CXX object CMakeFiles/cartographer.sensor.internal.voxel_filter_test.dir/cartographer/sensor/internal/voxel_filter_test.cc.o
最新发布
07-23

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值