【问题标题】:Communication webots emitter and receiver通信 webbots 发射器和接收器
【发布时间】:2020-07-15 18:46:17
【问题描述】:

我正在尝试在 webbots 中通信两个控制器,实际上是一个普通控件和一个主管。我已经放置了发射器节点,但我不知道我必须使用什么功能来发送消息。我也包含了 但函数 send() 无法识别。我正在用 C++ 编写代码。如果有人可以帮助我,我将不胜感激。

文档说明要使用的功能是:

#include "<webots/Emitter.hpp>"

namespace webots {
  class Emitter : public Device {
    virtual int send(const void *data, int size);
    // ...
  }
}

但我不知道这是如何工作的。

谢谢。

【问题讨论】:

    标签: c++ robot receiver webots emitter


    【解决方案1】:

    您将找到一个在 C++ 中使用Emitter 的简单示例here。对应的Receiver 代码为here。那应该澄清这些方法的使用。

    【讨论】:

      猜你喜欢
      • 1970-01-01
      • 2016-11-19
      • 1970-01-01
      • 2017-08-20
      • 2021-11-06
      • 1970-01-01
      • 2016-01-22
      • 1970-01-01
      • 1970-01-01
      相关资源
      最近更新 更多