I want to use [rosbridge](http://wiki.ros.org/rosbridge_suite) on Mac OS X, which depends on [rosauth](http://wiki.ros.org/rosauth), which in turn depends on `libssl-dev`
I've installed `openssl` on OS X via Homebrew, but it's keg-only since Apple uses its own libraries.
Therefore, compilation of `rosauth` fails with:
[ 99%] Building CXX object rosauth/CMakeFiles/ros_mac_authentication_test.dir/test/ros_mac_authentication_test.cpp.o
[ 99%] Building CXX object rosauth/CMakeFiles/ros_mac_authentication.dir/src/ros_mac_authentication.cpp.o
/Users/smaniato/Cornell/Research/Projects/behaviors_ws/src/rosauth/src/ros_mac_authentication.cpp:15:10: fatal error: 'openssl/sha.h' file not found
#include
Homebrew says that I have to manually add the following build variables:
LDFLAGS: -L/usr/local/opt/openssl/lib
CPPFLAGS: -I/usr/local/opt/openssl/include
How do I pass those to `catkin_make`? I tried the following but it didn't work:
catkin_make -D LDFLAGS=-L/usr/local/opt/openssl/lib CPPFLAGS=-I/usr/local/opt/openssl/include
I'm also OK with modifying `CMakeLists.txt`, since I'm building from source. Thanks!
↧
Passing LDFLAGS and CPPFLAGS to catkin_make
↧
How let other catkin packages depend on a library built with ExternalProject_Add(...)?
Hi,
I encountered difficulties wrapping an external driver into a catkin package such that other catkin packages can depend on it. The driver is provided by a company as open-source, it builds without cmake, and it is distributed through a public mercurial repository.
To conveniently pull in upstream updates, I wanted to have the build process checkout and build a specific commit. I know this is discouraged behavior for releasing ROS packages through the build-farm. But for the moment I do not intend to release the package through the build-farm.
I tried using the CMake command **ExternalProject_Add** because of the following question:
http://answers.ros.org/question/63259/using-externalproject_add-with-catkin/
**Building the driver library works fine, but any depending catkin package is not aware of the build target for the library. Does anybody know how to properly expose the library and the build target itself to other catkin packages?**
Here are the details. In my package ```igh_eml``` I successfully build a library called ```ethercat```. ```igh_eml```'s CMakeLists.txt looks like this:
project(igh_eml)
find_package(catkin REQUIRED)
catkin_package(
INCLUDE_DIRS ${CATKIN_DEVEL_PREFIX}/include
LIBRARIES ethercat)
include(ExternalProject)
ExternalProject_Add(upstream_igh_eml
# #--Download step----------
HG_REPOSITORY http://hg.code.sf.net/p/etherlabmaster/code # URL of mercurial repo
HG_TAG 792892ab4806 # Mercurial branch name, commit id or tag
TIMEOUT 30 # Time allowed for file download operations
# #--Update/Patch step----------
UPDATE_COMMAND touch /config.h COMMAND mkdir -p /include /lib # Source work-tree update command
# #--Configure step-------------
CONFIGURE_COMMAND touch /ChangeLog COMMAND autoreconf -i COMMAND /configure --prefix= --disable-kernel --enable-hrtimer --enable-tool # Build tree configuration command
# #--Build step-----------------
BUILD_IN_SOURCE 1 # Use source dir for build dir
)
ExternalProject_Get_Property(upstream_igh_eml source_dir)
add_custom_command(TARGET upstream_igh_eml POST_BUILD
COMMAND cp
${source_dir}/../../include/ecrt.h
${CATKIN_DEVEL_PREFIX}/include/
)
add_custom_command(TARGET upstream_igh_eml POST_BUILD
COMMAND cp
${source_dir}/../../include/ectty.h
${CATKIN_DEVEL_PREFIX}/include
)
add_custom_command(TARGET upstream_igh_eml POST_BUILD
COMMAND cp
${source_dir}/../../lib/libethercat.so
${CATKIN_DEVEL_PREFIX}/lib
)
Here is a link to the actual file:
https://github.com/code-iai/iai_robot_drivers/blob/master/igh_eml/CMakeLists.txt
My second package ```omnidriver_ethercat``` depends on ```igh_eml``` on gives this error:
CMake Error at /home/georg/ros/indigo/boxy_refactoring/devel/share/igh_eml/cmake/igh_emlConfig.cmake:141 (message):
Project 'omni_ethercat' tried to find library 'ethercat'. The library is
neither a target nor built/installed properly. Did you compile project
'igh_eml'? Did you find_package() it before the subdirectory containing its
code is included?
Here is a link to CMakeLists of ```omnidrive_ethercat```:
https://github.com/code-iai/iai_robot_drivers/blob/master/omni_ethercat%2FCMakeLists.txt
**Does anybody know how I declare that the library ```ethercat``` will be build through ```ExternalProject_Add```? Furthermore, how can I make other catkin packages wait for that build target to finish? Thanks in advance for any help!**
↧
↧
Building a Pure CMake project with Catkin
We want to build a pure CMake project in our catkin workspace, but we want it to be built with non default options.
Are there examples on how to do this or best practices to do this?
At first, I was imagining that you could add the CMake arguments to the package.xml that needs to be created for the package, but this doesn't look to be the case. Is there an example on how to do this, documentation seems to really be lacking for using catkin with pure cmake projects beyond stating that it is supported.
↧
Add library
hi,
i want to add a library to my package, i create a folder lib contain my libraries, but i dont know how to modify CMakeList.txt.
can you help me please?
↧
The specified base path "/home/cdslab/catkin_ws" contains a CMakeLists.txt but "catkin_make" must be invoked in the root of workspace. This is the error I am seeing in my terminal.
I have initialized the workspace in src. And my current catkin_ws has a src folder and a cmakeLists.txt shortcut. I have followed the tutorials , still it shows me an error!Please can someone guide me regarding this? thank you!
↧
↧
catkin_make failed
I recently installed ROS indigo and following the tutorial to get to know ROS. However, error occurred after `catkin_make`. I have also included the log files. Please help me out let me know how to fix this!! Appreciate it!!
----------
The error:
Base path: /home/ciara/catkin_ws
Source space: /home/ciara/catkin_ws/src
Build space: /home/ciara/catkin_ws/build
Devel space: /home/ciara/catkin_ws/devel
Install space: /home/ciara/catkin_ws/install
####
#### Running command: "make cmake_check_build_system" in "/home/ciara/catkin_ws/build"
####
-- Using CATKIN_DEVEL_PREFIX: /home/ciara/catkin_ws/devel
-- Using CMAKE_PREFIX_PATH: /opt/ros/indigo
-- This workspace overlays: /opt/ros/indigo
-- Using PYTHON_EXECUTABLE: /usr/bin/python
-- Using Debian Python package layout
-- Using empy: /usr/bin/empy
-- Using CATKIN_ENABLE_TESTING: ON
-- Call enable_testing()
-- Using CATKIN_TEST_RESULTS_DIR: /home/ciara/catkin_ws/build/test_results
-- Found gtest sources under '/usr/src/gtest': gtests will be built
-- Using Python nosetests: /usr/bin/nosetests-2.7
-- catkin 0.6.18
-- BUILD_SHARED_LIBS is on
-- ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
-- ~~ traversing 1 packages in topological order:
-- ~~ - beginner_tutorials
-- ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
-- +++ processing catkin package: 'beginner_tutorials'
-- ==> add_subdirectory(beginner_tutorials)
-- Using these message generators: gencpp;genlisp;genpy
CMake Error at /opt/ros/indigo/share/genmsg/cmake/genmsg-extras.cmake:94 (message):
add_message_files() directory not found:
/home/ciara/catkin_ws/src/beginner_tutorials/msg
Call Stack (most recent call first):
beginner_tutorials/CMakeLists.txt:13 (add_message_files)
-- Configuring incomplete, errors occurred!
See also "/home/ciara/catkin_ws/build/CMakeFiles/CMakeOutput.log".
See also "/home/ciara/catkin_ws/build/CMakeFiles/CMakeError.log".
make: *** [cmake_check_build_system] Error 1
Invoking "make cmake_check_build_system" failed
Base path: /home/ciara/catkin_ws
Source space: /home/ciara/catkin_ws/src
Build space: /home/ciara/catkin_ws/build
Devel space: /home/ciara/catkin_ws/devel
Install space: /home/ciara/catkin_ws/install
####
#### Running command: "make cmake_check_build_system" in "/home/ciara/catkin_ws/build"
####
-- Using CATKIN_DEVEL_PREFIX: /home/ciara/catkin_ws/devel
-- Using CMAKE_PREFIX_PATH: /opt/ros/indigo
-- This workspace overlays: /opt/ros/indigo
-- Using PYTHON_EXECUTABLE: /usr/bin/python
-- Using Debian Python package layout
-- Using empy: /usr/bin/empy
-- Using CATKIN_ENABLE_TESTING: ON
-- Call enable_testing()
-- Using CATKIN_TEST_RESULTS_DIR: /home/ciara/catkin_ws/build/test_results
-- Found gtest sources under '/usr/src/gtest': gtests will be built
-- Using Python nosetests: /usr/bin/nosetests-2.7
-- catkin 0.6.18
-- BUILD_SHARED_LIBS is on
-- ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
-- ~~ traversing 1 packages in topological order:
-- ~~ - beginner_tutorials
-- ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
-- +++ processing catkin package: 'beginner_tutorials'
-- ==> add_subdirectory(beginner_tutorials)
-- Using these message generators: gencpp;genlisp;genpy
CMake Error at /opt/ros/indigo/share/genmsg/cmake/genmsg-extras.cmake:94 (message):
add_message_files() directory not found:
/home/ciara/catkin_ws/src/beginner_tutorials/msg
Call Stack (most recent call first):
beginner_tutorials/CMakeLists.txt:13 (add_message_files)
-- Configuring incomplete, errors occurred!
See also "/home/ciara/catkin_ws/build/CMakeFiles/CMakeOutput.log".
See also "/home/ciara/catkin_ws/build/CMakeFiles/CMakeError.log".
make: *** [cmake_check_build_system] Error 1
Invoking "make cmake_check_build_system" failed
----------
My CMakelists.txt:
cmake_minimum_required(VERSION 2.8.3)
project(beginner_tutorials)
# Find catkin and any catkin packages
find_package(catkin REQUIRED COMPONENTS
roscpp
rospy
std_msgs
genmsg
)
## Declare ROS messages and services
add_message_files(DIRECTORY msg FILES Num.msg)
add_service_files(DIRECTORY srv FILES AddTwoInts.srv)
## Generate added messages and services with any dependencies listed here
generate_messages(
DEPENDENCIES
std_msgs
)
catkin_package()
include_directories(include ${catkin_INCLUDE_DIRS})
add_executable(talker src/talker.cpp)
target_link_libraries(talker ${catkin_LIBRARIES})
add_dependencies(talker beginner_tutorials_generate_messages_cpp)
add_executable(listener src/listener.cpp)
target_link_libraries(listener ${catkin_LIBRARIES})
add_dependencies(listener beginner_tutorials_generate_messages_cpp)
----------
CMakeError.log:
Determining if the pthread_create exist failed with the following output:
Change Dir: /home/ciara/catkin_ws/build/CMakeFiles/CMakeTmp
Run Build Command:/usr/bin/make "cmTryCompileExec917054501/fast"
/usr/bin/make -f CMakeFiles/cmTryCompileExec917054501.dir/build.make CMakeFiles/cmTryCompileExec917054501.dir/build
make[1]: Entering directory `/home/ciara/catkin_ws/build/CMakeFiles/CMakeTmp'
/usr/bin/cmake -E cmake_progress_report /home/ciara/catkin_ws/build/CMakeFiles/CMakeTmp/CMakeFiles 1
Building C object CMakeFiles/cmTryCompileExec917054501.dir/CheckSymbolExists.c.o
/usr/bin/cc -o CMakeFiles/cmTryCompileExec917054501.dir/CheckSymbolExists.c.o -c /home/ciara/catkin_ws/build/CMakeFiles/CMakeTmp/CheckSymbolExists.c
Linking C executable cmTryCompileExec917054501
/usr/bin/cmake -E cmake_link_script CMakeFiles/cmTryCompileExec917054501.dir/link.txt --verbose=1
/usr/bin/cc CMakeFiles/cmTryCompileExec917054501.dir/CheckSymbolExists.c.o -o cmTryCompileExec917054501 -rdynamic
CMakeFiles/cmTryCompileExec917054501.dir/CheckSymbolExists.c.o: In function `main':
CheckSymbolExists.c:(.text+0x16): undefined reference to `pthread_create'
collect2: error: ld returned 1 exit status
make[1]: *** [cmTryCompileExec917054501] Error 1
make[1]: Leaving directory `/home/ciara/catkin_ws/build/CMakeFiles/CMakeTmp'
make: *** [cmTryCompileExec917054501/fast] Error 2
File /home/ciara/catkin_ws/build/CMakeFiles/CMakeTmp/CheckSymbolExists.c:
/* */
#include
int main(int argc, char** argv)
{
(void)argv;
#ifndef pthread_create
return ((int*)(&pthread_create))[argc];
#else
(void)argc;
return 0;
#endif
}
Determining if the function pthread_create exists in the pthreads failed with the following output:
Change Dir: /home/ciara/catkin_ws/build/CMakeFiles/CMakeTmp
Run Build Command:/usr/bin/make "cmTryCompileExec2346830332/fast"
/usr/bin/make -f CMakeFiles/cmTryCompileExec2346830332.dir/build.make CMakeFiles/cmTryCompileExec2346830332.dir/build
make[1]: Entering directory `/home/ciara/catkin_ws/build/CMakeFiles/CMakeTmp'
/usr/bin/cmake -E cmake_progress_report /home/ciara/catkin_ws/build/CMakeFiles/CMakeTmp/CMakeFiles 1
Building C object CMakeFiles/cmTryCompileExec2346830332.dir/CheckFunctionExists.c.o
/usr/bin/cc -DCHECK_FUNCTION_EXISTS=pthread_create -o CMakeFiles/cmTryCompileExec2346830332.dir/CheckFunctionExists.c.o -c /usr/share/cmake-2.8/Modules/CheckFunctionExists.c
Linking C executable cmTryCompileExec2346830332
/usr/bin/cmake -E cmake_link_script CMakeFiles/cmTryCompileExec2346830332.dir/link.txt --verbose=1
/usr/bin/cc -DCHECK_FUNCTION_EXISTS=pthread_create CMakeFiles/cmTryCompileExec2346830332.dir/CheckFunctionExists.c.o -o cmTryCompileExec2346830332 -rdynamic -lpthreads
/usr/bin/ld: cannot find -lpthreads
collect2: error: ld returned 1 exit status
make[1]: *** [cmTryCompileExec2346830332] Error 1
make[1]: Leaving directory `/home/ciara/catkin_ws/build/CMakeFiles/CMakeTmp'
make: *** [cmTryCompileExec2346830332/fast] Error 2
----------
Environment variable:
ROS_ROOT=/opt/ros/indigo/share/ros
ROS_PACKAGE_PATH=/opt/ros/indigo/share:/opt/ros/indigo/stacks
ROS_MASTER_URI=http://localhost:11311
ROS_HOSTNAME=localhost
ROSLISP_PACKAGE_DIRECTORIES=
ROS_DISTRO=indigo
ROS_ETC_DIR=/opt/ros/indigo/etc/ros
↧
how to use matlab shared library in visual studio 2010 and cmake ?
Hello,
I work in my project intitled "Automatic brain tumor segmentation". I use the visual studio c++ 2010, cmake, Qt, itk and vtk libraries. I have a matlab code doing a party of my project and I want to use it in visual studio. So I generate a shared library with matlab command " mcc -v -W cpplib:libSymDemo -T link:lib SymDemo" and many files (libSymDemo.cpp, libSymDemo.h, libSymDemo.lib and libSymDemo.dll). So how to link this library to my project ?? I must change the CMakeLists.txt file ??
Please can you help me ?
Cordially
↧
why "gtest" in ros giving CMake Error when i compile the code?
i am running a simple gtest, when i compile my package with catkin_make, i am getting below error. Can anyone help to resolve this?
CMake Error at /opt/ros/indigo/share/catkin/cmake/test/gtest.cmake:71 (message):
catkin_add_executable_with_gtest() must be called after catkin_package() so
that default output directories for the executables are defined
Call Stack (most recent call first):
/opt/ros/indigo/share/catkin/cmake/test/gtest.cmake:34 (catkin_add_executable_with_gtest)
ros_gtest/CMakeLists.txt:26 (catkin_add_gtest)
i followed this link http://ysonggit.github.io/coding/2014/12/19/use-gtest-in-ros-program.html
↧
Hector Nav Msgs build error - in Eclipse
I am new to ROS, and Linux, but have experience with Eclipse in windows environment.
I have a few nodes (including Hector SLAM catkin) all functioning using ROS_MAKE and ROSRUN from the terminal. I know the code is OK.
Now working to setup eclipse, and am to the point where the nodes will compile in Eclipse so I have worked out the obvious dependencies issue that plague many people including myself. (using this page: wiki.ros.org/ODEs#Eclipse)
Error now is that in some of the build files the get_pkg_map is being called but not getting returned and instead generates error that CMAKE_PREFIX_PATH environment variable isn't set. Exact error wording is below.
I have added the CMAKE_PREFIX_PATH environment variable to Eclipse and set it to same value as echo'd by terminal. "/home/linux/catkin_ws/devel:/opt/ros/jade"
Can you point me towards what I am missing? I apologize if this belongs in an Eclipse forum but the files generating the errors are part of ROS so thought better to start here. Appreciate any help you can provide.
[ 24%] Generating EusLisp manifest code for hector_nav_msgs
cd /home/linux/catkin_ws/build/hector_slam-catkin/hector_nav_msgs && ../../catkin_generated/env_cached.sh /usr/bin/python /opt/ros/jade/share/geneus/cmake/../../../lib/geneus/gen_eus.py -m -o /home/linux/catkin_ws/devel/share/roseus/ros/hector_nav_msgs hector_nav_msgs nav_msgs std_msgs
Traceback (most recent call last):
ERROR: Neither the environment variable CMAKE_PREFIX_PATH is set nor was a list of paths passed.
File "/opt/ros/jade/lib/python2.7/dist-packages/geneus/geneus_main.py", line 133, in genmain
pkg_map = get_pkg_map()
File "/opt/ros/jade/lib/python2.7/dist-packages/geneus/geneus_main.py", line 55, in get_pkg_map
for ws in workspaces.get_spaces():
File "/usr/lib/python2.7/dist-packages/catkin_pkg/workspaces.py", line 52, in get_spaces
raise RuntimeError('Neither the environment variable CMAKE_PREFIX_PATH is set nor was a list of paths passed.')
RuntimeError: Neither the environment variable CMAKE_PREFIX_PATH is set nor was a list of paths passed.
make[2]: Leaving directory `/home/linux/catkin_ws/build'
make[2]: *** [/home/linux/catkin_ws/devel/share/roseus/ros/hector_nav_msgs/manifest.l] Error 3
make[1]: Leaving directory `/home/linux/catkin_ws/build'
make[1]: *** [hector_slam-catkin/hector_nav_msgs/CMakeFiles/hector_nav_msgs_generate_messages_eus.dir/all] Error 2
make: *** [all] Error 2
UPADTED: Forgot the setup info. This is on Ubuntu 14.04, ROS JADE, Mars2 Eclipse Linux 32 bit
↧
↧
How to link opencv to ROS indigo (catkin) with CMake (ubuntu 14.04)?
Am so far not able to use cv_bridge. Am getting this compilation error
Make Error at /opt/ros/indigo/share/cv_bridge/cmake/cv_bridgeConfig.cmake:106 (message):
Project 'cv_bridge' specifies '/usr/include/opencv' as an include dir,
which is not found. It does neither exist as an absolute directory nor in
'/opt/ros/indigo//usr/include/opencv'. Ask the maintainer ..
May be the problem in my CMake (...?)
cmake_minimum_required(VERSION 2.8.3)
project(XY)
find_package(catkin REQUIRED COMPONENTS
cv_bridge
image_transport
roscpp
rospy
std_msgs
)
#set(OpenCV_DIR "/usr/local/lib/opencv")
find_package(OpenCV REQUIRED core imgproc highgui PATHS /home/polar/soft/lib/opencv/opencv-3.1.0/cmake)
include_directories( ${OpenCV_INCLUDE_DIRS} )
if(OpenCV_FOUND)
# include_directories(${Boost_INCLUDE_DIRS})
message("\n\n OpenCV found!!!! \n\n")
endif()
Any idea on the cause of the problem and how to solve it please? I was using ROS fuerte in the past and never experienced such problems....
↧
Linking opencv with ROS using cmake issue
Am getting this compilation error> ../devel/lib/libXY.so: undefined> reference to `cv::calcOpticalFlowPyrLK
In my CMake
find_package(OpenCV REQUIRED core imgproc highgui videoio PATHS /home/polar/soft/lib/opencv/opencv-3.1.0/cmake)
... then
target_link_libraries(${file2link}
${catkin_LIBRARIES}
${MY_LIB}
${MY_LIB}
${gsl_LIBRARIES}
# ${Boost_PROGRAM_OPTIONS_LIBRARY} ${Boost_REGEX_LIBRARY}
${Boost_LIBRARIES}
${OpenCV_LIB}
${OpenCV_LIBRARIES}
${OpenCV_LIBS}
)
For info, I installled opencv 3.1.0 myself. In XY.h I just call opencv like
#include
#include
#include
#include "opencv2/video/tracking.hpp"
#include "opencv2/imgproc/imgproc.hpp"
#include "opencv2/imgproc/imgproc_c.h"
#include
#include "opencv2/xfeatures2d.hpp"
Any idea on the source of the problem?
↧
Could not find "tf_conversions" package configuration file
Hi,
I was compiling a ROS node in my raspberry pi (fresh install) and there is a cmake error.
I'm using the raspberry in headless mode. The node complied successfully in my computer though.
CMake Error at /opt/ros/indigo/share/catkin/cmake/catkinConfig.cmake:83 (find_package) :
Could not find a package configuration file provided by "tf_conversions" with any of the following names:
tf_conversionsConfig.cmake
tf_conversions-config.cmake
Call Stack
maven_odo/CMakeLists.tst:4 (find_package)
Thank you for helping
Much appreciated.
James
↧
Could not find a package configuration file provided by "opencv2"
I was following the Converting between ROS images and OpenCV images (Python) tutorial and i came across the following problem while running catkin_make. I am new to ros and i am still finding my way around it. I have installed opencv and have tried out the solutions suggested in other threads, but none of them seem to work. This is the error i get while executing catkin_make.
CMake Error at /opt/ros/indigo/share/catkin/cmake/catkinConfig.cmake:83 (find_package):
Could not find a package configuration file provided by "opencv2" with any
of the following names:
opencv2Config.cmake
opencv2-config.cmake
Add the installation prefix of "opencv2" to CMAKE_PREFIX_PATH or set
"opencv2_DIR" to a directory containing one of the above files. If
"opencv2" provides a separate development package or SDK, be sure it has
been installed.
my CMakeLists file has the following content
cmake_minimum_required(VERSION 2.8.3)
project(opencv_test)
find_package(catkin REQUIRED COMPONENTS
cv_bridge
opencv2
rospy
sensor_msgs
std_msgs
)
find_package(OpenCV)
include_directories(
${catkin_INCLUDE_DIRS}
)
include_directories(${OpenCV_INCLUDE_DIRS})
target_link_libraries(opencv_test ${OpenCV_LIBRARIES})
↧
↧
How to correctly link opencv3 under ROS Indigo?
Am getting this message error
../devel/lib/libirTest.so: undefined reference to `cv::ORB::create(int, float, int, int, int, int, int, int, int)'
../devel/lib/libirTest.so: undefined reference to `cv::calcOpticalFlowPyrLK(cv::_InputArray const&, cv::_InputArray const&, cv::_InputArray const&, cv::_InputOutputArray const&, cv::_OutputArray const&, cv::_OutputArray const&, cv::Size_, int, cv::TermCriteria, int, double)'
However am able to succefully compile outside ROS; that is, using the similar package without ROS.... Here is the CMake file am using
cmake_minimum_required(VERSION 2.8.3)
project(my_test_pkg)
SET(SRC ${CMAKE_CURRENT_SOURCE_DIR}/src)
find_package(catkin REQUIRED COMPONENTS
cv_bridge
image_transport
roscpp
rospy
std_msgs
message_generation
genmsg
)
find_package(nodelet REQUIRED)
################################################
## Declare ROS messages, services and actions ##
################################################
add_message_files(
FILES
velocity_trsl.msg
)
generate_messages(
DEPENDENCIES
std_msgs
)
catkin_package(
CATKIN_DEPENDS message_generation cv_bridge image_transport roscpp rospy std_msgs
)
###########
## Build ##
###########
include_directories(
${catkin_INCLUDE_DIRS}
)
#***********************
#****** GSL
#***********************
find_package( PkgConfig REQUIRED)
pkg_check_modules( gsl REQUIRED gsl )
#***********************
#****** Boost
#***********************
SET (BOOST_DIR "/home/polar/soft/lib/boost/boost_1_61_0")
FIND_PACKAGE(Boost 1.61.0 REQUIRED thread)
if (NOT Boost_FOUND)
message(FATAL_ERROR " Fatal error: Boost (version >= 1.55) required.")
else()
message(STATUS "Setting up BOOST")
message(STATUS " Includes - ${Boost_INCLUDE_DIRS}")
message(STATUS " Library - ${Boost_LIBRARY_DIRS}")
include_directories(${Boost_INCLUDE_DIRS})
link_directories(${Boost_LIBRARY_DIRS})
endif (NOT Boost_FOUND)
#***********************
#****** OpenCV
#***********************
find_package( OpenCV 3.1.0 REQUIRED )
find_package( OpenCV 3.1.0 REQUIRED PATHS /home/polar/soft/lib/opencv/opencv-3.1.0/cmake)
if (NOT OpenCV_FOUND)
message(FATAL_ERROR "*****!!!!! opencv NOT found.")
endif (NOT OpenCV_FOUND)
#****************************************
include_directories(${SRC}/calculus)
SET(MY_LIB
irTest
)
# ALL EXEC FILES...
SET(EXE_TESTER
tester1
)
add_executable(tester1 ${CMAKE_CURRENT_SOURCE_DIR}/exe-main-files-stdl/testdir/tester1.cpp )
SET(FILES_2_RUN
${EXE_TESTER}
)
#--------------------------
foreach(file2link ${FILES_2_RUN})
target_link_libraries(${file2link}
${catkin_LIBRARIES}
${Boost_LIBRARIES}
${gsl_LIBRARIES}
${OpenCV_LIBRARIES}
${OpenCV_LIBS}
${VISP_LIBRARIES}
${MY_LIB}
)
add_dependencies(${file2link} my_test_pkg_generate_messages_cpp)# newlly added for messages!!
endforeach(file2link)
add_subdirectory(src)
Should it be a conflict between the opencv version am using and that (v2.4) used by ROS?
↧
winros_make fails with fatal error
Hello,
I installed winros on Win7 using VisualStudio 2013 (Version 12). I also installed Python and CMake.
I can start ROSCore normally and even the examples, but when i try to run winros_make it fails.
In order to run ROS with overlay I created a workspace and added the Universal-Robot-package (link:[universal-robot](https://github.com/ros-industrial/universal_robot)) to the src folder using wstool (link:[win_ros/hydro/Msvc Overlays ](http://wiki.ros.org/win_ros/hydro/Msvc%20Overlays)).
When i run winros_make it fails displaying following message:
CMake Error at C:/opt/ros-vc12/hydro/x86/share/catkin/cmake/catkinConfig.cmake:72 (find_package):
Could not find a package configuration file provided by "dynamic_reconfigure" with any of the following names:
dynamic_reconfigureConfig.cmake
dynamic_reconfiguration-config.cmake
Add the installation prefix of "dynamic_reconfigure" to CMAKE_PREFIX_PATH of set "dynamic_reconfiguration_DIR" to a directory containing one of the above files. If "dynamic_reconfiguration" provides a seperate development package or SDK, be sure it has been installed.
Call Stack (most recent call first):
universal_robot/ur_driver/CMakeLists.txt:7 (find_package)
-- Configuring incomplete, errors occured!
See also "C:ws/ws/overlay/build/CMakeFiles/CMakeOutput.log".
Executing nmake in the root build directory
Microsoft (R) Program Meintenance Utility Version 12.00.21005.1
Copyright (C) Microsoft Corporation. All rights reserved.
NMAKE: fatal error U1064: MAKEFILE not found and no target specified
Stop.
This is the CMakeOutput.log-file:
The system is: Windows - 6.1.7601 - AMD64
Compiling the C compiler identification source file "CMakeCCompilerId.c" succeeded.
Compiler: C:/Program Files (x86)/Microsoft Visual Studio 12.0/VC/bin/cl.exe
Build flags:
Id flags:
The output was:
0
Microsoft (R) C/C++ Optimizing Compiler Version 18.00.31101 for x86
Copyright (C) Microsoft Corporation. All rights reserved.
CMakeCCompilerId.c
Microsoft (R) Incremental Linker Version 12.00.31101.0
Copyright (C) Microsoft Corporation. All rights reserved.
/out:CMakeCCompilerId.exe
CMakeCCompilerId.obj
Compilation of the C compiler identification source "CMakeCCompilerId.c" produced "CMakeCCompilerId.exe"
Compilation of the C compiler identification source "CMakeCCompilerId.c" produced "CMakeCCompilerId.obj"
The C compiler identification is MSVC, found in "C:/ws/overlay/build/CMakeFiles/3.6.0-rc3/CompilerIdC/CMakeCCompilerId.exe"
Compiling the CXX compiler identification source file "CMakeCXXCompilerId.cpp" succeeded.
Compiler: C:/Program Files (x86)/Microsoft Visual Studio 12.0/VC/bin/cl.exe
Build flags:
Id flags:
The output was:
0
Microsoft (R) C/C++ Optimizing Compiler Version 18.00.31101 for x86
Copyright (C) Microsoft Corporation. All rights reserved.
CMakeCXXCompilerId.cpp
Microsoft (R) Incremental Linker Version 12.00.31101.0
Copyright (C) Microsoft Corporation. All rights reserved.
/out:CMakeCXXCompilerId.exe
CMakeCXXCompilerId.obj
Compilation of the CXX compiler identification source "CMakeCXXCompilerId.cpp" produced "CMakeCXXCompilerId.exe"
Compilation of the CXX compiler identification source "CMakeCXXCompilerId.cpp" produced "CMakeCXXCompilerId.obj"
The CXX compiler identification is MSVC, found in "C:/ws/overlay/build/CMakeFiles/3.6.0-rc3/CompilerIdCXX/CMakeCXXCompilerId.exe"
Determining if the C compiler works passed with the following output:
Change Dir: C:/ws/overlay/build/CMakeFiles/CMakeTmp
Run Build Command:"nmake" "/NOLOGO" "cmTC_219c1\fast"
"C:\Program Files (x86)\Microsoft Visual Studio 12.0\VC\BIN\nmake.exe" -f CMakeFiles\cmTC_219c1.dir\build.make /nologo -L CMakeFiles\cmTC_219c1.dir\build
Building C object CMakeFiles/cmTC_219c1.dir/testCCompiler.c.obj
C:\PROGRA~2\MICROS~1.0\VC\bin\cl.exe @C:\Users\ANSYS-~1\AppData\Local\Temp\nmA1CA.tmp
testCCompiler.c
Linking C executable cmTC_219c1.exe
C:\CMake\bin\cmake.exe -E vs_link_exe --intdir=CMakeFiles\cmTC_219c1.dir --manifests -- C:\PROGRA~2\MICROS~1.0\VC\bin\link.exe /nologo @CMakeFiles\cmTC_219c1.dir\objects1.rsp @C:\Users\ANSYS-~1\AppData\Local\Temp\nmA1EA.tmp
Detecting C compiler ABI info compiled with the following output:
Change Dir: C:/ws/overlay/build/CMakeFiles/CMakeTmp
Run Build Command:"nmake" "/NOLOGO" "cmTC_36f32\fast"
"C:\Program Files (x86)\Microsoft Visual Studio 12.0\VC\BIN\nmake.exe" -f CMakeFiles\cmTC_36f32.dir\build.make /nologo -L CMakeFiles\cmTC_36f32.dir\build
Building C object CMakeFiles/cmTC_36f32.dir/CMakeCCompilerABI.c.obj
C:\PROGRA~2\MICROS~1.0\VC\bin\cl.exe @C:\Users\ANSYS-~1\AppData\Local\Temp\nmA36F.tmp
CMakeCCompilerABI.c
Linking C executable cmTC_36f32.exe
C:\CMake\bin\cmake.exe -E vs_link_exe --intdir=CMakeFiles\cmTC_36f32.dir --manifests -- C:\PROGRA~2\MICROS~1.0\VC\bin\link.exe /nologo @CMakeFiles\cmTC_36f32.dir\objects1.rsp @C:\Users\ANSYS-~1\AppData\Local\Temp\nmA380.tmp
Determining if the CXX compiler works passed with the following output:
Change Dir: C:/ws/overlay/build/CMakeFiles/CMakeTmp
Run Build Command:"nmake" "/NOLOGO" "cmTC_7ffce\fast"
"C:\Program Files (x86)\Microsoft Visual Studio 12.0\VC\BIN\nmake.exe" -f CMakeFiles\cmTC_7ffce.dir\build.make /nologo -L CMakeFiles\cmTC_7ffce.dir\build
Building CXX object CMakeFiles/cmTC_7ffce.dir/testCXXCompiler.cxx.obj
C:\PROGRA~2\MICROS~1.0\VC\bin\cl.exe @C:\Users\ANSYS-~1\AppData\Local\Temp\nmA505.tmp
testCXXCompiler.cxx
Linking CXX executable cmTC_7ffce.exe
C:\CMake\bin\cmake.exe -E vs_link_exe --intdir=CMakeFiles\cmTC_7ffce.dir --manifests -- C:\PROGRA~2\MICROS~1.0\VC\bin\link.exe /nologo @CMakeFiles\cmTC_7ffce.dir\objects1.rsp @C:\Users\ANSYS-~1\AppData\Local\Temp\nmA535.tmp
Detecting CXX compiler ABI info compiled with the following output:
Change Dir: C:/ws/overlay/build/CMakeFiles/CMakeTmp
Run Build Command:"nmake" "/NOLOGO" "cmTC_0ddad\fast"
"C:\Program Files (x86)\Microsoft Visual Studio 12.0\VC\BIN\nmake.exe" -f CMakeFiles\cmTC_0ddad.dir\build.make /nologo -L CMakeFiles\cmTC_0ddad.dir\build
Building CXX object CMakeFiles/cmTC_0ddad.dir/CMakeCXXCompilerABI.cpp.obj
C:\PROGRA~2\MICROS~1.0\VC\bin\cl.exe @C:\Users\ANSYS-~1\AppData\Local\Temp\nmA69B.tmp
CMakeCXXCompilerABI.cpp
Linking CXX executable cmTC_0ddad.exe
C:\CMake\bin\cmake.exe -E vs_link_exe --intdir=CMakeFiles\cmTC_0ddad.dir --manifests -- C:\PROGRA~2\MICROS~1.0\VC\bin\link.exe /nologo @CMakeFiles\cmTC_0ddad.dir\objects1.rsp @C:\Users\ANSYS-~1\AppData\Local\Temp\nmA6BB.tmp
Detecting CXX [] compiler features compiled with the following output:
Change Dir: C:/ws/overlay/build/CMakeFiles/CMakeTmp
Run Build Command:"nmake" "/NOLOGO" "cmTC_226c6\fast"
"C:\Program Files (x86)\Microsoft Visual Studio 12.0\VC\BIN\nmake.exe" -f CMakeFiles\cmTC_226c6.dir\build.make /nologo -L CMakeFiles\cmTC_226c6.dir\build
Building CXX object CMakeFiles/cmTC_226c6.dir/feature_tests.cxx.obj
C:\PROGRA~2\MICROS~1.0\VC\bin\cl.exe @C:\Users\ANSYS-~1\AppData\Local\Temp\nmA8FB.tmp
feature_tests.cxx
Linking CXX executable cmTC_226c6.exe
C:\CMake\bin\cmake.exe -E vs_link_exe --intdir=CMakeFiles\cmTC_226c6.dir --manifests -- C:\PROGRA~2\MICROS~1.0\VC\bin\link.exe /nologo @CMakeFiles\cmTC_226c6.dir\objects1.rsp @C:\Users\ANSYS-~1\AppData\Local\Temp\nmA91B.tmp
Feature record: CXX_FEATURE:1cxx_alias_templates
Feature record: CXX_FEATURE:0cxx_alignas
Feature record: CXX_FEATURE:0cxx_alignof
Feature record: CXX_FEATURE:0cxx_attributes
Feature record: CXX_FEATURE:0cxx_attribute_deprecated
Feature record: CXX_FEATURE:1cxx_auto_type
Feature record: CXX_FEATURE:0cxx_binary_literals
Feature record: CXX_FEATURE:0cxx_constexpr
Feature record: CXX_FEATURE:1cxx_contextual_conversions
Feature record: CXX_FEATURE:1cxx_decltype
Feature record: CXX_FEATURE:0cxx_decltype_auto
Feature record: CXX_FEATURE:1cxx_default_function_template_args
Feature record: CXX_FEATURE:1cxx_defaulted_functions
Feature record: CXX_FEATURE:0cxx_defaulted_move_initializers
Feature record: CXX_FEATURE:1cxx_delegating_constructors
Feature record: CXX_FEATURE:0cxx_deleted_functions
Feature record: CXX_FEATURE:0cxx_digit_separators
Feature record: CXX_FEATURE:1cxx_enum_forward_declarations
Feature record: CXX_FEATURE:1cxx_explicit_conversions
Feature record: CXX_FEATURE:1cxx_extended_friend_declarations
Feature record: CXX_FEATURE:1cxx_extern_templates
Feature record: CXX_FEATURE:1cxx_final
Feature record: CXX_FEATURE:0cxx_func_identifier
Feature record: CXX_FEATURE:1cxx_generalized_initializers
Feature record: CXX_FEATURE:0cxx_generic_lambdas
Feature record: CXX_FEATURE:0cxx_inheriting_constructors
Feature record: CXX_FEATURE:0cxx_inline_namespaces
Feature record: CXX_FEATURE:1cxx_lambdas
Feature record: CXX_FEATURE:0cxx_lambda_init_captures
Feature record: CXX_FEATURE:1cxx_local_type_template_args
Feature record: CXX_FEATURE:1cxx_long_long_type
Feature record: CXX_FEATURE:0cxx_noexcept
Feature record: CXX_FEATURE:0cxx_nonstatic_member_init
Feature record: CXX_FEATURE:1cxx_nullptr
Feature record: CXX_FEATURE:1cxx_override
Feature record: CXX_FEATURE:1cxx_range_for
Feature record: CXX_FEATURE:1cxx_raw_string_literals
Feature record: CXX_FEATURE:0cxx_reference_qualified_functions
Feature record: CXX_FEATURE:0cxx_return_type_deduction
Feature record: CXX_FEATURE:1cxx_right_angle_brackets
Feature record: CXX_FEATURE:1cxx_rvalue_references
Feature record: CXX_FEATURE:0cxx_sizeof_member
Feature record: CXX_FEATURE:1cxx_static_assert
Feature record: CXX_FEATURE:1cxx_strong_enums
Feature record: CXX_FEATURE:1cxx_template_template_parameters
Feature record: CXX_FEATURE:0cxx_thread_local
Feature record: CXX_FEATURE:1cxx_trailing_return_types
Feature record: CXX_FEATURE:0cxx_unicode_literals
Feature record: CXX_FEATURE:1cxx_uniform_initialization
Feature record: CXX_FEATURE:0cxx_unrestricted_unions
Feature record: CXX_FEATURE:0cxx_user_literals
Feature record: CXX_FEATURE:0cxx_variable_templates
Feature record: CXX_FEATURE:1cxx_variadic_macros
Feature record: CXX_FEATURE:1cxx_variadic_templates
I hope someone can help me.
Best regards
J_Schaefer
↧
Uknown CMake Command "catkin_package"
This CMakeLists.txt File
cmake_minimum_required(VERSION 2.8)
project(ardrone_tutorials)
find_package(catkin REQUIRED)
catkin_package()
install(PROGRAMS
src/drone_controller.py
src/drone_status.py
src/drone_video_display.py
src/joystick_controller.py
src/keyboard_controller.py
DESTINATION ${CATKIN_PACKAGE_BIN_DESTINATION} )
install(DIRECTORY launch/
DESTINATION
${CATKIN_PACKAGE_SHARE_DESTINATION}/launch
)
Gives the results
rosmake starting...
[ rosmake ] Packages requested are:
['ardrone_tutorials']
[ rosmake ] Logging to directory
/home/ardrone/.ros/rosmake/rosmake_output-20160628-151821
[ rosmake ] Expanded args
['ardrone_tutorials'] to:
['ardrone_tutorials']
[rosmake-0] Starting >>> roslang [
make ]
[rosmake-0] Finished <<< roslang No
Makefile in package roslang
[rosmake-0] Starting >>> roscpp [ make
]
[rosmake-0] Finished <<< roscpp No
Makefile in package roscpp
[rosmake-0] Starting >>> geometry_msgs
[ make ]
[rosmake-0] Finished <<< geometry_msgs
No Makefile in package geometry_msgs
[rosmake-0] Starting >>> sensor_msgs [
make ]
[rosmake-0] Finished <<< sensor_msgs
No Makefile in package sensor_msgs
[rosmake-0] Starting >>> rosbuild [
make ]
[rosmake-0] Finished <<< rosbuild No
Makefile in package rosbuild
[rosmake-0] Starting >>> roslib [ make
]
[rosmake-0] Finished <<< roslib No
Makefile in package roslib
[rosmake-0] Starting >>> rosconsole [
make ]
[rosmake-0] Finished <<< rosconsole
No Makefile in package rosconsole
[rosmake-0] Starting >>> pluginlib [
make ]
[rosmake-0] Finished <<< pluginlib
ROS_NOBUILD in package pluginlib
[rosmake-0] Starting >>>
message_filters [ make ]
[rosmake-0] Finished <<<
message_filters No Makefile in
package message_filters [rosmake-0]
Starting >>> image_transport [ make ]
[rosmake-0] Finished <<<
image_transport ROS_NOBUILD in package
image_transport [rosmake-0] Starting
>>> std_srvs [ make ] [rosmake-0] Finished <<< std_srvs No
Makefile in package std_srvs
[rosmake-0] Starting >>> bullet [ make
]
[rosmake-0] Finished <<< bullet
ROS_NOBUILD in package bullet
[rosmake-0] Starting >>> angles [ make
]
[rosmake-0] Finished <<< angles
ROS_NOBUILD in package angles
[rosmake-0] Starting >>> rospy [ make
]
[rosmake-0] Finished <<< rospy No
Makefile in package rospy
[rosmake-0] Starting >>> rostest [
make ]
[rosmake-0] Finished <<< rostest No
Makefile in package rostest
[rosmake-0] Starting >>> roswtf [ make
]
[rosmake-0] Finished <<< roswtf No
Makefile in package roswtf
[rosmake-0] Starting >>> tf [ make ]
[rosmake-0] Finished <<< tf
ROS_NOBUILD in package tf
[rosmake-0] Starting >>>
common_rosdeps [ make ]
[rosmake-0] Finished <<<
common_rosdeps ROS_NOBUILD in package
common_rosdeps [rosmake-0] Starting
>>> camera_calibration_parsers [ make ] [rosmake-0]
Finished <<<
camera_calibration_parsers ROS_NOBUILD
in package camera_calibration_parsers
[rosmake-0] Starting >>>
camera_info_manager [ make ]
[rosmake-0] Finished <<<
camera_info_manager ROS_NOBUILD in
package camera_info_manager
[rosmake-0] Starting >>>
ardrone_autonomy [ make ]
[rosmake-0] Finished <<<
ardrone_autonomy [PASS] [ 4.55 seconds
] [rosmake-0] Starting
>>> diagnostic_msgs [ make ] [rosmake-0] Finished <<<
diagnostic_msgs No Makefile in
package diagnostic_msgs [rosmake-0]
Starting >>> std_msgs [ make ]
[rosmake-0] Finished <<< std_msgs No
Makefile in package std_msgs
[rosmake-0] Starting >>>
diagnostic_updater [ make ]
[rosmake-0] Finished <<<
diagnostic_updater ROS_NOBUILD in
package diagnostic_updater [rosmake-0]
Starting >>> rosbag [ make ]
[rosmake-0] Finished <<< rosbag No
Makefile in package rosbag
[rosmake-0] Starting >>> joy [ make ]
[rosmake-0] Finished <<< joy
ROS_NOBUILD in package joy
[rosmake-0] Starting >>>
ardrone_tutorials [ make ]
[ rosmake ] All 9
linesardrone_tutorials: 0.2 sec ] [ 1
Active 26/27 Complete ]
{------------------------------------------------------------------------------- mkdir -p bin cd build && cmake -Wdev
-DCMAKE_TOOLCHAIN_FILE=`rospack find rosbuild`/rostoolchain.cmake ..
TODO: implement add_roslaunch_check()
in rostest-extras.cmake. CMake Error
at CMakeLists.txt:5 (catkin_package):
Unknown CMake command "catkin_package".
-- Configuring incomplete, errors occurred!
-------------------------------------------------------------------------------} [ rosmake ] Output from build of
package ardrone_tutorials written to:
[ rosmake ]
/home/ardrone/.ros/rosmake/rosmake_output-20160628-151821/ardrone_tutorials/build_output.log
[rosmake-0] Finished <<<
ardrone_tutorials [FAIL] [ 0.25
seconds ] [ rosmake ]
Halting due to failure in package
ardrone_tutorials. [ rosmake ]
Waiting for other threads to complete.
[ rosmake ] Results:
[ rosmake ] Built 27 packages with 1
failures.
[ rosmake ] Summary output to
directory
[ rosmake ]
/home/ardrone/.ros/rosmake/rosmake_output-20160628-151821
Any idea why the CMake Error happens? The find_package(catkin) was in the line before catkin_package(), so I don't know waht else is needed. The catkin package is also under the share folder in the opt/ros/fuerte directory.
↧
building from source producing RT_LIBRARY-NOTFOUND (diagnostics pacakge)
I am trying to build ROS from sources and I am following http://wiki.ros.org/kinetic/Installation/Source for the same but cmake is returning an error ,for the complete error please have a look at https://paste.kde.org/pziwmekkj .
I have installed it successfully from http://wiki.ros.org/kinetic/Installation/Ubuntu .I hope this is not interfering with building process.
↧
↧
Is there a simple way to find ROS headers in CMake without catkin?
I am building an external library that will be linked in as part of a ros package, but is built outside of Catkin.
I'd like to use some of the ROS messages (e.g. ROS_INFO, ROS_DEBUG) inside this library for debugging.
I have manually modified the CMake to `include_directories( /opt/ros/kinetic/include/)`
and the code works as I want.
I'd like to do something like:
find_package( roscpp )
if (ROSCPP_FOUND)
include_directories(${ROSCPP_INCLUDE_DIRS})
...
Unfortunately, CMake can't find roscpp without all of the catkin magic.
I don't want to find_package(catkin) as it messes with the normal CMake build setup for the library.
One hack I can think of is to check the ROS_ROOT environment variable, and if it exists, make the include relative to that.
But that is a hack that I'd prefer to avoid.
Is there a clean minimal setup that can discover the ROS include directory with pure CMake?
↧
How can i copy non-binary files into my binaries directory with catkin and cmake?
Hi, I have a benchmarking executable in my project which pulls data from bagfiles. Now I want to copy the folder with my bagfiles into the directory where my binaries end up, because I have hardcoded paths to them in my code. I already tried to copy the folder with my bagfiles by adding this line to my `CMakeLists.txt`:
file(COPY src/benchmarking/bagfiles DESTINATION ${CMAKE_BINARY_DIR})
Unfortunately the variable `CMAKE_BINARY_DIR` only contains the absolute path to my source directory. Is there a variable that points to the binaries directory?
↧
How to enter compiler flags into CMakeLists
When I compile my ROS code, I'm getting a ton of warnings like:
warning: extended initializer lists only available with -std=c++11 or -std=gnu++11
According to this [SO question](http://stackoverflow.com/questions/24469529/warning-non-static-data-member-initializers-only-available-with-std-c11-or) I need to add `-std=c++0x` to my compiler's flags.
I see in my auto-generated CMakeLists.txt, there's already the commented-out option:
#set(CMAKE_C_FLAGS "-std=gnu99 ${CMAKE_C_FLAGS}")
so I changed that to:
set(CMAKE_C_FLAGS "-std=c++0x ${CMAKE_C_FLAGS}")
However, when I re-run `catkin_make --pkg mypackage` I still see these warnings. I tried the other flags suggested in the SO question, but the output is the same. Why is CMake ignoring CMAKE_C_FLAGS?
↧