0

I´m trying to comunicate two controllers in webots, in fact, a normal control and a supervisor. I have put the emitter node but i don´t know what function i have to use to send message. I have included too <webots/Emitter.hpp> but the function send() is not recognized. I am doing my code in C++. If anyone could help me i would be so grateful.

Documentation explain that the function to use is:

#include "<webots/Emitter.hpp>"

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

But i don´t have idea how works this.

Thank you.

Mohsen Alyafei
  • 4,765
  • 3
  • 30
  • 42
eldanks
  • 11
  • 2

1 Answers1

1

You will find a simple example of using an Emitter in C++ here. The corresponding Receiver code is here. That should clarify the use of these methods.

Olivier Michel
  • 755
  • 6
  • 10