How to compile codes directly from ROS-CORE2?


Sometimes, I face errors with uploading codes to ROS-CORE2 via the cloud IDE (one such problem is incompatible bin file, although controller type and code are correct). I prefer instead to access ROS-CORE2 via SSH, write and compile .cpp codes directly within the controller. I do not want to use Visual Studio Code for compilation. Is it possible to do that? And if yes, how to compile files?

Note that by “codes” I mean .cpp programs containing hFramework.h header file.

Thanks in advance

Hi, do you still face the same problems with programming CORE2-ROS through Web IDE? If you want to program your CORE2 without cloud connection and cables, take a look at one of my previous posts: Upload programs wireless without cloud - #9 by Dominik2 . Building code on CORE2-ROS is possible. You can find toolchain and hFramework library in /opt/husarion (remember to connect RaspberryPi 3 / ASUS Tinker board with CORE2 real-time board using USB cable).

Thank you Dominik2 for your reply

I would try the method suggested above.

I still face problems with uploading the code through Web IDE: error connecting to the server, invalid bin file, timeout, and others. Clicking “Upload” again does not restart programming when an error has occurred. I have to disconnect power from CORE2 and repower again. I hope offline programming would overcome these difficulties.

W.A, please tell which model of CORE2-ROS do you have (with ASUS Tinker Board, or Raspberry Pi 3)?

I have CORE2-ROS with Raspberry Pi 3