- html - 出于某种原因,IE8 对我的 Sass 文件中继承的 html5 CSS 不友好?
- JMeter 在响应断言中使用 span 标签的问题
- html - 在 :hover and :active? 上具有不同效果的 CSS 动画
- html - 相对于居中的 html 内容固定的 CSS 重复背景?
我想在 catkin 工作区中构建我的项目。执行 catkin_make 后我得到了这些错误:
6:11: error: ‘vector’ is not a member of ‘cv’
cv::vector<cv::Point> points;
6:31: error: expected primary-expression before ‘>’ token
cv::vector<cv::Point> points;
9:77: error: no matching function for call to ‘std::vector<Eigen::Matrix<double, 3, 1>, Eigen::aligned_allocator<Eigen::Matrix<double, 3, 1> > >::push_back(cv::Point)’
/catkin_ws/src/rgbd_calibration/src/rgbd_calibration/calibration_test.cpp:1123:113: error: no matching function for call to ‘fillConvexPoly(cv::Mat&, std::vector<Eigen::Matrix<double, 3, 1>, Eigen::aligned_allocator<Eigen::Matrix<double, 3, 1> > >&, cv::Scalar)’
cv::fillConvexPoly(tmp_image, points, cv::Scalar(c == 0 ? 128 : 0, c == 1 ? 128 : 0, c == 2 ? 128 : 0));
^
在/opt/ros/kinetic/include/opencv-3.3.1-dev/opencv2/imgproc/imgproc.hpp:48:0 包含的文件中, 来自/opt/ros/kinetic/include/image_geometry/pinhole_camera_model.h:6,
我已经构建了 opencv 3.3.0,它还找到了`/opt/ros/kinetic/include/opencv-3.3.1-dev/opencv2/imgproc/imgproc.hpp:48:0,
我怀疑某些事情与 opencv 库有关,但找不到。这是我第一次尝试使用 ROS,所以欢迎任何帮助
下面的生成文件:
cmake_minimum_required(VERSION 2.8.3)
project(rgbd_calibration)
set(CMAKE_BUILD_TYPE RelWithDebInfo)
## Find catkin macros and libraries
## if COMPONENTS list like find_package(catkin REQUIRED COMPONENTS xyz)
## is used, also find other catkin packages
find_package(catkin REQUIRED COMPONENTS cmake_modules roscpp calibration_common geometry_msgs kinect
eigen_conversions camera_info_manager cv_bridge pcl_ros
image_transport)# swissranger_camera)
## System dependencies are found with CMake's conventions
# find_package(Boost REQUIRED COMPONENTS system)
find_package(Boost REQUIRED)
find_package(Eigen REQUIRED)
find_package(PCL 1.7 REQUIRED)
find_package(OpenCV REQUIRED)
find_package(OpenMP REQUIRED)
find_package(Ceres REQUIRED)
set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} ${OpenMP_C_FLAGS}")
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} ${OpenMP_CXX_FLAGS}")
set(CMAKE_EXE_LINKER_FLAGS "${CMAKE_EXE_LINKER_FLAGS} ${OpenMP_EXE_LINKER_FLAGS}")
## Uncomment this if the package has a setup.py. This macro ensures
## modules and scripts declared therein get installed
# catkin_python_setup()
#######################################
## Declare ROS messages and services ##
#######################################
## Generate messages in the 'msg' folder
add_message_files(
FILES
Acquisition.msg
)
## Generate services in the 'srv' folder
# add_service_files(
# FILES
# Service1.srv
# Service2.srv
# )
## Generate added messages and services with any dependencies listed here
generate_messages(
DEPENDENCIES
std_msgs
)
###################################################
## Declare things to be passed to other projects ##
###################################################
## LIBRARIES: libraries you create in this project that dependent projects also need
## CATKIN_DEPENDS: catkin_packages dependent projects also need
## DEPENDS: system dependencies of this project that dependent projects also need
catkin_package(
INCLUDE_DIRS include
LIBRARIES interactive_checkerboard_finder rgbd_calibration
CATKIN_DEPENDS roscpp calibration_common geometry_msgs kinect
eigen_conversions camera_info_manager cv_bridge pcl_ros image_transport
DEPENDS eigen3 pcl opencv2
)
###########
## Build ##
###########
## Specify additional locations of header files
include_directories(include
${catkin_INCLUDE_DIRS}
${EIGEN_INCLUDE_DIRS}
${PCL_INCLUDE_DIRS}
${CERES_INCLUDE_DIRS}
)
## Declare a cpp library
add_library(rgbd_calibration
src/rgbd_calibration/calibration.cpp include/rgbd_calibration/calibration.h
include/rgbd_calibration/globals.h
src/rgbd_calibration/depth_undistortion_estimation.cpp include/rgbd_calibration/depth_undistortion_estimation.h
src/rgbd_calibration/checkerboard_views.cpp include/rgbd_calibration/checkerboard_views.h
src/rgbd_calibration/checkerboard_views_extractor.cpp include/rgbd_calibration/checkerboard_views_extractor.h
src/rgbd_calibration/publisher.cpp include/rgbd_calibration/publisher.h
)
add_executable(rgbd_offline_calibration
src/rgbd_calibration/calibration_node.cpp include/rgbd_calibration/calibration_node.h
src/rgbd_calibration/offline_calibration_node.cpp include/rgbd_calibration/offline_calibration_node.h
)
#add_executable(simulation
# src/rgbd_calibration/simulation_node.cpp include/rgbd_calibration/simulation_node.h
#)
add_executable(test_calibration
src/rgbd_calibration/test_node.cpp include/rgbd_calibration/test_node.h
src/rgbd_calibration/calibration_test.cpp include/rgbd_calibration/calibration_test.h
)
add_executable(data_collection
src/rgbd_calibration/data_collection_node.cpp
)
## Add dependencies to the executable
# add_dependencies(calibration_node ${PROJECT_NAME})
## Specify libraries to link a library or executable target against
target_link_libraries(rgbd_calibration
${catkin_LIBRARIES}
${PCL_LIBRARIES}
${OpenCV_LIBS}
${CERES_LIBRARIES}
)
target_link_libraries(rgbd_offline_calibration
rgbd_calibration
${catkin_LIBRARIES}
${PCL_LIBRARIES}
${OpenCV_LIBS}
${CERES_LIBRARIES}
)
#target_link_libraries(simulation
# rgbd_calibration
# ${catkin_LIBRARIES}
# ${PCL_LIBRARIES}
# ${OpenCV_LIBS}
# ${CERES_LIBRARIES}
#)
target_link_libraries(test_calibration
rgbd_calibration
${catkin_LIBRARIES}
${PCL_LIBRARIES}
${OpenCV_LIBS}
${CERES_LIBRARIES}
)
target_link_libraries(data_collection
${catkin_LIBRARIES}
${PCL_LIBRARIES}
${OpenCV_LIBS}
)
#############
## Install ##
#############
## Mark executable scripts (Python etc.) for installation
## not required for python when using catkin_python_setup()
# install(PROGRAMS
# scripts/my_python_script
# DESTINATION ${CATKIN_PACKAGE_BIN_DESTINATION}
# )
## Mark executables and/or libraries for installation
# install(TARGETS calibration calibration_node
# ARCHIVE DESTINATION ${CATKIN_PACKAGE_LIB_DESTINATION}
# LIBRARY DESTINATION ${CATKIN_PACKAGE_LIB_DESTINATION}
# RUNTIME DESTINATION ${CATKIN_PACKAGE_BIN_DESTINATION}
# )
## Mark cpp header files for installation
# install(DIRECTORY include/${PROJECT_NAME}/
# DESTINATION ${CATKIN_PACKAGE_INCLUDE_DESTINATION}
# FILES_MATCHING PATTERN "*.h"
# PATTERN ".svn" EXCLUDE
# )
## Mark other files for installation (e.g. launch and bag files, etc.)
# install(FILES
# # myfile1
# # myfile2
# DESTINATION ${CATKIN_PACKAGE_SHARE_DESTINATION}
# )
#############
## Testing ##
#############
## Add gtest based cpp test target and link libraries
# catkin_add_gtest(${PROJECT_NAME}-test test/polynomial_undistortion_matrix_multifit_test.cpp)
# if(TARGET ${PROJECT_NAME}-test)
# target_link_libraries(${PROJECT_NAME}-test
# ${catkin_LIBRARIES}
# ${PCL_LIBRARIES}
# ${OpenCV_LIBS}
# ${CERES_LIBRARIES})
# endif()
## Add folders to be run by python nosetests
# catkin_add_nosetests(test)
最佳答案
您需要使用 STL 的 std::vector<>
, CV 没有 vector
实现:
#include <vector>
...
std::vector<cv::Point> points;
...
关于c++ - ROS环境搭建错误(catkin),我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/53760354/
我想在 catkin 工作区中构建我的项目。执行 catkin_make 后我得到了这些错误: 6:11: error: ‘vector’ is not a member of ‘cv’
我正在学习这些教程: ROS installation in Ubuntu Create your ROS workspace . 在步骤 catkin_make 中出现错误: -- The C co
我已经在Ubuntu 14.04.5中安装了ROS indigo和gazebo2软件包。当我尝试使用 catkin 命令时,我得到: catkin_init_workspace:找不到命令 所以,我尝
当catkin build尚未开始实际构建文件时,我中断了(Ctrl+C)它的执行。现在,我无法再次运行它,因为某些文件似乎已损坏。当我在工作区上执行 catkin build 时,出现此错误: $
编译器提示未找到消息 (.../message.h)。请参阅下面我的 CMakeLists.txt cmake_minimum_required(VERSION 2.8.3) project(my_p
我正在尝试用 catkin 构建这个 ROS 包 https://github.com/toddhester/rl-texplore-ros-pkg但它无法构建“rl_experiment”并出现以下
我正在尝试在 ROS 中运行 python 代码,它包含一个我必须 pip 安装的模块(不是为 ROS 制作的模块)。当我尝试在 roscore 运行的情况下在我的 catkin 工作区中运行代码时,
我正在尝试安装roslaunch但它说我需要安装roslib,然后说我需要安装catkin,它说我需要安装python-catkin-pkg。 我先调用source /opt/ros/kinetic/
我想在docker上使用自定义的ros-indigo。我准备了以下Dockerfile FROM ros:indigo-robot RUN echo "source /opt/ros/indigo/s
我创建了一个ros catkin包,并成功导入到QtCreator中。尽管编译没有问题,但我的包的 CMakeLists 文件中提到的 include 目录没有被索引。 可能是什么问题?如果您需要更多
我可以在ROS的catkin工作区中编译安装ROS包。如何将 catkin 工作区中的包导出到 .deb 文件,以便我可以在其他机器上安装和使用它? 我的 ROS 版本是 ROS Indigo,操作系
我正在运行 ROS Indigo。我有一个简单的问题:我的包中有一个实用程序类,我希望可以从我们的脚本中调用它。只需要在我们自己的包内调用即可;我不需要它可用于其他 ROS 包。 我在文件 HandC
目前,我使用以下别名来执行此操作: alias ck='export ck_dir=`pwd` && cd ~/catkin_ws && catkin_make && cd $ck_dir' 这只有在
我刚开始使用 ROS,想将我的文件保存在 github 上。不幸的是创建了一个相当复杂的文件系统。 我如何在 github 上管理我自己编写的代码,因为它非常 stash 在 catkin 工作区中,
我有 Ubuntu 20.04 我刚刚安装了 ROS 有意识的和柳絮。 但是每次我做catkin build我有一个错误列表,无法继续。你们能帮我解决这个问题吗? Traceback (most re
我目前正在尝试使用在 catkin 中声明为 cmake 接口(interface)库的仅包含 c++ header 的库。这个库应该被 catkin_ws/src 中的其他包使用。我能够使用 cat
我使用catkin编译CUDA项目时遇到了一个我认为是链接器错误的问题。下面是源代码的片段。当我尝试运行catkin build时出现错误:error In function `curand_init
我正尝试在 C++ 中运行以下命令: #include #include "pcl/pcl_base.h" #include "pcl/PointIndices.h" #include "pcl/c
我目前无法使用 cv_bridge。我收到这个编译错误 CMake Error at /opt/ros/indigo/share/cv_bridge/cmake/cv_bridgeConfig.cma
我正在尝试使用 publisher-subcriber no 通过从我的网络摄像头流式传输图像来运行我的对象识别程序。在我的程序中,我使用的是 opencv_dnn 库提供的 readNetFromT
我是一名优秀的程序员,十分优秀!