gazebo topic订阅

本文介绍如何使用Gazebo通过TCP/IP套接字进行通信,包括如何订阅Gazebo主题以接收消息。提供了示例代码,展示如何创建节点、订阅世界统计信息主题,并处理收到的消息。

gazebo$ find . -name *proto
./gazebo/msgs/cylindergeom.proto
./gazebo/msgs/undo_redo.proto
./gazebo/msgs/cessna.proto
./gazebo/msgs/pose_animation.proto
./gazebo/msgs/link_data.proto
./gazebo/msgs/int.proto
./gazebo/msgs/propagation_grid.proto
./gazebo/msgs/rest_login.proto
./gazebo/msgs/pid.proto
./gazebo/msgs/sky.proto
 

http://gazebosim.org/tutorials?tut=topics_subscribed&ver=1.9

Tutorial: How to subscribe to gazebo topics

Gazebo communicates on TCP/IP sockets, which allows separate programs to interface with Gazebo. Boost ASIO is used by Gazebo to manage the communication layer, and Google Protobufs are used as the message passing and serialization library. Messages are sent on named channels called topics via publishers. On the other side of a topic are subscribers, which receive callbacks when messages arrive. In summary, to send messages one must publish messages using a publisher on a named topic, and to receive messages one must subscribe to a named topic using a subscriber.

The easiest way to communicate with Gazebo over TCP/IP sockets is to link against the Gazebo libraries, and use the provided functions.

The Gazebo transport system

评论 1
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

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

抵扣说明:

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

余额充值