So I am working on a capstone team that is trying to use the Ping Echosounder for obstacle detection. Our goal is to integrate it into an existing UAV that is running a custom version of MOOS-IvP running on a Beaglebone Black, but initially we just want to write a program that will turn an LED on if it detects an object within a set distance. Since MOOS-IvP uses C++ we have been looking at the “deployment branch” from the ping-cpp github. Unfortunately, our team doesn’t have that much experience in this and although we have used “make” files, we haven’t used cmake before, but we are somewhat familiar with C++.
We have cloned the bluerobotics/ping-cpp repository and switched to the deployment branch. Within this branch there is the src folder, which contains the device folder and message folder. Each of these folders have their own CMakeLists.txt files and I am unsure if I need to build each of these separately or if I need to somehow build them together. We have looked over the Underwater Sonar and Altimeter with Arduino guide since it has more documentation, and would like to create a program similar to “ping1d-simple.ino” but for our Beaglebone Black.
So would I write a similar program to “ping1d-simple.ino” and possibly call it “main.cpp” that relies on the “device” and “message” src? If so how should I go about using cmake since there are two CMakeLists.txt files?