Home        Store        Learn        Blog

PING360 with ubuntu 18.05 and ROS Melodic can not run package

I have run PING360 with ubuntu 18.05 and ROS Melodic but it shown massage as below.

Traceback (most recent call last):
File “/home/loma/catkin_ws/src/ping360_sonar/nodes/ping360_node”, line 3, in
from ping360_sonar import main
File “/home/loma/catkin_ws/devel/lib/python2.7/dist-packages/ping360_sonar/init.py”, line 34, in
exec(__fh.read())
File “”, line 1, in
File “/home/loma/catkin_ws/src/ping360_sonar/src/ping360_sonar/node.py”, line 15, in
from sensor import Ping360
File “/home/loma/catkin_ws/src/ping360_sonar/src/ping360_sonar/sensor.py”, line 6, in
from brping import definitions
File “/home/loma/.local/lib/python2.7/site-packages/brping/init.py”, line 4, in
from brping.device import PingDevice
File “/home/loma/.local/lib/python2.7/site-packages/brping/device.py”, line 38
def connect_serial(self, device_name: str, baudrate: int =115200):
^
SyntaxError: invalid syntax
[ping360_node-3] process has died [pid 1772, exit code 1, cmd /home/loma/catkin_ws/src/ping360_sonar/nodes/ping360_node __name:=ping360_node __log:=/ho
me/loma/.ros/log/74e59170-9ce7-11eb-80d3-03ad1605d8d6/ping360_node-3.log].
log file: /home/loma/.ros/log/74e59170-9ce7-11eb-80d3-03ad1605d8d6/ping360_node-3*.log

How I can fix it?

Did you install the correct version of bluerobotics-ping? Make sure you use version 0.0.9.

Also, make sure that you are using the correct version of python.

Python 2.7 has reached EOL last year, it’s not more supported.