Quantcast
Channel: ROS Answers: Open Source Q&A Forum - RSS feed
Viewing all 670 articles
Browse latest View live

RViz: ros package using_markers not found

$
0
0
Hi everyone, I tried to follow tutorials for rviz in http://wiki.ros.org/rviz/Tutorials/Markers%3A%20Basic%20Shapes However, after I did it step by step, ros cannot find the package even though I have sourced setup.bash. Can someone help me out? Great thanks!!! z1huo@z1huo-ThinkPad-P51:~$ catkin_create_pkg using_markers roscpp visualization_msgs usage: catkin_create_pkg [-h] [--meta] [-s [SYS_DEPS [SYS_DEPS ...]]] [-b [BOOST_COMPS [BOOST_COMPS ...]]] [-V PKG_VERSION] [-D DESCRIPTION] [-l LICENSE] [-a AUTHOR] [-m MAINTAINER] [--rosdistro ROSDISTRO] name [dependencies [dependencies ...]] catkin_create_pkg: error: File exists: /home/z1huo/using_markers/CMakeLists.txt z1huo@z1huo-ThinkPad-P51:~$ cd ~/catkin_ws z1huo@z1huo-ThinkPad-P51:~/catkin_ws$ catkin_make Base path: /home/z1huo/catkin_ws Source space: /home/z1huo/catkin_ws/src Build space: /home/z1huo/catkin_ws/build Devel space: /home/z1huo/catkin_ws/devel Install space: /home/z1huo/catkin_ws/install #### #### Running command: "make cmake_check_build_system" in "/home/z1huo/catkin_ws/build" #### #### #### Running command: "make -j8 -l8" in "/home/z1huo/catkin_ws/build" #### [ 0%] Built target std_msgs_generate_messages_lisp [ 0%] Built target std_msgs_generate_messages_nodejs [ 0%] Built target std_msgs_generate_messages_eus [ 0%] Built target std_msgs_generate_messages_cpp [ 0%] Built target std_msgs_generate_messages_py [ 0%] Built target _beginner_tutorials_generate_messages_check_deps_AddTwoInts [ 0%] Built target _beginner_tutorials_generate_messages_check_deps_Num [ 15%] Built target beginner_tutorials_generate_messages_lisp [ 46%] Built target beginner_tutorials_generate_messages_py [ 69%] Built target beginner_tutorials_generate_messages_eus [ 84%] Built target beginner_tutorials_generate_messages_cpp [100%] Built target beginner_tutorials_generate_messages_nodejs [100%] Built target beginner_tutorials_generate_messages z1huo@z1huo-ThinkPad-P51:~/catkin_ws$ source devel/setup.bash z1huo@z1huo-ThinkPad-P51:~/catkin_ws$ rosrun using_markers basic_shapes [rospack] Error: package 'using_markers' not found

catkin config --install and --no-install using same build dir?

$
0
0
With catkin_make (and earlier versions of catkin tools?) I was able to build to either devel or install, but with catkin config I have to clean and rebuild everything when switching from one to the other- it would be less trouble to use a two profiles: Error: Attempting to build a catkin workspace using build space: "/home/lucasw/catkin_ws/build" but that build space's most recent configuration differs from the commanded one in ways which will cause problems. Fix the following options or use `catkin clean -b` to remove the build space: - install: True (stored) is not False (commanded) $ catkin clean -b [clean] Warning: This will completely remove the following directories. (Use `--yes` to skip this check) [clean] Build Space: /home/lucasw/catkin_ws/build [clean] Are you sure you want to completely remove the directories listed above? [yN]: y [clean] Removing buildspace: /home/lucasw/catkin_ws/build Or is there another way to do it that uses the least amount of building and rebuilding? (The second profile approach still requires a duplicate build, but at least doesn't need to be deleted) It seems like if all the cmake args are the same then one build should be able to either be used in place or installed (or dynamic libraries are built differently?)

Catkin not building packages in order

$
0
0
I have just had a really odd problem with catkin_make. I have been successfully building a workspace containing three packages, two with messages and another one with an executable. So far, removing the build and devel folders and relaunching the command worked fine, but now for some reason the process crashes in the linking phase of the executable while the headers of the other packages are still being generated. This means that I have to relaunch the command several times, getting different errors that come and go as new code is generated each time until finally the executable gets linked successfully. Any ideas what the problem might be?

Problem tracking down an cmake error in a ROS/gazebo project

$
0
0
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.

OpenCV 3 runtime error "Invalid pointer to file storage" cv_bridge + third party library

$
0
0
I'm trying to publish the image of a [picozense camera](https://www.pico-interactive.com/zense) in a ROS node in **ROS kinetic, Ubuntu 16.04**. I build a catkin package and included the camera's API (.h and .so files) which is OpenCV3 compatible. This works fine, i can call the API functions in the c++ source code. However, OpenCV crashes at runtime with an error that after some research most posts argue is a conflict between OpenCV2 and OpenCV3. But my installed **OpenCV version is 3.3.1** and i don't have any OpenCV 2.x installed. (Also i'm using cv_bridge which [depends on OpenCV3](https://github.com/ros-perception/vision_opencv/blob/kinetic/cv_bridge/CMakeLists.txt) components) The only OpenCV package i added to my dependencies and in my code is the *highgui* package. If i leave it out, the node does not crash at all. But even with the highgui package the node runs successfully sometimes. How can i fix the error? **OpenCV Runtime Error** rosusr@ubuntu:~/catkin_ws$ rosrun picozense publisher 1 OpenCV Error: Bad argument (Invalid pointer to file storage) in cvGetFileNodeByName, file /tmp/binarydeb/ros-kinetic-opencv3-3.3.1/modules/core/src/persistence.cpp, line 861 terminate called after throwing an instance of 'cv::Exception' what(): /tmp/binarydeb/ros-kinetic-opencv3-3.3.1/modules/core/src/persistence.cpp:861: error: (-5) Invalid pointer to file storage in function cvGetFileNodeByName Aborted (core dumped) **Running the node works sometimes** (the initialization just fails because the camera is not connected) rosusr@ubuntu:~/catkin_ws$ rosrun picozense publisher 1 2 PsInitialize status: -1 Initialize failed! Shutdown status: 0 **publisher.cpp** #include #include #include #include "PicoZense_api.h" int main(int argc, char** argv){ ros::init(argc, argv, "publisher"); ros::NodeHandle nh; PsReturnStatus status; std::cout << "1" << std::endl; status = PsInitialize(); std::cout << "2" << std::endl; std::cout << "PsInitialize status: " << status << std::endl; if (status != PsReturnStatus::PsRetOK){ std::cout << "Initialize failed!" << std::endl; status = PsShutdown(); std::cout << "Shutdown status: " << status << std::endl; return -1; } // ... // using opencv highgui etc. here // return 0; } **CMakeLists.txt** cmake_minimum_required(VERSION 2.8.3) project(picozense) add_compile_options(-std=c++11) find_package(catkin REQUIRED COMPONENTS cv_bridge image_transport sensor_msgs message_generation ) find_package(OpenCV 3 REQUIRED COMPONENTS highgui) generate_messages( DEPENDENCIES sensor_msgs ) catkin_package( CATKIN_DEPENDS cv_bridge image_transport sensor_msgs message_runtime ) include_directories( include ${catkin_INCLUDE_DIRS} #picoZense API header file is here (/picozense/include/) ${OpenCV_INCLUDE_DIRS} ) message(STATUS "catkin_include_dirs: " ${catkin_INCLUDE_DIRS}) message(STATUS "opencv_include_dirs: " ${OpenCV_INCLUDE_DIRS}) add_executable(publisher src/publisher.cpp) add_dependencies(publisher ${catkin_EXPORTED_TARGETS} ${${PROJECT_NAME}_EXPORTED_TARGETS}) target_link_libraries(publisher ${catkin_LIBRARIES} ${OpenCV_LIBRARIES} ${PROJECT_SOURCE_DIR}/lib/x64/libpicozense_api.so) message(STATUS "opencv_libraries: " ${OpenCV_LIBRARIES}) **package.xml** picozense0.0.0The picozense packagerosusrTODOcatkincv_bridgeimage_transportsensor_msgsmessage_generationcv_bridgeimage_transportsensor_msgsmessage_generationcv_bridgeimage_transportsensor_msgsmessage_runtime **ldd libpicozense_api.so** linux-vdso.so.1 => (0x00007ffc19ea8000) libpthread.so.0 => /lib/x86_64-linux-gnu/libpthread.so.0 (0x00007ff34274c000) libstdc++.so.6 => /usr/lib/x86_64-linux-gnu/libstdc++.so.6 (0x00007ff3423ca000) libm.so.6 => /lib/x86_64-linux-gnu/libm.so.6 (0x00007ff3420c1000) libgcc_s.so.1 => /lib/x86_64-linux-gnu/libgcc_s.so.1 (0x00007ff341eaa000) libc.so.6 => /lib/x86_64-linux-gnu/libc.so.6 (0x00007ff341ae0000) /lib64/ld-linux-x86-64.so.2 (0x000055f87df4e000) I've already searched and tried a lot but any help is very much appreciated!

"The library is neither a target nor built/installed properly"

$
0
0
Hello, Hello I have a package called wp3_driver_pkg which builds without errors when I build it alone but when I'm trying to use it in another package (ur10) I have the following error :

  Project 'ur10' tried to find library 'wp3_driver_pkg'.  The library is
  neither a target nor built/installed properly.  Did you compile project
  'wp3_driver_pkg'? Did you find_package() it before the subdirectory
  containing its code is included?
The package wp3_driver_pkg has been added to the ur10 package.xml for build and run. and is called in the cmakefile.txt of the ur10:

find_package( wp3_driver_pkg REQUIRED)
This is the catkin_package() in the cmakefile.txt for the wp3_driver_pkg

catkin_package(
INCLUDE_DIRS include
LIBRARIES ${PROJECT_NAME} wp3_driver_lib
CATKIN_DEPENDS message_runtime roscpp rospy roslib ${MSG_DEPS}
)
the wp3_driver_lib is a library added in the same cmakefile with the source file


 add_library(wp3_driver_lib
         src/wp3_driver.cpp
)
target_link_libraries(wp3_driver_lib
       	${catkin_LIBRARIES}
)

I can even see the package being built before in the terminal : ![image description](/upfiles/14660709451251592.png) And if I use the command "rospack fin wp3_driver_pkg" just after the failed compilation and the package is found, even if I suppress the devel and build folder of the workspace. Thanks for the answers if you see what I'm doing wrong !

What does "catkin build --cmake-args -DCMAKE_BUILD_TYPE=Release" actually do?

$
0
0
I recently been exploring using these cmake-args to optimize my code. For the past few weeks I have just been running "catkin build ". Today when I ran "catkin build --cmake-args -DCMAKE_BUILD_TYPE=Release" my code ran 10 times faster. Should I always be running the second command instead with the build type explicitly mentioned as opposed to simply "catkin build "? Is this a safe practice? I could not find much about this on the internet and I would greatly appreciate some advice.

How to properly install packages from source?

$
0
0
Hi, I have been reading on how to install packages INTO ROS that aren't included in the ROS installation for a while now and I still don't get it. I am trying to modify source before installing, hence I would like to build it myself. I am using Kinetic (Ubuntu 16.04 LTS) distro using catkin filesystem. The package I am trying to install is this: [serial](http://wiki.ros.org/serial) It is available as a .deb package so initially I installed it using `sudo apt-get install ros-kinematic-serial` and that installed fine. 1. First of all, I don't quite get how a package like this one works when installed (or any ROS package). I checked its CMakeLists.txt file, it only installs headers and an example binary file. Going into `cd /opt/ros/kinetic/share/serial` there is only package.xml file and a cmake folder with serialConfig.cmake and serialConfig-version.cmake files. I compiled a basic ROS node using this library and it works fine, so how does ROS know where to find the src files if it only has headers and cmake configs installed? 2. Secondly, if I try to install package from source into ROS, what's the proper way of doing it? I have tried: cd ~/catkin_ws/src git clone https://github.com/wjwwood/serial.git cd ~/catkin_ws/ && catkin_make source ~/catkin_ws/devel/setup.bash That works fine, my example node works and I can adjust the source to my liking, but the package is installed to my catkin workspace and not the global ROS path. How do I add the package into the ROS environment so that something like `rospack list`can identify it? 3. Lastly, how come after `catkin_make` I can't find my package using rosrun my_package serial_example_node? Any help is really appreciated!

Check ROS Version in CMake File with Catkin

$
0
0
Is there a way to check the version of ROS being used in the CMakeLists.txt file? i.e., are there any variables or macros to query the version?

Couldn't find executable named jet_real.launch below /home/nvidia/FOLDER_FOR_ROS/catkin_ws/src/rosjet/jet_bringup [rosrun] Found the following, but they're either not files

$
0
0
Hello everyone sorry for this long question I am pretty new with ROS, I am trying to connect my jetson TX! with my host pc. However when I run my launch file source ~/.bashrc; source FOLDER_FOR_ROS/catkin_ws/devel/setup.sh; rosrun jet_bringup jet_real.launch I get this error: [rosrun] Couldn't find executable named jet_real.launch below /home/nvidia/FOLDER_FOR_ROS/catkin_ws/src/rosjet/jet_bringup [rosrun] Found the following, but they're either not files, [rosrun] or not executable: [rosrun] /home/nvidia/FOLDER_FOR_ROS/catkin_ws/src/rosjet/jet_bringup/launch/jet_real.launch when I run catkin config I get this: Profile: default Extending: [env] /home/nvidia/FOLDER_FOR_ROS/catkin_ws/devel:/opt/ros/kinetic Workspace: /home/nvidia -------------------------------------------------------------------------------- Source Space: [missing] /home/nvidia/src Log Space: [missing] /home/nvidia/logs Build Space: [missing] /home/nvidia/build Devel Space: [missing] /home/nvidia/devel Install Space: [unused] /home/nvidia/install DESTDIR: [unused] None -------------------------------------------------------------------------------- Devel Space Layout: linked Install Space Layout: None -------------------------------------------------------------------------------- Additional CMake Args: None Additional Make Args: None Additional catkin Make Args: None Internal Make Job Server: True Cache Job Environments: False -------------------------------------------------------------------------------- Whitelisted Packages: None Blacklisted Packages: None -------------------------------------------------------------------------------- Initialized new catkin workspace in `/home/nvidia` -------------------------------------------------------------------------------- -------------------------------------------------------------------------------- WARNING: Source space `/home/nvidia/src` does not yet exist. I already check my jetson and Pc can ping, but I think that this problem come from directories path I will really appreciate your help thanks

How to cross compile for Raspberry Pi 3 ?

$
0
0
Hello, Compiling my project directly on my raspberry has a high failure rate so I thought the cross compilation was a good option to avoid that. But it appears to be more difficult than I thought and there are not that much tutorials on the internet about this topic. Can somebody help me figure it out by describing how to proceed step by step not to miss anything ? **Here's what I did :** ([this answer](https://stackoverflow.com/questions/19162072/how-to-install-the-raspberry-pi-cross-compiler-on-my-linux-host-machine) from stackoverflow helped me a lot) 1) Install the compiler for the raspberry on my computer (running Ubuntu 16.04) -> for my raspberry it's `arm-linux-gnueabihf` 2) Create a `rostoolchain.cmake` file : SET(CMAKE_SYSTEM_NAME Linux) SET(CMAKE_SYSTEM_VERSION 1) set(CMAKE_CXX_STANDARD 11) set(CMAKE_CXX_STANDARD_REQUIRED ON) #avoid RT_LIBRARY-NOT-FOUND issue set(CMAKE_LIBRARY_ARCHITECTURE arm-linux-gnueabihf) #set(CMAKE_INSTALL_RPATH "${CMAKE_INSTALL_PREFIX}/lib") #set(CMAKE_INSTALL_RPATH_USE_LINK_PATH TRUE) set(LD_LIBRARY_PATH ${LD_LIBRARY_PATH} $ENV{HOME}/raspberrypi/devel/lib) set(PKG_CONFIG_PATH ${PKG_CONFIG_PATH} $ENV{HOME}/raspberrypi/devel/lib/pkgconfig) # specify the cross compiler SET(CMAKE_C_COMPILER /usr/bin/arm-linux-gnueabihf-gcc) SET(CMAKE_CXX_COMPILER /usr/bin/arm-linux-gnueabihf-g++) SET(CMAKE_FIND_ROOT_PATH $ENV{HOME}/raspberrypi/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_LIBRARY_PATH $ENV{HOME}/raspberrypi/rootfs) # Set compiler flag SET(CMAKE_C_FLAGS "${CMAKE_CXX_FLAGS} --sysroot=${CMAKE_FIND_ROOT_PATH}") SET( CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} --sysroot=${CMAKE_FIND_ROOT_PATH}" ) 3) Create a catkin profile to cross compile : Profile: cross Extending: [explicit] /opt/ros/kinetic Workspace: /home/robotics/raspberrypi ------------------------------------------------------------------------------------------------------------------------- Source Space: [exists] /home/robotics/raspberrypi/src Log Space: [exists] /home/robotics/raspberrypi/logs Build Space: [exists] /home/robotics/raspberrypi/build Devel Space: [exists] /home/robotics/raspberrypi/devel Install Space: [unused] /home/robotics/raspberrypi/install DESTDIR: [unused] None ------------------------------------------------------------------------------------------------------------------------- Devel Space Layout: linked Install Space Layout: None ------------------------------------------------------------------------------------------------------------------------- Additional CMake Args: -DBUILD_SHARED_LIBS=Off -DCMAKE_TOOLCHAIN_FILE=/home/robotics/raspberrypi/rostoolchain.cmake Additional Make Args: None Additional catkin Make Args: None Internal Make Job Server: True Cache Job Environments: False ------------------------------------------------------------------------------------------------------------------------- Whitelisted Packages: None Blacklisted Packages: None 4) Finally, run `catkin build` but it generates this warning (I display for only one package) : Warnings << tile_manager:cmake /home/robotics/raspberrypi/logs/tile_manager/build.cmake.001.log CMake Warning at /home/robotics/raspberrypi/src/tile_manager/CMakeLists.txt:79 (add_executable): Cannot generate a safe linker search path for target tile_marker_node because there is a cycle in the constraint graph: dir 0 is [/home/robotics/raspberrypi/rootfs/usr/lib/arm-linux-gnueabihf] dir 1 must precede it due to link library [libpthread.so] dir 1 is [/usr/lib/x86_64-linux-gnu] dir 0 must precede it due to link library [libpthread.so] Some of these libraries may not be found correctly. Leading to this error : Errors << tile_manager:make /home/robotics/raspberrypi/logs/tile_manager/build.make.002.log /opt/ros/kinetic/lib/libtf.so: file not recognized: File format not recognized collect2: error: ld returned 1 exit status It seems that there is a conflict with the paths `/usr/lib/x86_64-linux-gnu`, `/home/robotics/raspberrypi/rootfs/usr/lib/arm-linux-gnueabihf` and I have other warnings with `/opt/ros/kinetic/lib` too but I can't find which variable is defining those paths (I think I should only have `/home/robotics/raspberrypi/rootfs/usr/lib/arm-linux-gnueabihf` ) Am I missing something here or is it possible that the issues come from my `CMakeLists.txt` files ? Any insight would be greatly appreciated.

U-Blox: Could not open serial port :/dev/ttyACM0

$
0
0
hello guys, I'm getting this error. Then the process dies. I'm not sure about what could be wrong. Any idea will be very appreciated 02.07.18 21:24:26 (+0000) main [ublox_gps-2] restarting process 02.07.18 21:24:26 (+0000) main process[ublox_gps-2]: started with pid [29965] 02.07.18 21:24:26 (+0000) main [ WARN] [1530566666.814132192]: Warning: PPP is enabled - this is an expert setting. 02.07.18 21:24:26 (+0000) main terminate called after throwing an instance of 'std::runtime_error' 02.07.18 21:24:26 (+0000) main what(): U-Blox: Could not open serial port :/dev/ttyACM0 open: No such file or directory 02.07.18 21:24:26 (+0000) main [ublox_gps-2] process has died [pid 29965, exit code -6, cmd /catkin_ws/devel/lib/ublox_gps/ublox_gps __name:=ublox_gps __log:=/root/.ros/log/a10fc4ca-7e39-11e8-817b-00044ba83bf2/ublox_gps-2.log].

catkin-pkg distribution was not found

$
0
0
Hi ROS-Community, I am using ubuntu 16.04 with ROS Kinetic build from source. Today I tried to recompile my workspace, but now I get some errors using catkin_find_pkg, which does not allow me to compile any package at all. If I try to compile my workspace: CMake Error at CMakeLists.txt:20 (message): Search for 'catkin' in workspace failed (catkin_find_pkg catkin /home/hkluessendorff/ros/2-additional/src): Traceback (most recent call last): File "/usr/local/bin/catkin_find_pkg", line 5, in from pkg_resources import load_entry_point File "/usr/lib/python2.7/dist-packages/pkg_resources/__init__.py", line 2927, in @_call_aside File "/usr/lib/python2.7/dist-packages/pkg_resources/__init__.py", line 2913, in _call_aside f(*args, **kwargs) File "/usr/lib/python2.7/dist-packages/pkg_resources/__init__.py", line 2940, in _initialize_master_working_set working_set = WorkingSet._build_master() File "/usr/lib/python2.7/dist-packages/pkg_resources/__init__.py", line 637, in _build_master return cls._build_from_requirements(__requires__) File "/usr/lib/python2.7/dist-packages/pkg_resources/__init__.py", line 650, in _build_from_requirements dists = ws.resolve(reqs, Environment()) File "/usr/lib/python2.7/dist-packages/pkg_resources/__init__.py", line 829, in resolve raise DistributionNotFound(req, requirers) pkg_resources.DistributionNotFound: The 'catkin-pkg==0.4.3' distribution was not found and is required by the application I get the same error when I just invoke catkin_find_pkg Traceback (most recent call last): File "/usr/local/bin/catkin_find_pkg", line 5, in from pkg_resources import load_entry_point File "/usr/lib/python2.7/dist-packages/pkg_resources/__init__.py", line 2927, in @_call_aside File "/usr/lib/python2.7/dist-packages/pkg_resources/__init__.py", line 2913, in _call_aside f(*args, **kwargs) File "/usr/lib/python2.7/dist-packages/pkg_resources/__init__.py", line 2940, in _initialize_master_working_set working_set = WorkingSet._build_master() File "/usr/lib/python2.7/dist-packages/pkg_resources/__init__.py", line 637, in _build_master return cls._build_from_requirements(__requires__) File "/usr/lib/python2.7/dist-packages/pkg_resources/__init__.py", line 650, in _build_from_requirements dists = ws.resolve(reqs, Environment()) File "/usr/lib/python2.7/dist-packages/pkg_resources/__init__.py", line 829, in resolve raise DistributionNotFound(req, requirers) pkg_resources.DistributionNotFound: The 'catkin-pkg==0.4.3' distribution was not found and is required by the application I looked inside python-catkin-pkg which I installed via apt-get python-catkin-pkg is already the newest version (0.4.6-100). It seems to me that somehow I need catkin-pkg version 0.4.3, but installed 0.4.6 via an apt-get upgrade. Anybody of you has an idea how to solve this error? Thanks in advance for your advice Best regards,

catkin_make Error - An error has occurred. Help

$
0
0
cd ~/catkin_ws && catkin_make The following error occurs. How do I do it? ![image description](https://cafeptthumb-phinf.pstatic.net/MjAxODA3MDRfMjIw/MDAxNTMwNjk1MDEwMjQ3.6Mb1BTPGhZixYrgfIf-IxZX5NlDvdUDE8qgv9yffecwg.mw2oqEAQGrazuRPh_5obGFDzlElt3w9WqtEZFqMSxcwg.PNG.nanboojada/%EC%8A%A4%ED%81%AC%EB%A6%B0%EC%83%B7%2C_2018-07-04_17-56-03.png?type=w740)

AMCL 'openni-dev' not found

$
0
0
Hi, I am trying to install AMCL ROS package using catkin_make but i get the following error: *CMake Error at /usr/share/cmake-2.8/Modules/FindPkgConfig.cmake:283 (message): A required package was not found . . . -- Found the following Boost libraries: -- system -- filesystem -- thread -- date_time -- iostreams -- serialization **-- checking for module 'openni-dev' -- package 'openni-dev' not found*** Openni is already installed, so, maybe, the problem is that its libraries are not included in the CMakeLists.txt file Boost libraries. In that case, I would like to know how and which openni files are needed to be included.

Problem building with non-installed dependencies

$
0
0
I am making a custom ROS package in C++. The problem I am having is that the build of my node fails, because dpkg-shlibdeps, which gets run during $ fakeroot debian/rules binary is failing to find shared objects that are not installed yet. These non-ROS libs have just been built in Jenkins which is then followed by building of non-ROS components which use the libraries and then building of the ROS components. dh_shlibdeps -l/mnt/build/workspace/RobotCore/catkin_ws/src/t6_hardware/debian/ros-kinetic-t6-hardware//opt/ros/kinetic/lib/ dpkg-shlibdeps -Tdebian/ros-kinetic-t6-hardware.substvars -l/mnt/build/workspace/RobotCore/catkin_ws/src/t6_hardware/debian/ros-kinetic-t6-hardware//opt/ros/kinetic/lib/ debian/ros-kinetic-t6-hardware/opt/ros/kinetic/lib/t6_hardware/t6_hardware_node dpkg-shlibdeps: error: couldn't find library libicorutility.so.1 needed by debian/ros-kinetic-t6-hardware/opt/ros/kinetic/lib/t6_hardware/t6_hardware_node (ELF format: 'elf32-littlearm-hfabi'; RPATH: '') dpkg-shlibdeps: error: couldn't find library libicormqtt.so.1 needed by debian/ros-kinetic-t6-hardware/opt/ros/kinetic/lib/t6_hardware/t6_hardware_node (ELF format: 'elf32-littlearm-hfabi'; RPATH: '') The CMakeLists.txt specifies to find the libraries at the build location, but this does not seem to be transferred through bloom. These libraries are sucessessfully picked up in other, non-ROS, cmake builds with cpack to package them, with similar find_library stanzas. EDIT: updated CMakeLists.txt cmake_minimum_required(VERSION 3.5) project(t6_hardware) # Set the build type. Options are: # Coverage : w/ debug symbols, w/o optimization, w/ code-coverage # Debug : w/ debug symbols, w/o optimization # Release : w/o debug symbols, w/ optimization # RelWithDebInfo : w/ debug symbols, w/ optimization # MinSizeRel : w/o debug symbols, w/ optimization, stripped binaries #set(ROS_BUILD_TYPE RelWithDebInfo) set ( CMAKE_CXX_STANDARD 11 ) set ( CMAKE_BUILD_TYPE release ) find_library( ICORUTILITY_LIBRARIES NAMES libicorutility libicorutility.so.1 PATHS ../../../shared/IcorUtilityLib/build ../../../../shared/IcorUtilityLib/build ) find_library( ICORMQTT_LIBRARIES NAMES libicormqtt libicormqtt.so.1 PATHS ../../../shared/MqttLib/build ../../../../shared/MqttLib/build ) find_package( catkin REQUIRED COMPONENTS actionlib actionlib_msgs controller_manager hardware_interface message_generation roscpp sensor_msgs std_msgs ) catkin_package( CATKIN_DEPENDS actionlib actionlib_msgs controller_manager hardware_interface roscpp sensor_msgs std_msgs ) include_directories( include ${catkin_INCLUDE_DIRS} ) add_executable(${PROJECT_NAME}_node src/t6_main.cpp src/t6_robot.cpp ) message( "Utility libraries = ${ICORUTILITY_LIBRARIES}" ) message( "Mqtt libraries = ${ICORMQTT_LIBRARIES}" ) target_link_libraries( ${PROJECT_NAME}_node ${catkin_LIBRARIES} ${ICORUTILITY_LIBRARIES} ${ICORMQTT_LIBRARIES} ) ## Mark executables and/or libraries for installation install(TARGETS ${PROJECT_NAME}_node ARCHIVE DESTINATION ${CATKIN_PACKAGE_LIB_DESTINATION} LIBRARY DESTINATION ${CATKIN_PACKAGE_LIB_DESTINATION} RUNTIME DESTINATION ${CATKIN_PACKAGE_BIN_DESTINATION} ) install(DIRECTORY launch/ DESTINATION ${CATKIN_PACKAGE_SHARE_DESTINATION}/launch PATTERN ".svn" EXCLUDE ) Note that during run time, the libraries are installed from deb packages, but not at build time. Does anybody know how to get the ROS build mechanism to not fail when it learns of non-packaged dependencies through dpkg_shlibdeps?

importerror catkin_pkg

$
0
0
## Problem I reinstalled ROS1 Kinetic on Ubuntu 16.04 since I realized I had been using pip, apt, and virtualenvs in the wrong way. In my system environment, I installed ROS Kinetic following the guidelines which worked fine. However when I run ``` sudo rosdep init ``` I get: Traceback (most recent call last): File "/usr/bin/rosdep", line 3, in from rosdep2.main import rosdep_main File "/usr/lib/python2.7/dist-packages/rosdep2/__init__.py", line 45, in from .lookup import RosdepDefinition, RosdepView, RosdepLookup, \ File "/usr/lib/python2.7/dist-packages/rosdep2/lookup.py", line 41, in from .rospkg_loader import RosPkgLoader File "/usr/lib/python2.7/dist-packages/rosdep2/rospkg_loader.py", line 37, in import catkin_pkg.package ImportError: No module named catkin_pkg.package I had solved this before by installing it with pip instead of with apt but this apparently isn't the recommended method. I've also encountered other similar import errors before where python doesn't recognize packages installed with apt. ## Details `dpkg -L python-catkin-pkg` yields: /. /usr /usr/share /usr/share/doc /usr/share/doc/python-catkin-pkg /usr/share/doc/python-catkin-pkg/copyright /usr/share/doc/python-catkin-pkg/changelog.Debian.gz /usr/lib /usr/lib/python2.7 /usr/lib/python2.7/dist-packages /usr/lib/python2.7/dist-packages/catkin_pkg-0.4.6.egg-info /usr/lib/python2.7/dist-packages/catkin_pkg-0.4.6.egg-info/top_level.txt /usr/lib/python2.7/dist-packages/catkin_pkg-0.4.6.egg-info/dependency_links.txt /usr/lib/python2.7/dist-packages/catkin_pkg-0.4.6.egg-info/entry_points.txt /usr/lib/python2.7/dist-packages/catkin_pkg-0.4.6.egg-info/PKG-INFO /usr/lib/python2.7/dist-packages/catkin_pkg-0.4.6.egg-info/requires.txt /usr/bin /usr/bin/catkin_find_pkg /usr/bin/catkin_create_pkg /usr/bin/catkin_test_changelog /usr/bin/catkin_prepare_release /usr/bin/catkin_package_version /usr/bin/catkin_tag_changelog /usr/bin/catkin_generate_changelog `dpkg -L ros-kinetic-catkin` yields: /. /opt /opt/ros /opt/ros/kinetic /opt/ros/kinetic/setup.bash /opt/ros/kinetic/lib /opt/ros/kinetic/lib/python2.7 /opt/ros/kinetic/lib/python2.7/dist-packages /opt/ros/kinetic/lib/python2.7/dist-packages/catkin-0.7.11.egg-info /opt/ros/kinetic/lib/python2.7/dist-packages/catkin /opt/ros/kinetic/lib/python2.7/dist-packages/catkin/workspace_vcs.py /opt/ros/kinetic/lib/python2.7/dist-packages/catkin/package_version.pyc /opt/ros/kinetic/lib/python2.7/dist-packages/catkin/tidy_xml.py /opt/ros/kinetic/lib/python2.7/dist-packages/catkin/cmake.py /opt/ros/kinetic/lib/python2.7/dist-packages/catkin/tidy_xml.pyc /opt/ros/kinetic/lib/python2.7/dist-packages/catkin/init_workspace.py /opt/ros/kinetic/lib/python2.7/dist-packages/catkin/terminal_color.py /opt/ros/kinetic/lib/python2.7/dist-packages/catkin/test_results.py /opt/ros/kinetic/lib/python2.7/dist-packages/catkin/environment_cache.py /opt/ros/kinetic/lib/python2.7/dist-packages/catkin/workspace.py /opt/ros/kinetic/lib/python2.7/dist-packages/catkin/find_in_workspaces.py /opt/ros/kinetic/lib/python2.7/dist-packages/catkin/find_in_workspaces.pyc /opt/ros/kinetic/lib/python2.7/dist-packages/catkin/package_version.py /opt/ros/kinetic/lib/python2.7/dist-packages/catkin/builder.pyc /opt/ros/kinetic/lib/python2.7/dist-packages/catkin/init_workspace.pyc /opt/ros/kinetic/lib/python2.7/dist-packages/catkin/__init__.py /opt/ros/kinetic/lib/python2.7/dist-packages/catkin/__init__.pyc /opt/ros/kinetic/lib/python2.7/dist-packages/catkin/environment_cache.pyc /opt/ros/kinetic/lib/python2.7/dist-packages/catkin/workspace_vcs.pyc /opt/ros/kinetic/lib/python2.7/dist-packages/catkin/builder.py /opt/ros/kinetic/lib/python2.7/dist-packages/catkin/cmake.pyc /opt/ros/kinetic/lib/python2.7/dist-packages/catkin/terminal_color.pyc /opt/ros/kinetic/lib/python2.7/dist-packages/catkin/test_results.pyc /opt/ros/kinetic/lib/python2.7/dist-packages/catkin/workspace.pyc /opt/ros/kinetic/lib/pkgconfig /opt/ros/kinetic/lib/pkgconfig/catkin.pc /opt/ros/kinetic/etc /opt/ros/kinetic/etc/catkin /opt/ros/kinetic/etc/catkin/profile.d /opt/ros/kinetic/etc/catkin/profile.d/05.catkin_make.bash /opt/ros/kinetic/etc/catkin/profile.d/05.catkin_make_isolated.bash /opt/ros/kinetic/share /opt/ros/kinetic/share/catkin /opt/ros/kinetic/share/catkin/cmake /opt/ros/kinetic/share/catkin/cmake/catkin_python_setup.cmake /opt/ros/kinetic/share/catkin/cmake/stamp.cmake /opt/ros/kinetic/share/catkin/cmake/safe_execute_process.cmake /opt/ros/kinetic/share/catkin/cmake/all.cmake /opt/ros/kinetic/share/catkin/cmake/debug_message.cmake /opt/ros/kinetic/share/catkin/cmake/shell.cmake /opt/ros/kinetic/share/catkin/cmake/list_insert_in_workspace_order.cmake /opt/ros/kinetic/share/catkin/cmake/catkin_package_xml.cmake /opt/ros/kinetic/share/catkin/cmake/templates /opt/ros/kinetic/share/catkin/cmake/templates/setup.zsh.in /opt/ros/kinetic/share/catkin/cmake/templates/env.sh.in /opt/ros/kinetic/share/catkin/cmake/templates/rosinstall.in /opt/ros/kinetic/share/catkin/cmake/templates/env-hook.context.py.in /opt/ros/kinetic/share/catkin/cmake/templates/script.sh.in /opt/ros/kinetic/share/catkin/cmake/templates/relay.py.in /opt/ros/kinetic/share/catkin/cmake/templates/setup.bat.in /opt/ros/kinetic/share/catkin/cmake/templates/Doxyfile.in /opt/ros/kinetic/share/catkin/cmake/templates/script.bash.in /opt/ros/kinetic/share/catkin/cmake/templates/env.bat.in /opt/ros/kinetic/share/catkin/cmake/templates/safe_execute_install.cmake.in /opt/ros/kinetic/share/catkin/cmake/templates/script.in /opt/ros/kinetic/share/catkin/cmake/templates/script.py.in /opt/ros/kinetic/share/catkin/cmake/templates/_setup_util.py.in /opt/ros/kinetic/share/catkin/cmake/templates/setup.bash.in /opt/ros/kinetic/share/catkin/cmake/templates/pkgConfig.cmake.in /opt/ros/kinetic/share/catkin/cmake/templates/python_distutils_install.sh.in /opt/ros/kinetic/share/catkin/cmake/templates/setup.sh.in /opt/ros/kinetic/share/catkin/cmake/templates/__init__.py.in /opt/ros/kinetic/share/catkin/cmake/templates/python_distutils_install.bat.in /opt/ros/kinetic/share/catkin/cmake/templates/cfg-extras.context.py.in /opt/ros/kinetic/share/catkin/cmake/templates/generate_cached_setup.py.in /opt/ros/kinetic/share/catkin/cmake/templates/pkg.context.pc.in /opt/ros/kinetic/share/catkin/cmake/templates/pkgConfig-version.cmake.in /opt/ros/kinetic/share/catkin/cmake/templates/order_packages.context.py.in /opt/ros/kinetic/share/catkin/cmake/em /opt/ros/kinetic/share/catkin/cmake/em/order_packages.cmake.em /opt/ros/kinetic/share/catkin/cmake/em/pkg.pc.em /opt/ros/kinetic/share/catkin/cmake/platform /opt/ros/kinetic/share/catkin/cmake/platform/lsb.cmake /opt/ros/kinetic/share/catkin/cmake/platform/windows.cmake /opt/ros/kinetic/share/catkin/cmake/platform/ubuntu.cmake /opt/ros/kinetic/share/catkin/cmake/catkin_package.cmake /opt/ros/kinetic/share/catkin/cmake/catkin_workspace.cmake /opt/ros/kinetic/share/catkin/cmake/catkin_add_env_hooks.cmake /opt/ros/kinetic/share/catkin/cmake/list_append_deduplicate.cmake /opt/ros/kinetic/share/catkin/cmake/env-hooks /opt/ros/kinetic/share/catkin/cmake/env-hooks/05.catkin_make.bash /opt/ros/kinetic/share/catkin/cmake/env-hooks/05.catkin_make_isolated.bash /opt/ros/kinetic/share/catkin/cmake/assert.cmake /opt/ros/kinetic/share/catkin/cmake/string_starts_with.cmake /opt/ros/kinetic/share/catkin/cmake/empy.cmake /opt/ros/kinetic/share/catkin/cmake/catkin_download.cmake /opt/ros/kinetic/share/catkin/cmake/python.cmake /opt/ros/kinetic/share/catkin/cmake/interrogate_setup_dot_py.py /opt/ros/kinetic/share/catkin/cmake/test /opt/ros/kinetic/share/catkin/cmake/test/tests.cmake /opt/ros/kinetic/share/catkin/cmake/test/catkin_download_test_data.cmake /opt/ros/kinetic/share/catkin/cmake/test/download_checkmd5.py /opt/ros/kinetic/share/catkin/cmake/test/run_tests.py /opt/ros/kinetic/share/catkin/cmake/test/nosetests.cmake /opt/ros/kinetic/share/catkin/cmake/test/remove_test_results.py /opt/ros/kinetic/share/catkin/cmake/test/gtest.cmake /opt/ros/kinetic/share/catkin/cmake/list_append_unique.cmake /opt/ros/kinetic/share/catkin/cmake/find_program_required.cmake /opt/ros/kinetic/share/catkin/cmake/catkin_libraries.cmake /opt/ros/kinetic/share/catkin/cmake/catkin_install_python.cmake /opt/ros/kinetic/share/catkin/cmake/catkinConfig-version.cmake /opt/ros/kinetic/share/catkin/cmake/tools /opt/ros/kinetic/share/catkin/cmake/tools/rt.cmake /opt/ros/kinetic/share/catkin/cmake/tools/bz2.cmake /opt/ros/kinetic/share/catkin/cmake/tools/threads.cmake /opt/ros/kinetic/share/catkin/cmake/tools/libraries.cmake /opt/ros/kinetic/share/catkin/cmake/tools/doxygen.cmake /opt/ros/kinetic/share/catkin/cmake/catkin_generate_environment.cmake /opt/ros/kinetic/share/catkin/cmake/catkinConfig.cmake /opt/ros/kinetic/share/catkin/cmake/catkin_destinations.cmake /opt/ros/kinetic/share/catkin/cmake/catkin_metapackage.cmake /opt/ros/kinetic/share/catkin/cmake/parse_package_xml.py /opt/ros/kinetic/share/catkin/cmake/legacy.cmake /opt/ros/kinetic/share/catkin/cmake/toplevel.cmake /opt/ros/kinetic/share/catkin/cmake/em_expand.cmake /opt/ros/kinetic/share/catkin/cmake/order_paths.py /opt/ros/kinetic/share/catkin/cmake/atomic_configure_file.cmake /opt/ros/kinetic/share/catkin/LICENSE /opt/ros/kinetic/share/catkin/package.xml /opt/ros/kinetic/env.sh /opt/ros/kinetic/.rosinstall /opt/ros/kinetic/setup.sh /opt/ros/kinetic/bin /opt/ros/kinetic/bin/catkin_topological_order /opt/ros/kinetic/bin/catkin_package_version /opt/ros/kinetic/bin/catkin_test_results /opt/ros/kinetic/bin/catkin_make_isolated /opt/ros/kinetic/bin/catkin_make /opt/ros/kinetic/bin/catkin_prepare_release /opt/ros/kinetic/bin/catkin_find /opt/ros/kinetic/bin/catkin_init_workspace /opt/ros/kinetic/setup.zsh /opt/ros/kinetic/_setup_util.py /opt/ros/kinetic/.catkin /usr /usr/share /usr/share/doc /usr/share/doc/ros-kinetic-catkin /usr/share/doc/ros-kinetic-catkin/changelog.Debian.gz `which python` yields: /usr/bin/python on Python 2.7.12 `echo $PYTHONPATH` yields: /opt/ros/kinetic/lib/python2.7/dist-packages:/home/achille/.local/lib/python2.7/site-packages:/home/achille/.local/lib/python2.7/site-packages:/opt/ros/kinetic/bin:/home/achille/.local/lib/python2.7/site-packages:/usr/lib/python2.7/dist-packages `echo $PATH` yields: /opt/ros/kinetic/bin:/home/achille/bin:/home/achille/.local/bin:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/usr/games:/usr/local/games:/snap/bin

Automatically run tests on ROS build farm for pure cmake project

$
0
0
I'm hosting a [pure cmake project ](http://wiki.ros.org/ifopt)(not dependent on catkin) on the ROS build farm, for which I generate some unit test in my *CMakeLists.txt* similar to: find_package(GTest) add_executable(test my_test.cpp) target_link_libraries(test ${GTEST_BOTH_LIBRARIES} pthread) add_test(test test) I can run these with `make test` after a non-catkin build, this works fine. **How can I tell the ROS build farm (which seems to be internally calling `catkin_make run_tests`) to run that gtest binary as well after building?** [(jenkins-log)](http://build.ros.org/view/Kdev/job/Kdev__ifopt__ubuntu_xenial_amd64/) I don't want to *catkinize* my project, which would allow me to use `catkin_add_gtest`. I want to keep allowing the ` cd build && cmake ..` pure cmake build for users that don't have catkin installed. Any help would be greatly appreciated.

Use IKFast in separate package

$
0
0
I am attempting to use some of the definitions and functions found in the IKFast plugin package (more on this below) but am running into trouble adding the necessary dependencies in my CMakeLists.txt The file structure of the files relevant to me look like this: myrobot_ikfast_plugin/ include/ ikfast.h src/ myrobot_group_ikfast_solver.cpp CMakeLists.txt package.xml my_package/ src/ my_iksolver.cpp CMakeLists.txt package.xml Within `my_iksolver.cpp` I require the use of - IkSolutionList - IkSolutionBase - IkReal - ComputeIk() The above definitions and functions come from both `ikfast.h` and `myrobot_group_ikfast_solver.cpp`, so I suppose I only really need to include the `cpp` file as it already has a `#include ikfast.h`. Where I'm stuck is editing the CMakeLists.txts to include the few things I need from IKFast. As noted here by, my lord and savior, gvdhoorn https://answers.ros.org/question/217214/catkin-tools-how-to-include-source-file-from-another-package/, the "elegant" way to do this is to consider using libraries so naturally I tried the following: Added to `myrobot_ikfast_plugin/CMakeLists.txt`: add_library(ik_solver src/kuka_arm_ikfast_solver.cpp) target_link_libraries(ik_solver ${catkin_LIBRARIES}) And added the ik_solver to the install: install(TARGETS ${IKFAST_LIBRARY_NAME} ik_solver LIBRARY DESTINATION ${CATKIN_PACKAGE_LIB_DESTINATION}) Then I added to `my_package/CMakeLists.txt`: - `kuka_ikfast_plugin` to `find_package()` - `add_executable(my_iksolver src/my_iksolver.cpp)` - `target_link_libraries(my_iksolver ik_solver)` (see above created library) But when attempting to `#include ` I get a build error "No such file or directory`. So the questions that I would like to be answered are summarized as follows: 1. How should I edit IKFast's CMakeLists.txt so that I can use components of both the cpp and header files. 2. How should I edit my_package CMakeLists.txt and my_package/package.xml to use those components. 3. How should I #include the cpp file (marked as a library) to be used by `my_package/src/my_iksolver.cpp`. Thanks for the help ahead of time!

Migrating a custom library package used outside of ROS

$
0
0
Hi all, We have a custom ROS package which exposes ROS services to the outside world (so as to let the app we are developing call ROS services). The ROS package and app used to work fine under indigo (Ubuntu 14.04), now we are migrating to kinetic (Ubuntu 16.04) and it did not work straight away: the compiler cannot find the `#include "ros/ros.h"` and `#include `. It turns out that we had to add the following lines to our app's `CMakeLists.txt` in order to have the app compile: include_directories( /opt/ros/kinetic/include ) link_directories( /opt/ros/kinetic/lib ) which is ugly and problably not the intended way. Has anything changed in kinetic regarding the external use of ROS? We did not find much about this in the migration guides (link [here](http://wiki.ros.org/kinetic/Migration) and [here](http://wiki.ros.org/jade/Migration)). What should we actually do, rather than the CMake include and link instructions above? Anyone knows more about the problem? As a reference, here are the `CMakeLists.txt` and `package.xml` files of the ROS package: **package.xml:** lc_toolkitLink0.0.1Tools for linking the toolkit with ROS.Antoine RennuitAntoine RennuitProprietarycatkinroscppstd_msgsgeometry_msgslc_control **CMakeLists.txt:** cmake_minimum_required(VERSION 2.8.3) project(lc_toolkitLink) set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -std=c++11") ################################################################################ # Find packages. # Eigen. # NOTE: for reasons we do not understand it is not possible to set # CMAKE_MODULE_PATH as a relative path (although we do it in the toolkit) # hence we use function get_filename_component() to transform the relative # path to an absolute path. get_filename_component(LC_CMAKE_FOLDER_PATH "../../../../CMake" ABSOLUTE) set(CMAKE_MODULE_PATH ${CMAKE_MODULE_PATH} ${LC_CMAKE_FOLDER_PATH}) set(CMAKE_PREFIX_PATH ${CMAKE_PREFIX_PATH} ../../../../../Dependencies/Eigen/v3.2.0) find_package(Eigen3 REQUIRED) # Catkin. find_package(catkin REQUIRED COMPONENTS roscpp std_msgs geometry_msgs lc_control) ################################################################################ catkin_package( INCLUDE_DIRS . LIBRARIES lc_toolkitLink CATKIN_DEPENDS roscpp std_msgs geometry_msgs lc_control ) ################################################################################ # Headers. include_directories( ${catkin_INCLUDE_DIRS} ${EIGEN3_INCLUDE_DIR} ../../../../ # This path is used to find headers from [Core] and [System]. ) ################################################################################ # Dependencies. #add_subdirectory(../../../../Core ../../Core) ################################################################################ # Binaries. add_library( lc_toolkitLink src/RosBase.h src/RosBase.cpp src/RosFrameSubscriber.h src/RosFrameSubscriber.cpp src/RosServices.h src/RosServices.cpp ) add_dependencies(lc_toolkitLink ${catkin_EXPORTED_TARGETS}) target_link_libraries(lc_toolkitLink ${catkin_LIBRARIES} Core) ################################################################################ # Install. install(TARGETS lc_toolkitLink DESTINATION lib) and both CMakeLists.txt of the app: **Top level CMakeLists.txt:** CMAKE_MINIMUM_REQUIRED(VERSION 2.8.9) cmake_policy(SET CMP0015 NEW) # Projet. project(ToolKit) set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -std=c++11") #SET( CMAKE_BUILD_TYPE Debug ) find_package(catkin REQUIRED COMPONENTS rtt_ros) set(CMAKE_AUTOMOC ON) # Instruct CMake to run moc automatically when needed. set(CMAKE_PREFIX_PATH ../Dependencies/Qt/v5.9.1/5.9.1/gcc_64) find_package(Qt5Widgets REQUIRED) find_package(Qt5Core REQUIRED) find_package(Qt5Gui REQUIRED) find_package(Qt5OpenGL REQUIRED) find_package(Qt5Quick REQUIRED) find_package(Qt5Qml REQUIRED) find_package(Qt5QuickControls2 REQUIRED) #include_directories( /opt/ros/kinetic/include ) #link_directories( /opt/ros/kinetic/lib ) # Find dependencies. set(CMAKE_MODULE_PATH ../src/CMake) find_package(Eigen3 REQUIRED) set(CMAKE_PREFIX_PATH ../Dependencies/pcl/v1.8.1) find_package(PCL 1.7 REQUIRED COMPONENTS common io filters) set(CMAKE_PREFIX_PATH ../Dependencies/gtest/v0a439623) find_package(GTest REQUIRED) set(CMAKE_PREFIX_PATH ../Dependencies/OpenSceneGraph/v3.4.1) find_package(OpenSceneGraph 3.4.1 REQUIRED osg osgGA osgDB osgUtil osgText osgViewer OpenThreads ) set(QT_DIR ../../Dependencies/Qt/v5.9.1/5.9.1/gcc_64) #TODO: use find_package() for all dependencies. set(STEPCODE_INSTALL_DIR ../../Dependencies/sc-install) # Add subfolders. add_subdirectory(Core) add_subdirectory(System) add_subdirectory(DataModel) add_subdirectory(SceneGraph) add_subdirectory(TkRenderer) add_subdirectory(UnitTests) add_subdirectory(ToolKitApp) #add_subdirectory(Importer) **Lower level CMakeLists.txt:** project(SceneGraph) # List sources. set(${PROJECT_NAME}_headers RosFrameSubscriberNode.h ) set(${PROJECT_NAME}_sources ... RosFrameSubscriberNode.cpp ... ) # Headers. include_directories( ../ ${EIGEN3_INCLUDE_DIR} ${PCL_INCLUDE_DIRS} ../catkin_ws/src/le_painters_companion/lc_toolkitLink/src) # Link. link_directories( ${PCL_LIBRARY_DIRS}) add_definitions(${PCL_DEFINITIONS}) find_library(LC_TOOLKIT_LINK NAMES "lc_toolkitLink" PATHS ../catkin_ws/install/lib) if (${LC_TOOLKIT_LINK}) message(FATAL_ERROR "COULD NOT find library lc_toolkitLink") endif() # Output library. add_library(${PROJECT_NAME} STATIC ${${PROJECT_NAME}_headers} ${${PROJECT_NAME}_sources}) # Linker. target_link_libraries(${PROJECT_NAME} DataModel ${PCL_COMMON_LIBRARIES} ${PCL_IO_LIBRARIES} ${LC_TOOLKIT_LINK}) Kind regards, Olof and Antoine.
Viewing all 670 articles
Browse latest View live


<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>