[Documentation] [TitleIndex] [WordIndex

LuxAI QTrobot

QTrobot, is a commercial available toddler-like humanoid robot built by LuxAI S.A. It is a socially engaging and interactive robot with a wide areas of application. QTrobot is currently being used for emotional training of children with autism, post-stroke rehabilitation and elderly cognitive and physical rehabilitation.

https://github.com/luxai-qtrobot/tutorials/raw/master/doc/qtrobot.png

QTrobot Interface

The QTrobot (LuxAI) interface aims to facilitate accessing basic robot functionalities leveraging a set of user-friendly ROS interfaces. Each robot’s functionality can be accessed in blocking and non-blocking mode using ROS publish/subscribe and Service/Client interfaces. Following are the main interfaces of QTrobot:

and some extra interfaces which are available for some models of QTrobot:

For each of the main interfaces, there are two different way of accessing them:

  1. Using ROS Publisher/Subscribers to allow non-blocking call to the interfaces
  2. Using ROS Services for blocking and accessing more sophisticated interfaces

Naming convention

All the QTRobot ROS interfaces have '/qt_robot/...' prefix in front of their names. The word follows the prefix is the name of the main service (e.g. '/qt_robot/speech/...'). Each interface may have more sub-services (methods) which come after the main service name. For example:

/qt_robot/speech/say    : implements say() method of QTrobot TTS
/qt_robot/speech/config : implements configure() method of QTrobot TTS

For user’s convenience we have given the same name to the service and subscriber for each QTrobot ROS interface. That means one can access, for example, the speech functionality using ROS service call or publish/subscribe via the same interface name (e.g. '/qt_robot/speech/say'). Please notice that some of the complex services (e.g. speech configuration for language, pitch,…) are accessible only via ROS service call.

Accessing QTrobot interface from bash

You can access each Robot functionality via its publish/subscribe or Service/Client interfaces. For example to use robot 'Speech' functionality you can try the following:

Using ROS Publisher

$ rostopic pub /qt_robot/speech/say std_msgs/String "data: 'I am QT'"

Using ROS Service

$ rosservice call /qt_robot/speech/say "message: 'I am QT.'"

Accessing QTrobot interface from a python script

[Non-blocking mode] The following example shows how to access QTrobot Speech functionality using ROS publish/subscribe method from python:

   1 import rospy
   2 from std_msgs.msg import String
   3 
   4 # create a publisher
   5 speechSay_pub = rospy.Publisher('/qt_robot/speech/say', String, queue_size=10)
   6 ...
   7 # publish a text message to TTS (non-blocking)
   8 speechSay_pub.publish("Hello! I am QT!")

[blocking mode] And the following example, re-implements the previous one using ROS Service/Client method from python:

   1 import rospy
   2 from std_msgs.msg import String
   3 from qt_robot_interface.srv import *
   4 
   5 # create a service clients
   6 speechSay = rospy.ServiceProxy('/qt_robot/speech/say', speech_say)
   7 ...
   8 # call the service (blocking)
   9 resp = speechSay("Hello! I am QT.")

/!\ Notice: All QTrobot service interfaces returns the status of the call upun success or failure. For example to check whether a call to a service was successful in python, you can check the return value resp.status.

List of available interfaces

Currently the following interfaces have been implemented:

Functionality

Interface prefix

Description

Speech

/qt_robot/speech/...

robot text to speech functionality

Audio

/qt_robot/audio/...

simple standard audio file player

Emotion

/qt_robot/emotion/...

robot facial emotion

Gesture

/qt_robot/gesture/...

robot gesture control

Behavior

/qt_robot/behavior/...

more complex behaviors by combining the robot basic functionality

Motor

/qt_robot/motor/...

robot motor controls using standard ros_control

Setting

/qt_robot/setting/...

basic setting of robot such as speaker volume control.

Human 3D Skeleton

/qt_nuitrack_app/skeletons

Human full body skeleton information

Human 3D Hand Pos

/qt_nuitrack_app/hands

Human 3D hand pos and state

Human Hand Gestures

/qt_nuitrack_app/gestures

Some basic human gestures recognition

Human facial

/qt_nuitrack_app/faces

human face detection, orientation, eyes and facial features pos, age/gender detection and facial emotion recognition


1. Speech Interface

This interface implements QTrobot text to speech functionality which support many languages. The supported languages can be different for each robot. following are some standard supported languages:

Subscribers

Interface Name

Data Type

Description

/qt_robot/speech/say

'std_msgs/String' (text)

Read a text using built-in TTS

Services

Interface Name

Service Name

Parameters

Description

/qt_robot/speech/say

'speech_say'

message

Read a text using built-in TTS

/qt_robot/speech/config

'speech_config'

'language', 'pitch', 'speed'

Configure TTS

(!) Default language is set in '/opt/ros/kinetic/share/qt_robot_interface/config/qtrobot-interface.yaml'. the default pitch is usually '140' and speed is '80'.

(!) when calling 'speech_config', leave pitch and speed parameters to '0' if you do not want to change them.


2. Audio Interface

Play a standard audio file (e.g. wav, mp3). The audio file can be given using its complete name (with the file extension) such as happy.mp3 or simply without the file extension: happy. In the second case, the player first looks for happy.mp3 to play and if it is not found it then tries with happy.wavand so on.

(!) The default path for the audio files is '~/robot/data/audios/'

Subscribers

Interface Name

Data Type

Description

/qt_robot/audio/play

'std_msgs/String' (audio file name)

Play an sudio file

Services

Interface Name

Service Name

Parameters

Description

/qt_robot/audio/play

'audio_play'

'filename', 'filepath'

Play an audio file given by its filename and filepath

(!) To play the audio file from the default path, pass an empty string to filepath param.


3. Emotion Interface

Change the robot facial emotions such as 'QT/happy', 'QT/sad', etc.

Subscribers

Interface Name

Data Type

Description

/qt_robot/emotion/show

'std_msgs/String' (emotion name)

Show a facial emotion given by its name

Services

Interface Name

Service Name

Parameters

Description

/qt_robot/emotion/show

'emotion_show'

'name'

Show a facial emotion given by its name

(!) The complete list of emotion files can be found in '~/robot/data/emotions/'.


4. Gesture Interface

Plays recored robot gesture (arms, head) such as 'happy', 'discust', etc. The complete list of gesture files can be found in ~/robot/data/gestures/.

Subscribers

Interface Name

Data Type

Description

/qt_robot/gesture/play

'std_msgs/String' (gesture name)

Play a robot gesture given by its name

Services

Interface Name

Service Name

Parameters

Description

/qt_robot/gesture/play

'gesture_play'

'name', 'speed'

Play a robot gesture given by its name and speed (default 1.0)

/qt_robot/gesture/record

'gesture_record'

'parts', 'idleParts'

start recording a new gesture. 'parts' is a string array of parts name ('head', 'left_arm', 'right_arm') which specifies which robot part will be used for recording the gesture. 'idleParts' must be set to 'true' to release the motor PWM and put them in idle mode. If not you must put them in idle mode using '/qt_robot/motors/setControlMode' interface

/qt_robot/gesture/save

'gesture_save'

'name', 'path'

stops the current recording process and save the recorded gesture given by its 'name'. 'path' specifies where to save the gesture instead of the default path.

/qt_robot/gesture/list

'gesture_list'

<none>

return a list of a the available gestures within the default gesture path

(!) The default value for speed is 1.0 and it is the default speed with which the gesture got recorded.

/!\ Notice: if the speed param value is 0 the default speed will be used to play the gestures.

/!\ Notice: Default path to record/play the gesture is '~/robot/data/gestures/'.


5. Behavior Interface

This interface implements higher-level and more complex behaviors by combing robot basic functionality.

Subscribers

Interface Name

Data Type

Description

/qt_robot/behavior/talkText

'std_msgs/String' (message)

Read a text using TTS and show talking emotion

/qt_robot/behavior/talkAudio

'std_msgs/String' (audio filename)

Play an audio file and show talking emotion

Services

Interface Name

Service Name

Parameters

Description

/qt_robot/behavior/talkText

'behavior_talk_text'

'message'

Read a text using TTS and show talking emotion

/qt_robot/behavior/talkAudio

'behavior_talk_audio'

'filename', 'filepath'

Play an audio file and show talking emotion

/!\ Notice: The talkAudio and talkText services are mutually exclusive and cannot be used with Emotion Interface at the same time.

(!) To play the audio file from the default path, pass an empty string to filepath param.


6. Motor Interface

Motor interface provide access to the robot actuators using standard ros_control system. Currently the interface implements ROS 'JointStateController', 'JointGroupPositionController' and a custom 'QTMotorsController' controllers.

/!\ Notice: Before using the Motor interface, ensure that you fully understood ros_control system and have a clear understanding of what you do at the motor joint level.

6.1. QTrobot parts

The robot joints are structured as different parts as shown bellow:

Subscribers

Interface Name

Data Type

Description

/qt_robot/joints/state

sensor_msgs/JointState

publishes joint states (currently only positions)

/qt_robot/head_position/command

std_msgs/Float64MultiArray

move the robot head to desired position given by (HeadYaw, HeadPitch).

/qt_robot/right_arm_position/command

std_msgs/Float64MultiArray

move the right_arm to desired position given by (RightShoulderPitch, RightShoulderRoll, RightElbowRoll).

/qt_robot/left_arm_position/command

std_msgs/Float64MultiArray

move the left_arm to desired position given by (LeftShoulderPitch, LeftShoulderRoll, LeftElbowRoll).

Services

Interface Name

Service Name

Parameters

Description

/qt_robot/motors/home

'home'

'parts'

moves the desired robot part to the home position. 'parts' is an array of robot parts and/or single joint name (e.g. ['left_arm', 'right_arm', 'HeadPitch'])

/qt_robot/motors/setControlMode

'set_control_mode'

'parts'

set the control mode (M_ON=0, M_OFF=1, M_BRAKE=2) of desired robot part. 'parts' is an array of robot parts and/or single joint name (e.g. ['left_arm', 'right_arm', 'HeadPitch']). M_ON: motor is controlled. M_OFF: motor is idle and M_BRAKE: motor is in brake mode (not controlled)

/qt_robot/motors/setVelocity

'set_velocity'

'parts', 'velocity'

sets the moving velocity of the desired robot part. 'parts' is an array of robot parts and/or single joint name (e.g. ['left_arm', 'right_arm', 'HeadPitch']). 'velocity' is given as percentage.

/!\ Notice: For safety purpose, every joint has a maximum velocity limits. For example you cannot run 'HeadPitch' joint with more than 20% of the maximum velocity.


7. Setting Interface

This interface provides some basic setting of robot such as speaker volume control.

Services

Interface Name

Service Name

Parameters

Description

/qt_robot/setting/setVolume

'setting_setVolume'

'volume'

set the robot speaker volume to the desired level (in percentage)

---

8. Human 3D Tracking Interface

This interface implements different human 3D body and facial tracking including human full body skeleton, hands pos and gestures, facial and emotion recognition using Intel Realsense camera and Nuitrack SDK.

Publishers

Interface Name

Data Type

Description

/qt_nuitrack_app/skeletons

'qt_nuitrack_app/Skeletons'

publishes human full body skeleton information

/qt_nuitrack_app/hands

'qt_nuitrack_app/Hands'

publishes human 3D hand pos and state

/qt_nuitrack_app/gestures

'qt_nuitrack_app/Gestures'

publishes some basic human gestures recognition

/qt_nuitrack_app/faces

'qt_nuitrack_app/Faces'

publishes human face detection, orientation, eyes and facial features pos, age/gender detection and facial emotion recognition

/camera/color/image_raw

'sensor_msgs/Image'

publishes ROS standard 2D camera image


Tutorials

Please visit luxai-qtrobot github repository for the full list of examples and interesting demos for QTrobot.

Some of the examples and demos are short listed here:

1. Examples

2. Demos


2024-03-23 12:23