In addition to this I followed the readme file to build the pi_sonar as shown:
Sonar Sensor Handling based on pigpio
library.
To build:
cd ~/catkin_ws/src
git clone https://github.com/UbiquityRobotics/pi_sonar.git
cd ..
catkin_make
source devel/setup.bash
The node needs to access the pigpio daemon, hence the following steps to have it run at startup (if it does not do so already):
wget https://raw.githubusercontent.com/joan2937/pigpio/master/util/pigpiod.service
sudo cp pigpiod.service /etc/systemd/system
sudo systemctl enable pigpiod.service
sudo systemctl start pigpiod.service ******(THIS LINE)******
And encountered the following error:
Job for pigpiod.service failed because the control process exited with error code. See “systemctl status pigpiod.service” and “journalctl -xe” for details.
After looking at “systemctl status pigpiod.service” i got the following:
~/catkin_ws$ systemctl status pigpiod.service
● pigpiod.service - Pigpio daemon
Loaded: loaded (/etc/systemd/system/pigpiod.service; enabled; vendor preset:
Active: failed (Result: exit-code) since Thu 2021-01-21 16:06:04 SAST; 23s ag
Process: 27129 ExecStart=/usr/bin/pigpiod (code=exited, status=203/EXEC)
Jan 21 16:06:04 ubuntu-VirtualBox systemd[1]: Starting Pigpio daemon…
Jan 21 16:06:04 ubuntu-VirtualBox systemd[1]: pigpiod.service: Control process e
Jan 21 16:06:04 ubuntu-VirtualBox systemd[1]: Failed to start Pigpio daemon.
Jan 21 16:06:04 ubuntu-VirtualBox systemd[1]: pigpiod.service: Unit entered fail
Jan 21 16:06:04 ubuntu-VirtualBox systemd[1]: pigpiod.service: Failed with resul
Im not sure if this is the cause of my issue. Also I am unsure whether this must be executed in the catkin_ws or not.