[Documentation] [TitleIndex] [WordIndex


The purpose of this tutorial is to introduce you to the competition interface that is used to interact with GEAR, the software used by teams participating in the Agile Robotics for Industrial Automation Competition (ARIAC).

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

GEAR provides a ROS interface to the teams for controlling all available actuators, reading sensor information and sending/receiving notifications. We highly recommend going through the Tutorials to get familiar with ROS, in particular, ROS topics and services.

This tutorial will only use command-line interfaces to GEAR; see the Hello World tutorial for an example of how to programmatically interface with GEAR.

Running GEAR

After following the System Setup tutorial, you should have GEAR installed. To setup your terminal for running GEAR, you will have to run:

and, if you installed GEAR from source, you will also have to source the relevant setup file from the GEAR install, such as:

This will have to be done for each new terminal opened: we recommend adding it to your bash.rc.

To launch GEAR with a sample work cell environment configuration that contains a IIWA14 arm and some sensors in various locations, run:

Use this invocation for the rest of the tutorial so that we have some components to interact with: it should start Gazebo and all of the competition handling code.

Note: Previous versions of GEAR used the UR10, which is still used in some tutorial images.


Starting the competition

When GEAR is started, the various competition elements will be in an inactive state. You need to call a service to start the competition. After launching GEAR, you can execute the following command in a new terminal to manually start the competition:

You should see a message that the competition was successfully started.

Receiving orders

As described in the competition specifications, an order is composed of a set of shipments to prepare. Orders are communicated to the teams via ROS messages on the topic /ariac/orders. Teams should subscribe to this topic to receive the initial order, as well as any future order updates. To see the last order that was published, once the competition has been started, run:

You should observe the initial order expected to be completed.

You must use sensors to detect and classify the products in the storage unit in order to choose the required products for the order. This is covered in the next tutorial.

Controlling the vacuum gripper

Each arm has a simulated pneumatic gripper attached to the arm's end effector. Teams can enable or disable the suction of the gripper. When the suction is enabled and the gripper is making contact with a product, the contacting product will be attached to the gripper. At any point, teams will also be able to disable the suction, causing the detachment of the object if it was previously attached. To enable the gripper's suction from the command line, run:

The gripper periodically publishes its internal state on topic /ariac/gripper/state. If you subscribe to this topic, you'll be able to introspect the gripper's status. In particular, you can check whether the suction is enabled/disabled or whether there is an object attached to the gripper. Execute the following command to display the gripper's state using the console:

We will demonstrate the use of the suction gripper to transport a product in the following section. You can disable the suction again for now with:

Controlling the arm

The IIWA14 simulation and control code is provided by IFL-CAMP's iiwa_stack ROS packages. The control parameters have been modified for use in the ARIAC simulation.

The arm's controller is subscribed to the /ariac/arm/command topic and so that topic can be used to control all the joints of the arm. This topic uses the trajectory_msgs/JointTrajectory message type for specifying the desired position, velocity, acceleration and/or effort for each joint. The arm's controller will try to match the commanded states.

Note that some combinations of goal types will not work. We recommend using just position for goals, but others are possible. The arm is controlled by an instance of the ros_controllers/joint_trajectory_controller, see the documentation of that package for more details:



Note that the following sequence of commands should be executed without much delay between the commands, or they may not work as expected.

As an example of controlling the arm from the command-line, starting with the arm over the bins, to move the arm call:

You should see that the controller for the arm receives the joint trajectory and moves the arm to the joint positions specified. To verify, run:

You should see the arm's joints approximately match the requested values.

The /ariac/joint_states topic uses the sensor_msgs/JointState message type, which contains the joint positions, velocities, efforts, and the name of the joints. This is the same type of message that is published when the ROS driver is connected to an actual robot arm as opposed to an arm simulated in Gazebo.

Also, the state of the arm's controller is periodically published on the /ariac/arm/state topic. See the control_msgs/JointTrajectoryControllerState message type for more information. This might be useful for debugging, but it may or may not be available when using an actual robot arm.

Now that the arm is over a product, enable the suction gripper:

You should see that the gripper is now enabled and has a product:

Shipments from orders are to be built in shipping boxes that move along the belt. For demonstration purposes, in this demo there is a shipping box that starts in front of the arm in the center of the belt. If we want to move the product over the shipping box, it is not sufficient to send a single point to the arm controller, or we will hit obstacles in the environment. Instead, like before, we will send a sequence of points to be reached over the course of a few seconds:

With the arm now over a shipping box, we drop the product by disabling the suction gripper:

We will see how to submit shipping boxes for delivery in the following section.

rqt GUI

To control the arm from a GUI, run:

Open a joint controller with Plugins > Robot tools > Joint trajectory controller. Select the ariac/arm controller on the /controller_manager namespace and push the power button to enable the controller. You should be able to adjust the arm position by modifying the 7 joint values (enlarge the window if you cannot see 7 joints).

Be aware that enabling the joint trajectory controller in rqt can conflict with other joint trajectories that the arm might be receiving from, for example, the command-line. Disable the controller in rqt if you wish to send trajectories from the command-line.


See the MoveIt tutorial for an example of using MoveIt to control the arm.

Controlling the conveyor belt

The service /ariac/conveyor/control can be used to modify the power of the conveyor belt or stop it. The power can be 0 or a value in the range of 50 to 100, with 100 representing full speed.

You can start the conveyor belt with:

Delivering shipping boxes: drone communication

When contestants have completed a shipment, they must wait for it to be in the drone pickup area at the end of the belt, at which point they can notify a drone to deliver the box. The ROS service /ariac/drone is used for this purpose. You must specify the name of the delivery that is in the box, which is communicated in the order.

Assuming you have followed the steps above to move a product into the shipping box and start the conveyor belt, once the box reaches the drone collection area, trigger the drone with:

You should see the drone collect the box and an output on the terminal running ARIAC with the score of the shipment.

If multiple shipments need to be delivered, the drone can be called to collect another shipment once the first one has been delivered.

Drone collection area congestion

If a shipping box reaches the end of the conveyor belt while there is already one waiting to be collected, the conveyor belt will be stopped to avoid congestion of the drone collection area. Control of the conveyor belt will be disabled until the waiting box is collected. At that point the belt control will be re-enabled and you may restore power to the belt.

To know if the drone collection area is congested, you can check the state of the conveyor belt:

$ rostopic echo /ariac/conveyor/state -n 1
power: 0.0
enabled: False

If the conveyor belt is not enabled, this implies that the collection area is congested. Even when the area is clear again, power will not be restored to the belt automatically so that it does not interfere with in-progress order fulfillment.

Trial end

When all orders have been filled, or the time limit for the trial has been exhausted, the competition state published on /ariac/competition_state will change to done.

Check that this is the case with:

If you wish to request that the trial end early (e.g. you have detected a fault with your system and wish to terminate early), you can do so with the following command:

Faulty products

There are quality control sensors in the environment that publish the pose of faulty products that they detect in shipping boxes. The following characteristics apply to quality control sensors:

Close the previous simulation and start the following demonstration environment instead:

Start the competition which will cause a shipping box to be filled with a demonstration of the requested shipment:

Check the output of the quality control sensor above the shipping box:

You should see that one of the products in the shipping box has been detected as faulty by the sensor, but the other product on the tray passes quality control and is not reported:

The quality control sensors also publish TF frames of the faulty products detected. See the logical camera tutorial for more details.

TF frames

GEAR publishes various TF frames of various poses in the world. These frames may be useful when developing the robot control algorithm. To visualize the TF frames in rviz for example, install rviz if you don't already have it, and run:

For more information on working with TF frames 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.

Troubleshooting interfaces

There are a few interfaces that will not be available during the competition but can be useful during development. See the developer tips page for details on how to enable cheats.

Viewing shipping box contents

The /ariac/shipping_boxes topic can be used during development for seeing the pose of products in the shipping boxes in the same frame as that which will be used for shipment evaluation.

For example, you can see the reported poses of the contents of the shipping box that was filled earlier in the tutorial:

Submitting shipping boxes without drone delivery

The /ariac/submit_shipment service can be used during development for submitting shipping boxes for evaluation without them being ready for drone collection.

For example, once the competition has been started:

Querying storage locations of products

To determine where in the workcell products may be found, you can use the osrf_gear/GetMaterialLocations service. The storage units where products are found will change between trials. An example service call and response is:

which suggests that products of type piston_rod_part may be found in bin2. The TF frame bin2_frame can be used to know the location of bin2 with respect to the origin of the "world":

Next steps

Now that you are familiar with the interface to the ARIAC competition, see the sensor interface tutorial to learn how to interface with the available sensors.

2021-01-02 12:30