ros句柄作用

ros句柄的作用:

1.Automatic Startup and Shutdown

On creation, if the internal node has not been started already, ros::NodeHandle will start the node. Once all ros::NodeHandleinstances have been destroyed, the node will be automatically shutdown.

在节点初始化和关闭一节中,使用ros::NodeHandle管理节点的内部引用,使启动和关闭一个节点变得简单.

在创建时,如果一个内部节点没有被启动,节点句柄将启动该节点.一旦所有的节点句柄实例被销毁,那么节点将被自动关闭. 

2.Namespaces

NodeHandle s let you specify a namespace to their constructor:
ros::NodeHandle nh("my_namespace")
This makes any  relative   name  used with that  NodeHandle  relative to  <node_namespace>/my_namespace  instead of just  <node_namespace> .
这使节点拥有相对名字<node_namespace>/my_namespace,而不仅仅是<node_namespace>
未完.....

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值