To install sonars,
sudo apt update
sudo apt upgrade
sudo apt install ros-kinetic-pi-sonar
Then, to enable the sensors, edit the file as root using
`sudo nano etc/ubiquity/robot.yaml`
or some other editor of your choice, so that
is uncommented and
sonars: None is commented.
# Robot Configuration #sonars: None sonars: 'pi_sonar_v1'
The sonar node publishes a
sensor_msgs/Range message for each sonar reading.
Rviz can visualize these messages as cones. There are launch files to do this in:
https://github.com/UbiquityRobotics/magni_robot (the source package, not the binary packages)
The move_basic node uses the messages published by the sonar node to determine proximity to obstacles.
|/pi_sonar/sonar_1||45 degrees to the left|
|/pi_sonar/sonar_2||45 degrees to the right|