icub-basic-demos
demoRedBall

The manager module for the Red-Ball Demo developed by IIT and ISR.

The manager module for the Red-Ball Demo developed by IIT and ISR.

Copyright (C) 2010 RobotCub Consortium Author: Ugo Pattacini, Alessandro Roncone

CopyPolicy: Released under the terms of the GNU GPL v2.0.

Description

This module collects the 3-d object positions estimated by the particle filter and sends data to the head and arm controllers in order to gaze at the target, reach for it and eventually grasp it. It relies on the YARP ICartesianControl interface to control both arms and on the YARP IGazeControl interface to control the gaze.

Furthermore, there exists a second modality that enables to estimate the 3-d object position using stereo vision that needs to be calibrated in advance relying on a feed-forward neural network.

Finally, a simulation modality is available to run the demo within gazebo.

Libraries

Parameters

None.

Ports Accessed

The robot interface is assumed to be operative; in particular, the ICartesianControl interface must be available. The iKinGazeCtrl must be running.

In order to run the demo in simulation, such modules can be run with --context gazeboCartesianControl. A template is also available in the folder app/scripts/demoRedBall_gazebo.xml.template.

Ports Created

Input Data Files

None.

Output Data Files

None.

Configuration Files

The configuration file passed through the option –from should look like as follows:

[general]
// the robot name to connect to
robot icub
// the thread period [ms]
thread_period 30
// left arm switch
left_arm on
// right arm switch
right_arm on
// arm trajectory execution time [s]
traj_time 2.0
// reaching tolerance [m]
reach_tol 0.01
// eye used
eye left
// homes limbs if target detection timeout expires [s]
idle_tmo 5.0
// enable the use of stereo vision calibrated by NN
use_network off
// NN configuration file
network network.ini
// enable the use of speech
speech on
// enable the simulation
simulation off
[torso]
// joint switch (min **) (max **) [deg]; 'min', 'max' optional
pitch on (max 30.0)
roll off
yaw on
[left_arm]
// enable/disable the grasp
grasp_enable on
// the offset [m] to be added to the desired position
reach_offset 0.0 -0.15 -0.05
// the offset [m] for grasping
grasp_offset 0.0 0.0 -0.05
// hand orientation to be kept [axis-angle rep.]
hand_orientation 0.064485 0.707066 0.704201 3.140572
// enable impedance velocity mode
impedance_velocity_mode off
impedance_stiffness 0.5 0.5 0.5 0.2 0.1
impedance_damping 60.0 60.0 60.0 20.0 0.0
[right_arm]
grasp_enable on
reach_offset 0.0 0.15 -0.05
grasp_offset 0.0 0.0 -0.05
hand_orientation -0.012968 -0.721210 0.692595 2.917075
impedance_velocity_mode off
impedance_stiffness 0.5 0.5 0.5 0.2 0.1
impedance_damping 60.0 60.0 60.0 20.0 0.0
[home_arm]
// home position [deg]
poss -30.0 30.0 0.0 45.0 0.0 0.0 0.0
// velocities to reach home positions [deg/s]
vels 10.0 10.0 10.0 10.0 10.0 10.0 10.0
[arm_selection]
// hysteresis range added around plane y=0 [m]
hysteresis_thres 0.1
[grasp]
// ball radius [m] for still target detection
sphere_radius 0.05
// timeout [s] for still target detection
sphere_tmo 3.0
// timeout [s] to open hand after closure
release_tmo 3.0
// open hand positions [deg]
open_hand 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0
// close hand positions [deg]
close_hand 0.0 80.0 12.0 18.0 27.0 50.0 20.0 50.0 135.0
// velocities to reach hand positions [deg/s]
vels_hand 10.0 10.0 10.0 10.0 10.0 10.0 10.0 10.0 10.0
[include speech "speech_English.ini"]

The latter inclusion is the .ini file needed for the predefined set of sentences to be spoken. The speech during the red ball demo is divided into three states:

Available commands

To run the demo in gazebo, the following commands can be used:

Note that on the real robot the demo automatically starts.

Tested OS

Windows, Linux

Author
Ugo Pattacini, Alessandro Roncone