Hi
I wrote a ROS node and want to run the node on another target. So my plan was to copy the executable to the target and start it there with rosrun. The project is a CMake project and when i have the whole workspace on the target and do a source command before it works. But when i only copy the executable i am not able to start the node with rosnode name /path-of-the-executable.
Is there something missing?
best regards
Harald
↧
Run ROS node on target
↧
Refer to package root in CMakeLists.txt
Hi,
I would like to run some custom commands when running catkin_make. In particular, I want to generate python scripts from QT resources and .ui files. How can it be done? How can I refer to files/scripts inside my package? I read the tutorial, but no way to find some good documentation about custom pre/post scripts, neither if catkin exports cmake symbols to refer to the current package source tree.
↧
↧
CMake: How to compile each node with a specific flag
I think this is really a CMake question. Let's say I want to compile the source for node 1, 2 and 3 with -pthread, -O3 and -Os flags respectively. How should I specify this in `CMakeLists.txt` and/or `catkin_make` command?
↧
CMake error in ROS2
I am trying to create a ROS2 package from scratch, named `testpackagecpp` and have this CMakeLists.txt :
cmake_minimum_required(VERSION 2.8.3)
project(testpackagecpp)
if(NOT WIN32)
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -std=c++11 -Wall -Wextra")
endif()
find_package(ament_cmake REQUIRED)
find_package(example_interfaces REQUIRED)
find_package(rcl REQUIRED)
find_package(rmw REQUIRED)
#find_package(rmw_implementation REQUIRED)
#force opensplice implementation
find_package(rmw_opensplice_cpp REQUIRED)
#find_package(rmw_fastrtps_cpp REQUIRED)
ament_package()
and this as the package.xml file :
testpackagecpp 0.0.0 Package containing examples of how to use the rcl API. Alejandro Hernandez Apache License 2.0 ament_cmake rosidl_default_generators example_interfaces rcl rmw_implementation example_interfaces rcl rmw_implementation rosidl_default_runtime ament_cmake
When I try to build this using `ament build --symlink-install --only-package testpackagecpp`, I get an error as `"NOT" "element" "IN_LIST" "rcl_RECURSIVE_DEPENDENCIES"`. 
Any Idea where am I going wrong ?
↧
How to use a Arduino Due in a CMake-based package using rosserial-arduino?
I prefer using the CMake-based approach for packages using rosserial-arduino as not requiring the Arduino IDE has quite a few advantages. For the older Arduino boards, specifying the board type is as simple as typing it somewhere in the CMakeLists.txt, e.g. (example from [here](https://github.com/skohlbr/simple_2wd_robot/blob/master/simple_2wd_control_arduino/firmware/CMakeLists.txt#L10)):
generate_arduino_firmware(controller
SRCS controller.cpp ../lib/AFMotor.cpp ${ROS_LIB_DIR}/time.cpp
BOARD uno
PORT /dev/ttyUSB0
)
It appears to be a bit more complicated for the Due however, as that one is special and not a "classical" avr device (see [location-of-boards-txt-for-an-arduino-due-sam-board on stackoverflow](https://stackoverflow.com/questions/35799214/location-of-boards-txt-for-an-arduino-due-sam-board) for instance).
My question is: Is it possible to "painlessly" compile and flash firmware for the Due using a CMake setup, or is it required to manually copy and setup the `boards.txt` for that one somewhere?
↧
↧
How is the service.hpp file generated from service.srv file in ROS2 ?
While using services in ROS2, we include `example_interfaces/srv/add_two_ints.hpp` in the server.cpp and client.cpp files. How is this file generated.
In my case, i created a new service file `heatFlow.srv` and changed the CMakeLists.txt file and the cpp files accordingly. But when i try to build the package, it gives a fatal error : `fatal error: example_interfaces/srv/heatFlow.hpp: No such file or directory
compilation terminated.`
How are these `.hpp` files basically generated ?
↧
Indigo: failing to build rosbag, missing header
Hello everyone,
I am trying to build and cross compile ROS Indigo for a custom board that features an ARM processor running a custom Linux distribution.
Besides a few identical warnings I will deal with later, the process fails at what seems to be the very end of the build process, when when putting together the rosbag package. The output is the following:
Scanning dependencies of target rosbag
[ 12%] Building CXX object CMakeFiles/rosbag.dir/src/player.cpp.o
[ 25%] Building CXX object CMakeFiles/rosbag.dir/src/recorder.cpp.o
In file included from /home/jjtq/mtp_catkin_ws/src/ros_comm/rosbag_storage/include/rosbag/bag.h:41:0,
from /home/jjtq/mtp_catkin_ws/src/ros_comm/rosbag/include/rosbag/recorder.h:59,
from /home/jjtq/mtp_catkin_ws/src/ros_comm/rosbag/src/recorder.cpp:35:
/home/jjtq/mtp_catkin_ws/src/ros_comm/rosbag_storage/include/rosbag/chunked_file.h:44:19: fatal error: bzlib.h: No such file or directory
compilation terminated.
CMakeFiles/rosbag.dir/build.make:86: recipe for target 'CMakeFiles/rosbag.dir/src/recorder.cpp.o' failed
make[2]: *** [CMakeFiles/rosbag.dir/src/recorder.cpp.o] Error 1
make[2]: *** Waiting for unfinished jobs....
In file included from /home/jjtq/mtp_catkin_ws/src/ros_comm/rosbag_storage/include/rosbag/bag.h:41:0,
from /home/jjtq/mtp_catkin_ws/src/ros_comm/rosbag/include/rosbag/player.h:51,
from /home/jjtq/mtp_catkin_ws/src/ros_comm/rosbag/src/player.cpp:35:
/home/jjtq/mtp_catkin_ws/src/ros_comm/rosbag_storage/include/rosbag/chunked_file.h:44:19: fatal error: bzlib.h: No such file or directory
compilation terminated.
CMakeFiles/rosbag.dir/build.make:62: recipe for target 'CMakeFiles/rosbag.dir/src/player.cpp.o' failed
make[2]: *** [CMakeFiles/rosbag.dir/src/player.cpp.o] Error 1
CMakeFiles/Makefile2:648: recipe for target 'CMakeFiles/rosbag.dir/all' failed
make[1]: *** [CMakeFiles/rosbag.dir/all] Error 2
Makefile:138: recipe for target 'all' failed
make: *** [all] Error 2
I am using the following toolchain file:
set(CMAKE_SYSTEM_NAME Linux)
set(CMAKE_C_COMPILER /usr/bin/arm-linux-gnueabihf-gcc)
set(CMAKE_CXX_COMPILER /usr/bin/arm-linux-gnueabihf-g++)
set(CMAKE_SYSROOT /home/jjtq/mtp_catkin_ws/cross/sysroots/cortexa7hf-neon-poky-linux-gnueabi)
set(CMAKE_FIND_ROOT_PATH /home/jjtq/mtp_catkin_ws /home/jjtq/mtp_catkin_ws/cross /home/jjtq/mtp_catkin_ws/cross/install /home/jjtq/mtp_catkin_ws/lz4-1_1.8.1.2-1-arm.pkg/usr)
set(PYTHON_LIBRARY /home/jjtq/mtp_catkin_ws/cross/libpython2.7.so.1.0)
set(PYTHON_INCLUDE_DIR /home/jjtq/mtp_catkin_ws/cross/include/python)
set(TinyXML_LIBRARY /home/jjtq/mtp_catkin_ws/cross/libtinyxml.so.2.6.2)
set(TinyXML_INCLUDE_DIR /usr/include)
set(BZIP2_LIBRARIES /home/jjtq/mtp_catkin_ws/cross/libbz2.so.1.0.6)
set(BZIP2_INCLUDE_DIR /usr/include)
# Have to set this one to BOTH, to allow CMake to find rospack
set(CMAKE_FIND_ROOT_PATH_MODE_PROGRAM BOTH)
set(CMAKE_FIND_ROOT_PATH_MODE_LIBRARY ONLY)
set(CMAKE_FIND_ROOT_PATH_MODE_INCLUDE ONLY)
set(CMAKE_FIND_ROOT_PATH_MODE_PACKAGE ONLY)
I have checked and the header "bzlib.h" is indeed in folder /usr/include, which is set in the toolchain file for BZIP2_INCLUDE_DIR. Any idea of what is it that I am missing?
The process has so far been kind of dirty and "hacky" because I am not familiar with build systems and crosscompiling to this degree, so please forgive any inacuracies and screw ups :)
Best regards!
↧
Cannot use FCL with ROS
Hello!
I am trying to use FCL with an Octree to perform obstacle detection. I downloaded the source code of FCL from github and performed the installation instructions:
mkdir build
cd build
cmake ..
This, I think, created a folder in usr/local/include/fcl with the installed library inside.
Now it was required to access it with ROS. For that, I added:
find_package(fcl REQUIRED)
${fcl_INCLUDE_DIRS}
target_link_libraries(obstacleDetection ${catkin_LIBRARIES} ${OCTOMAP_LIBRARIES} ${fcl_LIBRARY_DIRS} ${FCL_LIBRARIES})
to my CMakeLists.txt file.
It compiles with *catkin_make*, but when I add
#include "fcl/shape/geometric_shapes.h"
, for example, to my *obstacleDetection.h*, it shows a lot of errors, such as:
In file included from /usr/include/c++/5/cstdint:35:0,
from /usr/include/fcl/data_types.h:42,
from /usr/include/fcl/math/vec_3f.h:42,
from /usr/include/fcl/BV/AABB.h:42,
from /usr/include/fcl/collision_object.h:43,
from /usr/include/fcl/shape/geometric_shapes.h:42,
from /home/jpdelopes/ros_ws/src/prjc/src/../include/PrecisionAgriculture/obstacleDetection.h:27,
from /home/jpdelopes/ros_ws/src/prjc/src/obstacleDetection.cpp:6:
/usr/include/c++/5/bits/c++0x_warning.h:32:2: error: #error This file requires compiler and library support for the ISO C++ 2011 standard. This support must be enabled with the -std=c++11 or -std=gnu++11 compiler options.
#error This file requires compiler and library support \
(...)
/usr/include/fcl/data_types.h:48:14: error: ‘int64_t’ in namespace ‘std’ does not name a type
typedef std::int64_t FCL_INT64;
(...)
In file included from /usr/include/fcl/collision_object.h:44:0,
from /usr/include/fcl/shape/geometric_shapes.h:42,
from /home/jpdelopes/ros_ws/src/prjc/src/../include/PrecisionAgriculture/obstacleDetection.h:27,
from /home/jpdelopes/ros_ws/src/prjc/src/obstacleDetection.cpp:6:
/usr/include/fcl/math/transform.h:185:8: error: ‘mutex’ in namespace ‘std’ does not name a type
std::mutex lock_;
Which are three different errors. I think that the FCL library is detected, right? I do not know how to solve these errors.
PS: I think that I have installed all of the FCL library dependencies.
Thank you in advance.
↧
"No rule to make target" build error in ROS2
I have a `.cpp` file named as `heatConduction1.cpp` in which the node is named as `heatConduction1`. This is working. Now i created another file as `heatConduction2.cpp` in which i created a new node as `heatConduction2`. I have added this in the `CmakeLists.txt` as `custom_executable(topics heatConduction1)
custom_executable(topics heatConduction2)` But I get an error while using `ament build --symlink-install --only-package demo_nodes_cpp` as `make[2]: *** No rule to make target 'CMakeFiles/heatConduction2.dir/build'. Stop.
CMakeFiles/Makefile2:617: recipe for target 'CMakeFiles/heatConduction2.dir/all' failed
make[1]: *** [CMakeFiles/heatConduction2.dir/all] Error 2
Makefile:127: recipe for target 'all' failed
make: *** [all] Error 2
`
I do not understand why ?
↧
↧
Remove ROS artifact from CMake install
I am using CPack to create .deb binaries. The relevant part of the CMakeLists.txt looks like this:
INSTALL(TARGETS ${PROJECT_NAME}_node DESTINATION bin)
INSTALL(FILES doc/${PROJECT_NAME}.yaml DESTINATION share)
INSTALL(FILES doc/${PROJECT_NAME}.service DESTINATION lib/systemd/system)
SET(CPACK_DEBIAN_PACKAGE_MAINTAINER "Maintainer")
SET(CPACK_GENERATOR "DEB")
The .deb file gets build fine, the only problem i have is that ROS is adding som files:
- .catkin
- local/.rosinstall
- local/env.sh
- local/setup.{sh,bash,zsh}
- local/_setup_util.py
Any idea on how I can stop those files from appearing?
↧
import catkin workspace to qtcreator
Hi,
I am trying to program a GUI for ROS using qtcreator.
Therefore I have created an empty package using "catkin_create_qt_pkg gcs_gui". Afterwards I ran "catkin_make" to build the new package. It is running by "rosrun gcs_gui gcs_gui".
I would like to edit the files with Qtcreator now but it seems I am missing step during setup. I followed this http://wiki.ros.org/IDEs#QtCreator by
- copying CMakeLists.txt the way it said
- run qtcreator
- open CMakeLists.txt file (I get the error below)
- SOFT ASSERT: "!tcd.tcs.isEmpty()" in file /work/build/qt-creator/src/plugins/cmakeprojectmanager/cmakeprojectimporter.cpp, line 336)
- build directory is already selected correctly
- I don't understand this step: ... and 'Run CMake': Where should I run that? What do I need to type where?
- If I just click configure project, I get this:
- /home/vinni/catkin_ws/src/CMakeLists.txt:59: CMake Error (message): find_package(catkin) failed. catkin was neither found in the workspace nor in the CMAKE_PREFIX_PATH. One reason may be that no ROS setup.sh was sourced before.
- Configuring incomplete, errors occurred!
- cmake process exited with exit code 1.
Also, if I add this to the CMakeLists.txt, it fails as well:
- DCMAKE_INSTALL_PREFIX=/home/vinni/catkin_ws/install
- DCATKIN_DEVEL_PREFIX=/home/vinni/catkin_ws/devel
I hope someone can help me. I am a fairly newbie with ROS.
Thank you,
Vincenz
↧
How can I update/remove cmake without partially deleting my ROS distribution?
## Problem (TL;DR) ##
I need to update my cmake from version 2.8.12.2 to version 3.1 or higher. However this requires removing the previous version with the command: `sudo apt remove cmake`. This identifies several ROS files and deletes them. Having done this before, I can confirm that this command will completely break your ROS distribution, requiring a full reinstall to fix. So my question is: Is there a way to update cmake without removing the previous version or by avoid deleting the ROS files?
## Problem (detailed) ##
According to other forums on the internet, updating cmake requires deleting the previous version with the command `sudo apt remove cmake`. The problem is that this command identifies many files from my ROS distribution and marks them for deletion e.g:
matt@matt:~$ sudo apt remove cmake
Reading package lists... Done
Building dependency tree
Reading state information... Done
The following packages were automatically installed and are no longer required:
... lots of miscellaneous packages ...
Use 'apt-get autoremove' to remove them.
The following packages will be REMOVED:
cmake ros-indigo-actionlib ros-indigo-actionlib-msgs
ros-indigo-actionlib-tutorials ros-indigo-amcl ros-indigo-base-local-planner
ros-indigo-bond ros-indigo-bond-core ros-indigo-bondcpp ros-indigo-bondpy
... many, many more ROS files ...
ros-indigo-visualization-tutorials ros-indigo-viz ros-indigo-voxel-grid
ros-indigo-xacro
0 upgraded, 0 newly installed, 244 to remove and 347 not upgraded.
After this operation, 159 MB disk space will be freed.
Do you want to continue? [Y/n]
The full message is very long, so I have provided it in a text file here: [cmake_warning.txt](https://drive.google.com/open?id=1H6e1dW8-1zP4twOGnvOT8qBJ4vPubdbn)
I ran this command last time I needed to update cmake, and it completely broke my ROS distribution, requiring a full reinstall to fix. I'd prefer to avoid that happening again, either by updating cmake without deleting the old version, or by somehow preventing the command from deleting ROS files. Any help or advice would be greatly appreciated.
I also realize that this is more of a general-Linux type question rather than one specific to ROS. However, because it affects ROS users, and has surely affected several people before me, I thought I would be more likely to find an answer here, and that any answer I do find will be more relevant here than on another forum like StackOverflow. Having said that, if anyone thinks that is where this question should be asked, I can certainly move it.
## System details ##
- **OS:** Ubuntu 14.04
- **ROS version:** 1.11.21 (Indigo Igloo)
- **GCC version:** 4.8.4
- **Cmake version:** 2.8.12.2
↧
ROS on Raspberry PI
Hi. I want to run my own ros node on a raspberry pi which is running a Ubiquity distro . I have a ubuntu here to cross compile my ros node. I am able to cross compile a hello world example without any problems. But when i try to integrate a ros part i always got an error. I use cmake and the following CMakeLIsts.txt file
cmake_minimum_required(VERSION 2.8.3)
project(hello_world)
set(CMAKE_THREAD_PREFER_PTHREAD TRUE)
find_package(Threads REQUIRED)
## Find catkin and any catkin packages
find_package(catkin REQUIRED COMPONENTS
roscpp)
## 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
##generate_messages(DEPENDENCIES std_msgs)
## Declare a catkin package
catkin_package(CATKIN_DEPENDS roscpp)
##set (CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -std=c++11 -Wall -Werror -pthread")
set (CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -std=c++11 -pthread")
set (CMAKE_EXE_LINKER_FLAGS "${CMAKE_EXE_LINKER_FLAGS}")
include_directories(include ${catkin_INCLUDE_DIRS})
add_executable(hello_world ../src/main.cpp)
target_link_libraries(hello_world ${catkin_LIBRARIES})
##target_link_libraries(hello_world)
But i always got the following error:
-- Found gtest sources under '/usr/src/gtest': gtests will be built
-- Using Python nosetests: /usr/bin/nosetests-2.7
CMake Error at /opt/ros/kinetic/share/catkin/cmake/assert.cmake:17 (message):
Assertion failed: check for file existence, but filename
(RT_LIBRARY-NOTFOUND) unset. Message: RT Library
Call Stack (most recent call first):
/opt/ros/kinetic/share/catkin/cmake/tools/rt.cmake:42 (assert_file_exists)
/opt/ros/kinetic/share/catkin/cmake/all.cmake:147 (include)
/opt/ros/kinetic/share/catkin/cmake/catkinConfig.cmake:20 (include)
CMakeLists.txt:8 (find_package)
-- Configuring incomplete, errors occurred!
Does anybody knows what to do?
↧
↧
catkin_make_isolated does not create env.sh
Heyho,
I am trying to release a package containing a custom library for which we also use our custom build environment (which does add some convenient macros just as catkin would do). As it is all CMAKE I created a "wrapper" catkin package which will handle catkin dependencies and provide stuff like the package.xml (see https://github.com/fzi-forschungszentrum-informatik/fzi_icl_core ).
This works really well as long as I use catkin_make to build my workspace. All sources get build and installed correctly and subsequent projects can list this as dependency and so on. When I tried to release it however jenkins failed during presumably trying to execute the code? Here is the output:
[ 82%] Built target test_icl_core_config
[ 83%] Built target test_icl_core_logging
[ 91%] Built target ts_icl_core
[ 93%] Built target ts_icl_core_config
[100%] Built target ts_icl_core_thread
Install the project...
-- Install configuration: "Debug"
-- Installing: /tmp/catkin_workspace/install_isolated/share/tinyxml/tinyxml-config.cmake
-- Installing: /tmp/catkin_workspace/install_isolated/lib/libtinyxml.so
< many many more lines of installing...>
-- Removed runtime path from "/tmp/catkin_workspace/install_isolated/bin/ts_icl_core"
-- Installing: /tmp/catkin_workspace/install_isolated/bin/ts_icl_core_config
-- Removed runtime path from "/tmp/catkin_workspace/install_isolated/bin/ts_icl_core_config"
-- Installing: /tmp/catkin_workspace/install_isolated/bin/ts_icl_core_thread
-- Removed runtime path from "/tmp/catkin_workspace/install_isolated/bin/ts_icl_core_thread"
Unhandled exception of type 'RuntimeError':
Traceback (most recent call last):
File "/opt/ros/indigo/lib/python2.7/dist-packages/catkin/builder.py", line 965, in build_workspace_isolated
number=index + 1, of=len(ordered_packages)
File "/opt/ros/indigo/lib/python2.7/dist-packages/catkin/builder.py", line 670, in build_package
"'\n This sometimes occurs when a non-catkin package is "
RuntimeError: No env.sh file generated at: '/tmp/catkin_workspace/install_isolated/env.sh'
This sometimes occurs when a non-catkin package is interpreted as a catkin package.
This can also occur when the cmake cache is stale, try --force-cmake.<== Failed to process package 'fzi_icl_core':
No env.sh file generated at: '/tmp/catkin_workspace/install_isolated/env.sh'
This sometimes occurs when a non-catkin package is interpreted as a catkin package.
This can also occur when the cmake cache is stale, try --force-cmake.
Command failed, exiting.
# END SUBSECTION
Build step 'Execute shell' marked build as failure
[WARNINGS]Skipping publisher since build result is FAILURE
Full output can be found here ( http://build.ros.org/job/Idev__fzi_icl_core__ubuntu_trusty_amd64/3/console ).
I get the same error when I build the package locally with the command
catkin_make_isolated
The suggested --force-cmake does not change anything in this regard.
So I see two solutions, both of which I have no idea how to implement:
1. Don't execute catkin_make_isolated (on the buildfarm)
2. Ensure that the env.sh file is correctly created
I guess that I have mixed something without declaring it correctly or something like that but I can not find specific documentation about this (other than the REP for catkin_make_isolated http://www.ros.org/reps/rep-0134.html which does not seem to answer my problem) . Can somebody give me any pointers as to what I am missing?
Thanks!
↧
Problem tracking down an cmake error in a ROS/gazebo project
I am trying to upgrade a number of ROS/gazebo nodes made by some other developers:
https://github.com/ethz-asl/rotors_simulator
My goal is to get them running with Ubuntu 18.04, ROS melodic and Gazebo 9.
I have been able to solve most of the compile errors, but I seem to have encountered a problem I do not know how to find.
My problem is one remaining error, which I have been unable to determine the cause of.
It is a bit hard to solve a problem if you do not know what causes it in the first place:
Errors << rotors_gazebo_plugins:cmake /home/martin/ros_sim_drone/logs/rotors_gazebo_plugins/build.cmake.000.log
CMake Warning (dev) at /usr/share/cmake-3.10/Modules/FindBoost.cmake:911 (if):
Policy CMP0054 is not set: Only interpret if() arguments as variables or
keywords when unquoted. Run "cmake --help-policy CMP0054" for policy
details. Use the cmake_policy command to set the policy and suppress this
warning.
Quoted variables like "chrono" will no longer be dereferenced when the
policy is set to NEW. Since the policy is not set the OLD behavior will be
used.
Call Stack (most recent call first):
/usr/share/cmake-3.10/Modules/FindBoost.cmake:1558 (_Boost_MISSING_DEPENDENCIES)
/usr/share/OGRE/cmake/modules/FindOGRE.cmake:318 (find_package)
/usr/lib/x86_64-linux-gnu/cmake/gazebo/gazebo-config.cmake:175 (find_package)
CMakeLists.txt:19 (find_package)
This warning is for project developers. Use -Wno-dev to suppress it.
CMake Warning (dev) at CMakeLists.txt:25 (add_library):
Policy CMP0028 is not set: Double colon in target name means ALIAS or
IMPORTED target. Run "cmake --help-policy CMP0028" for policy details.
Use the cmake_policy command to set the policy and suppress this warning.
Target "rotors_gazebo_bag_plugin" links to target "UUID::UUID" but the
target was not found. Perhaps a find_package() call is missing for an
IMPORTED target, or an ALIAS target is missing?
This warning is for project developers. Use -Wno-dev to suppress it.
CMake Warning (dev) at CMakeLists.txt:25 (add_library):
Policy CMP0028 is not set: Double colon in target name means ALIAS or
IMPORTED target. Run "cmake --help-policy CMP0028" for policy details.
Use the cmake_policy command to set the policy and suppress this warning.
Target "rotors_gazebo_bag_plugin" links to target "UUID::UUID" but the
target was not found. Perhaps a find_package() call is missing for an
IMPORTED target, or an ALIAS target is missing?
This warning is for project developers. Use -Wno-dev to suppress it.
CMake Error at /home/martin/ros_sim_drone/src/rotors_simulator/rotors_gazebo_plugins/CMakeLists.txt:26 (target_link_libraries):
Error evaluating generator expression:
$
Target "UUID::UUID" not found.
CMake Error:
Error evaluating generator expression:
$
Target "UUID::UUID" not found.
CMake Error at /home/martin/ros_sim_drone/src/rotors_simulator/rotors_gazebo_plugins/CMakeLists.txt:26 (target_link_libraries):
Error evaluating generator expression:
$
Target "UUID::UUID" not found.
Running catkin_make or catkin build a second time the problem still presists;
Errors << rotors_gazebo_plugins:make /home/martin/ros_sim_drone/logs/rotors_gazebo_plugins/build.make.000.log
/usr/bin/x86_64-linux-gnu-ld: cannot find -lUUID::UUID
collect2: error: ld returned 1 exit status
make[2]: *** [librotors_gazebo_bag_plugin.so] Error 1
make[1]: *** [CMakeFiles/rotors_gazebo_bag_plugin.dir/all] Error 2
make: *** [all] Error 2
The CMakeLists.txt look like this currently:
cmake_minimum_required(VERSION 2.8.3)
project(rotors_gazebo_plugins)
find_package(catkin REQUIRED COMPONENTS
cmake_modules
geometry_msgs
mav_msgs
rosbag
roscpp
gazebo_ros
rotors_comm
rotors_control
std_srvs
tf
)
find_package(Eigen3 REQUIRED)
find_package(gazebo REQUIRED)
find_package(Protobuf REQUIRED)
link_directories(${GAZEBO_LIBRARY_DIRS})
include_directories(include ${Boost_INCLUDE_DIR} ${catkin_INCLUDE_DIRS} ${Eigen3_INCLUDE_DIRS} ${GAZEBO_INCLUDE_DIRS})
add_library(rotors_gazebo_bag_plugin SHARED src/gazebo_bag_plugin.cpp)
target_link_libraries(rotors_gazebo_bag_plugin ${catkin_LIBRARIES} ${GAZEBO_LIBRARIES})
catkin_package(
INCLUDE_DIRS include
LIBRARIES ${PROJECT_NAME} rotors_gazebo_motor_model rotors_gazebo_controller_interface
CATKIN_DEPENDS geometry_msgs mav_msgs rosbag roscpp rotors_comm rotors_control std_srvs tf
DEPENDS EIGEN3 GAZEBO
)
I think the problem is somewhere between cmake, gazebo and ROS, but I am not 100% sure.
My main problem is, I do not know how to move forward with this problem, so any input would be helpfull.
↧
Error while building ROS2 code on windows
I followed [these](https://github.com/ros2/ros2/wiki/Windows-Development-Setup) steps for installing and building ROS2 code on Windows. While compiling the code using `python src\ament\ament_tools\scripts\ament.py build`, it throws an error as `No CMAKE_C_COMPILER could be found` and `NO CMAKE_CXX_COMPILER could be found`. I have installed the VS 2015 correctly and i am opening the console through `VS2015 x64 Native Tools Command Prompt` and this should automatically set the path.
Where am i going wrong ?
↧
difference between install and executable in CMakeLists.
I am cleaning up my ros code base, applying catkin_lint and reading the C++ ROS Style Guide etc etc, soon going to implement unit test and have clang-check look at it.
Catkin_lint warns that I dont have any targets installed, which is true, because i have only add_executable(...).
I have tried understanding the catkin documentation explaining between install(...) and add_executable(...) from [catkin documentation](https://docs.ros.org/api/catkin/html/howto/format2/building_executables.html)
What is the observable/performance difference between installing and adding the executable?
Edit: Print of the error i got.
ryan@Macbuntu:~/catkin_ws/src/$ catkin_lint guide_pkg -W2
guidance: warning: target 'power' is not installed
guidance: warning: target 'pursuit' is not installed
guidance: warning: target 'goal' is not installed
guidance: warning: target 'kill_goal' is not installed
guidance: warning: target 'speed_cmd_mux' is not installed
guidance: notice: meaningless package description 'The guide package'
guidance: notice: target name 'power' might not be sufficiently unique
guidance: notice: target name 'pursuit' might not be sufficiently unique
guidance: notice: target name 'goal' might not be sufficiently unique
guidance: notice: target name 'kill_goal' might not be sufficiently unique
guidance: notice: target name 'speed_cmd_mux' might not be sufficiently unique
guidance: CMakeLists.txt(6): notice: list COMPONENTS should be sorted
catkin_lint: checked 1 packages and found 20 problems
↧
↧
CMake Error include dir 'include' does not exist relative
I am using ros kinetic on ubuntu 16.04
After setting up the environment and installing all dependencies using rosdep from the root I am running catkin_make and getting error:
CMake Error at /opt/ros/kinetic/share/catkin/cmake/catkin_package.cmake:302 (message):
catkin_package() include dir 'include' does not exist relative to
'/home/cerlab/Documents/depowder_summer_2018/src/cam_kinect'
Call Stack (most recent call first):
/opt/ros/kinetic/share/catkin/cmake/catkin_package.cmake:102 (_catkin_package)
cam_kinect/CMakeLists.txt:83 (catkin_package)
-- Configuring incomplete, errors occurred!
See also "/home/cerlab/Documents/depowder_summer_2018/build/CMakeFiles/CMakeOutput.log".
See also "/home/cerlab/Documents/depowder_summer_2018/build/CMakeFiles/CMakeError.log".
Makefile:3118: recipe for target 'cmake_check_build_system' failed
make: *** [cmake_check_build_system] Error 1
Invoking "make cmake_check_build_system" failed
The CMakeLists.txt file for my cam_kinect starting at line **80** is as follows:
## 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 cam_kinect
CATKIN_DEPENDS roscpp sensor_msgs std_msgs roslib message_runtime
DEPENDS Boost PCL
)
Also my ros environment:
ROS_ROOT=/opt/ros/kinetic/share/ros
ROS_PACKAGE_PATH=/home/cerlab/Documents/depowder_summer_2018/src:/opt/ros/kinetic/share
ROS_MASTER_URI=http://localhost:11311
ROS_VERSION=1
ROSLISP_PACKAGE_DIRECTORIES=/home/cerlab/Documents/depowder_summer_2018/devel/share/common-lisp
ROS_DISTRO=kinetic
ROS_ETC_DIR=/opt/ros/kinetic/etc/ros
↧
colcon build error ROS2
I am building ROS2 on windows from source. Recently there has been an upgrade in ROS2 and I am facing many problems in building a simple code. For this reason, I am now using a different PC to install ROS2 from scratch. Everything worked fine until the `colcon build`. I have the following error:
CMake Error: The following variables are used in this project, but they are set to NOTFOUND.
Please set them or make sure they are set and tested correctly in the CMake files:
EIGEN3_INCLUDE_DIR (ADVANCED)
used as include directory in directory C:/dev/ros2/src/ros2/orocos_kinematics_dynamics/orocos_kdl
used as include directory in directory C:/dev/ros2/src/ros2/orocos_kinematics_dynamics/orocos_kdl/doc
used as include directory in directory C:/dev/ros2/src/ros2/orocos_kinematics_dynamics/orocos_kdl/doc
used as include directory in directory C:/dev/ros2/src/ros2/orocos_kinematics_dynamics/orocos_kdl/src
used as include directory in directory C:/dev/ros2/src/ros2/orocos_kinematics_dynamics/orocos_kdl/src
used as include directory in directory C:/dev/ros2/src/ros2/orocos_kinematics_dynamics/orocos_kdl/tests
used as include directory in directory C:/dev/ros2/src/ros2/orocos_kinematics_dynamics/orocos_kdl/models
used as include directory in directory C:/dev/ros2/src/ros2/orocos_kinematics_dynamics/orocos_kdl/examples
---
Failed <<< orocos_kdl [ Exited with code 1 ]
Aborted <<< ament_cmake_ros
Aborted <<< rosidl_generator_cpp
Aborted <<< urdfdom
Summary: 54 packages finished [258.34s]
1 package failed: orocos_kdl
3 packages aborted: ament_cmake_ros rosidl_generator_cpp urdfdom
13 packages had stderr output: ament_copyright ament_cppcheck ament_cpplint ament_flake8 ament_index_python ament_lint_cmake ament_package ament_pep257 ament_uncrustify connext_cmake_module launch launch_testing orocos_kdl
113 packages not processed
↧
catkin_make Error: Could NOT find TinyXML2 (missing: TinyXML2_LIBRARY TinyXML2_INCLUDE_DIR)
Hi everyone!
I get this error when I try to compile my packages with catkin_make on a BeagleBone board (ARM).
I have these packages installed (aptitude search tinyxml): libtinyxml-dev, libtinyxml2-2v5, libtinyxml2.6.2v5
Any suggestion would be appreciated.
Here is the log:
root@beaglebone:~/RBE-2002# catkin_make
Base path: /root/RBE-2002
Source space: /root/RBE-2002/src
Build space: /root/RBE-2002/build
Devel space: /root/RBE-2002/devel
Install space: /root/RBE-2002/install
####
#### Running command: "cmake /root/RBE-2002/src -DCATKIN_DEVEL_PREFIX=/root/RBE-2002/devel -DCMAKE_INSTALL_PREFIX=/root/RBE-2002/install -G Unix Makefiles" in "/root/RBE-2002/build"
####
-- Using CATKIN_DEVEL_PREFIX: /root/RBE-2002/devel
-- Using CMAKE_PREFIX_PATH: /opt/ros/kinetic
-- This workspace overlays: /opt/ros/kinetic
-- 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: /root/RBE-2002/build/test_results
-- Found gtest sources under '/usr/src/gtest': gtests will be built
-- Using Python nosetests: /usr/bin/nosetests-2.7
-- catkin 0.7.6
-- BUILD_SHARED_LIBS is on
-- ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
-- ~~ traversing 29 packages in topological order:
-- ~~ - class_loader
-- ~~ - ros_control (metapackage)
-- ~~ - ros_controllers (metapackage)
-- ~~ - pluginlib
-- ~~ - rqt_joint_trajectory_controller
-- ~~ - controller_manager_msgs
-- ~~ - four_wheel_steering_msgs
-- ~~ - hardware_interface
-- ~~ - combined_robot_hw
-- ~~ - controller_interface
-- ~~ - force_torque_sensor_controller
-- ~~ - forward_command_controller
-- ~~ - effort_controllers
-- ~~ - imu_sensor_controller
-- ~~ - position_controllers
-- ~~ - controller_manager
-- ~~ - diff_drive_controller
-- ~~ - gripper_action_controller
-- ~~ - joint_limits_interface
-- ~~ - joint_state_controller
-- ~~ - joint_trajectory_controller
-- ~~ - rqt_controller_manager
-- ~~ - sweep_ros
-- ~~ - controller_manager_tests
-- ~~ - combined_robot_hw_tests
-- ~~ - transmission_interface
-- ~~ - turtlebotmini
-- ~~ - urdf_geometry_parser
-- ~~ - velocity_controllers
-- ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
-- +++ processing catkin package: 'class_loader'
-- ==> add_subdirectory(class_loader)
-- Boost version: 1.55.0
-- Found the following Boost libraries:
-- thread
-- system
-- chrono
-- date_time
-- atomic
-- Searching for Poco library...
-- Found Poco!
-- components found: Foundation.
-- Boost version: 1.55.0
-- Found the following Boost libraries:
-- thread
-- chrono
-- system
-- date_time
-- atomic
-- +++ processing catkin metapackage: 'ros_control'
-- ==> add_subdirectory(ros_control/ros_control)
-- +++ processing catkin metapackage: 'ros_controllers'
-- ==> add_subdirectory(ros_controllers/ros_controllers)
-- +++ processing catkin package: 'pluginlib'
-- ==> add_subdirectory(pluginlib)
-- Boost version: 1.55.0
-- Found the following Boost libraries:
-- filesystem
-- system
CMake Error at /usr/share/cmake-3.5/Modules/FindPackageHandleStandardArgs.cmake:148 (message):
Could NOT find TinyXML2 (missing: TinyXML2_LIBRARY TinyXML2_INCLUDE_DIR)
Call Stack (most recent call first):
/usr/share/cmake-3.5/Modules/FindPackageHandleStandardArgs.cmake:388 (_FPHSA_FAILURE_MESSAGE)
/opt/ros/kinetic/share/cmake_modules/cmake/Modules/FindTinyXML2.cmake:65 (find_package_handle_standard_args)
pluginlib/CMakeLists.txt:6 (find_package)
-- Configuring incomplete, errors occurred!
See also "/root/RBE-2002/build/CMakeFiles/CMakeOutput.log".
See also "/root/RBE-2002/build/CMakeFiles/CMakeError.log".
Invoking "cmake" failed
CMakeLists.txt of PluginLib:
cmake_minimum_required(VERSION 2.8.3)
project(pluginlib)
find_package(catkin REQUIRED COMPONENTS class_loader rosconsole roslib cmake_modules)
find_package(Boost REQUIRED COMPONENTS filesystem system)
find_package(TinyXML2 REQUIRED)
catkin_python_setup()
catkin_package(
INCLUDE_DIRS include
CATKIN_DEPENDS class_loader rosconsole roslib
DEPENDS Boost TinyXML2
)
include_directories(include ${catkin_INCLUDE_DIRS} ${Boost_INCLUDE_DIRS} ${TinyXML2_INCLUDE_DIRS})
add_executable(plugin_tool src/plugin_tool.cpp)
target_link_libraries(plugin_tool ${Boost_LIBRARIES} ${catkin_LIBRARIES} ${TinyXML2_LIBRARIES})
install(TARGETS plugin_tool
RUNTIME DESTINATION ${CATKIN_PACKAGE_BIN_DESTINATION}
ARCHIVE DESTINATION ${CATKIN_PACKAGE_LIB_DESTINATION}
LIBRARY DESTINATION ${CATKIN_PACKAGE_LIB_DESTINATION})
install(DIRECTORY include/pluginlib/
DESTINATION ${CATKIN_PACKAGE_INCLUDE_DESTINATION})
install(FILES share/pluginlib/typed_class_loader_template.cpp
DESTINATION ${CATKIN_PACKAGE_SHARE_DESTINATION})
install(PROGRAMS scripts/plugin_macro_update
DESTINATION ${CATKIN_PACKAGE_BIN_DESTINATION})
if(CATKIN_ENABLE_TESTING)
add_library(test_plugins EXCLUDE_FROM_ALL SHARED test/test_plugins.cpp)
catkin_add_gtest(${PROJECT_NAME}_utest test/utest.cpp)
if(TARGET ${PROJECT_NAME}_utest)
target_link_libraries(${PROJECT_NAME}_utest ${TinyXML2_LIBRARIES} ${catkin_LIBRARIES} ${Boost_LIBRARIES})
add_dependencies(${PROJECT_NAME}_utest test_plugins)
endif()
include(CheckCXXCompilerFlag)
check_cxx_compiler_flag("-std=c++11" COMPILER_SUPPORTS_CXX11)
if(COMPILER_SUPPORTS_CXX11)
catkin_add_gtest(${PROJECT_NAME}_unique_ptr_test test/unique_ptr_test.cpp)
if(TARGET ${PROJECT_NAME}_unique_ptr_test)
target_link_libraries(${PROJECT_NAME}_unique_ptr_test ${TinyXML2_LIBRARIES} ${catkin_LIBRARIES} ${Boost_LIBRARIES})
set_target_properties(${PROJECT_NAME}_unique_ptr_test PROPERTIES COMPILE_FLAGS -std=c++11 LINK_FLAGS -std=c++11)
add_dependencies(${PROJECT_NAME}_unique_ptr_test test_plugins)
endif()
endif()
endif()
↧