Recently, adding a package to Qt creator as shown in the [IDE wiki](http://wiki.ros.org/IDEs) and compiling it once makes it impossible to install it with catkin_make. I get the following error:
Install the project...
-- Install configuration: ""
CMake Error at cmake_install.cmake:41 (file):
file failed to open for writing (Permission denied):
/usr/local/.catkin
Makefile:115: recipe for target 'install' failed
make: *** [install] Error 1
In the wiki, somebody wrote:
> Recently this has started to fail,
> because the main CMakeLists is a
> symlink to a non writtable location.
> The workaround is to make a copy to
> toplevel.cmake instead of using a
> symlink. And if you want the project
> to be named something else than
> "Project" then add a line at the top
> with "project(MyProjectName)"
What does this mean and how to do it?
Using Ros Kinetic on Ubuntu 16.04
↧
QtCreator breaking my workspace
↧
Crosscompiling ROS into relocatable code
Hi,
I am currently working on cross-compiling the ROS dependencies I need for a project for a Raspberry Pi 3. After a bit of work I got it working. I install to the default location and later build a .deb package which copies the code to /opt/ros/kinetic on the target system.
My problem is that the generated files, specificly the -config.cmake files, contain references to directories in the installation-path. I don't know how to avoid this, since I cannot set the install-path to the correct location (it's not writable for me) so that I need to use an intermediate directory.
I thought about using the DESTDIR environment variable or the CMAKE_STAGIN_PREFIX but I don't know which would be the correct one or whether catkin adheres these variables.
Any help is very welcome!
I crosscompile by simply passing this toolchain file to catkin:
SET(CMAKE_SYSTEM_NAME Linux)
SET(CMAKE_SYSTEM_PROCESSOR armv7l)
SET(CMAKE_C_COMPILER ${RASPI_TOOLCHAIN}/bin/arm-linux-gnueabihf-gcc)
SET(CMAKE_CXX_COMPILER ${RASPI_TOOLCHAIN}/bin/arm-linux-gnueabihf-g++)
SET(CMAKE_FIND_ROOT_PATH ${RASPI_ROOTFS})
SET(CMAKE_FIND_ROOT_PATH_MODE_PROGRAM NEVER)
SET(CMAKE_FIND_ROOT_PATH_MODE_LIBRARY ONLY)
SET(CMAKE_FIND_ROOT_PATH_MODE_INCLUDE ONLY)
set(CMAKE_SYSROOT ${CMAKE_FIND_ROOT_PATH})
# Workarounds:
# Not populated automaticaly
SET(CMAKE_LIBRARY_ARCHITECTURE arm-linux-gnueabihf)
# rootfs/usr/include/arm-linux-gnueabihf not included
INCLUDE_DIRECTORIES(SYSTEM ${CMAKE_FIND_ROOT_PATH}/usr/include/arm-linux-gnueabihf)
# Compilerselftest fails, rootfs/usr/lib/arm-linux-gnueabihf is not linked against, only
# Symlink from rootfs/usr/lib/arm-linux-gnueabihf/4.9.3 to rootfs/usr/lib/arm-linux-gnueabihf
# /usr/lib/arm-linux-gnueabif instead of rootfs/usr/lib/arm-linux-gnueabif is added to the rpath for some packages
# -> happens when sysroot is prefix of runtime-dir: https://github.com/Kitware/CMake/blob/master/Source/cmComputeLinkInformation.cxx#L1753
# rootfs/lib/arm-linux-gnueabihf is not present in the rpath
set(CMAKE_SHARED_LIBRARY_RUNTIME_CXX_FLAG "-Wl,-rpath,${CMAKE_FIND_ROOT_PATH}/lib/arm-linux-gnueabihf:${CMAKE_FIND_ROOT_PATH}/usr/lib/arm-linux-gnueabihf:" CACHE STRING "" FORCE)
set(CMAKE_EXECUTABLE_RUNTIME_CXX_FLAG "-Wl,-rpath,${CMAKE_FIND_ROOT_PATH}/lib/arm-linux-gnueabihf:${CMAKE_FIND_ROOT_PATH}/usr/lib/arm-linux-gnueabihf:" CACHE STRING "" FORCE)
# console_bridge & urdfdom returns /usr/include as _INCLUDE_DIRS (https://github.com/ros/console_bridge/issues/44)
# Use modified find{console_bridge,urdfdom}.cmake (find_path)
# GTest adds host /usr/include to include directories
# remove NO_CMAKE_FIND_ROOT_PATH from find_path calls in src/catkin/cmake/tests/gtest.cmake
# pkg config looks up packages on the hostsystem
set(ENV{PKG_CONFIG_DIR} )
set(ENV{PKG_CONFIG_LIBDIR} "${CMAKE_FIND_ROOT_PATH}/usr/lib/pkgconfig:${CMAKE_FIND_ROOT_PATH}/usr/share/pkgconfig")
set(ENV{PKG_CONFIG_SYSROOT} "${CMAKE_FIND_ROOT_PATH}")
I was thinking about using the DESTDIR environment variable or [CMAKE_STAGING_PREFIX](https://cmake.org/cmake/help/v3.8/variable/CMAKE_STAGING_PREFIX.html#variable:CMAKE_STAGING_PREFIX) to make the generated code relocatable but I am not sure which is the right one to use or whether they work with catkin.
↧
↧
Which library can I access XmlRpcValue.h file?
Hello ROS users,
While installing geometry package for tf, during catkin_make I receive error:
21%] Built target roscpp_generate_messages_cpp
[ 21%] Built target roscpp_generate_messages_py
[ 22%] Built target test_roscpp_generate_messages_eus
[ 25%] Built target test_roscpp_generate_messages_py
[ 27%] Built target test_roscpp_generate_messages_nodejs
[ 30%] Built target test_roscpp_generate_messages_lisp
[ 32%] Built target test_roscpp_generate_messages_cpp
[ 33%] Built target test_rosmaster_generate_messages_cpp
[ 36%] Built target test_rosmaster_generate_messages_lisp
[ 37%] Built target test_rosmaster_generate_messages_nodejs
[ 37%] Built target test_rosservice_generate_messages_lisp
[ 37%] Built target test_rosservice_generate_messages_eus
[ 38%] Built target test_rosmaster_generate_messages_eus
[ 38%] Built target test_rosservice_generate_messages_cpp
[ 38%] Built target test_rosservice_generate_messages_nodejs
[ 40%] Built target topic_tools_generate_messages_cpp
[ 41%] Built target test_rosmaster_generate_messages_py
[ 41%] Built target test_rosservice_generate_messages_py
[ 41%] Built target topic_tools_generate_messages_nodejs
[ 42%] Built target topic_tools_generate_messages_py
[ 43%] Built target topic_tools_generate_messages_lisp
[ 43%] Built target topic_tools_generate_messages_eus
[ 45%] Built target test_rosbag_generate_messages_eus
[ 45%] Built target test_rosbag_generate_messages_nodejs
[ 46%] Built target test_rosbag_generate_messages_lisp
[ 47%] Built target test_rosbag_generate_messages_py
[ 48%] Built target test_rosbag_generate_messages_cpp
[ 50%] Built target test_rostopic_generate_messages_cpp
[ 50%] Built target test_rostopic_generate_messages_nodejs
[ 50%] Built target test_rostopic_generate_messages_eus
[ 51%] Built target test_rostopic_generate_messages_py
[ 52%] Built target test_rostopic_generate_messages_lisp
[ 52%] Built target tf_generate_messages_py
[ 52%] Built target tf_generate_messages_lisp
[ 52%] Built target tf_generate_messages_cpp
[ 53%] Built target tf_generate_messages_eus
[ 53%] Built target tf_generate_messages_nodejs
[ 53%] Built target amcl_sensors
[ 53%] Built target robot_pose_ekf_generate_messages_cpp
[ 53%] Built target robot_pose_ekf_generate_messages_lisp
[ 53%] Built target robot_pose_ekf_generate_messages_py
[ 53%] Built target robot_pose_ekf_generate_messages_nodejs
[ 53%] Built target robot_pose_ekf_generate_messages_eus
[ 53%] Built target hector_mapping_generate_messages_py
[ 53%] Built target hector_mapping_generate_messages_nodejs
[ 53%] Built target hector_mapping_generate_messages_cpp
[ 53%] Built target hector_mapping_generate_messages_lisp
[ 53%] Built target costmap_2d_generate_messages_cpp
[ 53%] Built target hector_mapping_generate_messages_eus
[ 53%] Built target costmap_2d_generate_messages_nodejs
[ 55%] Built target costmap_2d_generate_messages_eus
[ 55%] Built target costmap_2d_generate_messages_py
[ 55%] Built target costmap_2d_generate_messages_lisp
[ 55%] Built target base_local_planner_generate_messages_cpp
[ 55%] Built target base_local_planner_generate_messages_nodejs
[ 55%] Built target base_local_planner_generate_messages_lisp
[ 55%] Built target base_local_planner_generate_messages_eus
[ 55%] Built target base_local_planner_generate_messages_py
[ 55%] Built target navfn_generate_messages_cpp
[ 55%] Built target navfn_generate_messages_nodejs
[ 56%] Built target navfn_generate_messages_py
[ 56%] Built target navfn_generate_messages_eus
[ 57%] Built target rtabmap_ros_generate_messages_lisp
[ 58%] Built target rtabmap_ros_generate_messages_py
[ 58%] Built target navfn_generate_messages_lisp
[ 60%] Built target rtabmap_ros_generate_messages_cpp
[ 61%] Built target rtabmap_ros_generate_messages_eus
[ 61%] Built target scanmatcher
[ 62%] Built target rtabmap_ros_generate_messages_nodejs
[ 62%] Built target hector_nav_msgs_generate_messages
[ 62%] Built target rosconsole
[ 62%] Built target octomap_msgs_generate_messages
[ 62%] Built target tf2_msgs_generate_messages
[ 62%] Built target test_roslib_comm_generate_messages
[ 62%] Built target tf2_msgs_gencpp
[ 62%] Built target roscpp_generate_messages
[ 62%] Built target test_rosmaster_generate_messages
[ 62%] Built target test_roscpp_generate_messages
[ 65%] Built target test_rospy_generate_messages_py
[ 67%] Built target test_rospy_generate_messages_eus
[ 67%] Built target test_rosservice_generate_messages
[ 68%] Built target test_rospy_generate_messages_cpp
[ 70%] Built target test_rospy_generate_messages_lisp
[ 71%] Built target test_rospy_generate_messages_nodejs
[ 71%] Built target topic_tools_generate_messages
[ 71%] Built target test_rosbag_generate_messages
[ 71%] Built target tf_generate_messages
[ 71%] Built target test_rostopic_generate_messages
[ 71%] Built target tf_gencpp
[ 71%] Built target costmap_2d_generate_messages
[ 71%] Built target hector_mapping_generate_messages
[ 71%] Built target robot_pose_ekf_generate_messages
[ 71%] Built target navfn_generate_messages
[ 71%] Built target base_local_planner_generate_messages
[ 71%] Built target rtabmap_ros_generate_messages
[ 71%] Built target gridfastslam
[ 71%] Built target test_rospy_generate_messages
[ 71%] Built target tf2
[ 71%] Built target tf2_py
[ 75%] Built target roscpp
[ 75%] Built target laser_scan_sparsifier
[ 75%] Built target voxel_grid
[ 75%] Built target message_filters
[ 75%] Built target rosout
[ 75%] Built target laser_scan_splitter
[ 75%] Built target topic_tools
[ 75%] Built target geotiff_writer
[ 75%] Built target laser_scan_sparsifier_node
[ 75%] Built target DepthImageToLaserScan
[ 75%] Built target laser_scan_sparsifier_nodelet
[ 75%] Built target laser_scan_splitter_node
[ 75%] Built target laser_scan_splitter_nodelet
[ 75%] Built target tf2_ros
[ 75%] Built target mux
[ 75%] Built target map_to_image_node
[ 76%] Built target demux
[ 76%] Built target drop
[ 76%] Built target relay
[ 76%] Built target throttle
[ 76%] Built target switch_mux
[ 77%] Built target DepthImageToLaserScanROS
[ 77%] Built target rosbag
[ 77%] Built target tf2_ros_buffer_server
[ 77%] Built target tf2_ros_static_transform_publisher
[ 77%] Built target tf
[ 77%] Built target pytf_py
[ 77%] Built target pointcloud_to_laserscan
[ 77%] Built target geotiff_node
[ 77%] Built target play
[ 77%] Built target record
[ 77%] Built target ZEDWrapper
[ 77%] Built target geotiff_saver
[ 77%] Built target hector_geotiff_plugins
[ 77%] Built target DepthImageToLaserScanNodelet
[ 77%] Building CXX object geometry/tf/CMakeFiles/tf_change_notifier.dir/src/change_notifier.cpp.o
[ 77%] Built target testBroadcaster
[ 77%] Built target tf_empty_listener
[ 77%] Built target static_transform_publisher
[ 77%] Built target depthimage_to_laserscan
[ 77%] Built target tf_monitor
[ 77%] Built target testListener
[ 77%] Built target tf_echo
[ 78%] Built target fake_localization
[ 78%] Built target transform_listener_unittest
[ 78%] Built target slam_gmapping
[ 80%] Built target imu_attitude_to_tf_node
[ 80%] Built target slam_gmapping_nodelet
[ 80%] Built target slam_gmapping_replay
Scanning dependencies of target hector_trajectory_server
Scanning dependencies of target map_server_image_loader
Scanning dependencies of target map_server-map_saver
[ 80%] Built target pose_and_orientation_to_imu_node
[ 80%] Linking CXX executable /home/mars-lab/catkin_ws/devel/lib/map_server/rtest
[ 81%] Built target hector_map_server
[ 81%] Building CXX object hector_slam/hector_trajectory_server/CMakeFiles/hector_trajectory_server.dir/src/hector_trajectory_server.cpp.o
Scanning dependencies of target ncd_parser
Scanning dependencies of target amcl
[ 81%] Building CXX object navigation/map_server/CMakeFiles/map_server_image_loader.dir/src/image_loader.cpp.o
Scanning dependencies of target laser_ortho_projector
[ 81%] Building CXX object scan_tools/ncd_parser/CMakeFiles/ncd_parser.dir/src/ncd_parser.cpp.o
[ 81%] Building CXX object navigation/map_server/CMakeFiles/map_server-map_saver.dir/src/map_saver.cpp.o
[ 81%] Building CXX object navigation/amcl/CMakeFiles/amcl.dir/src/amcl_node.cpp.o
[ 81%] Building CXX object scan_tools/laser_ortho_projector/CMakeFiles/laser_ortho_projector.dir/src/laser_ortho_projector.cpp.o
[ 81%] Built target rtest
Scanning dependencies of target laser_scan_matcher
[ 81%] Building CXX object scan_tools/laser_scan_matcher/CMakeFiles/laser_scan_matcher.dir/src/laser_scan_matcher.cpp.o
/home/mars-lab/catkin_ws/src/geometry/tf/src/change_notifier.cpp:34:25: fatal error: XmlRpcValue.h: No such file or directory
compilation terminated.
geometry/tf/CMakeFiles/tf_change_notifier.dir/build.make:62: recipe for target 'geometry/tf/CMakeFiles/tf_change_notifier.dir/src/change_notifier.cpp.o' failed
make[2]: *** [geometry/tf/CMakeFiles/tf_change_notifier.dir/src/change_notifier.cpp.o] Error 1
CMakeFiles/Makefile2:37905: recipe for target 'geometry/tf/CMakeFiles/tf_change_notifier.dir/all' failed
make[1]: *** [geometry/tf/CMakeFiles/tf_change_notifier.dir/all] Error 2
make[1]: *** Waiting for unfinished jobs....
[ 81%] Linking CXX executable /home/mars-lab/catkin_ws/devel/lib/map_server/map_saver
[ 81%] Built target map_server-map_saver
[ 82%] Linking CXX shared library /home/mars-lab/catkin_ws/devel/lib/libmap_server_image_loader.so
[ 82%] Built target map_server_image_loader
[ 82%] Linking CXX executable /home/mars-lab/catkin_ws/devel/lib/ncd_parser/ncd_parser
[ 82%] Built target ncd_parser
[ 82%] Linking CXX executable /home/mars-lab/catkin_ws/devel/lib/hector_trajectory_server/hector_trajectory_server
[ 82%] Built target hector_trajectory_server
[ 82%] Linking CXX executable /home/mars-lab/catkin_ws/devel/lib/amcl/amcl
[ 82%] Built target amcl
[ 82%] Linking CXX shared library /home/mars-lab/catkin_ws/devel/lib/liblaser_ortho_projector.so
[ 82%] Built target laser_ortho_projector
[ 82%] Linking CXX shared library /home/mars-lab/catkin_ws/devel/lib/liblaser_scan_matcher.so
[ 82%] Built target laser_scan_matcher
Makefile:138: recipe for target 'all' failed
make: *** [all] Error 2
Invoking "make -j8 -l8" failed
I know it is because a library is missing, I install xmlprc library, but not sure why it still gives error. Anyone know which library this file is related to?
Ps: I have done sudo apt-get-upgrade and sudo apt-get update as well.
Thanks for the help.
↧
catkin build with cmake file and flags
Hi,
I have many packages that rely on each other. With "catkin build", all packages are compiled and linked in the right order. Now I have two questions:
1. If I add some CMAKE_CXX_FLAGS arguments in the CMakeLists.txt file of the top-level package, are these flags used for all other packages that are included by this top-level package?
2. Is it possible to append a "my_config.cmake" file to the "catkin build" command that is used for the whole compilation? It should just set some CMAKE_CXX_FLAGS arguments for all packages.
Thanks in advance!
inspire
↧
catkin_package(CATKIN_DEPENDS ...) vs. find_package(catkin REQUIRED COMPONENTS ...)
Hi,
Let's say I have a package `A` that depends on `sensor_msgs`. I have to add `sensor_msgs` to both
> find_package(catkin REQUIRED COMPONENTS sensor_msgs)> catkin_package(CATKIN_DEPENDS sensor_msgs)
What is the difference between the two? What purpose do each of them solve? For instance, I noticed that `message_generation` has to be in the `find_package` call while the `message_runtime` has to be in `catkin_package` call. Why are they not in both?
Thank you.
↧
↧
.msg Module not being found
I am running ROS Indigo on Ubuntu 14.04. Here is my package and cmake file:
CMAKELIST:
cmake_minimum_required(VERSION 2.8.3)
project(semantic_label_publisher)
## 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
rospy
std_msgs
message_generation
)
## Generate messages in the 'msg' folder
add_message_files(
FILES
SemLabel.msg
# Message2.msg
)
## Generate services in the 'srv' folder
# add_service_files(
# FILES
# Service1.srv
# Service2.srv
# )
## Generate actions in the 'action' folder
# add_action_files(
# FILES
# Action1.action
# Action2.action
# )
## Generate added messages and services with any dependencies listed here
generate_messages(
DEPENDENCIES
std_msgs # Or other packages containing msgs
)
###################################
## catkin specific configuration ##
###################################
## The catkin_package macro generates cmake config files for your package
## Declare things to be passed to dependent projects
## INCLUDE_DIRS: uncomment this if you package contains header files
## 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 semantic_label_publisher
CATKIN_DEPENDS rospy std_msgs
# DEPENDS system_lib
)
###########
## Build ##
###########
## Specify additional locations of header files
## Your package locations should be listed before other locations
# include_directories(include)
include_directories(
${catkin_INCLUDE_DIRS}
)
package.xml File:
semantic_label_publisher 0.0.0 The semantic_label_publisher package xxx TODO catkin rospy std_msgs message_generation message_runtime rospy std_msgs
I built my package, did everything, but when I run
rosrun semantic_label_publisher semantic_label_publisher_node.py
I get the following error:
ImportError: No module named semantic_label_publish.msg
Is there something I am doing wrong? If you need anymore info let me know.
Thanks
↧
CMake can't find yaml-cpp on debian jessie
I'm trying to release a new package on the ROS build farm, and the debian jessie build is currently failing due to the `yaml-cpp` dependency. I have it listed as a dependency in my package.xml:
<depend>yaml-cpp</depend>
and the relevant lines in my CMakeLists.txt are:
find_package(yaml-cpp REQUIRED)
catkin_package(
...
DEPENDS YAML_CPP
)
include_directories(
${catkin_INCLUDE_DIRS}
${YAML_CPP_INCLUDE_DIR}
)
add_library(my_target ...)
target_link_libraries(my_target ${YAML_CPP_LIBRARIES})
On Ubuntu this builds just fine, both locally and on the ROS build farm. For the Debian Jessie build, however, I get the following error:
CMake Error at CMakeLists.txt:18 (find_package): By not providing "Findyaml-cpp.cmake" in CMAKE_MODULE_PATH this project has asked CMake to find a package configuration file provided by "yaml-cpp", but CMake did not find one. Could not find a package configuration file provided by "yaml-cpp" with any of the following names: yaml-cppConfig.cmake yaml-cpp-config.cmake Add the installation prefix of "yaml-cpp" to CMAKE_PREFIX_PATH or set "yaml-cpp_DIR" to a directory containing one of the above files. If "yaml-cpp" provides a separate development package or SDK, be sure it has been installed. -- Configuring incomplete, errors occurred!The rosdep dependency seems to be resolving just fine (It installs `libyaml-cpp-dev` properly and `rosdep resolve yaml-cpp --os=debian:jessie` returns as expected). However, it seems that either the CMake config file either isn't being installed or is not being found. I'm not sure what to do about this, especially since it works in Ubuntu. The package that's failing is the "rosflight" package at https://github.com/rosflight/rosflight.git. If you're set up to run [ROS prerelease tests](http://wiki.ros.org/bloom/Tutorials/PrereleaseTest), the error can be reproduced using the following commands:
mkdir -p /tmp/prerelease_job
cd /tmp/prerelease_job
generate_prerelease_script.py \
https://raw.githubusercontent.com/ros-infrastructure/ros_buildfarm_config/production/index.yaml \
kinetic default debian jessie amd64 \
--custom-repo \
rosflight:git:https://github.com/rosflight/rosflight-release.git:release/kinetic/rosflight/0.1.2-0 \
rosflight_msgs:git:https://github.com/rosflight/rosflight-release.git:release/kinetic/rosflight_msgs/0.1.2-0 \
rosflight_pkgs:git:https://github.com/rosflight/rosflight-release.git:release/kinetic/rosflight_pkgs/0.1.2-0 \
rosflight_utils:git:https://github.com/rosflight/rosflight-release.git:release/kinetic/rosflight_utils/0.1.2-0 \
--level 0 \
--output-dir ./
./prerelease.sh
Any insights would be appreciated!
↧
How to use GPU enabled OpenCV with ROS Kinetic?
Hi, I want to use CUDA enabled OpenCV with ROS. I have kinetic which already has one OpenCV 3.2 but it is not cuda enabled and also doesn't have extra modules of opencv_contrib. For this reason, I built a new OpenCV in /usr/local with CUDA and opencv_contrib enabled and I got this new OpenCV working.
Now I have been through most of the question for implementing custom OpenCV with ROS and somehow, I am able to compile (catkin_make) my package using with custom OpenCV but when I run it, with rosrun, it again uses kinetic opencv and shows cuda not enabled. Any help in this regard would be appreciated.
P.S - I am able to use extra modules even with kinetic opencv also (It just worked by itself). Only that cuda part is not working for me.
↧
How to use the gtsam library in my ROS package?
Hello,
I am currently revisiting ROS again as I want to build localization with the [GTSAM library](https://bitbucket.org/gtborg/gtsam/). It is important to mention that this is the first time I used an external library aside from OpenCV.
I cloned the repository into my `/usr/lib` folder and installed it as instructed.
I then incorporated [this](https://bitbucket.org/gtborg/gtsam/src/8b0c2ecaf4060965eca355bdd907d239b5124de6/examples/LocalizationExample.cpp?at=develop&fileviewer=file-view-default) example from the library into a ROS node and wanted to compile it to see if I can use it in my code.
**However, it seems like CMake can not find the library:**
[ 50%] Building CXX object gtsam_testpack/CMakeFiles/gtsam_testpack_node.dir/src/gtsam_testpack_node.cpp.o
In file included from /usr/local/include/gtsam/base/Matrix.h:25:0,
from /usr/local/include/gtsam/base/Manifold.h:22,
from /usr/local/include/gtsam/geometry/BearingRange.h:21,
from /usr/local/include/gtsam/geometry/Pose2.h:23,
from /home/marc/catkin_ws/src/gtsam_testpack/src/gtsam_testpack_node.cpp:29:
/usr/local/include/gtsam/base/OptionalJacobian.h:22:23: fatal error: Eigen/Dense: No such file or directory compilation terminated.
gtsam_testpack/CMakeFiles/gtsam_testpack_node.dir/build.make:62: recipe for target 'gtsam_testpack/CMakeFiles/gtsam_testpack_node.dir/src/gtsam_testpack_node.cpp.o' failed
make[2]: *** [gtsam_testpack/CMakeFiles/gtsam_testpack_node.dir/src/gtsam_testpack_node.cpp.o] Error 1
CMakeFiles/Makefile2:840: recipe for target 'gtsam_testpack/CMakeFiles/gtsam_testpack_node.dir/all' failed
make[1]: *** [gtsam_testpack/CMakeFiles/gtsam_testpack_node.dir/all] Error 2
Makefile:138: recipe for target 'all' failed
make: *** [all] Error 2
Invoking "make -j4 -l4" failed
**Line 29 (first line of non-comment code):** `#include `
**My CMakeLists.txt:**
cmake_minimum_required(VERSION 2.8.3)
project(gtsam_testpack)
find_package(catkin REQUIRED COMPONENTS roscpp rospy std_msgs genmsg)
find_package(GTSAMCMakeTools)
catkin_package()
include_directories(
include
${catkin_INCLUDE_DIRS}
)
add_executable(gtsam_testpack_node src/gtsam_testpack_node)
target_link_libraries(gtsam_testpack_node ${catkin_libraries})
Basically, a small step by step guide on how to get from A (library installed, example node coded) to B (code compiles and is executable) would be awesome. I found a ton of threads regarding libraries, but due to my inexperience I was not able to fill in the missing information (e.g. how to apply the solutions to my problem).
↧
↧
Loading .PNGs for a GUI?
So I just started learning ROS and I was wondering how I could load images, specifically .PNG files, for a GUI. The idea is to create a display that the user can click on to publish a specific topic. I have some experience working with SDL and am using SDL's functionality to create a window and display the images. Right now, the images are stored within a file labeled "media" within the package, and the node fails to find them when executed.
How would I modify the CMake file or the package itself to load the images? I have tried looking at the turtlesim package used in the tutorials, but I can't seem to find the process used to load the images.
Any help would be greatly appreciated, thank you!
↧
How do I add catkin workspace into cmake tree?
Hello,
I am faced with a problem: I cannot use `add_subdirectory()` for catkin workspace to include it into my cmake project (there tons of pure-cmake legacy code). It seems, that the problem is catkin assumes that its `CMakeLists.txt` is the top-level list in a project (I took a look on catkin sources and found that it often refers to `${CMAKE_SOURCE_DIR}` and `${CMAKE_BINARY_DIR}`). My catkin packages uses libraries from legacy code and I know, that I could split my project into two (catkin and non-catkin) and use cmake exports, but that would be the hell I guess.
Are there any workarounds?
↧
How do I add catkin workspace into cmake tree?
Hello,
I am faced with a problem: I cannot use `add_subdirectory()` for catkin workspace to include it into my cmake project (there tons of pure-cmake legacy code). It seems, that the problem is catkin assumes that its `CMakeLists.txt` is the top-level list in a project (I took a look on catkin sources and found that it often refers to `${CMAKE_SOURCE_DIR}` and `${CMAKE_BINARY_DIR}`). My catkin packages uses libraries from legacy code and I know, that I could split my project into two (catkin and non-catkin) and use cmake exports, but that would be the hell I guess.
Are there any workarounds?
↧
Cannot build my package due to ros/Joy.h not being found
Seems like a pretty simple error to get past, but `catkin_make` cannot seem to find ros/Joy.h.
/home/sharan/catkin_ws/src/zlab_drone/src/fly_from_joy.cpp:4:21: fatal error: ros/Joy.h: No such file or directory. compilation terminated.
I have already included `joy` into my `CMakeLists.txt`. Not sure what else to do:
find_package(catkin REQUIRED COMPONENTS
ardrone_autonomy
cv_bridge
image_transport
roscpp
rospy
sensor_msgs
std_msgs
joy
)
↧
↧
How to link exe in Cmakelist.txt in ROS
Hi,
How to link exe file in CMakelist.txt in ROScpp . Usually we define the source file path (.cpp and .h header)only in Cmakelist but in case if exe file itself being used in source file then how to add rule in Cmakelist.txt.
Below is the rule:
add_executable(property_node ${$LOGG4CPP}_SOURCES} wrapper.cpp main.cpp wrapper.h)
in wrapper.cpp i have been referring one exe in system API inside my code . Through command line i am able to execute the code but in ros getting below error while running the node.
rosrun logpkg property_node
sh: 1: ./parse : not found . Here parse is a exe name which is being used in wrapper.cpp file through system API.
string string_output = "./parse {args} "
system(string_output.c_str());
↧
building roscpp
All I need is roscpp libs for Android. I'm hoping there's a way I can build just these by themselves. So without knowing much about cmake, I did ...
$ git clone https://github.com/ros/ros_comm
$ cd ros_comm/ros_comm
$ mkdir build && cd build
$ cmake ..
And ended up with the following ...
$ cmake ..
-- The C compiler identification is GNU 5.4.0
-- The CXX compiler identification is GNU 5.4.0
-- Check for working C compiler: /usr/bin/cc
-- Check for working C compiler: /usr/bin/cc -- works
-- Detecting C compiler ABI info
-- Detecting C compiler ABI info - done
-- Detecting C compile features
-- Detecting C compile features - done
-- Check for working CXX compiler: /usr/bin/c++
-- Check for working CXX compiler: /usr/bin/c++ -- works
-- Detecting CXX compiler ABI info
-- Detecting CXX compiler ABI info - done
-- Detecting CXX compile features
-- Detecting CXX compile features - done
CMake Error at CMakeLists.txt:3 (find_package):
By not providing "Findcatkin.cmake" in CMAKE_MODULE_PATH this project has
asked CMake to find a package configuration file provided by "catkin", but
CMake did not find one.
Could not find a package configuration file provided by "catkin" with any
of the following names:
catkinConfig.cmake
catkin-config.cmake
Add the installation prefix of "catkin" to CMAKE_PREFIX_PATH or set
"catkin_DIR" to a directory containing one of the above files. If "catkin"
provides a separate development package or SDK, be sure it has been
installed.
-- Configuring incomplete, errors occurred!
Is there a way to build just roscpp? The reason I'm doing this is that I'd eventually like to get to a point where I can modify things to start cross compiling using aarch64 tools, even if that means I have to do the port to an arm-v8a arch. The docker image for Android doesn't support the toolchains I need.
↧
use ros in existing qt project
Hello everyone,
I want to use ROS in a already existing qt project which uses qmake, What is the best way to do that , Am i obliged to transform the project to a Catkin package and rewrite a CMakeLists.txt file, is there any other easier solution ? thanks.
I want to use ROS in a already existing qt project which uses qmake, What is the best way to do that , Am i obliged to transform the project to a Catkin package and rewrite a CMakeLists.txt file, is there any other easier solution ? thanks.
↧
CMake can not determine linker language
Hey guys,
I'm attempting to run the pcl_visualizer_demo.cpp found here: http://pointclouds.org/documentation/tutorials/pcl_visualizer.php
I have taken the _demo off the .cpp file and in the CMakeLists.txt.
I ran:
catkin_create_pkg pcl_visualizer roscpp std_msgs rospy
I then placed the pcl_visualizer.cpp in the catkin_ws/src/pcl_visualizer/src folder
this is my full CMakeLists.txt file, as specified by the tutorial linked above, with only the _demo removed from the appropriate places. (note that I still get the same error even with _demo being included and the package being named appropriately for that as well).
cmake_minimum_required(VERSION 2.6 FATAL_ERROR)
project(pcl_visualizer)
find_package(PCL 1.2 REQUIRED)
include_directories(${PCL_INCLUDE_DIRS})
link_directories(${PCL_LIBRARY_DIRS})
add_definitions(${PCL_DEFINITIONS})
add_executable (pcl_visualizer pcl_visualizer.cpp)
target_link_libraries (pcl_visualizer ${PCL_LIBRARIES})
When I run the catkin_make, I get this error:
CMake Error: CMake can not determine linker language for target: pcl_visualizer
CMake Error: Cannot determine link language for target "pcl_visualizer".
Does anyone have any suggestions as to what could be causing this?
↧
↧
How can I add libicp library in my catkin package ?
I am trying to use libicp in my program and I have installed it as mentioned in the readme instruction file. Now I want to include that package in my program and I used Find package to locate it in my Cmakelist.txt but I get following error

How can i solve it
↧
using catkin_make doesn't work, invoking cmake failed
Hello this is my first time trying install and use ROS. I have installed ROS kinetic on Ubuntu 16.04. when i try to run
catkin_make I get this:
rishikesh@rishikesh-VirtualBox:~/catkin_ws$ catkin_make
Base path: /home/rishikesh/catkin_ws
Source space: /home/rishikesh/catkin_ws/src
Build space: /home/rishikesh/catkin_ws/build
Devel space: /home/rishikesh/catkin_ws/devel
Install space: /home/rishikesh/catkin_ws/install
####
#### Running command: "cmake /home/rishikesh/catkin_ws/src -DCATKIN_DEVEL_PREFIX=/home/rishikesh/catkin_ws/devel -DCMAKE_INSTALL_PREFIX=/home/rishikesh/catkin_ws/install -G Unix Makefiles" in "/home/rishikesh/catkin_ws/build"
####
-- Using CATKIN_DEVEL_PREFIX: /home/rishikesh/catkin_ws/devel
-- Using CMAKE_PREFIX_PATH: /opt/ros/kinetic
-- This workspace overlays: /opt/ros/kinetic
-- Using PYTHON_EXECUTABLE: /usr/local/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/rishikesh/catkin_ws/build/test_results
-- Found gtest sources under '/usr/src/gtest': gtests will be built
-- Using Python nosetests: /usr/bin/nosetests-2.7
ImportError: "from catkin_pkg.package import parse_package" failed: No module named catkin_pkg.package
Make sure that you have installed "catkin_pkg", it is up to date and on the PYTHONPATH.
CMake Error at /opt/ros/kinetic/share/catkin/cmake/safe_execute_process.cmake:11 (message):
execute_process(/usr/local/bin/python
"/opt/ros/kinetic/share/catkin/cmake/parse_package_xml.py"
"/opt/ros/kinetic/share/catkin/cmake/../package.xml"
"/home/rishikesh/catkin_ws/build/catkin/catkin_generated/version/package.cmake")
returned error code 1
Call Stack (most recent call first):
/opt/ros/kinetic/share/catkin/cmake/catkin_package_xml.cmake:63 (safe_execute_process)
/opt/ros/kinetic/share/catkin/cmake/all.cmake:151 (_catkin_package_xml)
/opt/ros/kinetic/share/catkin/cmake/catkinConfig.cmake:20 (include)
CMakeLists.txt:52 (find_package)
-- Configuring incomplete, errors occurred!
See also "/home/rishikesh/catkin_ws/build/CMakeFiles/CMakeOutput.log".
See also "/home/rishikesh/catkin_ws/build/CMakeFiles/CMakeError.log".
Invoking "cmake" failed
↧
include dir not found when catkin_make
Hello,
I would want to install hector_gazebo package from source.
After cloning source code in workspace and running catkin_make, I get the following error :
-- +++ processing catkin package: 'hector_gazebo_thermal_camera'
-- ==> add_subdirectory(hector_gazebo/hector_gazebo_thermal_camera)
CMake Error at /home/matt/catkin_ws/devel/share/gazebo_plugins/cmake/gazebo_pluginsConfig.cmake:106 (message):
Project 'gazebo_plugins' specifies
'/home/matt/catkin_ws/src/gazebo_ros_pkgs/gazebo_plugins/include' as an
include dir, which is not found. It does neither exist as an absolute
directory nor in
'/home/matt/catkin_ws/src/gazebo_ros_pkgs/gazebo_plugins//home/matt/catkin_ws/src/gazebo_ros_pkgs/gazebo_plugins/include'.
Ask the maintainer 'John Hsu ' to fix it.
Call Stack (most recent call first):
/opt/ros/indigo/share/catkin/cmake/catkinConfig.cmake:76 (find_package)
hector_gazebo/hector_gazebo_thermal_camera/CMakeLists.txt:7 (find_package)
However I already installed the gazebo_ros_pkgs package but not from source, with apt-get.
So I am sure that '/home/matt/catkin_ws/src/gazebo_ros_pkgs/gazebo_plugins/include' set as 'not found' is ultimately somewhere. But *hector_gazebo_thermal_camera/CMakeLists.txt* is not watching to the right direction.
In opening this *hector_gazebo_thermal_camera/CMakeLists.txt* and searching on the web, I guess that the problem come from those lines :
find_package(catkin REQUIRED COMPONENTS nodelet image_transport dynamic_reconfigure driver_base gazebo_plugins)
include_directories(include ${catkin_INCLUDE_DIRS})
Where include_directories's variable don't point to the repository where packages installed by apt-get are.
So my questions are :
- It is the good way to fix the pbm ?
- How to set directories defined in
catkin_INCLUDE_DIRS ?
- What other directory shoud I add in :
include_directories(include
${catkin_INCLUDE_DIRS}
${catkin_OTHER_DIR}) to point toward
package installed with apt-get ?
Best
Matt
↧