Cpp code in webots controller does not compile in macOS
To make a robot in webots, you first need to download webots onto your macos and install. For that follow the instructions in the official documentation. The link to the official documentation is given below.
Webots: instal
Cyberbotics Ltd., developers of the open source Webots robot simulator.
cyberbotics.com
Then create a new project and select a sample robot or make a custom robot. Follow the following link to make a custom robot.
Then make a new controller in c++ language and press the compile icon. You may see an error showing that the header #include <webots/Robot.hpp> is not found. The reason for this is that the ‘include’ folder is not there in the ‘webots’ folder which is in Applications.
Download the ‘include’ folder from the below link
Unzip the folder and paste in the below directory,
/users/ABC/webots
Then there should be ‘include’ and ‘lib’ folders in the ‘webots’ folder.
Then open the webots application again and open a new controller in c++ and compile. You will see the code gets compiled successfully.
Email: udara@protonest.co
If you enjoyed this article and would like to show some support, consider buying me a coffee on Ko-Fi.
Your support not only helps me keep creating content like this but also fuels me! ☕️📚
Thank you for being an amazing reader!
Here’s my Ko-Fi link: https://ko-fi.com/udarakumarasena
Cheers!