之前文章中手动配置的环境,在运行dave_demo的时候有报错,很长时间没能解决
所以又试了试官方提供的docker版本,可以正常运行demo
所以建议直接用docker配,除了最开始拉取docker镜像部分有差别,其它基本一样
步骤参考Docker环境|DAVE项目 — Docker Environment | Project DAVE
在执行./run.bash -c dockwater:noetic时,如果报错:在运行docker run …时,docker 未找到
关闭ssh,重新连接
然后使用以下命令创建容器(不要复制我的,可能会有信息不一样,复制你报错里的命令。然后可以参照我的,添加一下你需要的,命令介绍在之前的文章里有,dave官方的我也看不懂):
注意:可能需要删除官方命令中的–rm,我有这个参数的话就会失败(报错docker未找到)
docker run -it -p 50004:22 -v /home/ouc/ros_dave:/home/ouc --name dockwater_noetic_runtime --gpus all -v /dev:/dev -e DISPLAY -e TERM -e XAUTHORITY=/tmp/.dockerpznw0d90.xauth -v /tmp/.dockerpznw0d90.xauth:/tmp/.dockerpznw0d90.xauth -v /tmp/.X11-unix:/tmp/.X11-unix -v /etc/localtime:/etc/localtime:ro -e NVIDIA_DRIVER_CAPABILITIES=compute,utility -e NVIDIA_VISIBLE_DEVICES=all 869c5ad477cb /bin/bash
创建完容器后,就按照我之前的文章,配置可视化、配置cuda、下载代码编译运行,选配ssh远程
运行demo结果如下:
roslaunch dave_demo_launch dave_demo.launch
经查,png和usb系统都有:
locate libpng | grep cmake
locate libusb
只需安装pcap、配置:
sudo apt-get install libpcap-dev
sudo gedit `locate PCLConfig.cmake`
搜索openni(),在下面添加:
elseif("${_lib}" STREQUAL "png")
find_package(PNG)
elseif("${_lib}" STREQUAL "pcap")
find_package(PCAP)
elseif("${_lib}" STREQUAL "libusb-1.0")
find_package(LIBUSB_1)
cp `locate libusb | grep cmake` /usr/share/cmake-3.16/Modules/FindLIBUSB_1.cmake
sudo gedit /usr/share/cmake-3.16/Modules/FindPCAP.cmake
# - Try to find libpcap include dirs and libraries
#
# Usage of this module as follows:
#
# find_package(PCAP)
#
# Variables used by this module, they can change the default behaviour and need
# to be set before calling find_package:
#
# PCAP_ROOT_DIR Set this variable to the root installation of
# libpcap if the module has problems finding the
# proper installation path.
#
# Variables defined by this module:
#
# PCAP_FOUND System has libpcap, include and library dirs found
# PCAP_INCLUDE_DIR The libpcap include directories.
# PCAP_LIBRARY The libpcap library (possibly includes a thread
# library e.g. required by pf_ring's libpcap)
# HAVE_PF_RING If a found version of libpcap supports PF_RING
# HAVE_PCAP_IMMEDIATE_MODE If the version of libpcap found supports immediate mode
find_path(PCAP_ROOT_DIR
NAMES include/pcap.h
)
find_path(PCAP_INCLUDE_DIR
NAMES pcap.h
HINTS ${PCAP_ROOT_DIR}/include
)
set (HINT_DIR ${PCAP_ROOT_DIR}/lib)
# On x64 windows, we should look also for the .lib at /lib/x64/
# as this is the default path for the WinPcap developer's pack
if (${CMAKE_SIZEOF_VOID_P} EQUAL 8 AND WIN32)
set (HINT_DIR ${PCAP_ROOT_DIR}/lib/x64/ ${HINT_DIR})
endif ()
find_library(PCAP_LIBRARY
NAMES pcap wpcap
HINTS ${HINT_DIR}
)
include(FindPackageHandleStandardArgs)
find_package_handle_standard_args(PCAP DEFAULT_MSG
PCAP_LIBRARY
PCAP_INCLUDE_DIR
)
include(CheckCXXSourceCompiles)
set(CMAKE_REQUIRED_LIBRARIES ${PCAP_LIBRARY})
check_cxx_source_compiles("int main() { return 0; }" PCAP_LINKS_SOLO)
set(CMAKE_REQUIRED_LIBRARIES)
# check if linking against libpcap also needs to link against a thread library
if (NOT PCAP_LINKS_SOLO)
find_package(Threads)
if (THREADS_FOUND)
set(CMAKE_REQUIRED_LIBRARIES ${PCAP_LIBRARY} ${CMAKE_THREAD_LIBS_INIT})
check_cxx_source_compiles("int main() { return 0; }" PCAP_NEEDS_THREADS)
set(CMAKE_REQUIRED_LIBRARIES)
endif (THREADS_FOUND)
if (THREADS_FOUND AND PCAP_NEEDS_THREADS)
set(_tmp ${PCAP_LIBRARY} ${CMAKE_THREAD_LIBS_INIT})
list(REMOVE_DUPLICATES _tmp)
set(PCAP_LIBRARY ${_tmp}
CACHE STRING "Libraries needed to link against libpcap" FORCE)
else (THREADS_FOUND AND PCAP_NEEDS_THREADS)
message(FATAL_ERROR "Couldn't determine how to link against libpcap")
endif (THREADS_FOUND AND PCAP_NEEDS_THREADS)
endif (NOT PCAP_LINKS_SOLO)
include(CheckFunctionExists)
set(CMAKE_REQUIRED_LIBRARIES ${PCAP_LIBRARY})
check_function_exists(pcap_get_pfring_id HAVE_PF_RING)
check_function_exists(pcap_set_immediate_mode HAVE_PCAP_IMMEDIATE_MODE)
check_function_exists(pcap_set_tstamp_precision HAVE_PCAP_TIMESTAMP_PRECISION)
set(CMAKE_REQUIRED_LIBRARIES)
mark_as_advanced(
PCAP_ROOT_DIR
PCAP_INCLUDE_DIR
PCAP_LIBRARY
)
不知道做了什么,突然成功了:
Ubuntu22.04 解决 E: 无法定位软件包 yum_e: 无法定位软件包 libqt6opengl6-dev-
以上没解决
sudo cp -ra /etc/apt/sources.list /etc/apt/sources.list.bak
sudo vi /etc/apt/sources.list
deb http://mirrors.aliyun.com/ubuntu/ focal main restricted universe multiverse
deb-src http://mirrors.aliyun.com/ubuntu/ focal main restricted universe multiverse
deb http://mirrors.aliyun.com/ubuntu/ focal-security main restricted universe multiverse
deb-src http://mirrors.aliyun.com/ubuntu/ focal-security main restricted universe multiverse
deb http://mirrors.aliyun.com/ubuntu/ focal-updates main restricted universe multiverse
deb-src http://mirrors.aliyun.com/ubuntu/ focal-updates main restricted universe multiverse
deb http://mirrors.aliyun.com/ubuntu/ focal-proposed main restricted universe multiverse
deb-src http://mirrors.aliyun.com/ubuntu/ focal-proposed main restricted universe multiverse
deb http://mirrors.aliyun.com/ubuntu/ focal-backports main restricted universe multiverse
deb-src http://mirrors.aliyun.com/ubuntu/ focal-backports main restricted universe multiverse
保存退出
sudo apt-get update
sudo apt-get upgrade
遇到问题:
解决GPG 错误由于没有公钥,无法验证下列签名-
sudo apt-key adv --keyserver keyserver.ubuntu.com --recv-keys xxx
解决后好了
rosdep install --from-paths src --ignore-src -r -y