ROS packages for working with Toposens 3D Ultrasound sensors: http://toposens.com/
Developed and tested for ROS Melodic on Ubuntu 18.04 (Bionic) and ROS Kinetic on Ubuntu 16.04 (Xenial) using Toposens TS3 ultrasonic sensor.
Follow these guides to install and set up ROS Melodic on your system:
Install catkin tools:
$ sudo apt install python-catkin-tools
Follow these guides to install and set up ROS Kinetic on your system:
Install catkin tools:
$ sudo apt install python-catkin-tools
Clone the toposens metapackage into your catkin workspace:
$ cd ~/catkin_ws/src
$ git clone https://gitlab.com/toposens/public/ros-packages.git
Use rosdep to install missing dependencies:
$ rosdep update
$ rosdep install --from-paths ~/catkin_ws/src/ros-packages/ --ignore-src --rosdistro <distro> -y
Build the package by using catkin build:
$ catkin build toposens
Add yourself to the “dialout” group:
$ sudo adduser $USER dialout
Trigger updated group permissions to take effect:
$ newgrp dialout
Re-login or reboot for the updated group permissions to take effect permanently.
$ dmesg | grep "FTDI USB Serial Device"
In this case the terminal ID would be ttyUSB0
.
/ts_scans broadcasts messages of type toposens_msgs/TsScan, which hold the raw data stream parsed as toposens_msgs
The ts_driver_node
translates the sensor data into custom toposens_msgs/TsScan messages.
Source your ROS setup
$ source devel/setup.bash
Launch the driver node and start accruing data from a TS3 sensor. Set the corresponding serial port as launch argument (here: /dev/ttyUSB0):
$ roslaunch toposens_driver toposens_driver.launch port:=/dev/ttyUSB0
The sensor data is published to the the topic /ts_scans
. View the incoming scans with:
$ rostopic echo /ts_scans
To manipulate sensor parameters as well as visualization parameters live in realtime, run in an additional terminal window:
$ rosrun rqt_reconfigure rqt_reconfigure
The ts_driver_node
respectively ts_markers_node
need to be running for this to work.
There are 6 different parameters that can be changed in the ts_driver_node
.
Variable Name | Effect |
---|---|
num_pulse | Number of ultrasonic pulses emitted by the sensors piezo transducer in every transmission cycle. Increasing the value will detect objects that are further away, decreasing it will increase the precision in short range. |
peak_detection_window | Kernel size applied on ADC signals for peak detection. Decreasing it will separate multiple objects that are close to each other. |
echo_rejection_threshold | Minimum amplitude for an echo to be considered valid. Increasing it will ignore more points of smaller intensity. |
use_external_temperature | If checked uses external temperature value to calibrate speed-of-sound, otherwise use value provided by on-board temperature sensor. |
external_temperature | Temperature value used to calibrate speed-of-sound. Value is only used if use_external_temperature is checked. |
noise_indicator_threshold | Normalized noise level on ADC signals to mark processed points as noisy. |