ROS API
This package provides an interface to a micro controller board with which an array of ultrasonic sensors are connected and distance to the surrounding environment can be calculated based on the input gathered from the ultrasonic sensors.
us_driver
The us_driver node publishes ipa_odroidx_ultrasonic_interface/ExRangeArray messages based on how the ultrasonic sensors are configured and their gathered input. Each sensor can be configured as a pinging sensor or a listening sensor. Pinging sensors are activated to send out an echo which are then received by the themselves and the other sensors configured as listening sensors. Configuration of a sensor as a pinging sensor or as a listening sensor is done by means of the parameter configurations as described below.Published Topics
us_reading (ipa_odroidx_ultrasonic_interface/ExRangeArray)- Publishes the ranges as calculated by the us_driver node.
Parameters
configurations (list, default: None)- configurations is an array in which each element defines a configuration which is loaded sequentially and in a loop until a new configuration is provided. Each element of the array is a dictionary where the key is the sensor address of a pinging sensor defined as a string and the value is an array of integers which specify the addresses of the listening sensors which are to be read corresponding to the pinging sensor address provided as the key.
- Enable it to show debug messages.
I/O Pin Mapping on controller board
The following table summarizes the input and output connections to and from the sensors connected to the controller board. The table is with respect to the micro controller.
Sensor Address |
Output Pin |
Input Pin |
0 |
PA0 |
PB0 |
1 |
PA1 |
PB1 |
2 |
PA2 |
PB2 |
3 |
PA3 |
PB3 |
4 |
PA4 |
PB4 |
5 |
PA5 |
PB6 |
6 |
PA6 |
PC7 |
7 |
PD0 |
PA7 |
8 |
PD1 |
PC6 |
9 |
PD2 |
PC5 |
10 |
PD3 |
PC4 |
11 |
PD4 |
PC3 |
12 |
PD5 |
PC2 |
13 |
PD6 |
PD7 |
Usage/Examples
The us_driver node can be executed by:
roslaunch ipa_odroidx_ultrasonic_interface us_driver.launch
In the following example configuration yaml file, in the first cycle, sensor '1' and '2' are set as both pinging and listening sensors, sensors '3' and '4' listen to sensor '1' whereas '5' listens to sensor '2'. In the second cycle, sensors '10' and '13' are set as pinging sensors, sensors '1' and '12' listen to sensor '10' and sensor '7' and '8' listen to sensor '13':