• Diff for "toposens/Tutorials/Getting Started with ECHO ONE"
Differences between revisions 30 and 31
Revision 30 as of 2019-06-26 10:19:36
Size: 6938
Comment:
Revision 31 as of 2019-07-08 09:08:22
Size: 7071
Comment:
Deletions are marked like this. Additions are marked like this.
Line 19: Line 19:
## next.2.link=[[toposens/Tutorials/Getting Started with the TS3 on a Raspberry Pi|Getting Started with the TS3 on a Raspberry Pi]]

(!) Please ask about problems and questions regarding this tutorial on answers.ros.org. Don't forget to include in your question the link to this page, the versions of your OS & ROS, and also add appropriate tags.

Getting Started with ECHO ONE

Description: Using the Toposens stack to connect to and display data from Toposens 3D ultrasonic sensors

Keywords: Toposens, ECHO ONE, TS3, ultrasound

Tutorial Level: BEGINNER

This tutorial assumes that either Ubuntu 16.04 with ROS Kinetic or Ubuntu 18.04 with ROS Melodic is used. Additionally, it is assumed that you have a catkin workspace and catkin tools are installed.

Build Driver

Clone the toposens metapackage into the source folder of 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

In your catkin workspace build the package by using catkin build:

cd ~/catkin_ws

catkin build toposens

Source your build space by running "source ~/catkin_ws/devel/setup.bash". This needs to be done in every new terminal or you can add this command to your bashrc for it to be executed automatically.

Enable Serial Port Permissions

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.

Connect TS3 Sensor

Connect your Toposens TS3 sensor via the provided FTDI cable to any available USB port on your computer.

Obtain the connected terminal ID for the device:

dmesg | grep "FTDI USB Serial Device"

In the case below, the terminal ID would be ttyUSB0 Port

Visualize Data

There are three different ways of viewing the data output from a TS3 sensor, which are published to three separate topics:

The utility of these topics is further explored in the following sections.

View Raw Stream

The ts_driver_node translates the sensor data into custom toposens_msgs/TsScan messages.

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

TsScan

Visualize Data as Markers

The ts_markers_node translates the messages of type toposens_msgs/TsScan into messages of type visualization_msgs/MarkerArray, which can be visualized in RViz.

The driver node as well as the markers node are launched from within one launch-file:

roslaunch toposens_markers toposens_markers.launch port:=/dev/ttyUSB0

The markers are visualized in RViz:

View Pointcloud in RViz

The ts_cloud_node translates the messages of type toposens_msgs/TsScan into messages of type sensor_msgs/PointCloud2.

The driver node as well as the pointcloud node are launched from within one launch-file:

roslaunch toposens_pointcloud toposens_cloud.launch port:=/dev/ttyUSB0

The pointcloud is visualized in RViz: RVizPointcloud

The pointcloud is logged to the file ~/catkin_ws/src/ros-packages/toposens_pointcloud/toposens.pcd

Manipulate Parameters

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.

Sensor Parameters

There are 6 different parameters that can be changed in the ts_driver_node.

DynRecDriver

Variable Name

Effect

echo_rejection_threshold

Minimum amplitude for an echo to be considered valid. Increasing it will ignore more points of smaller intensity.

noise_indicator_threshold

Normalized noise level on ADC signals to mark processed points as noisy.

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.

external_temperature

Temperature value used to calibrate speed-of-sound. Value is only used if use_external_temperature is checked.

use_external_temperature

If checked uses external temperature value to calibrate speed-of-sound, otherwise use value provided by on-board temperature sensor.

Marker Parameters

There are 2 parameters that can be changed in the ts_markers_node.

Variable Name

Effect

lifetime

Duration for which a marker should remain visible

scale

Magnitude for resizing markers equally and simultaneously

Wiki: toposens/Tutorials/Getting Started with ECHO ONE (last edited 2023-12-13 12:16:09 by toposens)