Hi all,
I all, I have 2 packages with the following hierarchy:
---meta-package
------lc_control
------lc_toolkitLink
**lc_control** adds service files via **add_service_files(FILES BaseVel.srv)**, which should be used by **lc_toolkitLink**.
In order to let **lc_toolkitLink** know about the services added by **lc_control**, I add **lc_control** as a dependency to **lc_toolkitLink**, using **find_package**, **catkin_package** and **add_dependencies( ${catkin_EXPORTED_TARGETS})**. **package.xml** includes **lc_control **.
Though when I compile I get:
CMake Error at /opt/ros/indigo/share/catkin/cmake/catkinConfig.cmake:83 (find_package):
Could not find a package configuration file provided by "package1" with
any of the following names:
lc_controlConfig.cmake
lc_control-config.cmake
Add the installation prefix of "lc_control" to CMAKE_PREFIX_PATH or set
"lc_control_DIR" to a directory containing one of the above files. If
"lc_control" provides a separate development package or SDK, be sure it has
been installed.
I believe I have followed [these guidelines](http://docs.ros.org/indigo/api/catkin/html/howto/format2/cpp_msg_dependencies.html) and [these](http://wiki.ros.org/catkin/CMakeLists.txt).
Also what I understand CMake is saying is that the package does not exist, and this is because it is not compiled yet. Though I thought that **add_dependencies** would actually solve the problem but it does not.
Then I have set **lc_control_DIR** as stated in the message, but in this case I get error message:
CMake Error at /home/arennuit/DevRoot/src/catkin_ws/build/le_painters_companion/lc_control/catkin_generated/installspace/lc_controlConfig.cmake:103 (message):
Project 'lc_control' specifies 'include' as an include dir, which is not
found. It does not exist in
'/home/arennuit/DevRoot/src/catkin_ws/build/le_painters_companion/include'.
This does not make sense to me.
Any idea of what is going on in my case?
Thanks,
Antoine.
**-------------UPDATE------------**
Here is the packaging code for both my packages:
**CMakeLists.txt for lc_control**
cmake_minimum_required(VERSION 2.8.3)
project(lc_control)
################################################################################
# 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 ${LC_CMAKE_FOLDER_PATH})
set(CMAKE_PREFIX_PATH ../../../../../Dependencies/Eigen/v3.2.0)
find_package(Eigen3 REQUIRED)
# Catkin.
find_package(catkin REQUIRED COMPONENTS rtt_ros message_generation std_msgs)
# Custom messages and services.
add_service_files(
FILES
BasePos.srv
BaseVel.srv
)
generate_messages(DEPENDENCIES std_msgs)
################################################################################
# Catkin package build info.
catkin_package(
CATKIN_DEPENDS rtt_ros message_runtime std_msgs
)
add_definitions(-DRTT_COMPONENT)
################################################################################
# Headers.
include_directories(
"${EIGEN3_INCLUDE_DIR}"
"../../../../../Dependencies"
"../../../../"
"src/vrep_ik/externalIk"
"src/vrep_ik/include")
################################################################################
# Dependencies.
# NOTE: this compiles Core and System specifically for the ROS package (and is
# redundant with the compilation of Core and System for the toolkit).
add_subdirectory(../../../../Core ../../Core)
add_subdirectory(../../../../System ../../System)
################################################################################
# Create orocos components.
orocos_use_package(ocl-taskbrowser)
orocos_component(Orchestrator
src/Orchestrator.h
src/Orchestrator.cpp
src/StateMachine.h
src/StateMachine.cpp
../../../../../Dependencies/pugixml/v1.7/pugixml.cpp)
add_dependencies(Orchestrator ${${PROJECT_NAME}_EXPORTED_TARGETS}) # Make sure the services are created before they are used.
target_link_libraries(Orchestrator
${catkin_LIBRARIES}
${OROCOS-RTT_RTT-MARSHALLING_LIBRARY}
Core)
################################################################################
# Make this an installable package usable by other packages.
orocos_generate_package()
**package.xml for lc_control**
lc_control 0.1.0 T Bob catkin std_msgs rtt rtt_ros rtt_rosnode rtt_roscomm rtt_rosparam rtt_std_msgs rtt_std_srvs rtt_geometry_msgs message_generation message_runtime rtt_rosnode rtt_roscomm rtt_rosparam rtt_std_msgs rtt_std_srvs rtt_sensor_msgs rtt_nav_msgs rtt_geometry_msgs
**CMakeLists.txt for lc_toolkitLink**
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 ${LC_CMAKE_FOLDER_PATH})
set(CMAKE_PREFIX_PATH ../../../../../Dependencies/Eigen/v3.2.0)
find_package(Eigen3 REQUIRED)
# Catkin.
find_package(catkin REQUIRED COMPONENTS roscpp std_msgs lc_control)
################################################################################
catkin_package(
INCLUDE_DIRS .
LIBRARIES ${PROJECT_NAME}
lc_control
)
################################################################################
# Headers.
include_directories(
${catkin_INCLUDE_DIRS}
${EIGEN3_INCLUDE_DIR}
../../../../)
################################################################################
# Dependencies.
#add_subdirectory(../../../../Core ../../Core)
################################################################################
# Binaries.
add_library(
RosFrameSubscriber
src/RosBase.h
src/RosBase.cpp
src/RosSetBaseVelTargetService.h
src/RosSetBaseVelTargetService.cpp
src/RosFrameSubscriber.h
src/RosFrameSubscriber.cpp)
add_dependencies(RosFrameSubscriber ${catkin_EXPORTED_TARGETS})
target_link_libraries(RosFrameSubscriber
${catkin_LIBRARIES}
Core)
################################################################################
# Install.
install(TARGETS RosFrameSubscriber DESTINATION lib)
**package.xml for lc_toolkitLink**
lc_toolkitLink 0.0.1 Bob catkin roscpp std_msgs lc_control
↧
Package dependencies with .srv
↧
Compilation error when moving a package to an other workspace
Hi,
I have written a package in c++ that compile in my workspace ("catkin") but throw the error shown at the end when compiled in a different freshly created workspace ("catkin_ws").
I think I have properly configured my new "catkin_ws" as the first lines of catkin_make look correct :
Base path: /home/ubuntu/catkin_ws
Source space: /home/ubuntu/catkin_ws/src
Build space: /home/ubuntu/catkin_ws/build
Devel space: /home/ubuntu/catkin_ws/devel
Install space: /home/ubuntu/catkin_ws/install
####
#### Running command: "make cmake_check_build_system" in "/home/ubuntu/catkin_ws/build"
####
-- Using CATKIN_DEVEL_PREFIX: /home/ubuntu/catkin_ws/devel
-- Using CMAKE_PREFIX_PATH: /home/ubuntu/catkin_ws/devel;/opt/ros/indigo
-- This workspace overlays: /home/ubuntu/catkin_ws/devel;/opt/ros/indigo
-- Using PYTHON_EXECUTABLE: /usr/bin/python
-- Using Debian Python package layout
-- Using empy: /usr/bin/empy
-- Using CATKIN_ENABLE_TESTING: ON
-- Call enable_testing()
-- Using CATKIN_TEST_RESULTS_DIR: /home/ubuntu/catkin_ws/build/test_results
-- Found gtest sources under '/usr/src/gtest': gtests will be built
-- Using Python nosetests: /usr/bin/nosetests-2.7
-- catkin 0.6.18
-- BUILD_SHARED_LIBS is on
I'm working with ROS Indigo on Ubuntu 14.04, my package files can be found [here](https://drive.google.com/drive/folders/0ByDkLQ5Y0aXKamtYVDlpNTJ4Qzg?usp=sharing).
I've found this [related question](http://answers.ros.org/question/69574/differential_drive-compilation-error-request-for-member-__getmd5sum-in-m-which-is-of-non-class-type-const-int/) with a similar compilation error, I know I am publishing a double on a topic that takes in std_msgs::Float64 (see the following line) but **I don't understand why this code compile and work on my "catkin" workspace but not in the "catkin_ws" one, has anyone got an idea about that ?**
if(hand_brake_state_.data==1) {hand_brake_=0; hand_brake.publish(hand_brake_);}
I also tried to clean CMakeCache that I thought could create the error, according to [this question](http://answers.ros.org/question/11324/moving-packages-to-different-directory/), but it still doesn't compile.
Thanks for your time and help.
Error message :
[100%] Built target cmd_xp9000_generate_messages
In file included from /opt/ros/indigo/include/ros/serialization.h:37:0,
from /opt/ros/indigo/include/ros/publisher.h:34,
from /opt/ros/indigo/include/ros/node_handle.h:32,
from /opt/ros/indigo/include/ros/ros.h:45,
from /home/ubuntu/catkin_ws/src/cmd_xp9000/src/cmd_xp9000_node.cpp:1:
/opt/ros/indigo/include/ros/message_traits.h: In instantiation of ‘static const char* ros::message_traits::MD5Sum::value(const M&) [with M = double]’:
/opt/ros/indigo/include/ros/message_traits.h:255:104: required from ‘const char* ros::message_traits::md5sum(const M&) [with M = double]’
/opt/ros/indigo/include/ros/publisher.h:112:7: required from ‘void ros::Publisher::publish(const M&) const [with M = double]’
/home/ubuntu/catkin_ws/src/cmd_xp9000/src/cmd_xp9000_node.cpp:170:79: required from here
/opt/ros/indigo/include/ros/message_traits.h:126:34: error: request for member ‘__getMD5Sum’ in ‘m’, which is of non-class type ‘const double’
return m.__getMD5Sum().c_str();
^
/opt/ros/indigo/include/ros/message_traits.h: In instantiation of ‘static const char* ros::message_traits::DataType::value(const M&) [with M = double]’:
/opt/ros/indigo/include/ros/message_traits.h:264:106: required from ‘const char* ros::message_traits::datatype(const M&) [with M = double]’
/opt/ros/indigo/include/ros/publisher.h:112:7: required from ‘void ros::Publisher::publish(const M&) const [with M = double]’
/home/ubuntu/catkin_ws/src/cmd_xp9000/src/cmd_xp9000_node.cpp:170:79: required from here
/opt/ros/indigo/include/ros/message_traits.h:143:36: error: request for member ‘__getDataType’ in ‘m’, which is of non-class type ‘const double’
return m.__getDataType().c_str();
^
/opt/ros/indigo/include/ros/message_traits.h: In instantiation of ‘static const char* ros::message_traits::MD5Sum::value(const M&) [with M = int]’:
/opt/ros/indigo/include/ros/message_traits.h:255:104: required from ‘const char* ros::message_traits::md5sum(const M&) [with M = int]’
/opt/ros/indigo/include/ros/publisher.h:112:7: required from ‘void ros::Publisher::publish(const M&) const [with M = int]’
/home/ubuntu/catkin_ws/src/cmd_xp9000/src/cmd_xp9000_node.cpp:189:65: required from here
/opt/ros/indigo/include/ros/message_traits.h:126:34: error: request for member ‘__getMD5Sum’ in ‘m’, which is of non-class type ‘const int’
return m.__getMD5Sum().c_str();
^
/opt/ros/indigo/include/ros/message_traits.h: In instantiation of ‘static const char* ros::message_traits::DataType::value(const M&) [with M = int]’:
/opt/ros/indigo/include/ros/message_traits.h:264:106: required from ‘const char* ros::message_traits::datatype(const M&) [with M = int]’
/opt/ros/indigo/include/ros/publisher.h:112:7: required from ‘void ros::Publisher::publish(const M&) const [with M = int]’
/home/ubuntu/catkin_ws/src/cmd_xp9000/src/cmd_xp9000_node.cpp:189:65: required from here
/opt/ros/indigo/include/ros/message_traits.h:143:36: error: request for member ‘__getDataType’ in ‘m’, which is of non-class type ‘const int’
return m.__getDataType().c_str();
^
make[2]: *** [cmd_xp9000/CMakeFiles/cmd_xp9000_node.dir/src/cmd_xp9000_node.cpp.o] Erreur 1
make[1]: *** [cmd_xp9000/CMakeFiles/cmd_xp9000_node.dir/all] Erreur 2
make: *** [all] Erreur 2
Invoking "make -j8 -l8" failed
↧
↧
howto: Eigen Installation
All,
This is just a brief how to on how to resolve Eigen compile time errors - which wasn't installed on my Raspberry Pi.
I kept getting the error:
CMake Error at CMakeLists.txt:12 (find_package):
By not providing "FindEigen3.cmake" in CMAKE_MODULE_PATH this project has
asked CMake to find a package configuration file provided by "Eigen3", but
CMake did not find one.
Could not find a package configuration file provided by "Eigen3" with any
of the following names:
Eigen3Config.cmake
eigen3-config.cmake
Add the installation prefix of "Eigen3" to CMAKE_PREFIX_PATH or set
"Eigen3_DIR" to a directory containing one of the above files. If "Eigen3"
provides a separate development package or SDK, be sure it has been
installed.
And try as I might I couldn't find a conclusive answer. Anyway these steps should solve the issue
1) Download Eigen
hg clone https://bitbucket.org/eigen/eigen/
2) CD into the download dir
cd eigen
3) Create a build dir
mkdir build
4) Configure the build
cmake ..
5) Build the package
make
6) Install the package
sudo make install
And all being well that should be it!
Hope this helps
Mark
↧
how to specify gcc options while building ROS programs
Hi All,
When I compile my (non-ROS) programs with the third party libraries, I need to provide gcc with some options as well as paths to include head files and libraries. Usually this is how the gcc command looks like:
*gcc -I**my_include_files_path** -**SOME_OPTIONS** -L**my_library_files_path** source.c*
Now I want to use these third party libraries with ROS, how can I specify those options in ROS?
With Many Thanks,
↧
Catkin_make does not compile
Hey guys,
I have a problem with the ROS compiler. I code in C++ and pretty often the compiler does not apply small changes I did in the code.
E.g. if I change some parts of a string. So if I change
cmd_stg="Hello World";
to
cmd_stg=string2;
the compiler simply ignores the changes.
I have already tried `catkin_make --force-cmake´
That's very annoying. Do You have any advise?
↧
↧
Why can't I send a string message through my program?
Currently I am trying to build a simple node where I send a `string` using the `std_msgs::String.h` message class. What I do understand is, why I get these particular errors.
##Code ##
**Includes:**
// NORMAL INCLUDES
#include
#include
#include
// ROS INCLUDES
#include
#include
**Declaration:**
ros::Publisher command;
command = node.advertise("/command", 1);
**While loop:**
while (ros::ok()) {
std::cout << std::endl << std::endl;
std::cout << "Type your Command Below:" << std::endl << std::endl;
getline(std::cin, input);
command.publish(input);
}
##Errors ##
In file included from /opt/ros/kinetic/include/ros/serialization.h:37:0,
from /opt/ros/kinetic/include/ros/publisher.h:34,
from /opt/ros/kinetic/include/ros/node_handle.h:32,
from /opt/ros/kinetic/include/ros/ros.h:45,
from /home/sharan/catkin_ws/src/zlab_drone/src/demo_usr_input.cpp:9:
/opt/ros/kinetic/include/ros/message_traits.h: In instantiation of ‘static const char* ros::message_traits::MD5Sum::value(const M&) [with M = std::__cxx11::basic_string]’:
/opt/ros/kinetic/include/ros/message_traits.h:255:102: required from ‘const char* ros::message_traits::md5sum(const M&) [with M = std::__cxx11::basic_string]’
/opt/ros/kinetic/include/ros/publisher.h:112:7: required from ‘void ros::Publisher::publish(const M&) const [with M = std::__cxx11::basic_string]’
/home/sharan/catkin_ws/src/zlab_drone/src/demo_usr_input.cpp:45:30: required from here
/opt/ros/kinetic/include/ros/message_traits.h:126:34: error: ‘const class std::__cxx11::basic_string’ has no member named ‘__getMD5Sum’
return m.__getMD5Sum().c_str();
^
/opt/ros/kinetic/include/ros/message_traits.h: In instantiation of ‘static const char* ros::message_traits::DataType::value(const M&) [with M = std::__cxx11::basic_string]’:
/opt/ros/kinetic/include/ros/message_traits.h:264:104: required from ‘const char* ros::message_traits::datatype(const M&) [with M = std::__cxx11::basic_string]’
/opt/ros/kinetic/include/ros/publisher.h:112:7: required from ‘void ros::Publisher::publish(const M&) const [with M = std::__cxx11::basic_string]’
/home/sharan/catkin_ws/src/zlab_drone/src/demo_usr_input.cpp:45:30: required from here
/opt/ros/kinetic/include/ros/message_traits.h:143:36: error: ‘const class std::__cxx11::basic_string’ has no member named ‘__getDataType’
return m.__getDataType().c_str();
^
## String,msg ## [Link is here](http://docs.ros.org/kinetic/api/std_msgs/html/msg/String.html)
string data
Since they are the same type looking at `String.h`, I do not understand why I am getting this error.
↧
Weird compile error using ROS and Gazebo libraries
Hi guys,
Came across the weirdest compile error:
In function `ignition::math::Vector3::operator[](unsigned long) const':
gzwidget.cpp:(.text._ZNK8ignition4math7Vector3IdEixEm[_ZNK8ignition4math7Vector3IdEixEm]+0x2b): undefined reference to `ignition::math::IndexException::IndexException()'
`libgazebo_common.so` is throwing this.
What the hell is going on ? Im linking `ignition_math2` libraries, people in ignition sent me here.
Thanks
↧
Compilation problem with navigation package in kinetic
I am using ROS Kinetic on Ubuntu 16.04. I have the navigation package and some other stuff in my workspace. When I do catkin_make in my workspace it builds till 100% and then just stops and does nothing until I kill it.
This is what appears in the terminal after I press Ctrl+C:
make[2]: *** Deleting file '/home/robot/catkin_ws/devel/lib/costmap_2d/costmap_2d_markers'
make[2]: *** Deleting file '/home/robot/catkin_ws/devel/lib/costmap_2d/costmap_2d_cloud'
Traceback (most recent call last):
File "/opt/ros/kinetic/bin/catkin_make", line 296, in
sys.exit(main())
File "/opt/ros/kinetic/bin/catkin_make", line 240, in main
run_command(cmd, make_path)
File "/opt/ros/kinetic/lib/python2.7/dist-packages/catkin/builder.py", line 239, in run_command
proc.wait()
File "/usr/lib/python2.7/subprocess.py", line 1392, in wait
pid, sts = _eintr_retry_call(os.waitpid, self.pid, 0)
File "/usr/lib/python2.7/subprocess.py", line 476, in _eintr_retry_call
return func(*args)
KeyboardInterrupt
navigation/costmap_2d/CMakeFiles/costmap_2d_cloud.dir/build.make:541: recipe for target '/home/robot/catkin_ws/devel/lib/costmap_2d/costmap_2d_cloud' failed
navigation/costmap_2d/CMakeFiles/costmap_2d_markers.dir/build.make:541: recipe for target '/home/robot/catkin_ws/devel/lib/costmap_2d/costmap_2d_markers' failed
make[2]: *** [/home/robot/catkin_ws/devel/lib/costmap_2d/costmap_2d_cloud] Interrupt
make[2]: *** [/home/robot/catkin_ws/devel/lib/costmap_2d/costmap_2d_markers] Interrupt
CMakeFiles/Makefile2:11075: recipe for target 'navigation/costmap_2d/CMakeFiles/costmap_2d_cloud.dir/all' failed
make[1]: *** [navigation/costmap_2d/CMakeFiles/costmap_2d_cloud.dir/all] Interrupt
CMakeFiles/Makefile2:11114: recipe for target 'navigation/costmap_2d/CMakeFiles/costmap_2d_markers.dir/all' failed
make[1]: *** [navigation/costmap_2d/CMakeFiles/costmap_2d_markers.dir/all] Interrupt
Makefile:138: recipe for target 'all' failed
make: *** [all] Interrupt
Any help would be appreciated!
↧
/usr/bin/ld: cannot find -llib
I want to compile a [program][1] which was basically created and compiled under windows. Now I want to use that program under ROS linux. I created a catkin ros package and modify its CmakeLists and add all files to the package but I'm facing errors of lib like:
/usr/bin/ld: cannot find -llibRUNETag
collect2: error: ld returned 1 exit status
runtag/runetage/RUNEtagdetect/CMakeFiles/RUNEtagdetect.dir/build.make:164: recipe for target '/home/jaouadhros/catkin_ws/devel/lib/runetage/RUNEtagdetect' failed
make[2]: *** [/home/jaouadhros/catkin_ws/devel/lib/runetage/RUNEtagdetect] Error 1
CMakeFiles/Makefile2:3479: recipe for target 'runtag/runetage/RUNEtagdetect/CMakeFiles/RUNEtagdetect.dir/all' failed
make[1]: *** [runtag/runetage/RUNEtagdetect/CMakeFiles/RUNEtagdetect.dir/all] Error 2
Makefile:138: recipe for target 'all' failed
make: *** [all] Error 2
Invoking "make -j8 -l8" failed
I want to know how can I change my CmakeLists so as I can successfully compile it in my environment.
I using Ubuntu 16 working with ROS kinetic
This is the CmakeLists:
cmake_minimum_required(VERSION 2.8.3)
project(runetage)
OPTION( BUILD_SHARED_LIBS "Set to off to build static libraries" ON )
OPTION( BUILD_RUNETAGDETECT "Create RUNEtagdetect executable" ON )
OPTION( BUILD_CODEGEN "Create codegen executable" ON )
IF( NOT CMAKE_BUILD_TYPE )
SET( CMAKE_BUILD_TYPE "Release" )
ENDIF()
IF(CMAKE_INSTALL_PREFIX_INITIALIZED_TO_DEFAULT)
SET( CMAKE_INSTALL_PREFIX "${PROJECT_SOURCE_DIR}/../dist" CACHE PATH "Install prefix" FORCE )
ENDIF()
## Add support for C++11, supported in ROS Kinetic and newer
# add_definitions(-std=c++11)
## 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
roscpp
std_msgs
)
find_package(OpenCV REQUIRED)
catkin_package(
# INCLUDE_DIRS include
# LIBRARIES runetage
# CATKIN_DEPENDS roscpp std_msgs
# DEPENDS system_lib
)
###########
## Build ##
###########
include_directories(
${catkin_INCLUDE_DIRS}
)
#############
## Install ##
#############
ADD_SUBDIRECTORY( WinNTL )
INCLUDE_DIRECTORIES( "${PROJECT_SOURCE_DIR}/include"
${OpenCV_INCLUDE_DIRS}
"WinNTL/include"
)
INSTALL( DIRECTORY "${PROJECT_SOURCE_DIR}/include" DESTINATION . )
INSTALL( DIRECTORY "${PROJECT_SOURCE_DIR}/WinNTL/include" DESTINATION . )
SET( RUNETAG_SRCS
src/auxmath.cpp
src/auxrenderer.cpp
src/ellipsefitter.cpp
src/ellipsepoint.cpp
src/fpscounter.cpp
src/hirestimer.cpp
src/markerdetector.cpp
src/markerpose.cpp
src/slotfitter.cpp
src/ellipserefine.cpp
src/ellipsedetector.cpp
src/digitalmarkermodel.cpp
src/slot.cpp
src/coding.cpp
)
SET( RUNETAG_INCL
"include/auxmath.hpp"
"include/auxrenderer.hpp"
"include/digitalmarkermodel.hpp"
"include/ellipsefitter.hpp"
"include/ellipsepoint.hpp"
"include/fpscounter.hpp"
"include/hirestimer.hpp"
"include/imgtextstream.hpp"
"include/markerdetected.hpp"
"include/markerdetector.hpp"
"include/markerpose.hpp"
"include/slot.hpp"
"include/slotfitter.hpp"
"include/ellipserefine.hpp"
"include/ellipsedetector.hpp"
"include/runetag.hpp"
"include/coding.h")
ADD_LIBRARY( ${PROJECT_NAME} STATIC ${RUNETAG_SRCS} ${RUNETAG_INCL} )
TARGET_LINK_LIBRARIES(${PROJECT_NAME} WinNTL ${OpenCV_LIBS})
SET_TARGET_PROPERTIES( ${PROJECT_NAME}
PROPERTIES
VERSION "${${PROJECT_NAME}_VERSION}"
SOVERSION "${${PROJECT_NAME}_SOVERSION}"
CLEAN_DIRECT_OUTPUT 1
OUTPUT_NAME ${PROJECT_NAME} )
INSTALL( TARGETS ${PROJECT_NAME} DESTINATION lib PERMISSIONS OWNER_READ OWNER_WRITE OWNER_EXECUTE GROUP_READ GROUP_EXECUTE WORLD_READ WORLD_EXECUTE )
IF( BUILD_RUNETAGDETECT )
ADD_SUBDIRECTORY( RUNEtagdetect )
ENDIF()
IF( BUILD_CODEGEN )
ADD_SUBDIRECTORY( codegen )
ENDIF()
IF( BUILD_VIRTUALCAMERA )
ADD_SUBDIRECTORY( virtualcamera )
ENDIF()
MESSAGE( STATUS )
MESSAGE( STATUS "Build Settings:" )
MESSAGE( STATUS "------------------------------------------------" )
MESSAGE( STATUS "BUILD_SHARED_LIBS\t\t= ${BUILD_SHARED_LIBS}" )
MESSAGE( STATUS "CMAKE_INSTALL_PREFIX\t\t= ${CMAKE_INSTALL_PREFIX}" )
MESSAGE( STATUS "CMAKE_BUILD_TYPE\t\t= ${CMAKE_BUILD_TYPE} (Options: Release, Debug, MinSizeRel, RelWithDebInfo)" )
MESSAGE( STATUS )
MESSAGE( STATUS "You can change this values with cmake -D=" )
MESSAGE( STATUS "------------------------------------------------" )
This is another one for the same package but different project (I didn't create a ros package for this, I keep it as it is and copy it to my package ros):
PROJECT( RUNEtagdetect )
SET(Boost_ADDITIONAL_VERSIONS "1.49.0" )
#SET(Boost_DEBUG ON)
#SET(Boost_DETAILED_FAILURE_MSG ON)
SET(Boost_USE_STATIC_LIBS ON)
find_package( Boost REQUIRED COMPONENTS program_options )
IF( VERBOSE_FLAG )
ADD_DEFINITIONS( -DVERBOSE )
ENDIF()
INCLUDE_DIRECTORIES(.
"../include"
${OpenCV_INCLUDE_DIRS}
${Boost_INCLUDE_DIRS}
)
ADD_EXECUTABLE( ${PROJECT_NAME} RUNEtagdetect.cpp test_occlusion.cpp test_occlusion.h)
TARGET_LINK_LIBRARIES( ${PROJECT_NAME} libRUNETag ${OpenCV_LIBS} ${Boost_PROGRAM_OPTIONS_LIBRARY} WinNTL )
INSTALL( TARGETS ${PROJECT_NAME} DESTINATION bin PERMISSIONS OWNER_READ OWNER_WRITE OWNER_EXECUTE GROUP_READ GROUP_EXECUTE WORLD_READ WORLD_EXECUTE )
[1]: http://www.dsi.unive.it/~bergamasco/runetag/
↧
↧
hector_navigation_node problem compilation
Hello,
I downloaded the hector_navigation package from github but doesn't succeed on using the hector_navigation_node
the error is : "ResourceNotFound: hector_exploration_node".
I downloaded the hector_gazebo and hector_slam packages too and don't have any problem to use them. Is there anything I have to add in a CMakeList.txt to compile this package?
Thank you for your answer
↧
fatal error: pointgrey_camera_driver/PointGreyCamera.h: No such file or directory
I am trying to set some camera parameters in code instead of at launch, and compilation cannot use the driver header file. I assume it is in my cmake configuration, but I'm not sure where the error is, here is a stripped down version of my project:
#include
#include
class mweBlackfly
{
private:
ros::NodeHandle n;
public:
mweBlackfly()
{ros::Duration(5).sleep(); // sleep for 'x' second(s).}
};
int main(int argc, char **argv)
{
ros::init(argc, argv, "mweBlackfly");
return 0;
}
CMakeLists.txt
cmake_minimum_required(VERSION 2.8.3)
project(mwe)
find_package(catkin REQUIRED COMPONENTS
pointgrey_camera_driver
)
catkin_package(
)
include_directories(${catkin_INCLUDE_DIRS})
add_executable( mweBlackfly src/mweBlackfly.cpp)
add_dependencies( mweBlackfly mwe_gencpp)
target_link_libraries(mweBlackfly ${catkin_LIBRARIES})
package.xml
mwe 0.0.0 The mwe package turtlebot TODO catkin pointgrey_camera_driver pointgrey_camera_driver
compile error:
/home/turtle
bot/ros/src/mwe/src/mweBlackfly.cpp:5:55: fatal error: pointgrey_camera_driver/PointGreyCamera.h: No such file or directory
compilation terminated.
mwe/CMakeFiles/mweBlackfly.dir/build.make:62: recipe for target 'mwe/CMakeFiles/mweBlackfly.dir/src/mweBlackfly.cpp.o' failed
make[2]: *** [mwe/CMakeFiles/mweBlackfly.dir/src/mweBlackfly.cpp.o] Error 1
CMakeFiles/Makefile2:442: recipe for target 'mwe/CMakeFiles/mweBlackfly.dir/all' failed
make[1]: *** [mwe/CMakeFiles/mweBlackfly.dir/all] Error 2
make[1]: *** Waiting for unfinished jobs....
↧
cmakelists compiling questions
Hi, this is a new linux user.
When I compile my CMakelists, it gives me this error.
/usr/bin/ld: //usr/local/lib/libjsoncpp.a(json_reader.o): relocation R_X86_64_32 against `.rodata' can not be used when making a shared object; recompile with -fPI
C
//usr/local/lib/libjsoncpp.a: error adding symbols: Bad value
I want to add my own global planner into the ros navigation stack. So I replace everything in carrort planner with "test_planner", and nothing changed otherwise. Now I want to change the content of Make_plan function to make my own plan. I read the pose from a .json file, so I have to use libjsoncpp. So I go to CMakelists.txt, and change the code below:
add_library(test_planner src/test_planner.cpp)
target_link_libraries(test_planner
${catkin_LIBRARIES}
)
to:
add_library(test_planner src/test_planner.cpp)
target_link_libraries(test_planner
${catkin_LIBRARIES}
jsoncpp
)
jsoncpp can be used to call libjsoncpp in my directory:/usr/local/lib.libjosncpp.a, this kind of change can be used for my other file compiling but not for this pluggin. It gives this errormessage:
/usr/bin/ld: //usr/local/lib/libjsoncpp.a(json_reader.o): relocation R_X86_64_32 against `.rodata' can not be used when making a shared object; recompile with -fPI
C
//usr/local/lib/libjsoncpp.a: error adding symbols: Bad value
I have no idea how to fix this error in Cmakelists.txt.
Here is my CMakelists.txt:
cmake_minimum_required(VERSION 2.8.3)
project(test_planner)
find_package(catkin REQUIRED
COMPONENTS
roscpp
tf
nav_core
costmap_2d
base_local_planner
pluginlib
)
include_directories(
include
${catkin_INCLUDE_DIRS}
)
add_definitions(${EIGEN_DEFINITIONS})
catkin_package(
INCLUDE_DIRS include
LIBRARIES test_planner
CATKIN_DEPENDS
roscpp
pluginlib
costmap_2d
base_local_planner
nav_core
)
add_library(test_planner src/test_planner.cpp)
target_link_libraries(test_planner
${catkin_LIBRARIES}
jsoncpp
)
install(TARGETS test_planner
ARCHIVE DESTINATION ${CATKIN_PACKAGE_LIB_DESTINATION}
LIBRARY DESTINATION ${CATKIN_PACKAGE_LIB_DESTINATION}
)
install(DIRECTORY include/${PROJECT_NAME}/
DESTINATION ${CATKIN_PACKAGE_INCLUDE_DESTINATION}
PATTERN ".svn" EXCLUDE
)
install(FILES bgp_plugin.xml
DESTINATION ${CATKIN_PACKAGE_SHARE_DESTINATION}
)
↧
Please help out. Its Cmakelist, Cmake error. I heard related articles to this but I couldnot solve it.
Im using ROS kinetic and trying to build my first HelloROS.cpp with rosserial_embeddedlinux package. I couldnot compile the package, (I dont know how to write a makefile or makefile is generated automatically after cmake )
this is the error:
Whenever i try to cmake,
/HelloROS.cpp:6:17: fatal error: ros.h: No such file or directory
compilation terminated.
CMakeFiles/HelloROS.dir/build.make:62: recipe for target 'CMakeFiles/HelloROS.dir/examples/HelloRos/HelloROS.cpp.o' failed
make[2]: *** [CMakeFiles/HelloROS.dir/examples/HelloRos/HelloROS.cpp.o] Error 1
CMakeFiles/Makefile2:67: recipe for target 'CMakeFiles/HelloROS.dir/all' failed
make[1]: *** [CMakeFiles/HelloROS.dir/all] Error 2
Makefile:127: recipe for target 'all' failed
make: *** [all] Error 2
**This is my cmakelist.txt:**
cmake_minimum_required(VERSION 2.8.3)
project(rosserial_embeddedlinux)
find_package(catkin REQUIRED COMPONENTS rosserial_client roscpp rospy sensor_msgs std_msgs
)
catkin_package(
CATKIN_DEPENDS roscpp rospy
LIBRARIES ${PROJECT_NAME}/src/ros_lib)
include_directories(include ${catkin_INCLUDE_DIRS}
${rosserial_client_INCLUDE_DIRS}
${roscpp_INCLUDE_DIRS}
${ros_lib_INCLUDE_DIRS})
add_executable(HelloROS src/examples/HelloRos/HelloROS.cpp)
target_link_libraries(HelloROS ${catkin_LIBRARIES})
install(
DIRECTORY src/ros_lib
src/examples
DESTINATION ${CATKIN_PACKAGE_SHARE_DESTINATION}/src
FILES_MATCHING PATTERN "*.h"
)
catkin_install_python(
PROGRAMS src/${PROJECT_NAME}/make_libraries.py
DESTINATION ${CATKIN_PACKAGE_BIN_DESTINATION}
)
and
**this is my package.xml**
rosserial_embeddedlinux 0.7.7
rosserial for embedded Linux enviroments xx xx xx BSD http://ros.org/wiki/rosserial_embeddedlinux catkin rosserial_client roscpp rospy roscpp rospy rosserial_msgs
Please out my issue.
↧
↧
How to properly install packages from source?
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!
↧
Ros2 fails to build many packages on Windows 10
Hi,
Is it correct that ROS2 on windows fails to build many of its default packages?
I **precisely** followed [these](https://github.com/ros2/ros2/wiki/Windows-Development-Setup) steps to set up my environment for ROS2 bouncy and everything went fine. I installed opensplice, but had the same issues when trying to compile before I installed it. I checked my `PATH` as well.
When I run
colcon build --merge-install
every now and then, it fails to compile a package, which "exited with code 1". I then put an `AMENT_IGNORE` in the respecting folder and try again, just to see if it somehow can compile. But shouldn't these packages compile without failure?
To be precise, these packages fail to build: pluginlib, rviz, osrf, rcutils, demos, rmw, rcl_interfaces, std_srvs, std_msgs.
I also ignored the following: examples, examples_interfaces, rmw_connext, rmw_typesupport_connext.
Also, when I
cd \dev\ros2
call C:\opensplice67\HDE\x86_64.win64\release.bat
call install\local_setup.bat
ros2
the setup runs fine with no output, but I get "command not found" on ros2. Just as in this [question](https://answers.ros.org/question/294209/ros2-command-not-found-in-windows/).
Can anyone give me at least a hint? I would really appreciate it. Thank you in advance!
EDIT:
It seems that when building packages fail to compile because they depend on each other but prevent their dependencies from being built while failing themselves. So when compiling step-by-step while adding one package each step (and unfortunately in the right but unknown order), as of now, at least some of the packages listed above compile.
↧
Cross Compilation of ROS2 fails with gcc-linaro-7.3.1-2018.05-x86_64_arm-linux-gnueabihf toolchain
I have followed the directions [ros2 on arm architecture](https://github.com/ros2-for-arm/ros2/wiki/ROS2-on-arm-architecture) and everything builds successfully. So I change the Path to my desired toolchain and set `CROSS_COMPILATION=arm-linux-gnueabihf-` and it fails on
Starting >>> examples_rclcpp_minimal_publisher
--- stderr: examples_rclcpp_minimal_client
CMake Warning at ros2_arm_ws/install/rmw_implementation/share/rmw_implementation/cmake/ament_cmake_export_libraries-extras.cmake:116 (message):
Package 'rmw_implementation' exports library 'pthread' which couldn't be
found
/opt/gcc-linaro-7.3.1-2018.05-x86_64_arm-linux-gnueabihf/bin/../lib/gcc/arm-linux-gnueabihf/7.3.1/../../../../arm-linux-gnueabihf/bin/ld: warning: libfastcdr.so.1.0.7, needed by /ros2_arm_ws/install/rcl_interfaces/lib/librcl_interfaces__rosidl_typesupport_fastrtps_c.so, not found (try using -rpath or -rpath-link)s/ros2_arm_ws/install/rcl_interfaces/lib/librcl_interfaces__rosidl_typesupport_fastrtps_c.so: undefined reference to `eprosima::fastcdr::Cdr::deserialize(char&)'
/ros2_arm_ws/install/rcl_interfaces/lib/librcl_interfaces__rosidl_typesupport_fastrtps_cpp.so: undefined reference to `eprosima::fastcdr::Cdr::serializeBoolSequence(std::vector> const&)'
I eventually got it to work, but I did have a lot of warnings
/opt/gcc-linaro-7.3.1-2018.05-x86_64_arm-linux-gnueabihf/bin/../lib/gcc/arm-linux-gnueabihf/7.3.1/../../../../arm-linux-gnueabihf/bin/ld: /home/colas/ros2_arm_ws/install/lib/libnav_msgs__rosidl_typesupport_c.so: invalid string offset 3675 >= 3578 for section `.strtab'
/opt/gcc-linaro-7.3.1-2018.05-x86_64_arm-linux-gnueabihf/bin/../lib/gcc/arm-linux-gnueabihf/7.3.1/../../../../arm-linux-gnueabihf/bin/ld: /home/colas/ros2_arm_ws/install/lib/libnav_msgs__rosidl_typesupport_c.so: invalid string offset 3663 >= 3578 for section `.strtab'
/opt/gcc-linaro-7.3.1-2018.05-x86_64_arm-linux-gnueabihf/bin/../lib/gcc/arm-linux-gnueabihf/7.3.1/../../../../arm-linux-gnueabihf/bin/ld: /home/colas/ros2_arm_ws/install/lib/libnav_msgs__rosidl_typesupport_c.so: invalid string offset 3664 >= 3578 for section `.strtab'
/opt/gcc-linaro-7.3.1-2018.05-x86_64_arm-linux-gnueabihf/bin/../lib/gcc/arm-linux-gnueabihf/7.3.1/../../../../arm-linux-gnueabihf/bin/ld: /home/colas/ros2_arm_ws/install/lib/libnav_msgs__rosidl_typesupport_c.so: invalid string offset 3649 >= 3578 for section `.strtab'
/opt/gcc-linaro-7.3.1-2018.05-x86_64_arm-linux-gnueabihf/bin/../lib/gcc/arm-linux-gnueabihf/7.3.1/../../../../arm-linux-gnueabihf/bin/ld: /home/colas/ros2_arm_ws/install/lib/libnav_msgs__rosidl_typesupport_c.so: invalid string offset 3683 >= 3578 for section `.strtab'
/opt/gcc-linaro-7.3.1-2018.05-x86_64_arm-linux-gnueabihf/bin/../lib/gcc/arm-linux-gnueabihf/7.3.1/../../../../arm-linux-gnueabihf/bin/ld: /home/colas/ros2_arm_ws/install/lib/libnav_msgs__rosidl_typesupport_c.so: invalid string offset 3637 >= 3578 for section `.strtab'
Finished <<< map_msgs [31.9s]
Summary: 129 packages finished [7min 32s]
99 packages had stderr output: actionlib_msgs ament_cmake ament_cmake_auto ament_cmake_clang_format ament_cmake_copyright ament_cmake_core ament_cmake_cppcheck ament_cmake_cpplint ament_cmake_export_definitions ament_cmake_export_dependencies ament_cmake_export_include_directories ament_cmake_export_interfaces ament_cmake_export_libraries ament_cmake_export_link_flags ament_cmake_flake8 ament_cmake_gmock ament_cmake_gtest ament_cmake_include_directories ament_cmake_libraries ament_cmake_lint_cmake ament_cmake_nose ament_cmake_pclint ament_cmake_pep257 ament_cmake_pep8 ament_cmake_pyflakes ament_cmake_pytest ament_cmake_python ament_cmake_ros ament_cmake_target_dependencies ament_cmake_test ament_cmake_uncrustify ament_index_cpp ament_lint_auto ament_lint_common builtin_interfaces class_loader common_interfaces console_bridge diagnostic_msgs example_interfaces examples_rclcpp_minimal_client examples_rclcpp_minimal_composition examples_rclcpp_minimal_publisher examples_rclcpp_minimal_service examples_rclcpp_minimal_subscriber examples_rclcpp_minimal_timer fastcdr fastrtps fastrtps_cmake_module geometry_msgs gmock_vendor gtest_vendor libyaml_vendor lifecycle_msgs map_msgs nav_msgs osrf_testing_tools_cpp pluginlib poco_vendor rcl rcl_interfaces rcl_lifecycle rcl_yaml_param_parser rclcpp rclcpp_lifecycle rcutils rmw rmw_fastrtps_cpp rmw_implementation rmw_implementation_cmake ros_environment rosgraph_msgs rosidl_cmake rosidl_default_generators rosidl_default_runtime rosidl_generator_c rosidl_generator_cpp rosidl_generator_dds_idl rosidl_parser rosidl_typesupport_c rosidl_typesupport_cpp rosidl_typesupport_interface rosidl_typesupport_introspection_c rosidl_typesupport_introspection_cpp rttest sensor_msgs shape_msgs std_msgs std_srvs stereo_msgs test_osrf_testing_tools_cpp tinyxml2_vendor tinyxml_vendor tlsf tlsf_cpp trajectory_msgs uncrustify_vendor urdfdom_headers visualization_msgs
↧
cannot build moveit
Hello,
I created a workspace/src containing both the packages moveit_tutorials and panda_moveit_config, as explained here http://docs.ros.org/kinetic/api/moveit_tutorials/html/doc/getting_started/getting_started.html ...
However when I catkin build I get this error:
CMake Error at /opt/ros/kinetic/share/catkin/cmake/catkinConfig.cmake:83 (find_package):
Could not find a package configuration file provided by
"moveit_visual_tools" with any of the following names:
moveit_visual_toolsConfig.cmake
moveit_visual_tools-config.cmake
Add the installation prefix of "moveit_visual_tools" to CMAKE_PREFIX_PATH
or set "moveit_visual_tools_DIR" to a directory containing one of the above
files. If "moveit_visual_tools" provides a separate development package or
SDK, be sure it has been installed.
Call Stack (most recent call first):
CMakeLists.txt:13 (find_package)
How to resolve it please? regards
↧
↧
undefined reference to everything
Hi,
I have a package in my workspace that uses openCV and cv_bridge. I needed the cuda module of openCV, but it doesn't exist in the default openCV of ROS. I installed another version of openCV that included the cuda modules, I tried to link my workspace and my package to the new openCV and I had lots of errors like "undefined reference to 'cv_bridge::...' ", "undefined reference to 'ros::init::...' ", "undefined reference to 'rosbag::...' ". I tried to solve the problems but I wasn't able, so I tried to return to the default openCV (it worked fine with my package before I tried to use cuda, etc.), but it gives the same errors now. I have uninstalled and reinstalled ROS, deleted my workspace and the package and I have created them again, but I have the same errors. I have all the dependencies in the CMakeLists.txt.
**________**
**EDIT**
For more information, I have created now a new node with a loop that does nothing but `ros::spinOnce(); loop_rate.sleep();` in a different package, and I have the same `undefined reference to` errors about `ros::init(...)` and `ros::NodeHandle::NodeHandle(...)`.
**________**
**EDIT 2**
I have exported my package to another computer with ros and it does work, so I think it is a problem in my ros installation or something wrong in the configuration of the computer or ubuntu (maybe CMake, g++ or gcc?). Please does anyone know which could be the problem? Please I really need help!
**________**
These are some of the errors:
undefined reference to 'cv_bridge::toCvCopy(boost::shared_ptr> const> const&, std::string const&)'
undefined reference to 'ros::console::initializeLogLocation(ros::console::LogLocation*, std::string const&, ros::console::levels::Level)'
undefined reference to 'ros::init(int&, char**, std::string const&, unsigned int)'
undefined reference to 'ros::NodeHandle::NodeHandle(std::string const&, std::map, std::allocator>> const&)'
undefined reference to 'rosbag::Bag::open(std::string const&, unsigned int)'
undefined reference to 'rosbag::TypeQuery::TypeQuery(std::string const&)'
undefined reference to 'rosbag::MessageInstance::getTopic() const'
undefined reference to 'pcl_ros::transformPointCloud(std::string const&, sensor_msgs::PointCloud2_> const&, sensor_msgs::PointCloud2_>&, tf::TransformListener const&)'
undefined reference to 'pcl::PCDWriter::writeBinary(std::string const&, pcl::PCLPointCloud2 const&, Eigen::Matrix const&, Eigen::Quaternion const&)'
undefined reference to 'pcl::PCDWriter::writeASCII(std::string const&, pcl::PCLPointCloud2 const&, Eigen::Matrix const&, Eigen::Quaternion const&, int)'
undefined reference to 'rosbag::MessageInstance::getMD5Sum() const'
undefined reference to 'rosbag::Bag::readField(std::map, std::allocator>> const&, std::string const&, bool, std::string&) const'
undefined reference to 'rosbag::Bag::readField(std::map, std::allocator>> const&, std::string const&, bool, std::string&) const'
...
collect2: error: ld returned 1 exit status
b_c_f/CMakeFiles/bag_to_pcd.dir/build.make:990: recipe for target '/home/portico/catkin_ws/devel/lib/b_c_f/bag_to_pcd' failed
make[2]: *** [/home/portico/catkin_ws/devel/lib/b_c_f/bag_to_pcd] Error 1
CMakeFiles/Makefile2:1642: recipe for target 'b_c_f/CMakeFiles/bag_to_pcd.dir/all' failed
make[1]: *** [b_c_f/CMakeFiles/bag_to_pcd.dir/all] Error 2
Makefile:138: recipe for target 'all' failed
make: *** [all] Error 2
Invoking "make -j8 -l8" failed
I don't know if trying to use the new openCV I have changed something in my CMakeLists.txt or package.xml, so I add them here.
CMakeLists.txt:
cmake_minimum_required(VERSION 2.8.3)
project(b_c_f)
## Compile as C++11, supported in ROS Kinetic and newer
# add_compile_options(-std=c++11)
## Find catkin macros and libraries
## if COMPONENTS list like find_package(catkin REQUIRED COMPONENTS xyz)
## is used, also find other catkin packages
find_package(PCL REQUIRED)
find_package(OpenCV REQUIRED)
find_package(catkin REQUIRED COMPONENTS
cv_bridge
pcl_conversions
pcl_msgs
pcl_ros
rosbag
roscpp
sensor_msgs
tf
)
###################################
## 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 your 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 b_c_f
# CATKIN_DEPENDS cv_bridge pcl_conversions pcl_msgs pcl_ros rosbag roscpp sensor_msgs tf
# DEPENDS system_lib
)
###########
## Build ##
###########
## Specify additional locations of header files
## Your package locations should be listed before other locations
include_directories(
include
include/b_c_f
src/log
${catkin_INCLUDE_DIRS}
${PCL_INCLUDE_DIRS}
${OpenCV_INCLUDE_DIRS}
)
## Declare a C++ executable
## With catkin_make all packages are built within a single CMake context
## The recommended prefix ensures that target names across packages don't collide
add_executable(bag_to_pcd
src/BagCameraFiltering.cpp
src/Blob.cpp
src/timing-helper.cpp
src/Tracker.cpp
src/Vehicle.cpp
src/log/Logger.cpp
src/log/LogItem.cpp
src/log/Log.cpp
src/log/Thread.cpp
#include/bag_camera_filtering/Vehicle.h
)
## Specify libraries to link a library or executable target against
target_link_libraries(bag_to_pcd
${catkin_LIBRARIES}
${OpenCV_LIBS}
${PCL_LIBRARIES}
)
package.xml:
b_c_f 0.0.0 The b_c_f package portico TODO catkin cv_bridge pcl_conversions pcl_msgs pcl_ros rosbag roscpp sensor_msgs tf cv_bridge pcl_conversions pcl_msgs pcl_ros rosbag roscpp sensor_msgs tf cv_bridge pcl_conversions pcl_msgs pcl_ros rosbag roscpp sensor_msgs tf
I don't know anything about how the bash or bashrc should be so the problem could be there too.
Pd: I cloned the cv_bridge from github as another package in my catkin_ws but that didn't solve anything.
Please, I need help!
↧
colcon build sometimes fails with "File (source) cannot be opened: "set""": No such file or directory [C:\dev\ros2\build\ros2gui\publisher.vcxproj]"
Hey folks,
I have the strange issue, that (only sometimes!) colcon build Fails with the above stated error. This is no strerr output though, I got it from stdout_sterr.log ! (otherwise it only Fails to build with Code 1, no error message).
What is strange is, that sometimes it will build, and then without even changing the source code or anything it will succeed the next time. Does someone know what can cause this? Btw, "ros2gui" is my own package that I created…
Do I need to delete anything before building, to get a "clean" environment and update everything properly?
↧
problems compiling: qt5-qmake not found, then share/std_msgs/cmake/std_msgs-msg-paths.cmake not found
Hi all,
I'm very new to ros. For the moment I'm copying turtlesim to my src directory and I will start making modifications from there.
I did the following:
$ cp -R /opt/ros/melodic/share/turtlesim/ ~/catkin_ws/src
$ cd ~/catkin_ws/src
Then I crated the package in order to have CMakeLists.txt:
$ catkin_create_pkg turtlesim_edu geometry_msgs qtbase5-dev message_generation qt5-qmake rosconsole roscpp roscpp_serialization roslib rostime std_msgs std_srvs geometry_msgs
$ catkin_make
got the following error:
Could not find the required component 'qt5-qmake'.
The following CMake error indicates that you either need to install the package with the same name or change your environment so that it can be found.
CMake Error at /opt/ros/melodic/share/catkin/cmake/catkinConfig.cmake:83 (find_package):
Could not find a package configuration file provided by "qt5-qmake" with
any of the following names:
qt5-qmakeConfig.cmake
qt5-qmake-config.cmake
some places suggested to install qt5-default package but didn't help:
sudo apt-get install qt5-default
I solved it with:
export CMAKE_PREFIX_PATH=/usr/local/Qt5.5.1/5.5/gcc_64/lib/cmake
I tried again and I got the following error:
-- +++ processing catkin package: 'beginner_tutorials'
-- ==> add_subdirectory(beginner_tutorials)
-- Using these message generators:
CMake Error at /opt/ros/melodic/share/genmsg/cmake/genmsg-extras.cmake:271 (message):
Could not find 'share/std_msgs/cmake/std_msgs-msg-paths.cmake' (searched in
My environment:
ubuntu-18.04.2 (I can install another version if necessary)
version) qt5-qmake/bionic-updates,now
5.9.5+dfsg-0ubuntu2 amd64 [installed] qt5-qmake-bin/bionic-updates,now
5.9.5+dfsg-0ubuntu2 amd64 [installed] ros-melodic-qt-qmake/bionic,now
1.0.1-0bionic.20181026.232051 amd64 [installed]
How can I solve this situation ?
Is there a better way to copy the package ?
Thanks all!
↧