Skip to content
This repository has been archived by the owner on Oct 25, 2023. It is now read-only.

processing_belt_interpreter

MadeInPierre edited this page Oct 25, 2018 · 1 revision

Description

This package is used to convert raw data from the range sensors to rectangles.

The input ranges come from the ToF sensors on the belt, thanks to drivers_ard_others.

The output detection zones take into account the angle uncertainty and the range precision of the sensors.

ToF sensors detect in a cone in front of them :

Rectangle approximation

When detecting something, the detection zone (orange) that should be a circle arc with a thickness is approximated by a rectangle for simplicity in further processing :

Sensor properties

The node publishes static transforms of the sensors relative to the robot. These transforms, along with the properties of the sensors, are defined in a configuration file.

All the rectangles are published relative to the static frames of the sensors, so the angle property of the message is always zero.

If the node received a bad data on a sensor, it will use the last good data received for some times. This helps smooth out spikes of bad data.

Authors and versions

  • v1.0 (A17) : @milesial
    • Transforms and classifies range data
  • v2.0 (P18) : @milesial
    • Only transforms data, classifier is a new package

Configuration

A belt.xml definition file is necessary in the memory_definitions package. All the sensors and their positions are defined here, as well as the general precision and angle uncertainty of the sensors.

The structure is as follows :

<belt>
  <params>
    <param type="pololu">
      <max_range>2</max_range> <!-- meters -->
      <angle>0.44</angle> <!-- rad -->
      <precision>0.05</precision> <!-- percents -->
      <scale_responsive>1</scale_responsive> <!-- boolean : responds to scaling after computation or not -->
    </param>
  </params>
  <sensors>
    <sensor id="sensor1" type="polulu"> <!-- x, y in meters, a in rad -->
      <x>0.1</x>
      <y>0.15</y>
      <a>0.2</a>
    </sensor>
    <sensor id="sensor2" type="polulu"> <!-- x, y in meters, a in rad -->
      <x>0.1</x>
      <y>-0.15</y>
      <a>-0.2</a>
    </sensor>
  </sensors>
</belt>

Multiple sensor types can be defined in the params section. For each one are specified :

  • max_range: If the detected range is greater than this, it is ignored.
  • angle: The full cone angle.
  • precision: The precision of the range detection, as a percentage of the range (further detections are less precise).
  • scale_responsive: 0 or 1. If 1, the sensors of this type can be affected by scaling, which means the rectangle can be scaled down (or up) by dynamic reconfigure. This is useful to reduce the size of far obstacles for sensors with a large cone. This can be disabled for the teraranger because its cone is very small, and scaling its rectangles would lead to very small obstacles.

In the sensors section, all the sensors that are on the robot are listed, with their type and position relative to the robot's tf frame.

Communication

Servers

Server name Type Function
/processing/belt_interpreter/rects Topic The processed rectangles in the frame of each sensor are published here as a list. Each sensor appears only one time in the list.

Clients and subscriptions

Server name Type Function
/drivers/ard_others/belt_ranges Topic The node listens for raw data and stores it on a stack before processing it.
/memory/definitions/get Service The node fetches its definition file via the definitions package.

Running the package

rosrun processing_belt_interpreter belt_interpreter_node.py

How it works

In order to try to publish data as batches with all sensors in a batch, the node publishes all processed rectangles when it receives data for a sensor it already processed (excluding the teraranger which has a much higher frequency). It uses a watchdog to make sure the data is published at a fixed rate.