[Documentation] [TitleIndex] [WordIndex

Overview

The purpose of this tutorial is to introduce you to the sensors available to you in the Agile Robotics for Industrial Automation Competition (ARIAC) and how to interface with them from the command-line. See the Hello World tutorial for an example of how to programmatically read the sensor data.

Note: this tutorial assumes you are using ROS Kinetic (Ubuntu Xenial 16.04), the officially supported ROS distro for ARIAC 2018.

Prerequisites

You should have already completed the GEAR interface tutorial.

Reading sensor data

As described in the competition specifications, there are sensors available for you to place in the environment. How you can select which sensors to use is covered in the competition configuration specifications.

To start with, launch ARIAC with a sample workcell environment configuration that contains an arm and some sensors in various locations:

annotated_sensors.png

Start the competition so that the shipping box has some products appear in it (this will happen when the first order is received).

Break beam

This is a simulated photoelectric sensor, such as the Sick W9L-3. This sensor has a detection range of 1 meter and the binary output will tell you whether there is an object crossing the beam. There are two ROS topics that show the output of the sensor: /ariac/{sensor_name} and /ariac/{sensor_name}_change. A message is periodically published on topic /ariac/{sensor_name} with the output of the sensor. Once GEAR has been started, you can display the output of the break_beam sensor with:

You'll receive periodic updates showing if an object was detected. Alternatively, you could subscribe to the /ariac/{sensor_name}_change which will only show one message per transition from object not detected to object detected or vice versa:

You should see that the break beam says that it detects an object (the shipping box on the belt).

Proximity sensor

This is a simulated ultrasound proximity sensor such as the SU2-A0-0A. This sensor has a detection range of ~0.15 meters and the output will tell you how far an object is from the sensor. The ROS topic /ariac/{sensor_name} publishes the output of the sensor with the sensor_msgs/Range message type. We have installed a proximity sensor in the grill next to the belt. Once GEAR has been started, you can subscribe to the proximity sensor topic with:

For demonstration purposes, let's spawn a part that trips the sensor:

You should see that the sensor detects the part (reported range is less than the max range).

Laser profiler

This is a simulated 3D laser profiler such as the Cognex DS1300. The output of the sensor is an array of ranges and intensities. The size of the array is equal to the number of beams in the sensor. The maximum range of each beam is ~0.725m. The output of the sensor is periodically published on the topic /ariac/{sensor_name}. Once GEAR has been started you can subscribe to the laser profiler topic with:

The profile of the products in the shipping box can be detected by the sensor when they pass beneath it. Note that the ranges reported will vary over time as there is noise in the sensor output.

To visualize the laser scan, launch RViz:

annotated_rviz_mapping_laser_profiler.png

Disable the TF frames (uncheck the box) to clear the clutter from the display. You should be able to notice the scan being displayed relative to the laser profiler's TF frame (it looks like a solid red line in RViz). In another terminal, give power to the conveyor belt:

As the boxes pass beneath the laser profiler, the profile will change in the Z direction.

Depth camera

This is a simulated time-of-flight depth camera such as the Swissranger SR4000. The output of the sensor is a point cloud. Because of the amount of data being published, if you want to echo the sensor message, you probably want to use the following option to suppress the data values:

There is a depth camera positioned above one of the bins. In the rviz display from before, you will be able to notice it detecting a number of products that are sitting in the bin.

annotated_rviz_mapping_depth_camera.png

Logical camera

This is a simulated camera with a built-in object classification and localization system. The sensor reports the position and orientation of the camera in the world, as well as a collection of the objects detected within its frustum. For each object detected, the camera reports its type and pose from the camera reference frame. In the sample environment, there is a logical camera above the bins that store products. Run ARIAC and subscribe to the logical camera topic:

You should see that the logical camera reports the pose of multiple products, and its own pose in the world. Note that there is some noise in the poses reported by the camera.

TF transforms

In addition to publishing to the /ariac/{logical_camera_name} ROS topic, logical cameras also publish transforms on the /tf ROS topic that can be used by the TF2 library.

The TF2 library can be used to calculate the pose of the products detected by the logical cameras in the world co-ordinate frame (see http://wiki.ros.org/tf2). It does this by combining the the transform from the /world frame to /logical_camera_frame, with the transform from /logical_camera_frame to the frame of the detected products.

Here's an example of using TF2 command-line tools to do the conversion to the world co-ordinate frame. Note that the frame of the detected products is prefixed by the name of the camera that provides the transform, so that transforms provided by multiple cameras that see the same products are unique.

As another example, to use the logical camera that is positioned above the conveyor belt to get the pose of a shipping box it sees in world co-ordinates, you would run the following command (if there isn't a shipping box with that ID beneath the camera, you won't get the same output):

There are many ROS tools for interacting with TF frames. For example the pose of the models detected by the logical camera can be visualized in RViz:

annotated_rviz_mapping_logical_camera.png

For more information on working with TF frames programmatically see the tf2 tutorials.

Note that GEAR uses tf2_msgs and not the deprecated tf_msgs. Accordingly, you should use the tf2 package instead of tf.

Next steps

Now that you are familiar with the sensors available, continue to the Hello World tutorial to see how to programmatically interface with ARIAC.


2024-02-24 12:25