-1

Brain box. I work in Linux with C language. I want to know how API functions work. For example,wb_radar_get_number_of_targets(WbDeviceTag tag), how can I find its implementation code, that is, its. C code

  • A search for "Webots" quickly reveals [its source code](https://github.com/cyberbotics/webots/blob/565b5aed95a2aadb73bccf2ad733d37893d5edfe/src/lib/Controller/api/radar.c#L170). – Raymond Chen Jul 15 '20 at 04:18

1 Answers1

0

I would first recommend following the Webots tutorials, in particular, the one about controllers: https://cyberbotics.com/doc/guide/tutorial-4-more-about-controllers

Then you will find the description of the radar C API here: https://cyberbotics.com/doc/reference/radar#radar-functions

Finally, you can find the implementation of the radar C API here: https://github.com/cyberbotics/webots/blob/master/src/lib/Controller/api/radar.c

And the Webots side: https://github.com/cyberbotics/webots/blob/master/src/webots/nodes/WbRadar.cpp

David Mansolino
  • 1,713
  • 7
  • 13