当前位置:网站首页>ROS learning notes (6) -- function package encapsulated into Library and called
ROS learning notes (6) -- function package encapsulated into Library and called
2022-06-26 08:39:00 【Yu Getou】
In the use of ROS When it comes to feature packs , A function package sometimes needs to call functions or class definitions in other function packages , Therefore, you need to package a function package into a library so that other function packages can call it
example :A Function package call B Class of Feature Pack
1. take B Function packages are encapsulated as libraries
(1) modify CmakeLists.txt
add_library(lib_name src/code.cpp)
(2) modify package.xml
<export>
<!-- Other tools can request additional information be placed here -->
< cpp cflags="-I${prefix}/include" lflags="-L${prefix}/lib -lib_name"/ >
</export>`
- code.cpp It's a source file ,lib_name For custom library names
2. A The function package calls the above libraries
(1) modify CmakeLists.txt
find_package(catkin REQUIRED COMPONENTS ... b_package)
catkin_package( ... CATKIN_DEPENDS ... b_package)
add_executable(A_code src/A_code.cpp)
target_link_libraries(A_code lib_name)
(2) modify package.xml
<build_depend>b_package</build_depend>
<exec_depend>b_package</exec_depend>
- b_package yes B The name of the Feature Pack , Note that the names used to find the function packs and link libraries are different .
- A Function pack called B Function pack ,B The function pack can no longer contain A Function pack , Otherwise cmake Will report a mistake
边栏推荐
- optee中支持的时间函数
- GHUnit: Unit Testing Objective-C for the iPhone
- Analysis of Yolo series principle
- HEVC学习之码流分析
- Realizing sequence annotation with transformers
- OpenCV Learning notes iii
- Undefined symbols for architecture i386 is related to third-party compiled static libraries
- Reflection example of ads2020 simulation signal
- Koa_ mySQL_ Integration of TS
- opencv學習筆記三
猜你喜欢

Opencv learning notes II

Application of wireless charging receiving chip xs016 coffee mixing cup

"System error 5 occurred when win10 started mysql. Access denied"

WBC learning notes (I): manually push WBC formula

Fabrication of modulation and demodulation circuit
GHUnit: Unit Testing Objective-C for the iPhone

Introduction of laser drive circuit

【Unity Mirror】NetworkTeam的使用

Idea automatically sets author information and date

XXL job configuration alarm email notification
随机推荐
X-VLM多模态模型解读
Analysis of internal circuit of operational amplifier
教你几招:30句哄女孩的“霸道”温馨话,不看后悔!
Timer code guide in optee
Win10 mysql-8.0.23-winx64 solution for forgetting MySQL password (detailed steps)
(1) Turn on the LED
Recyclerview item gets the current position according to the X and Y coordinates
Record the problem yaml file contains Chinese message 'GBK' error
Relevant knowledge of DRF
nn. Modulelist and nn Sequential
Assembly led on
Application of wireless charging receiving chip xs016 coffee mixing cup
What are the conditions for Mitsubishi PLC to realize Ethernet wireless communication?
Discrete device ~ resistance capacitance
Is it safe to open an account in flush,
Intra class data member initialization of static const and static constexpr
STM32 encountered problems using encoder module (library function version)
STM32 porting mpu6050/9250 DMP official library (motion_driver_6.12) modifying and porting DMP simple tutorial
Leetcode22 summary of types of questions brushing in 2002 (XII) and collection search
你为什么会浮躁