Open ruffson opened 1 year ago
I think you just need to link against the appropriate tesseract_environment
and tesseract_kinematics
targets. It's not totally obvious what these targets are, but as a rule of thumb they are usually tesseract::<name_of_package>
or tesseract::<name_of_package>_<module>
for packages that have a core component and modules that build on other libraries (e.g., tesseract::tesseract_kinematics_core
, tesseract::tesseract_motion_planners_trajopt
, etc.). You may have to investigate the package's CMakeLists
to identify what these targets are called specifically.
find_package(tesseract_environment REQUIRED)
find_package(tesseract_kinematics REQUIRED)
...
target_link_libraries(generate_path_server
tesseract::tesseract_environment
tesseract::tesseract_kinematics_core
...
)
FWIW, all tesseract
packages that are not in tesseract_ros
are regular CMake projects, not catkin
components.
find_package(catkin required components
dynamic_reconfigure
pluginlib
rosbag
rosconsole
roscpp
roslib
tf
tf_conversions
eigen_conversions
std_msgs
sensor_msgs
cmake_modules
message_generation
moveit_core
moveit_ros_planning
moveit_ros_planning_interface
moveit_planners_ompl
pluginlib
tesseract_msgs
tesseract_monitoring
tesseract_rosutils
- tesseract_environment
- tesseract_kinematics
)
+find_package(tesseract_environment REQUIRED)
+find_package(tesseract_kinematics REQUIRED)
As a side-note it would be nice if the example were isolated. Instead, the examples mostly import cmake configuration and headers from tesseract_examples. I understand how you don't want to repeat yourself, but it is harder to isolated what is needed per project.
Here is a decent example from tesseract_planning
about how to link to some of the relevant targets
I think you just need to link against the appropriate
tesseract_environment
andtesseract_kinematics
targets. It's not totally obvious what these targets are, but as a rule of thumb they are usuallytesseract::<name_of_package>
ortesseract::<name_of_package>_<module>
for packages that have a core component and modules that build on other libraries (e.g.,tesseract::tesseract_kinematics_core
,tesseract::tesseract_motion_planners_trajopt
, etc.). You may have to investigate the package'sCMakeLists
to identify what these targets are called specifically.find_package(tesseract_environment REQUIRED) find_package(tesseract_kinematics REQUIRED) ... target_link_libraries(generate_path_server tesseract::tesseract_environment tesseract::tesseract_kinematics_core ... )
@marip8 Thank you for your response!
Hmm I tried this in the past (see my commented-out target-link-libraries) but when I do this I get a linker error:
/usr/bin/ld: cannot find -ltinyxml2::tinyxml2
collect2: error: ld returned 1 exit status
which is weird because I:
.so
in /usr/lib/x86_64-linux-gnu/libtinyxml2.so
, I even tried sym-linking the file to /usr/local/lib
, I set the LD_LIBRARY_PATH
,libxml2
as a build_depend
to the package.xml and find_package(TinyXML2 REQUIRED)
to my CMakeListld: warning: cannot find entry symbol _start; not setting start address
)Do you have any idea why it would not be able to find libxml2? I also installed ros-cmake-modules
.
Edit: I should add, that I am using this from a ROS noetic package. And I thought that the inter-package linking would be done by the build dependencies from the package.xml
?
Hi there, when I try to initialize a previously declared environment like this:
I am getting a linker error like below:
These are the relevant parts of my CMakelist. In my desperation, I have added a lot of dependencies everywhere:
(In this example, I lowercased everything by accident.)
The missing
tesseract_kinematics
package which builds totesseract_kinematics_core
can be found inside mycatkin_ws/build/tesseract_kinematics/core/libtesseract_kinematics_core.so
As a side-note it would be nice if the example were isolated. Instead, the examples mostly import cmake configuration and headers from tesseract_examples. I understand how you don't want to repeat yourself, but it is harder to isolated what is needed per project.