The first possibility is to add the new sensors (
Receiver) to the list of supported devices in the
webots_ros2_driver package. This would require modifying or enhancing the source code of the package. This would allow you to use the sensors in your URDF files without the need for a custom plugin. Please feel free to open a PR with your contribution if you decide to use this solution. You could use other already implemented devices (
webots_ros2_driver/src/plugins) as examples.
The second possibility is to create a custom plugin that uses the C controller API to access the devices, configure them and get their values. This would require writing a custom plugin that interfaces with the Webots simulation software. You would then need to add the plugin to the URDF file.
You can create your custom plugin in C++ or Python:
If you use the plugin in C++, make sure you use the C controller API as the C++ controller API cannot be used anymore since version 2023.0.0 of the package.