当前位置:网站首页>Nodehandle common member functions
Nodehandle common member functions
2022-06-25 08:16:00 【N1CROWN】
NodeHandle Common member functions include :
To create a topic publisher
ros::Publisher advertise(const string &topic,uint32_t queue_size, bool latch=false);
// The first parameter is the name of the publishing topic
// The second is the maximum length of the message queue , If the published message exceeds this length and is not received , Then the news will be out of the team . It is usually set as a
A smaller number is enough .
// The third parameter is whether to latch . Some topics are not published at a certain frequency , such as /map This topic, Only for initial subscription or map update
Under different circumstances ,/map Will release the news . The latch is used here .To create a topic subscriber
ros::Subscriber subscribe(const string &topic,uint32_t queue_size, void(*)(M));
// The first parameter is the name of the subscription topic
// The second parameter is the length of the subscription queue , If the received message is not handled in time , So new news joins the team , As soon as the news comes out
// The third parameter is the callback function pointer , Point to the callback function to process the received messageService creation server, Provide services
ros::ServiceServer advertiseService(const string &service, bool(*srv_func)(Mreq &, Mres &));
// The first parameter is service name
// The second parameter is the pointer to the service function , Point to the service function . The function pointed to should have two arguments , Accept requests and responses separately .Service creation client
ros::ServiceClient serviceClient(const string&service_name, bool persistent=false);
// The first functional expression service name
// The second parameter is used to set whether the service connection lasts , If true,client Will remain connected to the remote host , This will make subsequent requests faster . Usually we set flaseQuery the value of a parameter
bool getParam(const string &key, std::string &s);
boolgetParam (const std::string &key, double &d) const;
bool getParam(const std::string &key, int &i) const;
// Get... From the parameter server key Corresponding value , Multiple types have been overloadedAssign parameters
void setParam (const std::string &key, const std::string &s)const;
void setParam (const std::string &key, const char *s) const;
void setParam (const std::string &key, int i) const;
// to key Corresponding val assignment , Overloaded multiple types of val
边栏推荐
- 电子学:第010课——实验 8:继电振荡器
- 洛谷P5994 [PA2014]Kuglarz(异或思维+MST)
- Network model -- OSI model and tcp/ip model
- Remove headers from some pages in a word document
- 现在通过开户经理发的开户链接股票开户安全吗?
- June training (day 25) - tree array
- How to create a new branch with SVN
- TCP 加速小记
- 417 sequence traversal of binary tree 1 (102. sequence traversal of binary tree, 107. level traversal of binary tree II, 199. right view of binary tree, 637. layer average of binary tree)
- Electronics: Lesson 013 - Experiment 14: Wearable pulsed luminaries
猜你喜欢

自制坡道,可是真的很香

每日刷题记录 (三)

2022年毕业生求职找工作青睐哪个行业?

Neural network and deep learning-3-simple example of machine learning pytorch

Modeling and fault simulation of aircraft bleed system

Data-centric vs. Model-centric. The Answer is Clear!
![Luogu p1073 [noip2009 improvement group] optimal trade (layered diagram + shortest path)](/img/cb/046fe4b47898fd6db86edc8a267c34.png)
Luogu p1073 [noip2009 improvement group] optimal trade (layered diagram + shortest path)

CVPR 2022 Oral 2D图像秒变逼真3D物体

TCP stuff

Biweekly investment and financial report: capital ambush Web3 infrastructure
随机推荐
c#搭建ftp服务器并实现文件上传和下载
[QT] qtcreator shortcut key and QML introduction
Allgero reports an error: program has encoded a problem and must exit The design will be saved as a . SAV file
How to create a new branch with SVN
Use Adobe Acrobat pro to resize PDF pages
Rqt command
C disk drives, folders and file operations
To understand the difference between Gram-positive and Gram-negative bacteria and the difference in pathogenicity
Stm32cubemx Learning (5) Input capture Experiment
Deep learning series 48:deepfaker
DNS protocol and its complete DNS query process
2022年毕业生求职找工作青睐哪个行业?
STM32CubeMX 学习(5)输入捕获实验
TCP acceleration notes
Free SSL certificate acquisition tutorial
Luogu p5994 [pa2014]kuglarz (XOR thinking +mst)
Cloud computing exam version 1 0
Logu P2486 [sdoi2011] coloring (tree chain + segment tree + merging of intervals on the tree)
自制坡道,可是真的很香
Opencv minimum filtering (not limited to images)