编译时,如果有报关于pcl的错误,应修改CMakeLists文件,设定C++的最低版本:
set(CMAKE_CXX_STANDARD 14)
创建工作空间并拷贝相应功能包后,在src/grid_path_searcher/launch/demo.launch
中,加一行
<node pkg="rviz" type="rviz" name="rivz" args="-d $(find grid_path_searcher)/launch/rviz_config/demo.rviz" />
然后运行此launch文件:
使用noetic版本ROS可能遇到加载不出点云的问题。The problem is Noetic is more sensible to symbols like the "/" before a frame_id. Therefore, the "/" should be removed in cpp files and compiled again. Furthermore, to compile on Ubuntu 20 It is necessary to change c++ to 14.
解决方法:打开grid_path_searcher/src/demo_node.cpp
,搜索定位到world
,将/world
改为world