zoukankan      html  css  js  c++  java
  • octomap建立

    1、安装ros的octomap  ---已完成

    2、阅读相关论文,了解其机理,并编写程序实现。

    参考网页:https://www.cnblogs.com/gaoxiang12/p/5041142.html

    综述:

    http://octomap.github.io/

    http://octomap.github.io/octomap/doc/

    github: simple_example

    https://github.com/OctoMap/octomap/blob/devel/octomap/src/simple_example.cpp

    参考资料:

    两个ppt和一个pdf论文, 在document里面snow laptop Ubuntu

    在ros中实时观看八叉树地图:https://blog.csdn.net/crp997576280/article/details/74605766

    那么发布什么格式的消息出来呢?

    http://docs.ros.org/electric/api/octomap_server/html/OctomapServer_8cpp_source.html#100566

    从octomap_server_node.cpp:http://docs.ros.org/electric/api/octomap_server/html/octomap__server__node_8cpp_source.html

    -> OctomapServer.cpp可以找到:

    00566 void OctomapServer::publishMap(const ros::Time& rostime) const{
    00567 
    00568   octomap_ros::OctomapBinary map;
    00569   map.header.frame_id = m_worldFrameId;
    00570   map.header.stamp = rostime;
    00571 
    00572   octomap::octomapMapToMsgData(m_octoMap->octree, map.data);
    00573 
    00574   m_binaryMapPub.publish(map);
    00575 }

    可见,这个publish函数很好用,可以借鉴。

    点云格式:

     下面开始动手去写:

    首先创建文件夹:

    cd /program/catkin_ws/src

    catkin_create_pkg octomap_dwq std_msgs rospy roscpp

    cd ..

    catkin_make

    然后,修改CMakeLists.txt package.xml文件

    建立 node.cpp .h .cpp

    错误:

    在.h 文件中,包含了本身,就会出现定义的类已被定义的错误

    target_link_libraries(octomap_dwq  ${catkin_LIBRARIES} ${PCL_LIBRARIES} ${OCTOMAP_LIBRARIES})

    这句话容易错,主要是这个的含义。



     
  • 相关阅读:
    springMVC总结
    spring总结
    dubbo文档
    mysql集群
    JVM-优化
    JVM-GC日志打印
    JVM-垃圾回收
    JVM-问题定位示例
    C++11
    《疯狂的程序员》
  • 原文地址:https://www.cnblogs.com/snowdwq/p/9880352.html
Copyright © 2011-2022 走看看