I need to start developing with ROS at work, so I wanted to try it at home first. I compiled it on a Raspberry Pi using the following tutorial here but I used
ros_comm instead of
desktop distribution as compiling of RViz takes a lot of the time and it isn’t needed on a headless Raspberry Pi.
I believed that it would be possible to develop ROS nodes with remote development as I am used to, but there are some hiccups. First on the Raspberry a ROS project needs to be created using
catkin_create_pkg PROJECT_NAME std_msgs roscpp. Then on the development machine a Clion project needs to be created and configured as any other remote development project and its deployment path should be set to the folder where our project was created on the Raspberry. Once that is done,
CMakeLists.txt need to be deleted and the contents of the project on the Raspberry Pi needs to be downloaded via right clicking on the project folder > Deployment > Download from…. After that it is required to tweak CMake environment variables in the settings so that all ROS related stuff obtained on the Raspberry Pi using
printenv is copied there. Most important thing is
PYTHONPATH. And then after a few retries and deletions of the
cmake-build-* folder you are ready to remotely develop ROS nodes.