Device Components

Device components are reusable modules that provide specific functionalities for different robotic platforms. These components can be shared across multiple device types and provide a consistent interface for common capabilities like cameras, microphones, speakers, motion control, and more.

NAOqi Components

Components for NAOqi-based robots (NAO and Pepper).

Camera

class sic_framework.devices.common_naoqi.naoqi_camera.NaoqiCameraConf(naoqi_ip='127.0.0.1', port=9559, cam_id=0, res_id=2, fps=30, brightness=None, contrast=None, saturation=None, hue=None, gain=None, hflip=None, vflip=None, auto_exposition=None, auto_white_bal=None, manual_exposure_val=None, auto_exp_algo=None, sharpness=None, back_light_comp=None, auto_focus=None, manual_focus_value=None)[source]

Bases: SICConfMessage

__init__(naoqi_ip='127.0.0.1', port=9559, cam_id=0, res_id=2, fps=30, brightness=None, contrast=None, saturation=None, hue=None, gain=None, hflip=None, vflip=None, auto_exposition=None, auto_white_bal=None, manual_exposure_val=None, auto_exp_algo=None, sharpness=None, back_light_comp=None, auto_focus=None, manual_focus_value=None)[source]

Initialize camera configuration and optional device parameters.

For parameter meaning and defaults, see: - http://doc.aldebaran.com/2-8/family/nao_technical/video_naov6.html#naov6-video - http://doc.aldebaran.com/2-1/family/robots/video_robot.html

Parameters:
  • naoqi_ip (str) – NAOqi host IP.

  • port (int) – NAOqi TCP port.

  • cam_id (int) – Camera ID to use.

  • res_id (int) – Resolution ID.

  • fps (int) – Target frames per second.

  • brightness (Optional[int]) – Camera brightness.

  • contrast (Optional[int]) – Camera contrast.

  • saturation (Optional[int]) – Camera color saturation.

  • hue (Optional[int]) – Camera hue adjustment.

  • gain (Optional[int]) – Camera gain level.

  • hflip (Optional[int]) – Horizontal flip toggle.

  • vflip (Optional[int]) – Vertical flip toggle.

  • auto_exposition (Optional[int]) – Auto exposure toggle.

  • auto_white_bal (Optional[int]) – Auto white balance toggle.

  • manual_exposure_val (Optional[int]) – Manual exposure value.

  • auto_exp_algo (Optional[int]) – Auto exposure algorithm.

  • sharpness (Optional[int]) – Image sharpness.

  • back_light_comp (Optional[int]) – Backlight compensation toggle.

  • auto_focus (Optional[int]) – Auto focus toggle.

  • manual_focus_value (Optional[int]) – Manual focus value.

Parameter Defaults: brightness: 55 contrast: 32 saturation: 128 hue: 0 gain: 32 hflip: 0 vflip: 0 auto_exposition: 1 auto_white_bal: 1 auto_exp_algo: 1 sharpness: 0 back_light_comp: 1 auto_focus: 0 manual_focus_value: 0

class sic_framework.devices.common_naoqi.naoqi_camera.BaseNaoqiCameraSensor(*args, **kwargs)[source]

Bases: SICSensor

__init__(*args, **kwargs)[source]
static get_conf()[source]

Return the default configuration for a single camera sensor.

Returns:

Camera configuration instance.

Return type:

NaoqiCameraConf

static get_inputs()[source]

Declare that the sensor does not accept input messages.

Returns:

Empty list.

Return type:

list

static get_output()[source]

Declare the output message type produced by this sensor.

Returns:

Compressed image message class.

execute()[source]

Grab one image frame from the NAOqi camera and return it.

Returns:

Compressed image containing the RGB frame as a NumPy array.

Return type:

CompressedImageMessage

_cleanup()[source]

Release NAOqi camera resources after the sensor thread has stopped.

class sic_framework.devices.common_naoqi.naoqi_camera.NaoqiTopCameraSensor(*args, **kwargs)[source]

Bases: BaseNaoqiCameraSensor

__init__(*args, **kwargs)[source]
static get_conf()[source]

Return the default configuration for the top camera.

Returns:

Configuration with cam_id=0 and res_id=1.

Return type:

NaoqiCameraConf

class sic_framework.devices.common_naoqi.naoqi_camera.NaoqiTopCamera(ip='localhost', conf=None, input_source=None)[source]

Bases: SICConnector

component_class

alias of NaoqiTopCameraSensor

class sic_framework.devices.common_naoqi.naoqi_camera.NaoqiBottomCameraSensor(*args, **kwargs)[source]

Bases: BaseNaoqiCameraSensor

Sensor for the NAO bottom camera (cam_id=1).

__init__(*args, **kwargs)[source]
static get_conf()[source]

Return the default configuration for the bottom camera.

Returns:

Configuration with cam_id=1 and res_id=1.

Return type:

NaoqiCameraConf

class sic_framework.devices.common_naoqi.naoqi_camera.NaoqiBottomCamera(ip='localhost', conf=None, input_source=None)[source]

Bases: SICConnector

component_class

alias of NaoqiBottomCameraSensor

class sic_framework.devices.common_naoqi.naoqi_camera.StereoImageMessage(left, right)[source]

Bases: SICMessage

__init__(left, right)[source]

Create a stereo image message.

Parameters:
  • left (numpy.ndarray) – Left image array.

  • right (numpy.ndarray) – Right image array.

class sic_framework.devices.common_naoqi.naoqi_camera.NaoStereoCameraConf(calib_params=None, naoqi_ip='127.0.0.1', port=9559, cam_id=0, res_id=2, color_id=11, fps=30, convert_bw=True, use_calib=True)[source]

Bases: NaoqiCameraConf

__init__(calib_params=None, naoqi_ip='127.0.0.1', port=9559, cam_id=0, res_id=2, color_id=11, fps=30, convert_bw=True, use_calib=True)[source]

Initialize camera configuration and optional device parameters.

For parameter meaning and defaults, see: - http://doc.aldebaran.com/2-8/family/nao_technical/video_naov6.html#naov6-video - http://doc.aldebaran.com/2-1/family/robots/video_robot.html

Parameters:
  • naoqi_ip (str) – NAOqi host IP.

  • port (int) – NAOqi TCP port.

  • cam_id (int) – Camera ID to use.

  • res_id (int) – Resolution ID.

  • fps (int) – Target frames per second.

  • brightness (Optional[int]) – Camera brightness.

  • contrast (Optional[int]) – Camera contrast.

  • saturation (Optional[int]) – Camera color saturation.

  • hue (Optional[int]) – Camera hue adjustment.

  • gain (Optional[int]) – Camera gain level.

  • hflip (Optional[int]) – Horizontal flip toggle.

  • vflip (Optional[int]) – Vertical flip toggle.

  • auto_exposition (Optional[int]) – Auto exposure toggle.

  • auto_white_bal (Optional[int]) – Auto white balance toggle.

  • manual_exposure_val (Optional[int]) – Manual exposure value.

  • auto_exp_algo (Optional[int]) – Auto exposure algorithm.

  • sharpness (Optional[int]) – Image sharpness.

  • back_light_comp (Optional[int]) – Backlight compensation toggle.

  • auto_focus (Optional[int]) – Auto focus toggle.

  • manual_focus_value (Optional[int]) – Manual focus value.

Parameter Defaults: brightness: 55 contrast: 32 saturation: 128 hue: 0 gain: 32 hflip: 0 vflip: 0 auto_exposition: 1 auto_white_bal: 1 auto_exp_algo: 1 sharpness: 0 back_light_comp: 1 auto_focus: 0 manual_focus_value: 0

class sic_framework.devices.common_naoqi.naoqi_camera.StereoPepperCameraSensor(*args, **kwargs)[source]

Bases: BaseNaoqiCameraSensor

__init__(*args, **kwargs)[source]
static get_conf()[source]

Return the default configuration for a single camera sensor.

Returns:

Camera configuration instance.

Return type:

NaoqiCameraConf

undistort(img)[source]

Remove lens distortion using intrinsic matrix and distortion coefficients.

Parameters:

img (numpy.ndarray) – Image to undistort.

Returns:

Undistorted image.

Return type:

numpy.ndarray

warp(img, is_left)[source]

Apply perspective warp using rectification homography.

Parameters:
  • img (numpy.ndarray) – Image to warp.

  • is_left (bool) – Selects H1 for left and H2 for right.

Returns:

Warped image.

Return type:

numpy.ndarray

Raises:

AssertionError – If H1 or H2 is missing.

rectify(img, is_left)[source]

Undistort and warp an image for rectification.

Parameters:
  • img (numpy.ndarray) – Image to rectify.

  • is_left (bool) – Whether this is a left frame.

Returns:

Rectified image.

Return type:

numpy.ndarray

execute()[source]

Grab one image frame from the NAOqi camera and return it.

Returns:

Compressed image containing the RGB frame as a NumPy array.

Return type:

CompressedImageMessage

static get_output()[source]

Declare the output message type for this sensor.

Returns:

StereoImageMessage type.

class sic_framework.devices.common_naoqi.naoqi_camera.StereoPepperCamera(ip='localhost', conf=None, input_source=None)[source]

Bases: SICConnector

component_class

alias of StereoPepperCameraSensor

class sic_framework.devices.common_naoqi.naoqi_camera.DepthPepperCameraSensor(*args, **kwargs)[source]

Bases: BaseNaoqiCameraSensor

__init__(*args, **kwargs)[source]
static get_conf()[source]

Return the default configuration for the depth camera.

Returns:

Configuration with cam_id=2 and res_id=10.

Return type:

NaoqiCameraConf

class sic_framework.devices.common_naoqi.naoqi_camera.DepthPepperCamera(ip='localhost', conf=None, input_source=None)[source]

Bases: SICConnector

component_class

alias of DepthPepperCameraSensor

Microphone

class sic_framework.devices.common_naoqi.naoqi_microphone.NaoqiMicrophoneConf[source]

Bases: SICConfMessage

__init__()[source]
class sic_framework.devices.common_naoqi.naoqi_microphone.NaoqiMicrophoneSensor(*args, **kwargs)[source]

Bases: SICSensor

COMPONENT_STARTUP_TIMEOUT = 4

Timeout in seconds for component startup.

This controls how long a SICConnector should wait when requesting a component to start. Increase this value for components that need more time to initialize (e.g., robots that need to stand up or models that need to load to GPU).

__init__(*args, **kwargs)[source]
Parameters:
  • args (Any) – Positional arguments passed to the base class.

  • kwargs (Any) – Keyword arguments passed to the base class.

Raises:

RuntimeError – If the callback service cannot be registered.

static get_conf()[source]

Return the default configuration for this sensor.

Returns:

Microphone configuration instance.

Return type:

NaoqiMicrophoneConf

static get_inputs()[source]
Returns:

Empty list.

Return type:

list

static get_output()[source]

Define the output type of the component.

Must be implemented by the subclass.

Returns:

SIC message

Return type:

Type[SICMessage]

execute()[source]

Main function of the sensor.

Must be implemented by the subclass.

Returns:

A SICMessage

Return type:

SICMessage

_cleanup()[source]

Release NAOqi resources after the sensor thread has stopped.

processRemote(nbOfChannels, nbOfSamplesByChannel, timeStamp, inputBuffer)[source]
class sic_framework.devices.common_naoqi.naoqi_microphone.NaoqiMicrophone(ip='localhost', conf=None, input_source=None)[source]

Bases: SICConnector

component_class

alias of NaoqiMicrophoneSensor

Speakers

class sic_framework.devices.common_naoqi.naoqi_speakers.NaoqiSpeakersConf[source]

Bases: SICConfMessage

Configuration for the NAOqi speaker component.

__init__()[source]

Initialize default audio configuration values for the NAOqi speaker component.

class sic_framework.devices.common_naoqi.naoqi_speakers.NaoqiSpeakerComponent(*args, **kwargs)[source]

Bases: SICComponent

__init__(*args, **kwargs)[source]

Initialize the NAOqi speaker component and connect to ALAudioDevice and ALAudioPlayer.

static get_conf()[source]

Return the default configuration for this component.

Returns:

Default speaker configuration.

Return type:

NaoqiSpeakersConf

static get_inputs()[source]

Define the input types the component needs as a list.

Must be implemented by the subclass.

Returns:

list of SIC messages

Return type:

List[Type[SICMessage]]

static get_output()[source]

Define the output type of the component.

Must be implemented by the subclass.

Returns:

SIC message

Return type:

Type[SICMessage]

on_message(message)[source]

Define the handler for input messages.

Parameters:

message (SICMessage) – The message to handle.

Returns:

The reply

Return type:

SICMessage

on_request(request)[source]

Define the handler for Component specific requests. Must return a SICMessage as a reply to the request.

Parameters:

request (SICRequest) – The request for this component.

Returns:

The reply

Return type:

SICMessage

play_sound(message)[source]
stream_sound(message)[source]
stop(*args)[source]

Stop the component safely (template method).

Lifecycle: - Signal the component thread to stop via _signal_to_stop - Wait (up to COMPONENT_STOP_TIMEOUT) for the worker thread to confirm it stopped via _stopped - Only if the worker thread has stopped, run _cleanup() to release subclass resources

If the worker thread does not stop within the timeout, _cleanup() is skipped to avoid race conditions where resources are freed while the worker thread is still executing.

class sic_framework.devices.common_naoqi.naoqi_speakers.NaoqiSpeaker(ip='localhost', conf=None, input_source=None)[source]

Bases: SICConnector

component_class

alias of NaoqiSpeakerComponent

Text-to-Speech

class sic_framework.devices.common_naoqi.naoqi_text_to_speech.NaoqiTextToSpeechRequest(text, language=None, animated=False, pitch=None, speed=None, pitch_shift=None, volume=None)[source]

Bases: SICRequest

Request the robot to say a given text using text-to-speech.

__init__(text, language=None, animated=False, pitch=None, speed=None, pitch_shift=None, volume=None)[source]

Initialize a text-to-speech request.

Parameters:
class sic_framework.devices.common_naoqi.naoqi_text_to_speech.NaoqiTextToSpeechConf(language='English', volume=None, speed=None, pitch=None, pitch_shift=None)[source]

Bases: SICConfMessage

Configuration for the NAOqi text-to-speech engine.

Defines default voice parameters such as language, volume, pitch, and speed.

__init__(language='English', volume=None, speed=None, pitch=None, pitch_shift=None)[source]

Initialize default parameters for the text-to-speech configuration.

If None, the default NAOqi values are used.

See also: http://doc.aldebaran.com/2-4/naoqi/audio/altexttospeech-api.html#ALTextToSpeechProxy::setParameter__ssCR.floatCR

Parameters:
  • language (str) – Language to use “English” or “Dutch” or see http://doc.aldebaran.com/2-8/family/nao_technical/languages_naov6.html#language-codes-naov6

  • volume (float) – Sets the current gain applied to the signal synthesized by the text to speech engine if not None.

  • pitch (int) – Applies a pitch shift to the voice. Range is [50 - 100].

  • pitch_shift (float) – Applies a pitch shift to the voice. Range is [1.0 - 4.0]. 0 disables the effect.

  • speed (int) – sets the current voice speed. The default value is 100. Range is [50 - 400]

class sic_framework.devices.common_naoqi.naoqi_text_to_speech.NaoqiTextToSpeechActuator(*args, **kwargs)[source]

Bases: SICActuator

__init__(*args, **kwargs)[source]
set_params(params)[source]
static get_conf()[source]

Return the default configuration for this actuator.

Returns:

Default text-to-speech configuration.

Return type:

NaoqiTextToSpeechConf

static get_inputs()[source]

Define the input types the component needs as a list.

Must be implemented by the subclass.

Returns:

list of SIC messages

Return type:

List[Type[SICMessage]]

static get_output()[source]

Define the output type of the component.

Must be implemented by the subclass.

Returns:

SIC message

Return type:

Type[SICMessage]

execute(message)[source]

Execute the text-to-speech request.

Applies message-specific parameters, then speaks using ALTextToSpeech or ALAnimatedSpeech.

Parameters:

message (NaoqiTextToSpeechRequest) – Request containing speech parameters and text.

Returns:

Acknowledgement message after speaking.

Return type:

SICMessage

stop(*args)[source]

Stop the component safely (template method).

Lifecycle: - Signal the component thread to stop via _signal_to_stop - Wait (up to COMPONENT_STOP_TIMEOUT) for the worker thread to confirm it stopped via _stopped - Only if the worker thread has stopped, run _cleanup() to release subclass resources

If the worker thread does not stop within the timeout, _cleanup() is skipped to avoid race conditions where resources are freed while the worker thread is still executing.

class sic_framework.devices.common_naoqi.naoqi_text_to_speech.NaoqiTextToSpeech(ip='localhost', conf=None, input_source=None)[source]

Bases: SICConnector

component_class

alias of NaoqiTextToSpeechActuator

Motion

class sic_framework.devices.common_naoqi.naoqi_motion.NaoqiMoveRequest(x, y, theta)[source]

Bases: SICRequest

Make the robot move at the given velocity, in the specified direction vector in m/s, where theta indicates rotation. x - velocity along X-axis (forward), in meters per second. Use negative values for backward motion y - velocity along Y-axis (side), in meters per second. Use positive values to go to the left theta - velocity around Z-axis, in radians per second. Use negative values to turn clockwise.

__init__(x, y, theta)[source]
class sic_framework.devices.common_naoqi.naoqi_motion.NaoqiMoveToRequest(x, y, theta)[source]

Bases: NaoqiMoveRequest

Make the robot move to a given point in space relative to the robot, where theta indicates rotation. x - Distance along the X axis (forward) in meters. y - Distance along the Y axis (side) in meters. theta - Rotation around the Z axis in radians [-3.1415 to 3.1415].

class sic_framework.devices.common_naoqi.naoqi_motion.NaoqiMoveTowardRequest(x=0.0, y=0.0, theta=0.0)[source]

Bases: NaoqiMoveRequest

Makes the robot move at the given normalized velocity. x - normalized, unitless, velocity along X-axis. +1 and -1 correspond to the maximum velocity in the forward and backward directions, respectively. y - normalized, unitless, velocity along Y-axis. +1 and -1 correspond to the maximum velocity in the left and right directions, respectively. theta - normalized, unitless, velocity around Z-axis. +1 and -1 correspond to the maximum velocity in the counterclockwise and clockwise directions, respectively.

__init__(x=0.0, y=0.0, theta=0.0)[source]
class sic_framework.devices.common_naoqi.naoqi_motion.NaoqiGetRobotVelocityRequest(request_id=None)[source]

Bases: SICRequest

Return (vx [m/s], vy [m/s], vth [rad/s]) in the world frame.

class sic_framework.devices.common_naoqi.naoqi_motion.NaoqiCollisionProtectionRequest(target='All', enable=True)[source]

Bases: SICRequest

Enable / disable Pepper’s external-collision protection. target in {“Move”,”Arms”,”All”,”LArm”,”RArm”}

__init__(target='All', enable=True)[source]
class sic_framework.devices.common_naoqi.naoqi_motion.NaoqiMoveArmsEnabledRequest(left_enable=False, right_enable=False)[source]

Bases: SICRequest

Tell NAOqi’s walking controller to (not) move the arms. On NAOqi >= 2.4 the method is setMoveArmsEnabled; on older firmware it is setWalkArmsEnabled, so we try both.

__init__(left_enable=False, right_enable=False)[source]
class sic_framework.devices.common_naoqi.naoqi_motion.NaoqiIdlePostureRequest(joints, value)[source]

Bases: SICRequest

__init__(joints, value)[source]

Control idle behaviour. This is the robot behaviour when no user commands are sent. There are three idle control modes:

No idle control: in this mode, when no user command is sent to the robot, it does not move. Idle posture control: in this mode, the robot automatically comes back to a reference posture, then stays at

that posture until a user command is sent.

Breathing control: in this mode, the robot plays a breathing animation in loop.

See also NaoqiBreathingRequest.

http://doc.aldebaran.com/2-4/naoqi/motion/idle.html :param joints: The chain name, one of [“Body”, “Legs”, “Arms”, “LArm”, “RArm” or “Head”]. :type joints: str :param value: True or False :type value: bool

class sic_framework.devices.common_naoqi.naoqi_motion.NaoqiBreathingRequest(joints, value)[source]

Bases: SICRequest

__init__(joints, value)[source]

Control Breathing behaviour. This is the robot behaviour when no user commands are sent. There are three idle control modes:

No idle control: in this mode, when no user command is sent to the robot, it does not move. Idle posture control: in this mode, the robot automatically comes back to a reference posture, then stays at

that posture until a user command is sent.

Breathing control: in this mode, the robot plays a breathing animation in loop.

See also NaoqiIdlePostureRequest.

http://doc.aldebaran.com/2-4/naoqi/motion/idle.html :param joints: The chain name, one of [“Body”, “Legs”, “Arms”, “LArm”, “RArm” or “Head”]. :type joints: str :param value: True or False :type value: bool

class sic_framework.devices.common_naoqi.naoqi_motion.NaoPostureRequest(target_posture, speed=0.4)[source]

Bases: SICRequest

Make the robot go to a predefined posture. Options: [“Crouch”, “LyingBack” “LyingBelly”, “Sit”, “SitRelax”, “Stand”, “StandInit”, “StandZero”]

__init__(target_posture, speed=0.4)[source]
class sic_framework.devices.common_naoqi.naoqi_motion.NaoqiAnimationRequest(animation_path)[source]

Bases: SICRequest

Make the robot play predefined animation. Either the short or full name as a string will work. See: http://doc.aldebaran.com/2-4/naoqi/motion/alanimationplayer-advanced.html#animationplayer-list-behaviors-nao

Nao Examples:

animations/Sit/BodyTalk/BodyTalk_1 animations/Stand/Gestures/Hey_1 Enthusiastic_4

Pepper Examples:

Hey_3 animations/Stand/Gestures/ShowSky_5

__init__(animation_path)[source]
Parameters:

animation_path (str) – the animation name or path

class sic_framework.devices.common_naoqi.naoqi_motion.NaoqiSmartStiffnessRequest(enable=True)[source]

Bases: SICRequest

Enable or Disable the smart stiffness reflex for all the joints (True by default). see: http://doc.aldebaran.com/2-4/naoqi/motion/reflexes-smart-stiffness.html

__init__(enable=True)[source]
Parameters:

enable (bool) – True or False

class sic_framework.devices.common_naoqi.naoqi_motion.PepperPostureRequest(target_posture, speed=0.4)[source]

Bases: SICRequest

Make the robot go to a predefined posture. Options: [“Crouch”, “LyingBack” “LyingBelly”, “Sit”, “SitRelax”, “Stand”, “StandInit”, “StandZero”]

__init__(target_posture, speed=0.4)[source]
class sic_framework.devices.common_naoqi.naoqi_motion.NaoqiGetAnglesRequest(names, use_sensors=True)[source]

Bases: SICRequest

Request the current angles of specified joints from the robot.

Parameters:
  • names (list of str) – List of joint names to query (e.g., [“LShoulderPitch”, “RShoulderRoll”]).

  • use_sensors (bool) – If True, return the actual sensor values; if False, return the commanded values.

Returns:

The angles (in radians) for the specified joints, in the same order as ‘names’.

Return type:

list of float

__init__(names, use_sensors=True)[source]
class sic_framework.devices.common_naoqi.naoqi_motion.NaoqiSetAnglesRequest(names, angles, speed=0.5)[source]

Bases: SICRequest

Set the angles of specified joints on the robot.

Parameters:
  • names (list of str) – List of joint names to set (e.g., [“LShoulderPitch”, “RShoulderRoll”]).

  • angles (list of float) – List of target angles (in radians) for the specified joints, in the same order as ‘names’.

  • speed (float) – Fraction of maximum speed to use (0.0 to 1.0). Default is 0.5.

__init__(names, angles, speed=0.5)[source]
class sic_framework.devices.common_naoqi.naoqi_motion.NaoqiVelocityResponse(x, y, theta)[source]

Bases: SICMessage

Response message containing robot velocity.

__init__(x, y, theta)[source]
class sic_framework.devices.common_naoqi.naoqi_motion.NaoqiAnglesResponse(names, angles)[source]

Bases: SICMessage

Response message containing joint angles.

__init__(names, angles)[source]
class sic_framework.devices.common_naoqi.naoqi_motion.NaoqiSetAnglesResponse(names, angles, speed)[source]

Bases: SICMessage

Response message confirming joint angles were set.

__init__(names, angles, speed)[source]
class sic_framework.devices.common_naoqi.naoqi_motion.NaoqiMotionActuator(*args, **kwargs)[source]

Bases: SICActuator

__init__(*args, **kwargs)[source]
moveToward(motion)[source]
static get_inputs()[source]

Define the input types the component needs as a list.

Must be implemented by the subclass.

Returns:

list of SIC messages

Return type:

List[Type[SICMessage]]

static get_output()[source]

Define the output type of the component.

Must be implemented by the subclass.

Returns:

SIC message

Return type:

Type[SICMessage]

execute(request)[source]

Main function of the Actuator. Must return a SICMessage as a reply to the user.

Must be implemented by the subclass.

Parameters:

request (SICRequest) – input messages

Return type:

SICMessage

goToPosture(motion)[source]
run_animation(motion)[source]
move(motion)[source]
moveTo(motion)[source]
getRobotVelocity()[source]

Get robot velocity and return as a message with x, y, theta attributes.

get_angles(names, use_sensors=True)[source]
set_angles(names, angles, speed=0.5)[source]

Set joint angles and return a confirmation message.

setCollisionProtection(request)[source]

Set collision protection for the specified target.

setMoveArmsEnabled(request)[source]

Set whether the walking controller should move the arms.

stop(*args)[source]

Stop the NAOqi motion actuator.

class sic_framework.devices.common_naoqi.naoqi_motion.NaoqiMotion(ip='localhost', conf=None, input_source=None)[source]

Bases: SICConnector

component_class

alias of NaoqiMotionActuator

Motion Recorder

class sic_framework.devices.common_naoqi.naoqi_motion_recorder.StartRecording(joints)[source]

Bases: SICRequest

__init__(joints)[source]

Initialize a request to record the motion of selected joints.

For more information on joint chains, see robot documentation: - Nao: http://doc.aldebaran.com/2-8/family/nao_technical/bodyparts_naov6.html#nao-chains - Pepper: http://doc.aldebaran.com/2-8/family/pepper_technical/bodyparts_pep.html

Parameters:

joints (list[str]) – One or more joint chains or individual joints (e.g., [“Body”] or [“LArm”, “HeadYaw”]).

class sic_framework.devices.common_naoqi.naoqi_motion_recorder.StopRecording(request_id=None)[source]

Bases: SICRequest

class sic_framework.devices.common_naoqi.naoqi_motion_recorder.NaoqiMotionRecording(recorded_joints, recorded_angles, recorded_times)[source]

Bases: SICMessage

__init__(recorded_joints, recorded_angles, recorded_times)[source]

Create a motion recording message.

Example

recorded_joints = [“HeadYaw”, “HeadPitch”, “LWrist”] recorded_angles = [[0.13, 0.21, 0.25], [0.21, 0.23, 0.31], [-1.0, 0.0, 0.1]] recorded_times = [[0.1, 0.2, 0.3], [0.1, 0.2, 0.3], [0.1, 0.2, 0.3]]

See: http://doc.aldebaran.com/2-1/naoqi/motion/control-joint-api.html#joint-control-api

Parameters:
  • recorded_joints (list[str]) – Joint names (e.g., “HeadYaw”), not chains (e.g., “Body”).

  • recorded_angles (list[list[float]]) – Angles per joint, in radians.

  • recorded_times (list[list[float]]) – Target times per angle, in seconds.

save(filename)[source]

Save the recording to a file (e.g., “wave.motion”).

Parameters:

filename (str) – Target filename (preferably with .motion extension).

classmethod load(filename)[source]

Load a motion recording.

Parameters:

filename (str) – Path to a saved .motion file.

Returns:

Deserialized motion recording message.

Return type:

NaoqiMotionRecording

class sic_framework.devices.common_naoqi.naoqi_motion_recorder.PlayRecording(motion_recording_message, playback_speed=1)[source]

Bases: SICRequest

Request to replay a previously recorded motion.

__init__(motion_recording_message, playback_speed=1)[source]

Play a recorded motion.

Parameters:
  • motion_recording_message (NaoqiMotionRecording) – a NaoqiMotionRecording message.

  • playback_speed (float) – Playback speed multiplier (e.g., 1.5 for 1.5x; 0.5 for half speed).

class sic_framework.devices.common_naoqi.naoqi_motion_recorder.NaoqiMotionRecorderConf(replay_stiffness=0.6, replay_speed=0.75, use_interpolation=True, setup_time=0.5, use_sensors=False, samples_per_second=20)[source]

Bases: SICConfMessage

Configuration for recording and replaying motions.

__init__(replay_stiffness=0.6, replay_speed=0.75, use_interpolation=True, setup_time=0.5, use_sensors=False, samples_per_second=20)[source]

Initialize recorder configuration options.

There is a choice between setAngles (approximate) and angleInterpolation (exact but speed-limited).

Note: replay_speed is used only when use_interpolation=False. Note: setup_time is used only when use_interpolation=True.

Parameters:
  • replay_stiffness – Control how much power the robot should use to reach the given joint angles.

  • replay_speed – Control how fast the robot should to reach the given joint angles.

  • use_interpolation – Use setAngles if False and angleInterpolation if True.

  • setup_time – The time in seconds the robot has to reach the start position of the recording.

  • use_sensors – If true, sensor angles will be returned, otherwise command angles are used.

  • samples_per_second – How many times per second the joint positions are sampled.

class sic_framework.devices.common_naoqi.naoqi_motion_recorder.NaoqiMotionRecorderActuator(*args, **kwargs)[source]

Bases: SICActuator, NaoqiMotionTools

COMPONENT_STARTUP_TIMEOUT = 20

Timeout in seconds for component startup.

This controls how long a SICConnector should wait when requesting a component to start. Increase this value for components that need more time to initialize (e.g., robots that need to stand up or models that need to load to GPU).

__init__(*args, **kwargs)[source]

Initialize the motion tools by determining the robot type.

Parameters:

qi_session (qi.Session) – A qi.Session() instance used to determine robot type.

Raises:

NotImplementedError – If the robot type is not supported.

static get_conf()[source]

Return the default configuration for this component.

Returns:

Recorder configuration.

Return type:

NaoqiMotionRecorderConf

static get_inputs()[source]

Define the input types the component needs as a list.

Must be implemented by the subclass.

Returns:

list of SIC messages

Return type:

List[Type[SICMessage]]

static get_output()[source]

Define the output type of the component.

Must be implemented by the subclass.

Returns:

SIC message

Return type:

Type[SICMessage]

record_motion()[source]

A thread that starts to record the motion of the robot until an event is set.

reset_recording_variables(request)[source]

Initialize variables that will be populated during recording.

execute(request)[source]

Main function of the Actuator. Must return a SICMessage as a reply to the user.

Must be implemented by the subclass.

Parameters:

request (SICRequest) – input messages

Return type:

SICMessage

replay_recording(request)[source]

Replay a recorded motion.

stop(*args)[source]

Stop the component safely (template method).

Lifecycle: - Signal the component thread to stop via _signal_to_stop - Wait (up to COMPONENT_STOP_TIMEOUT) for the worker thread to confirm it stopped via _stopped - Only if the worker thread has stopped, run _cleanup() to release subclass resources

If the worker thread does not stop within the timeout, _cleanup() is skipped to avoid race conditions where resources are freed while the worker thread is still executing.

class sic_framework.devices.common_naoqi.naoqi_motion_recorder.NaoqiMotionRecorder(ip='localhost', conf=None, input_source=None)[source]

Bases: SICConnector

component_class

alias of NaoqiMotionRecorderActuator

LEDs

class sic_framework.devices.common_naoqi.naoqi_leds.NaoLEDRequest(name, value)[source]

Bases: SICRequest

Request to turn one or more LEDs on or off.

Parameters:
__init__(name, value)[source]
class sic_framework.devices.common_naoqi.naoqi_leds.NaoSetIntensityRequest(name, intensity)[source]

Bases: SICRequest

Request to change the intensity of one or more LEDs.

Parameters:
__init__(name, intensity)[source]
class sic_framework.devices.common_naoqi.naoqi_leds.NaoGetIntensityRequest(name)[source]

Bases: SICRequest

Request to retrieve the intensity of an LED or LED group.

Parameters:

name (str) – RGB LED or group name, see http://doc.aldebaran.com/2-5/naoqi/sensors/alleds.html.

__init__(name)[source]
class sic_framework.devices.common_naoqi.naoqi_leds.NaoGetIntensityReply(value)[source]

Bases: SICMessage

Message containing the LED intensity value.

Parameters:

value (float) – Intensity value in [0, 1].

__init__(value)[source]
class sic_framework.devices.common_naoqi.naoqi_leds.NaoFadeRGBRequest(name, r, g, b, duration=0.0)[source]

Bases: SICRequest

Request to fade one or more LEDs to a target RGB color.

Parameters:
  • name (str) – RGB LED or group name, see http://doc.aldebaran.com/2-5/naoqi/sensors/alleds.html.

  • r (float) – Red channel intensity in [0, 1].

  • g (float) – Green channel intensity in [0, 1].

  • b (float) – Blue channel intensity in [0, 1].

  • duration (float) – Duration in seconds for the fade (default = 0 for instant change).

__init__(name, r, g, b, duration=0.0)[source]
class sic_framework.devices.common_naoqi.naoqi_leds.NaoFadeListRGBRequest(name, rgbs, durations)[source]

Bases: SICRequest

Request to cycle LED colors through a list of RGB values over time.

Parameters:
  • name (str) – RGB LED or group name, see http://doc.aldebaran.com/2-5/naoqi/sensors/alleds.html.

  • rgbs (list[int]) – List of RGB values in hexadecimal format [0x00RRGGBB, …].

  • durations (list[float]) – List of durations (in seconds) corresponding to each RGB value.

__init__(name, rgbs, durations)[source]
class sic_framework.devices.common_naoqi.naoqi_leds.NaoBasicAwarenessRequest(value, stimulus_detection=None, engagement_mode=None, tracking_mode=None)[source]

Bases: SICRequest

Request to enable or disable basic awareness and configure its parameters.

Parameters:
__init__(value, stimulus_detection=None, engagement_mode=None, tracking_mode=None)[source]
class sic_framework.devices.common_naoqi.naoqi_leds.NaoqiLEDsActuator(*args, **kwargs)[source]

Bases: SICActuator

Actuator for controlling LEDs through the NAOqi ALLeds service.

Supports requests for turning LEDs on/off, changing colors, and adjusting intensity levels.

Variables:
  • session (qi.Session) – Connection to the local NAOqi framework.

  • leds (Any) – Handle to the ALLeds service.

__init__(*args, **kwargs)[source]
static get_conf()[source]

Define the expected configuration of the component using SICConfMessage.

Returns:

a SICConfMessage or None

Return type:

SICConfMessage

static get_inputs()[source]

Define the input types the component needs as a list.

Must be implemented by the subclass.

Returns:

list of SIC messages

Return type:

List[Type[SICMessage]]

static get_output()[source]

Define the output type of the component.

Must be implemented by the subclass.

Returns:

SIC message

Return type:

Type[SICMessage]

execute(message)[source]

Execute a LED control request.

Parameters:

message (SICRequest) – LED-related request to process.

Returns:

Reply message (e.g., NaoGetIntensityReply or generic SICMessage).

Return type:

SICMessage

stop(*args)[source]

Stop the component safely (template method).

Lifecycle: - Signal the component thread to stop via _signal_to_stop - Wait (up to COMPONENT_STOP_TIMEOUT) for the worker thread to confirm it stopped via _stopped - Only if the worker thread has stopped, run _cleanup() to release subclass resources

If the worker thread does not stop within the timeout, _cleanup() is skipped to avoid race conditions where resources are freed while the worker thread is still executing.

class sic_framework.devices.common_naoqi.naoqi_leds.NaoqiLEDs(ip='localhost', conf=None, input_source=None)[source]

Bases: SICConnector

component_class

alias of NaoqiLEDsActuator

Button

class sic_framework.devices.common_naoqi.naoqi_button.NaoqiButtonMessage(value)[source]

Bases: SICMessage

__init__(value)[source]

Initialize a message carrying button/touch values.

For more information, see: http://doc.aldebaran.com/2-4/naoqi/sensors/altouch.html

Examples

[[Head/Touch/Middle, True], [ChestBoard/Button, True]] [[Head/Touch/Middle, False]]

Parameters:

value (list[list[Any, bool]]) – List of button/touch name-value pairs.

class sic_framework.devices.common_naoqi.naoqi_button.NaoqiButtonSensor(*args, **kwargs)[source]

Bases: SICComponent

NaoqiButtonSensor is a sensor that reads the robot’s physical button and touch values from the ALMemory module.

__init__(*args, **kwargs)[source]

Initialize the button sensor by connecting to ALMemory and subscribing to touch signals.

Parameters:
  • args (Any) – Positional arguments passed to the SICComponent.

  • kwargs (Any) – Keyword arguments passed to the SICComponent.

static get_conf()[source]

Return the default configuration for this sensor.

Returns:

Default configuration message.

Return type:

SICConfMessage

static get_inputs()[source]

Return the list of input message types accepted by this component.

Returns:

Empty list since this is a sensor-only component.

Return type:

list

static get_output()[source]

Return the output message type produced by this component.

Returns:

The message class used for touch/button events.

Return type:

type

onTouchChanged(value)[source]

Callback triggered when a touch or button state changes.

Parameters:

value (list[list[str, bool]]) – List of name-value pairs representing button/touch changes.

start()[source]

Start the sensor by subscribing to the ‘TouchChanged’ ALMemory event.

Returns:

None

Return type:

None

stop(*args)[source]

Stop the component safely (template method).

Lifecycle: - Signal the component thread to stop via _signal_to_stop - Wait (up to COMPONENT_STOP_TIMEOUT) for the worker thread to confirm it stopped via _stopped - Only if the worker thread has stopped, run _cleanup() to release subclass resources

If the worker thread does not stop within the timeout, _cleanup() is skipped to avoid race conditions where resources are freed while the worker thread is still executing.

class sic_framework.devices.common_naoqi.naoqi_button.NaoqiButton(ip='localhost', conf=None, input_source=None)[source]

Bases: SICConnector

component_class

alias of NaoqiButtonSensor

Tracker

class sic_framework.devices.common_naoqi.naoqi_tracker.StartTrackRequest(target_name, size, mode='Head', effector='None', move_rel_position=None)[source]

Bases: SICRequest

Request to register a target and start tracking it.

__init__(target_name, size, mode='Head', effector='None', move_rel_position=None)[source]

Initialize a start-tracking request.

See: http://doc.aldebaran.com/2-5/naoqi/trackers/index.html

Parameters:
  • target_name – Name of the object to track (e.g., RedBall, Face).

  • size (float) – Target size in meters (e.g., ball diameter or face width).

  • mode (str) – Tracking mode default mode is “Head”, other options: “WholeBody”, “Move”. See http://doc.aldebaran.com/2-5/naoqi/trackers/index.html#tracking-modes

  • effector (str) – Effector to use (“Arms”, “LArm”, “RArm”, or “None”).

  • move_rel_position – Set the robot position relative to target in Move mode

class sic_framework.devices.common_naoqi.naoqi_tracker.StopAllTrackRequest(request_id=None)[source]

Bases: SICRequest

Request to stop tracking and unregister all targets.

class sic_framework.devices.common_naoqi.naoqi_tracker.RemoveTargetRequest(target_name)[source]

Bases: SICRequest

__init__(target_name)[source]

Initialize a request to remove a specific tracking target.

Parameters:

target_name (str) – Name of the target to stop tracking.

class sic_framework.devices.common_naoqi.naoqi_tracker.RemoveAllTargetsRequest(request_id=None)[source]

Bases: SICRequest

Request to remove all tracking targets.

class sic_framework.devices.common_naoqi.naoqi_tracker.NaoqiTrackerActuator(*args, **kwargs)[source]

Bases: SICActuator

__init__(*args, **kwargs)[source]
static get_conf()[source]

Return the default configuration for this actuator.

Returns:

Generic configuration message.

Return type:

SICConfMessage

static get_inputs()[source]

Define the input types the component needs as a list.

Must be implemented by the subclass.

Returns:

list of SIC messages

Return type:

List[Type[SICMessage]]

static get_output()[source]

Define the output type of the component.

Must be implemented by the subclass.

Returns:

SIC message

Return type:

Type[SICMessage]

execute(request)[source]

Main function of the Actuator. Must return a SICMessage as a reply to the user.

Must be implemented by the subclass.

Parameters:

request (SICRequest) – input messages

Return type:

SICMessage

stop(*args)[source]

Stop the component safely (template method).

Lifecycle: - Signal the component thread to stop via _signal_to_stop - Wait (up to COMPONENT_STOP_TIMEOUT) for the worker thread to confirm it stopped via _stopped - Only if the worker thread has stopped, run _cleanup() to release subclass resources

If the worker thread does not stop within the timeout, _cleanup() is skipped to avoid race conditions where resources are freed while the worker thread is still executing.

class sic_framework.devices.common_naoqi.naoqi_tracker.NaoqiTracker(ip='localhost', conf=None, input_source=None)[source]

Bases: SICConnector

component_class

alias of NaoqiTrackerActuator

Look At

class sic_framework.devices.common_naoqi.naoqi_lookat.NaoqiLookAtConf(camera_index=0, camera_y_max=480, camera_x_max=640, mirror_x=False)[source]

Bases: SICConfMessage

__init__(camera_index=0, camera_y_max=480, camera_x_max=640, mirror_x=False)[source]

Initialize LookAt configuration.

Parameters:
  • camera_index (int)

  • camera_y_max (int)

  • camera_x_max (int)

  • mirror_x (bool) – Mirror the horizontal angle sign.

class sic_framework.devices.common_naoqi.naoqi_lookat.LookAtMessage(x, y)[source]

Bases: SICMessage

Message requesting the robot to look at normalized image coordinates.

Coordinates are in range [0.0, 1.0], where (0,0) is top-left.

__init__(x, y)[source]

Create a LookAt request message.

Parameters:
  • x (float) – Horizontal normalized coordinate in [0.0, 1.0].

  • y (float) – Vertical normalized coordinate in [0.0, 1.0].

class sic_framework.devices.common_naoqi.naoqi_lookat.NaoqiLookAtComponent(*args, **kwargs)[source]

Bases: SICComponent

__init__(*args, **kwargs)[source]
static get_conf()[source]

Return the default configuration for this component.

Returns:

Default LookAt configuration.

Return type:

NaoqiLookAtConf

static get_inputs()[source]

Define the input types the component needs as a list.

Must be implemented by the subclass.

Returns:

list of SIC messages

Return type:

List[Type[SICMessage]]

static get_output()[source]

Define the output type of the component.

Must be implemented by the subclass.

Returns:

SIC message

Return type:

Type[SICMessage]

on_message(message)[source]
Parameters:

message (SICMessage) – Incoming message (LookAtMessage or BoundingBoxesMessage).

stop(*args)[source]

Stop the component safely (template method).

Lifecycle: - Signal the component thread to stop via _signal_to_stop - Wait (up to COMPONENT_STOP_TIMEOUT) for the worker thread to confirm it stopped via _stopped - Only if the worker thread has stopped, run _cleanup() to release subclass resources

If the worker thread does not stop within the timeout, _cleanup() is skipped to avoid race conditions where resources are freed while the worker thread is still executing.

class sic_framework.devices.common_naoqi.naoqi_lookat.NaoqiLookAt(ip='localhost', conf=None, input_source=None)[source]

Bases: SICConnector

component_class

alias of NaoqiLookAtComponent

Stiffness

class sic_framework.devices.common_naoqi.naoqi_stiffness.Stiffness(stiffness=0.7, joints='Body', enable_joint_list_generation=True)[source]

Bases: SICRequest

__init__(stiffness=0.7, joints='Body', enable_joint_list_generation=True)[source]

Initialize a stiffness control request.

Controls how strongly the robot maintains commanded joint angles.

For more information, see: - Nao: http://doc.aldebaran.com/2-8/family/nao_technical/bodyparts_naov6.html#nao-chains - Pepper: http://doc.aldebaran.com/2-8/family/pepper_technical/bodyparts_pep.html

Parameters:
  • stiffness (float) – Stiffness level to set in [0, 1].

  • joints (list[str]) – Joint or joint chain names (e.g., [“Body”], [“HeadYaw”, LArm]).

  • enable_joint_list_generation (bool) – If True, joint lists are automatically expanded from chains.

class sic_framework.devices.common_naoqi.naoqi_stiffness.NaoqiStiffnessActuator(*args, **kwargs)[source]

Bases: SICActuator, NaoqiMotionTools

__init__(*args, **kwargs)[source]

Initialize the motion tools by determining the robot type.

Parameters:

qi_session (qi.Session) – A qi.Session() instance used to determine robot type.

Raises:

NotImplementedError – If the robot type is not supported.

static get_inputs()[source]

Define the input types the component needs as a list.

Must be implemented by the subclass.

Returns:

list of SIC messages

Return type:

List[Type[SICMessage]]

static get_output()[source]

Define the output type of the component.

Must be implemented by the subclass.

Returns:

SIC message

Return type:

Type[SICMessage]

execute(request)[source]

Main function of the Actuator. Must return a SICMessage as a reply to the user.

Must be implemented by the subclass.

Parameters:

request (SICRequest) – input messages

Return type:

SICMessage

stop(*args)[source]

Stop the component safely (template method).

Lifecycle: - Signal the component thread to stop via _signal_to_stop - Wait (up to COMPONENT_STOP_TIMEOUT) for the worker thread to confirm it stopped via _stopped - Only if the worker thread has stopped, run _cleanup() to release subclass resources

If the worker thread does not stop within the timeout, _cleanup() is skipped to avoid race conditions where resources are freed while the worker thread is still executing.

class sic_framework.devices.common_naoqi.naoqi_stiffness.NaoqiStiffness(ip='localhost', conf=None, input_source=None)[source]

Bases: SICConnector

component_class

alias of NaoqiStiffnessActuator

Autonomous

class sic_framework.devices.common_naoqi.naoqi_autonomous.NaoBlinkingRequest(value)[source]

Bases: SICRequest

Request to enable or disable autonomous blinking.

Parameters:

value (bool) – True to enable, False to disable autonomous blinking.

__init__(value)[source]
class sic_framework.devices.common_naoqi.naoqi_autonomous.NaoBackgroundMovingRequest(value)[source]

Bases: SICRequest

Request to enable or disable autonomous background movement.

Parameters:

value (bool) – True to enable, False to disable background movement.

__init__(value)[source]
class sic_framework.devices.common_naoqi.naoqi_autonomous.NaoListeningMovementRequest(value)[source]

Bases: SICRequest

Request to enable or disable listening movements (small motions indicating attention).

Parameters:

value (bool) – True to enable, False to disable listening movements.

__init__(value)[source]
class sic_framework.devices.common_naoqi.naoqi_autonomous.NaoSpeakingMovementRequest(value, mode=None)[source]

Bases: SICRequest

Request to enable or disable autonomous speaking movements.

Parameters:
  • value (bool) – True to enable, False to disable.

  • mode (str) – Speaking movement mode (“random” or “contextual”).

Raises:

ValueError – If mode is not one of the supported options. see http://doc.aldebaran.com/2-5/naoqi/interaction/autonomousabilities/alspeakingmovement.html#speaking-movement-mode

__init__(value, mode=None)[source]
class sic_framework.devices.common_naoqi.naoqi_autonomous.NaoRestRequest(request_id=None)[source]

Bases: SICRequest

class sic_framework.devices.common_naoqi.naoqi_autonomous.NaoWakeUpRequest(request_id=None)[source]

Bases: SICRequest

class sic_framework.devices.common_naoqi.naoqi_autonomous.NaoSetAutonomousLifeRequest(state='solitary')[source]

Bases: SICRequest

Request to set the state of the Autonomous Life module.

For further details, see: http://doc.aldebaran.com/2-5/ref/life/state_machine_management.html#autonomouslife-states

Parameters:

state (str) – Target state (“solitary”, “interactive”, “safeguard”, or “disabled”).

__init__(state='solitary')[source]
class sic_framework.devices.common_naoqi.naoqi_autonomous.NaoBasicAwarenessRequest(value, stimulus_detection=None, engagement_mode=None, tracking_mode=None)[source]

Bases: SICRequest

Request to enable or disable basic awareness and configure its parameters.

Parameters:
  • value (bool) – True to enable, False to disable basic awareness.

  • stimulus_detection (list[tuple[str, bool]]) – Optional list of (stimulus_name, enable) tuples.

  • engagement_mode (str) – Engagement mode setting.

  • tracking_mode (str) – Tracking mode setting.

__init__(value, stimulus_detection=None, engagement_mode=None, tracking_mode=None)[source]
class sic_framework.devices.common_naoqi.naoqi_autonomous.NaoqiAutonomousActuator(*args, **kwargs)[source]

Bases: SICActuator

Actuator managing NAOqi autonomous abilities.

Provides an interface for enabling or disabling autonomous features like blinking, awareness, and background movements, as well as wakeUp and rest actions.

Variables:

session (qi.Session) – Connection to the NAOqi framework.

__init__(*args, **kwargs)[source]
static get_conf()[source]

Define the expected configuration of the component using SICConfMessage.

Returns:

a SICConfMessage or None

Return type:

SICConfMessage

static get_inputs()[source]

Define the input types the component needs as a list.

Must be implemented by the subclass.

Returns:

list of SIC messages

Return type:

List[Type[SICMessage]]

static get_output()[source]

Define the output type of the component.

Must be implemented by the subclass.

Returns:

SIC message

Return type:

Type[SICMessage]

execute(message)[source]

Execute the given autonomous ability request.

Parameters:

message (SICRequest) – Request specifying which autonomous ability to adjust.

Returns:

Acknowledgement message after execution.

Return type:

SICMessage

Raises:

Exception – If a requested service or mode is invalid.

stop(*args)[source]

Stop the component safely (template method).

Lifecycle: - Signal the component thread to stop via _signal_to_stop - Wait (up to COMPONENT_STOP_TIMEOUT) for the worker thread to confirm it stopped via _stopped - Only if the worker thread has stopped, run _cleanup() to release subclass resources

If the worker thread does not stop within the timeout, _cleanup() is skipped to avoid race conditions where resources are freed while the worker thread is still executing.

class sic_framework.devices.common_naoqi.naoqi_autonomous.NaoqiAutonomous(ip='localhost', conf=None, input_source=None)[source]

Bases: SICConnector

component_class

alias of NaoqiAutonomousActuator

Common NAOqi Motion

class sic_framework.devices.common_naoqi.common_naoqi_motion.NaoqiMotionTools(qi_session)[source]

Bases: object

Provides utility functions for handling NAOqi robot motion models.

Variables:

robot_type (str) – Type of robot, either ‘nao’ or ‘pepper’.

__init__(qi_session)[source]

Initialize the motion tools by determining the robot type.

Parameters:

qi_session (qi.Session) – A qi.Session() instance used to determine robot type.

Raises:

NotImplementedError – If the robot type is not supported.

generate_joint_list(joint_chains)[source]

Generate a flat list of valid joints for a given robot based on input joint chains.

Parameters:

joint_chains (list[str]) – List of joint chains or individual joints to resolve.

Returns:

A flat list of valid joint names for the current robot.

Return type:

list[str]

Raises:

ValueError – If a provided joint or chain is not recognized.

property body_model

Retrieve the mapping of joint chains to their respective joints for the current robot.

For more information, see robot documentation: - Nao: http://doc.aldebaran.com/2-8/family/nao_technical/bodyparts_naov6.html#nao-chains - Pepper: http://doc.aldebaran.com/2-8/family/pepper_technical/bodyparts_pep.html

Returns:

Dictionary of joint chains and their associated joints.

Return type:

dict[str, list[str]]

property all_joints

Retrieve all joints available for the current robot.

Returns:

List of all joint names.

Return type:

list[str]

Motion Affect Transformation

class sic_framework.devices.common_naoqi.motion_affect_transformation.MotionAffectTransformation[source]

Bases: object

Apply affect-based transformations to NAOqi motion dictionaries.

The methods adjust amplitude, timing, posture, and enforce joint limits based on valence/arousal or emotion labels.

transform_values(motion, valence, arousal)[source]

Transform a motion by applying flow, time, and weight changes based on valence and arousal.

Parameters:
  • motion (dict) – Motion dictionary with the shape { “motion”: { joint_name: {“angles”: list[float], “times”: list[float]} } }.

  • valence (float) – Valence value in [-1, 1] influencing amplitude and posture.

  • arousal (float) – Arousal value in [-1, 1] influencing repetition and speed.

Returns:

The transformed motion dictionary.

Return type:

dict

transform_label(motion, emotion_label)[source]

Transform a motion by first mapping an emotion label to valence/arousal values.

Parameters:
  • motion (dict) – Motion dictionary to transform.

  • emotion_label (str) – Discrete emotion label (e.g., “happy”, “sad”, “angry”).

Returns:

The transformed motion dictionary.

Return type:

dict

angle_limit(motion)[source]

Clamp joint angles to the robot’s physical limits.

Parameters:

motion (dict) – Motion dictionary to validate and clamp.

Returns:

The motion dictionary with angles limited to valid ranges.

Return type:

dict

modify_flow_parameters(motion, valence)[source]

Adjust motion amplitudes and blend towards a linear trajectory based on valence.

Parameters:
  • motion (dict) – Motion dictionary to modify.

  • valence (float) – Valence value affecting amplitude (positive increases, negative slightly decreases).

Returns:

The updated motion dictionary.

Return type:

dict

modify_time_parameters(motion, arousal)[source]

Adjust repetition (implicit via angle scaling) and speed (time scaling) based on arousal.

Parameters:
  • motion (dict) – Motion dictionary to modify.

  • arousal (float) – Arousal value affecting repetition and speed.

Returns:

The updated motion dictionary.

Return type:

dict

modify_weight_parameters(motion, valence, arousal)[source]

Add or adjust posture-related joints (e.g., head pitch) based on valence and arousal.

Parameters:
  • motion (dict) – Motion dictionary to modify.

  • valence (float) – Valence value influencing posture.

  • arousal (float) – Arousal value influencing posture and added joints.

Returns:

The updated motion dictionary.

Return type:

dict

static pivot_states(motion, ignore_joints)[source]

Collect unique time points across joints, excluding specified joints.

Parameters:
  • motion (dict) – Motion dictionary containing joint time arrays.

  • ignore_joints (list[str]) – Joint names to ignore when collecting time points.

Returns:

Sorted unique list of time points.

Return type:

list[float]

static amplitude(valence)[source]

Map valence to an amplitude scaling factor.

Parameters:

valence (float) – Valence value in [-1, 1].

Returns:

Amplitude multiplier (>0).

Return type:

float

static repetition(arousal)[source]

Map arousal to a repetition factor.

Positive arousal increases the factor; non-positive returns 1.

Parameters:

arousal (float) – Arousal value in [-1, 1].

Returns:

Repetition multiplier (>=1).

Return type:

float

static speed(arousal)[source]

Map arousal to a speed scaling factor for time values.

Parameters:

arousal (float) – Arousal value in [-1, 1].

Returns:

Speed multiplier (>0).

Return type:

float

static head_pose(valence, arousal, up=0.506145, down=0.349066)[source]

Compute a head pitch offset based on valence and arousal.

Parameters:
  • valence (float) – Valence value.

  • arousal (float) – Arousal value.

  • up (float) – Maximum upward pitch in radians.

  • down (float) – Maximum downward pitch in radians.

Returns:

Head pitch offset in radians.

Return type:

float

property leg_joints

Retrieve the list of leg joint names.

Returns:

List of leg joint identifiers.

Return type:

list[str]

property hand_joints

Retrieve the list of hand joint names.

Returns:

List of hand joint identifiers.

Return type:

list[str]

property upright

Retrieve a posture dictionary for an upright (expanded) stance.

Returns:

Mapping from joint name to target angle in radians.

Return type:

dict[str, float]

property neutral

Retrieve a posture dictionary for a neutral stance.

Returns:

Mapping from joint name to target angle in radians.

Return type:

dict[str, float]

property bend

Retrieve a posture dictionary for a bent (shrunk) stance.

Returns:

Mapping from joint name to target angle in radians.

Return type:

dict[str, float]

static limit_check(joint)[source]

Look up the minimum and maximum allowed angles for a given joint.

Parameters:

joint (str) – Joint name to query.

Returns:

Tuple of (minimum, maximum) allowed angles in radians.

Return type:

tuple[float, float]

static values_from_emotion(emotion_label)[source]

Map an emotion label to its (valence, arousal) pair.

Parameters:

emotion_label (str) – Emotion label key (e.g., “happy”, “sad”).

Returns:

Tuple containing (valence, arousal).

Return type:

tuple[float, float]

NAO-Specific Components

NAO Motion Streamer
class sic_framework.devices.common_naoqi.nao_motion_streamer.StartStreaming(joints)[source]

Bases: SICRequest

Request to start streaming joint positions for specified joints.

__init__(joints)[source]

Start streaming the positions of the selected joints. For more information see robot documentation: For nao: http://doc.aldebaran.com/2-8/family/nao_technical/bodyparts_naov6.html#nao-chains For pepper: http://doc.aldebaran.com/2-8/family/pepper_technical/bodyparts_pep.html

Parameters:

joints (list[str]) – One of the robot’s “Joint chains” such as [“Body”] or [“LArm”, “HeadYaw”]

class sic_framework.devices.common_naoqi.nao_motion_streamer.StopStreaming(request_id=None)[source]

Bases: SICRequest

class sic_framework.devices.common_naoqi.nao_motion_streamer.NaoJointAngles(joints, angles)[source]

Bases: SICMessage

Message carrying joint names and their corresponding angles in radians.

__init__(joints, angles)[source]

Create a joint-angle message.

Parameters:
  • joints (list[str]) – Joint names in the order of the angles.

  • angles (list[float]) – Joint angles in radians.

class sic_framework.devices.common_naoqi.nao_motion_streamer.NaoMotionStreamerConf(stiffness=0.6, speed=0.75, stream_stiffness=0, use_sensors=False, samples_per_second=20)[source]

Bases: SICConfMessage

Configuration for the NAOqi motion streaming service.

__init__(stiffness=0.6, speed=0.75, stream_stiffness=0, use_sensors=False, samples_per_second=20)[source]

Initialize configuration options for motion streaming.

Parameters:
  • stiffness (float) – Control how much power the robot should use to reach the given joint angles

  • speed (float) – Set the fraction of the maximum speed used to reach the target position.

  • stream_stiffness (float) – Control the stiffness of the robot when streaming its joint positions.

Note: Use stiffness, not stream_stiffness, to control the stiffness of the robot when consuming a stream of joint postions. :param bool use_sensors: If true, sensor angles will be returned, otherwise command angles are used. :param int samples_per_second: How many times per second the joint positions are sampled.

class sic_framework.devices.common_naoqi.nao_motion_streamer.NaoqiMotionStreamerService(*args, **kwargs)[source]

Bases: SICService, NaoqiMotionTools

Stream NAOqi joint angles and process control requests.

This component connects to a local NAOqi session, exposes start/stop streaming requests, and publishes NaoJointAngles messages at the requested rate.

__init__(*args, **kwargs)[source]

Set up the NAOqi session, motion service, and streaming thread.

Parameters:
  • args (Any) – Positional arguments passed to the component base.

  • kwargs (Any) – Keyword arguments passed to the component base.

static get_conf()[source]

Return the default configuration for this component.

Returns:

Default configuration instance.

Return type:

NaoMotionStreamerConf

static get_inputs()[source]

List the message and request types accepted by this component.

Returns:

Supported inputs.

Return type:

list[type]

on_request(request)[source]

Handle start/stop streaming requests.

Parameters:

request (SICRequest) – Incoming request instance.

Returns:

Acknowledgement message.

Return type:

SICMessage

on_message(message)[source]

Apply stiffness if needed and forward desired joint angles to the robot.

Parameters:

message (NaoJointAngles) – Message containing joint names and desired angles.

static get_output()[source]

Declare the message type produced by this component.

Returns:

Output message class.

Return type:

type

stream_joints()[source]

Background loop: sample joint angles and publish them at the configured rate.

The loop respects do_streaming and component stop signals.

Raises:

Exception – Logged and triggers stop() on unexpected errors.

stop(*args)[source]

Stop the motion streamer, closing the NAOqi session and the component.

Returns:

None

Return type:

None

class sic_framework.devices.common_naoqi.nao_motion_streamer.NaoqiMotionStreamer(ip='localhost', conf=None, input_source=None)[source]

Bases: SICConnector

Connector binding to NaoqiMotionStreamerService.

component_class

alias of NaoqiMotionStreamerService

Pepper-Specific Components

Pepper Motion Streamer
class sic_framework.devices.common_pepper.pepper_motion_streamer.StartStreaming(joints)[source]

Bases: SICRequest

Request to start streaming joint positions.

Begins continuous sampling and broadcasting of the specified joint chains’ positions at the configured sample rate.

Variables:

joints (list) – Joint chains to stream (e.g., [“Body”], [“LArm”, “RArm”, “Head”]).

See NAOqi documentation for joint chain definitions:

__init__(joints)[source]

Initialize start streaming request.

Parameters:

joints (list[str]) – Joint chain names to stream. Common chains include “Body”, “Head”, “LArm”, “RArm”, “LLeg”, “RLeg” (Pepper has wheels, not legs).

class sic_framework.devices.common_pepper.pepper_motion_streamer.StopStreaming(request_id=None)[source]

Bases: SICRequest

Request to stop streaming joint positions.

Halts the continuous sampling and broadcasting of joint positions.

class sic_framework.devices.common_pepper.pepper_motion_streamer.SetLockedJointsRequest(locked_joints)[source]

Bases: SICRequest

Request to set which joint chains should be locked.

Locked joints maintain stiffness=1.0 and their angles are frozen, preventing motion streaming from changing them. This is useful for puppeteering with selective joint locking.

Variables:

locked_joints (list) – Joint chain names to lock (e.g., [“LArm”, “RArm”]).

__init__(locked_joints)[source]

Initialize locked joints request.

Parameters:

locked_joints (list[str]) – Joint chains to lock. Use chain names like “LArm”, “RArm”, “Head” (not individual joint names).

class sic_framework.devices.common_pepper.pepper_motion_streamer.GetLockedJointsRequest(request_id=None)[source]

Bases: SICRequest

Request to retrieve the current list of locked joint chains.

Returns:

LockedJointsResponse containing the currently locked joint chains.

Return type:

LockedJointsResponse

class sic_framework.devices.common_pepper.pepper_motion_streamer.ClearLockedJointsRequest(request_id=None)[source]

Bases: SICRequest

Request to unlock all joints and clear stored locked angles.

Removes all joint locking constraints, allowing full motion streaming control.

class sic_framework.devices.common_pepper.pepper_motion_streamer.LockedJointsResponse(locked_joints)[source]

Bases: SICMessage

Response containing the current list of locked joint chains.

Variables:

locked_joints (list) – Currently locked joint chain names.

__init__(locked_joints)[source]

Initialize locked joints response.

Parameters:

locked_joints (list[str]) – List of currently locked joint chains.

class sic_framework.devices.common_pepper.pepper_motion_streamer.PepperMotionStream(joints, angles, velocity)[source]

Bases: SICMessage

Message containing Pepper’s current joint angles and base velocity.

This message is published by the motion streamer at the configured sample rate and contains complete motion state information.

Variables:
  • joints (list) – List of joint names.

  • angles (list) – Joint angles in radians, corresponding to joints list.

  • velocity (tuple) – Base velocity as (vx, vy, vtheta) in (m/s, m/s, rad/s).

__init__(joints, angles, velocity)[source]

Initialize motion stream message.

Parameters:
  • joints (list[str]) – Joint names being streamed.

  • angles (list[float]) – Current angles in radians for each joint.

  • velocity (tuple) – Robot base velocity (vx, vy, vtheta).

class sic_framework.devices.common_pepper.pepper_motion_streamer.PepperMotionStreamerConf(stiffness=0.6, speed=0.75, stream_stiffness=0, use_sensors=False, samples_per_second=20, locked_joints=None)[source]

Bases: SICConfMessage

Configuration for Pepper motion streamer component.

Controls the behavior of the motion streamer including stiffness, speed, sampling rate, and joint locking configuration.

Variables:
  • stiffness (float) – Stiffness for consuming motion streams [0.0-1.0].

  • speed (float) – Speed fraction for reaching target positions [0.0-1.0].

  • stream_stiffness (float) – Stiffness when producing motion streams [0.0-1.0].

  • use_sensors (bool) – If True, read sensor angles; if False, read command angles.

  • samples_per_second (int) – Streaming frequency in Hz.

  • locked_joints (list) – Initial list of locked joint chains.

Note

  • Use stiffness to control force when Pepper receives motion commands

  • Use stream_stiffness to control stiffness when Pepper is being moved manually

  • For puppeteering, set stream_stiffness=0.0 on the puppet (source robot)

__init__(stiffness=0.6, speed=0.75, stream_stiffness=0, use_sensors=False, samples_per_second=20, locked_joints=None)[source]

Initialize motion streamer configuration.

Parameters:
  • stiffness (float) – Motor power for consuming streams [0.0-1.0]. Higher values provide more force. Defaults to 0.6.

  • speed (float) – Movement speed fraction [0.0-1.0]. Defaults to 0.75.

  • stream_stiffness (float) – Stiffness when producing streams [0.0-1.0]. Use 0.0 for manual manipulation. Defaults to 0.

  • use_sensors (bool) – Read sensor (True) vs command (False) angles. Defaults to False.

  • samples_per_second (int) – Streaming rate in Hz. Defaults to 20.

  • locked_joints (list[str] or None) – Joint chains to lock with stiffness=1.0. These joints won’t be affected by incoming motion streams. Defaults to None.

class sic_framework.devices.common_pepper.pepper_motion_streamer.PepperMotionStreamerService(*args, **kwargs)[source]

Bases: SICService, NaoqiMotionTools

Service component for Pepper motion streaming.

Provides bidirectional motion streaming capabilities:

  • Produces motion streams by reading Pepper’s joint angles and velocity

  • Consumes motion streams by setting Pepper’s joints to received angles

  • Supports selective joint locking for advanced control scenarios

This component runs a background thread that continuously samples joint positions at the configured rate when streaming is active. It can also receive and execute motion commands from external sources.

The component handles both joint-level control and base movement, making it suitable for full-body teleoperation and puppeteering applications.

Note

All operations are thread-safe, with proper synchronization between the streaming thread and request handlers.

__init__(*args, **kwargs)[source]

Initialize the motion streamer service.

Sets up NAOqi session, motion service, joint mappings, and starts the background streaming thread.

Parameters:
  • args – Variable length argument list passed to parent.

  • kwargs – Arbitrary keyword arguments passed to parent.

static get_conf()[source]

Get default configuration for this component.

Returns:

Default configuration instance.

Return type:

PepperMotionStreamerConf

static get_inputs()[source]

Get list of input message types this component accepts.

Returns:

List of accepted message types including motion streams and control requests.

Return type:

list

_get_joints_in_locked_chains()[source]

Get all individual joint names that belong to locked chains.

Expands locked chain names (e.g., “LArm”) into their constituent joint names (e.g., [“LShoulderPitch”, “LShoulderRoll”, “LElbowYaw”, “LElbowRoll”]).

Returns:

Individual joint names in locked chains.

Return type:

list[str]

on_request(request)[source]

Handle control requests for the motion streamer.

Processes various request types to control streaming behavior and manage joint locking state.

Parameters:

request – The incoming request (StartStreaming, StopStreaming, SetLockedJointsRequest, GetLockedJointsRequest, or ClearLockedJointsRequest).

Returns:

Acknowledgment or response data.

Return type:

SICMessage or LockedJointsResponse

on_message(message)[source]

Execute motion from incoming PepperMotionStream message.

Applies the received joint angles and base velocity to the robot, respecting locked joint constraints. Locked joints maintain their stored angles instead of following the stream.

The method:

  1. Sets appropriate stiffness for locked vs non-locked joints

  2. Overrides locked joint angles with stored values

  3. Applies joint angles at configured speed

  4. Executes base movement with received velocity

Parameters:

message (PepperMotionStream) – Motion stream containing joint angles and base velocity to apply.

Note

Locked joints are set to stiffness=1.0 and maintain their frozen angles, while non-locked joints follow the incoming stream.

static get_output()[source]

Get the output message type this component produces.

Returns:

PepperMotionStream class.

Return type:

type

stream_motion()[source]

Background thread for continuous motion streaming.

Runs in a separate thread, continuously sampling joint angles and robot velocity at the configured rate when streaming is active. Publishes PepperMotionStream messages containing the current robot state.

The thread:

  1. Waits for streaming to be enabled (StartStreaming request)

  2. Ensures locked joints maintain stiffness=1.0

  3. Captures current angles for all joints (including locked ones)

  4. Reads robot base velocity

  5. Publishes complete motion state

  6. Sleeps to maintain configured sample rate

Note

Thread Lifecycle: Started in __init__(), runs until component is stopped via _signal_to_stop. Uses do_streaming event to pause/resume without destroying the thread.

Error Handling: Logs exceptions and triggers component shutdown on critical errors.

Locked Joints: Locked joints have their angles captured and stored on first sample after locking. These frozen angles are included in the stream to maintain locked positions on consumer robots.

class sic_framework.devices.common_pepper.pepper_motion_streamer.PepperMotionStreamer(ip='localhost', conf=None, input_source=None)[source]

Bases: SICConnector

Connector for accessing Pepper’s motion streaming capabilities.

Provides a high-level interface to the PepperMotionStreamerService component. Access this through the Pepper device’s motion_streaming() method.

This connector supports both producing and consuming motion streams, enabling bidirectional teleoperation and puppeteering scenarios.

Example usage:

# Simple streaming:
pepper.motion_streaming().request(StartStreaming(["Head", "RArm", "LArm"]))

# Puppeteering (connect two robots):
puppet_stream = puppet.motion_streaming()
performer_stream = performer.motion_streaming(input_source=puppet_stream)
puppet_stream.request(StartStreaming(["Head", "RArm", "LArm"]))

# With joint locking:
pepper.motion_streaming().request(SetLockedJointsRequest(["RArm"]))
component_class

alias of PepperMotionStreamerService

Pepper Tablet
class sic_framework.devices.common_pepper.pepper_tablet.UrlMessage(url)[source]

Bases: SICMessage

Message containing a URL to display on Pepper’s tablet.

Variables:

url (str) – The URL to display in the tablet’s webview.

__init__(url)[source]

Initialize URL message.

Parameters:

url (str) – Web URL to display on the tablet (e.g., “http://example.com”).

class sic_framework.devices.common_pepper.pepper_tablet.WifiConnectRequest(network_name, network_password, network_type='wpa2')[source]

Bases: SICRequest

Message containing Wi-Fi credentials for Pepper’s tablet.

Variables:
  • network_name (str) – SSID of the Wi-Fi network to join.

  • network_password (str) – Password or key used to authenticate.

  • network_type (str) – Security type (e.g., “open”, “wep”, “wpa”, “wpa2”).

__init__(network_name, network_password, network_type='wpa2')[source]

Initialize Wi-Fi connection message.

Parameters:
  • network_name (str) – SSID of the Wi-Fi network.

  • network_password (str) – Password for the Wi-Fi network.

  • network_type (str) – Security type, defaults to “wpa2”.

class sic_framework.devices.common_pepper.pepper_tablet.ClearDisplayMessage[source]

Bases: SICMessage

Message indicating the tablet display should be cleared.

__init__()[source]
class sic_framework.devices.common_pepper.pepper_tablet.NaoqiTabletComponent(*args, **kwargs)[source]

Bases: SICComponent

Component for controlling Pepper’s tablet display.

Provides access to Pepper’s built-in tablet screen through NAOqi’s ALTabletService. Accepts UrlMessage requests to display web content on the tablet.

The tablet may need to be configured with a Wi-Fi network before it can be used.

For information on the available methods (not implemented yet), please refer to the NAOqi ALTabletService API documentation: http://doc.aldebaran.com/2-5/naoqi/core/altabletservice-api.html

Example usage:

from sic_framework.devices.common_pepper.pepper_tablet import UrlMessage

pepper.tablet.send_message(UrlMessage("http://example.com"))

Note

The tablet requires active network connectivity to load external URLs.

__init__(*args, **kwargs)[source]

Initialize the tablet component.

Establishes connection to NAOqi session and ALTabletService.

Parameters:
  • args – Variable length argument list passed to parent.

  • kwargs – Arbitrary keyword arguments passed to parent.

static get_inputs()[source]

Get list of input message types this component accepts.

Returns:

List containing supported message types.

Return type:

list

static get_output()[source]

Get the output message type this component produces.

Returns:

SICMessage class (generic acknowledgment).

Return type:

type

on_message(message)[source]

Handle incoming tablet request messages.

Parameters:

message (SICMessage) – Message to process.

on_request(request)[source]

Handle incoming tablet request messages.

Parameters:

message (SICMessage) – Message to process.

show_webview(url)[source]

Show the webview on the tablet.

Parameters:

url (str) – The URL to display on the tablet.

wifi_connect(network_name, network_password, network_type)[source]

Connect the tablet to the specified Wi-Fi network.

Parameters:
  • network_name (str) – SSID of the Wi-Fi network.

  • network_password (str) – Password/key for the Wi-Fi network.

  • network_type (str) – Security type (“open”, “wep”, “wpa”, “wpa2”).

Raises:

RuntimeError – If the tablet service fails to configure Wi-Fi.

clear_display()[source]

Clear the current tablet display.

Uses ALTabletService.cleanWebview to remove any displayed content.

Raises:

RuntimeError – If clearing the display fails.

class sic_framework.devices.common_pepper.pepper_tablet.NaoqiTablet(ip='localhost', conf=None, input_source=None)[source]

Bases: SICConnector

Connector for accessing Pepper’s tablet display.

Provides a high-level interface to the NaoqiTabletComponent. Access this through the Pepper device’s tablet property.

component_class

alias of NaoqiTabletComponent

Pepper Top Tactile Sensor
class sic_framework.devices.common_pepper.pepper_top_tactile_sensor.PepperTactileSensorMessage(value)[source]

Bases: SICMessage

Message containing tactile sensor state.

Variables:

value (int) – Touch state - 1 when touched, 0 when released.

See: http://doc.aldebaran.com/2-5/naoqi/sensors/altouch-api.html#MiddleTactilTouched

__init__(value)[source]

Initialize tactile sensor message.

Parameters:

value (int) – Touch state (1 = touched, 0 = released).

class sic_framework.devices.common_pepper.pepper_top_tactile_sensor.PepperTopTactileSensor(*args, **kwargs)[source]

Bases: SICComponent

Sensor component for Pepper’s top head tactile sensor.

Monitors the middle tactile button on top of Pepper’s head and emits events when the sensor is touched or released. This is the primary touch-sensitive area on Pepper’s head, located at the center-top.

This sensor subscribes to NAOqi’s ALMemory MiddleTactilTouched event and publishes PepperTactileSensorMessage instances through the SIC framework.

Example usage:

def on_head_touch(msg):
    if msg.value == 1:
        print("Head touched!")
    else:
        print("Touch released!")

pepper.tactile_sensor.register_callback(on_head_touch)

Note

This sensor monitors the physical touch-sensitive area on Pepper’s head, not a clickable button. Light touch is sufficient to trigger the event.

__init__(*args, **kwargs)[source]

Initialize the tactile sensor.

Establishes connection to NAOqi session and ALMemory service.

Parameters:
  • args – Variable length argument list passed to parent.

  • kwargs – Arbitrary keyword arguments passed to parent.

static get_conf()[source]

Get default configuration for this sensor.

Returns:

Default (empty) configuration message.

Return type:

SICConfMessage

static get_inputs()[source]

Get list of input message types this sensor accepts.

Returns:

Empty list (this sensor does not accept input messages).

Return type:

list

static get_output()[source]

Get the output message type this sensor produces.

Returns:

PepperTactileSensorMessage class.

Return type:

type

onTouchChanged(value)[source]

Callback invoked when tactile sensor state changes.

Parameters:

value (int) – New touch state (1 = touched, 0 = released).

start()[source]

Start the sensor and subscribe to touch events.

Connects to the NAOqi MiddleTactilTouched event and begins emitting messages when the tactile sensor state changes.

stop(*args)[source]

Stop the component safely (template method).

Lifecycle: - Signal the component thread to stop via _signal_to_stop - Wait (up to COMPONENT_STOP_TIMEOUT) for the worker thread to confirm it stopped via _stopped - Only if the worker thread has stopped, run _cleanup() to release subclass resources

If the worker thread does not stop within the timeout, _cleanup() is skipped to avoid race conditions where resources are freed while the worker thread is still executing.

class sic_framework.devices.common_pepper.pepper_top_tactile_sensor.PepperTopTactile(ip='localhost', conf=None, input_source=None)[source]

Bases: SICConnector

Connector for accessing Pepper’s top tactile sensor.

Provides a high-level interface to the PepperTopTactileSensor component. Access this through the Pepper device’s tactile_sensor property.

component_class

alias of PepperTopTactileSensor

Pepper Back Bumper Sensor
class sic_framework.devices.common_pepper.pepper_back_bumper_sensor.PepperBackBumperMessage(value)[source]

Bases: SICMessage

Message containing back bumper state.

Variables:

value (int) – Bumper state - 1 when pressed, 0 when released.

__init__(value)[source]

Initialize back bumper message.

Parameters:

value (int) – Bumper state (1 = pressed, 0 = released).

class sic_framework.devices.common_pepper.pepper_back_bumper_sensor.PepperBackBumperSensor(*args, **kwargs)[source]

Bases: SICComponent

Sensor component for Pepper’s rear bumper.

Monitors the back bumper sensor on Pepper robot and emits events when the bumper is pressed or released. The bumper is located on the back of Pepper’s base platform.

This sensor subscribes to NAOqi’s ALMemory BackBumperPressed event and publishes PepperBackBumperMessage instances through the SIC framework.

Example usage:

def on_bumper(msg):
    if msg.value == 1:
        print("Back bumper pressed!")
    else:
        print("Back bumper released!")

pepper.back_bumper.register_callback(on_bumper)
__init__(*args, **kwargs)[source]

Initialize the back bumper sensor.

Establishes connection to NAOqi session and ALMemory service.

Parameters:
  • args – Variable length argument list passed to parent.

  • kwargs – Arbitrary keyword arguments passed to parent.

static get_conf()[source]

Get default configuration for this sensor.

Returns:

Default (empty) configuration message.

Return type:

SICConfMessage

static get_inputs()[source]

Get list of input message types this sensor accepts.

Returns:

Empty list (this sensor does not accept input messages).

Return type:

list

static get_output()[source]

Get the output message type this sensor produces.

Returns:

PepperBackBumperMessage class.

Return type:

type

onBumperChanged(value)[source]

Callback invoked when bumper state changes.

Parameters:

value (int) – New bumper state (1 = pressed, 0 = released).

start()[source]

Start the sensor and subscribe to bumper events.

Connects to the NAOqi BackBumperPressed event and begins emitting messages when the bumper state changes.

stop(*args)[source]

Stop the component safely (template method).

Lifecycle: - Signal the component thread to stop via _signal_to_stop - Wait (up to COMPONENT_STOP_TIMEOUT) for the worker thread to confirm it stopped via _stopped - Only if the worker thread has stopped, run _cleanup() to release subclass resources

If the worker thread does not stop within the timeout, _cleanup() is skipped to avoid race conditions where resources are freed while the worker thread is still executing.

class sic_framework.devices.common_pepper.pepper_back_bumper_sensor.PepperBackBumper(ip='localhost', conf=None, input_source=None)[source]

Bases: SICConnector

Connector for accessing Pepper’s back bumper sensor.

Provides a high-level interface to the PepperBackBumperSensor component. Access this through the Pepper device’s back_bumper property.

component_class

alias of PepperBackBumperSensor

Pepper Right Bumper Sensor
class sic_framework.devices.common_pepper.pepper_right_bumper_sensor.PepperRightBumperMessage(value)[source]

Bases: SICMessage

Message containing right bumper state.

Variables:

value (int) – Bumper state - 1 when pressed, 0 when released.

__init__(value)[source]

Initialize right bumper message.

Parameters:

value (int) – Bumper state (1 = pressed, 0 = released).

class sic_framework.devices.common_pepper.pepper_right_bumper_sensor.PepperRightBumperSensor(*args, **kwargs)[source]

Bases: SICComponent

Sensor component for Pepper’s right bumper.

Monitors the right bumper sensor on Pepper robot and emits events when the bumper is pressed or released. The bumper is located on the right side of Pepper’s base platform.

This sensor subscribes to NAOqi’s ALMemory RightBumperPressed event and publishes PepperRightBumperMessage instances through the SIC framework.

Example usage:

def on_right_bumper(msg):
    if msg.value == 1:
        print("Right bumper pressed!")
    else:
        print("Right bumper released!")

pepper.right_bumper.register_callback(on_right_bumper)
__init__(*args, **kwargs)[source]

Initialize the right bumper sensor.

Establishes connection to NAOqi session and ALMemory service.

Parameters:
  • args – Variable length argument list passed to parent.

  • kwargs – Arbitrary keyword arguments passed to parent.

static get_conf()[source]

Get default configuration for this sensor.

Returns:

Default (empty) configuration message.

Return type:

SICConfMessage

static get_inputs()[source]

Get list of input message types this sensor accepts.

Returns:

Empty list (this sensor does not accept input messages).

Return type:

list

static get_output()[source]

Get the output message type this sensor produces.

Returns:

PepperRightBumperMessage class.

Return type:

type

onBumperChanged(value)[source]

Callback invoked when bumper state changes.

Parameters:

value (int) – New bumper state (1 = pressed, 0 = released).

start()[source]

Start the sensor and subscribe to bumper events.

Connects to the NAOqi RightBumperPressed event and begins emitting messages when the bumper state changes.

stop(*args)[source]

Stop the component safely (template method).

Lifecycle: - Signal the component thread to stop via _signal_to_stop - Wait (up to COMPONENT_STOP_TIMEOUT) for the worker thread to confirm it stopped via _stopped - Only if the worker thread has stopped, run _cleanup() to release subclass resources

If the worker thread does not stop within the timeout, _cleanup() is skipped to avoid race conditions where resources are freed while the worker thread is still executing.

class sic_framework.devices.common_pepper.pepper_right_bumper_sensor.PepperRightBumper(ip='localhost', conf=None, input_source=None)[source]

Bases: SICConnector

Connector for accessing Pepper’s right bumper sensor.

Provides a high-level interface to the PepperRightBumperSensor component. Access this through the Pepper device’s right_bumper property.

component_class

alias of PepperRightBumperSensor

Pepper Left Bumper Sensor
class sic_framework.devices.common_pepper.pepper_left_bumper_sensor.PepperLeftBumperMessage(value)[source]

Bases: SICMessage

Message containing left bumper state.

Variables:

value (int) – Bumper state - 1 when pressed, 0 when released.

__init__(value)[source]

Initialize left bumper message.

Parameters:

value (int) – Bumper state (1 = pressed, 0 = released).

class sic_framework.devices.common_pepper.pepper_left_bumper_sensor.PepperLeftBumperSensor(*args, **kwargs)[source]

Bases: SICComponent

Sensor component for Pepper’s left bumper.

Monitors the left bumper sensor on Pepper robot and emits events when the bumper is pressed or released. The bumper is located on the left side of Pepper’s base platform.

This sensor subscribes to NAOqi’s ALMemory LeftBumperPressed event and publishes PepperLeftBumperMessage instances through the SIC framework.

Example usage:

def on_left_bumper(msg):
    if msg.value == 1:
        print("Left bumper pressed!")
    else:
        print("Left bumper released!")

pepper.left_bumper.register_callback(on_left_bumper)
__init__(*args, **kwargs)[source]

Initialize the left bumper sensor.

Establishes connection to NAOqi session and ALMemory service.

Parameters:
  • args – Variable length argument list passed to parent.

  • kwargs – Arbitrary keyword arguments passed to parent.

static get_conf()[source]

Get default configuration for this sensor.

Returns:

Default (empty) configuration message.

Return type:

SICConfMessage

static get_inputs()[source]

Get list of input message types this sensor accepts.

Returns:

Empty list (this sensor does not accept input messages).

Return type:

list

static get_output()[source]

Get the output message type this sensor produces.

Returns:

PepperLeftBumperMessage class.

Return type:

type

onBumperChanged(value)[source]

Callback invoked when bumper state changes.

Parameters:

value (int) – New bumper state (1 = pressed, 0 = released).

start()[source]

Start the sensor and subscribe to bumper events.

Connects to the NAOqi LeftBumperPressed event and begins emitting messages when the bumper state changes.

stop(*args)[source]

Stop the component safely (template method).

Lifecycle: - Signal the component thread to stop via _signal_to_stop - Wait (up to COMPONENT_STOP_TIMEOUT) for the worker thread to confirm it stopped via _stopped - Only if the worker thread has stopped, run _cleanup() to release subclass resources

If the worker thread does not stop within the timeout, _cleanup() is skipped to avoid race conditions where resources are freed while the worker thread is still executing.

class sic_framework.devices.common_pepper.pepper_left_bumper_sensor.PepperLeftBumper(ip='localhost', conf=None, input_source=None)[source]

Bases: SICConnector

Connector for accessing Pepper’s left bumper sensor.

Provides a high-level interface to the PepperLeftBumperSensor component. Access this through the Pepper device’s left_bumper property.

component_class

alias of PepperLeftBumperSensor

Desktop Components

Components for desktop/PC-based devices.

Camera

class sic_framework.devices.common_desktop.desktop_camera.DesktopCameraConf(fx=1.0, fy=1.0, flip=None, device_id=0, flip_rgb=False)[source]

Bases: SICConfMessage

__init__(fx=1.0, fy=1.0, flip=None, device_id=0, flip_rgb=False)[source]

Sets desktop camera configuration parameters.

See https://docs.opencv.org/4.x/da/d54/group__imgproc__transform.html#ga47a974309e9102f5f08231edc7e7529d :param fx: rescaling factor along x-axis (float) :param fy: rescaling factor along y-axis (float) :param device_id: The device ID of the camera for OpenCV to use. Default: 0

See https://docs.opencv.org/3.4/d2/de8/group__core__array.html#gaca7be533e3dac7feb70fc60635adf441 :param flip: flip code for vertical (0), horizontal (>0), or both (<0) flipping. Default is None (no flipping)

class sic_framework.devices.common_desktop.desktop_camera.DesktopCameraSensor(*args, **kwargs)[source]

Bases: SICSensor

__init__(*args, **kwargs)[source]
static get_conf()[source]

Define the expected configuration of the component using SICConfMessage.

Returns:

a SICConfMessage or None

Return type:

SICConfMessage

static get_inputs()[source]

Define the input types the component needs as a list.

Must be implemented by the subclass.

Returns:

list of SIC messages

Return type:

List[Type[SICMessage]]

static get_output()[source]

Define the output type of the component.

Must be implemented by the subclass.

Returns:

SIC message

Return type:

Type[SICMessage]

execute()[source]

Main function of the sensor.

Must be implemented by the subclass.

Returns:

A SICMessage

Return type:

SICMessage

class sic_framework.devices.common_desktop.desktop_camera.DesktopCamera(ip='localhost', conf=None, input_source=None)[source]

Bases: SICConnector

component_class

alias of DesktopCameraSensor

Microphone

class sic_framework.devices.common_desktop.desktop_microphone.MicrophoneConf(channels=1, sample_rate=44100, device_index=None)[source]

Bases: SICConfMessage

__init__(channels=1, sample_rate=44100, device_index=None)[source]
class sic_framework.devices.common_desktop.desktop_microphone.DesktopMicrophoneSensor(*args, **kwargs)[source]

Bases: SICSensor

__init__(*args, **kwargs)[source]
static get_conf()[source]

Define the expected configuration of the component using SICConfMessage.

Returns:

a SICConfMessage or None

Return type:

SICConfMessage

static get_inputs()[source]

Define the input types the component needs as a list.

Must be implemented by the subclass.

Returns:

list of SIC messages

Return type:

List[Type[SICMessage]]

static get_output()[source]

Define the output type of the component.

Must be implemented by the subclass.

Returns:

SIC message

Return type:

Type[SICMessage]

execute()[source]

Main function of the sensor.

Must be implemented by the subclass.

Returns:

A SICMessage

Return type:

SICMessage

class sic_framework.devices.common_desktop.desktop_microphone.DesktopMicrophone(ip='localhost', conf=None, input_source=None)[source]

Bases: SICConnector

component_class

alias of DesktopMicrophoneSensor

Speakers

class sic_framework.devices.common_desktop.desktop_speakers.SpeakersConf(sample_rate=44100, channels=1, device_index=None)[source]

Bases: SICConfMessage

Parameters for speakers go here.

__init__(sample_rate=44100, channels=1, device_index=None)[source]
class sic_framework.devices.common_desktop.desktop_speakers.DesktopSpeakersActuator(*args, **kwargs)[source]

Bases: SICActuator

__init__(*args, **kwargs)[source]
static get_conf()[source]

Define the expected configuration of the component using SICConfMessage.

Returns:

a SICConfMessage or None

Return type:

SICConfMessage

static get_inputs()[source]

Define the input types the component needs as a list.

Must be implemented by the subclass.

Returns:

list of SIC messages

Return type:

List[Type[SICMessage]]

static get_output()[source]

Define the output type of the component.

Must be implemented by the subclass.

Returns:

SIC message

Return type:

Type[SICMessage]

on_request(request)[source]

Handle a request from the client. Calls the execute method.

Parameters:

request (SICRequest) – input messages

Return type:

SICMessage

on_message(message)[source]

Define the handler for input messages.

Parameters:

message (SICMessage) – The message to handle.

Returns:

The reply

Return type:

SICMessage

class sic_framework.devices.common_desktop.desktop_speakers.DesktopSpeakers(ip='localhost', conf=None, input_source=None)[source]

Bases: SICConnector

component_class

alias of DesktopSpeakersActuator

Text-to-Speech

class sic_framework.devices.common_desktop.desktop_text_to_speech.TextToSpeechConf(amplitude=100, pitch=50, speed=175, gap=0, voice='en')[source]

Bases: SICConfMessage

Parameters for espeak.

__init__(amplitude=100, pitch=50, speed=175, gap=0, voice='en')[source]

Initialize espeak configuration.

Parameters:
  • amplitude – Volume (0-200), default 100

  • pitch – Pitch adjustment (0-99), default 50

  • speed – Speed in words per minute, default 175

  • gap – Word gap in 10ms units, default 0

  • voice – Voice to use (e.g., ‘en’, ‘en-us’, ‘en+f3’), default ‘en’

class sic_framework.devices.common_desktop.desktop_text_to_speech.DesktopTextToSpeechActuator(*args, **kwargs)[source]

Bases: SICActuator

Desktop text to speech actuator.

Requires espeak to be installed.

__init__(*args, **kwargs)[source]
static get_conf()[source]

Define the expected configuration of the component using SICConfMessage.

Returns:

a SICConfMessage or None

Return type:

SICConfMessage

static get_inputs()[source]

Define the input types the component needs as a list.

Must be implemented by the subclass.

Returns:

list of SIC messages

Return type:

List[Type[SICMessage]]

static get_output()[source]

Define the output type of the component.

Must be implemented by the subclass.

Returns:

SIC message

Return type:

Type[SICMessage]

_speak(text)[source]

Use espeak subprocess to speak the text.

on_request(request)[source]

Handle a request from the client. Calls the execute method.

Parameters:

request (SICRequest) – input messages

Return type:

SICMessage

on_message(message)[source]

Define the handler for input messages.

Parameters:

message (SICMessage) – The message to handle.

Returns:

The reply

Return type:

SICMessage

stop(*args)[source]

Stop the component safely (template method).

Lifecycle: - Signal the component thread to stop via _signal_to_stop - Wait (up to COMPONENT_STOP_TIMEOUT) for the worker thread to confirm it stopped via _stopped - Only if the worker thread has stopped, run _cleanup() to release subclass resources

If the worker thread does not stop within the timeout, _cleanup() is skipped to avoid race conditions where resources are freed while the worker thread is still executing.

class sic_framework.devices.common_desktop.desktop_text_to_speech.DesktopTextToSpeech(ip='localhost', conf=None, input_source=None)[source]

Bases: SICConnector

component_class

alias of DesktopTextToSpeechActuator

SpaceMouse

class sic_framework.devices.common_desktop.desktop_spacemouse.SpaceMouseStates(t, x, y, z, roll, pitch, yaw, buttons)[source]

Bases: SICMessage

__init__(t, x, y, z, roll, pitch, yaw, buttons)[source]

State objects returned from read() have 7 attributes: [t,x,y,z,roll,pitch,yaw,button]. :param t: timestamp in seconds since the script started. :param x: x translation in the range [-1.0, 1.0] :param y: y translation in the range [-1.0, 1.0] :param z: z translation in the range [-1.0, 1.0] :param roll: roll rotation in the range [-1.0, 1.0]. :param pitch: pitch rotations in the range [-1.0, 1.0]. :param yaw: yaw rotation in the range [-1.0, 1.0]. :param buttons: list of button states (0 or 1), in order specified in the device specifier

class sic_framework.devices.common_desktop.desktop_spacemouse.DesktopSpaceMouseSensor(*args, **kwargs)[source]

Bases: SICSensor

__init__(*args, **kwargs)[source]
static get_inputs()[source]

Define the input types the component needs as a list.

Must be implemented by the subclass.

Returns:

list of SIC messages

Return type:

List[Type[SICMessage]]

static get_output()[source]

Define the output type of the component.

Must be implemented by the subclass.

Returns:

SIC message

Return type:

Type[SICMessage]

execute()[source]

Main function of the sensor.

Must be implemented by the subclass.

Returns:

A SICMessage

Return type:

SICMessage

class sic_framework.devices.common_desktop.desktop_spacemouse.DesktopSpaceMouse(ip='localhost', conf=None, input_source=None)[source]

Bases: SICConnector

component_class

alias of DesktopSpaceMouseSensor

AlphaMini Components

Components for the Ubtech AlphaMini robot.

Connector

Microphone

class sic_framework.devices.common_mini.mini_microphone.MiniMicrophoneSensor(*args, **kwargs)[source]

Bases: SICSensor

A SICSensor component that acts as a TCP server to receive raw audio data from the external Android micarraytest application (https://github.com/Social-AI-VU/alphamini_android), and streams it as mono audio messages for downstream processing (e.g., Dialogflow or other ASR systems). At the time of writing, this component is running on the AlphaMini robot to stay consistent with the current structure. If performance limitations or lag become more significant in the future, consider running it locally.

This component: - Listens on a specified TCP port for incoming stereo audio data. - Buffers the incoming audio data and converts it from stereo to mono. - Sends mono audio data encapsulated in an AudioMessage. - Attempts to (re)launch the external Android micarraytest app if disconnected

for more than 5 seconds.

sample_rate

Audio sample rate in Hz (default: 44000).

Type:

int

channels

Number of audio channels (2 for stereo).

Type:

int

bytes_per_sample

Bytes per audio sample (2 for 16-bit).

Type:

int

frame_size

Number of bytes per chunk received over the socket.

Type:

int

buffer_time_ms

Duration (in ms) of audio data to buffer before sending.

Type:

int

buffer_size

Computed buffer size in bytes for the target duration.

Type:

int

buffer_accumulator

Accumulates raw audio data until the buffer is full.

Type:

bytes

host

IP address the server listens on (default: “0.0.0.0”, which means it accepts connections from any network interface).

Type:

str

port

TCP port the server listens on (default: 5000).

Type:

int

server_socket

The main server socket.

Type:

socket.socket

client_conn

Active client connection, if any.

Type:

socket.socket

last_connection_time

Timestamp of the last successful connection.

Type:

float

COMPONENT_STARTUP_TIMEOUT = 10

Timeout in seconds for component startup.

This controls how long a SICConnector should wait when requesting a component to start. Increase this value for components that need more time to initialize (e.g., robots that need to stand up or models that need to load to GPU).

__init__(*args, **kwargs)[source]
start_app(package_name, activity_name)[source]
execute()[source]

Main function of the sensor.

Must be implemented by the subclass.

Returns:

A SICMessage

Return type:

SICMessage

class sic_framework.devices.common_mini.mini_microphone.MiniMicrophone(ip='localhost', conf=None, input_source=None)[source]

Bases: SICConnector

component_class

alias of MiniMicrophoneSensor

Speaker

class sic_framework.devices.common_mini.mini_speaker.MiniSpeakersConf(sample_rate=44100, channels=1)[source]

Bases: SICConfMessage

__init__(sample_rate=44100, channels=1)[source]
class sic_framework.devices.common_mini.mini_speaker.MiniSpeakerComponent(*args, **kwargs)[source]

Bases: SICComponent

COMPONENT_STARTUP_TIMEOUT = 5

Timeout in seconds for component startup.

This controls how long a SICConnector should wait when requesting a component to start. Increase this value for components that need more time to initialize (e.g., robots that need to stand up or models that need to load to GPU).

__init__(*args, **kwargs)[source]
static get_conf()[source]

Define the expected configuration of the component using SICConfMessage.

Returns:

a SICConfMessage or None

Return type:

SICConfMessage

static get_inputs()[source]

Define the input types the component needs as a list.

Must be implemented by the subclass.

Returns:

list of SIC messages

Return type:

List[Type[SICMessage]]

static get_output()[source]

Define the output type of the component.

Must be implemented by the subclass.

Returns:

SIC message

Return type:

Type[SICMessage]

on_message(message)[source]

Define the handler for input messages.

Parameters:

message (SICMessage) – The message to handle.

Returns:

The reply

Return type:

SICMessage

on_request(request)[source]

Define the handler for Component specific requests. Must return a SICMessage as a reply to the request.

Parameters:

request (SICRequest) – The request for this component.

Returns:

The reply

Return type:

SICMessage

stop(*args)[source]

Stop the component safely (template method).

Lifecycle: - Signal the component thread to stop via _signal_to_stop - Wait (up to COMPONENT_STOP_TIMEOUT) for the worker thread to confirm it stopped via _stopped - Only if the worker thread has stopped, run _cleanup() to release subclass resources

If the worker thread does not stop within the timeout, _cleanup() is skipped to avoid race conditions where resources are freed while the worker thread is still executing.

class sic_framework.devices.common_mini.mini_speaker.MiniSpeaker(ip='localhost', conf=None, input_source=None)[source]

Bases: SICConnector

component_class

alias of MiniSpeakerComponent

Animation

Franka Components

Components for the Franka Emika robot arm.

Motion

class sic_framework.devices.common_franka.franka_motion.FrankaPoseRequest(stream=False)[source]

Bases: SICRequest

A request for obtaining the current end-effector (EE) pose relative to the robot base frame.

__init__(stream=False)[source]
class sic_framework.devices.common_franka.franka_motion.FrankaPose(position, orientation)[source]

Bases: SICMessage

A SICMessage containing end-effector (EE) position and orientation in robot base frame

Parameters:
  • position – end-effector position in robot base frame

  • orientation – end-effector orientation (quaternion) in robot base frame

__init__(position, orientation)[source]
class sic_framework.devices.common_franka.franka_motion.FrankaGripperGraspRequest(width, speed=0.1, force=5, epsilon_inner=0.005, epsilon_outer=0.005)[source]

Bases: SICRequest

A SICRequest to command the gripper to grasp an object with a force-controlled command.

see the api documentation for more details: https://jeanelsner.github.io/panda-py/panda_py.libfranka.html#panda_py.libfranka.Gripper.grasp

Parameters:
  • width – The distance between the fingers in meters. The width must be between 0.0 and 0.085 m.

  • speed – The speed of the gripper in meters per second. The speed must be between 0 and 0.1 m/s.

  • force – The gripping force in Newton. The force must be between 5 and 70 N.

  • epsilon_inner – The inner tolerance for the grasp width in meters.

  • epsilon_outer – The outer tolerance for the grasp width in meters.

__init__(width, speed=0.1, force=5, epsilon_inner=0.005, epsilon_outer=0.005)[source]
class sic_framework.devices.common_franka.franka_motion.FrankaGripperMoveRequest(width, speed=0.1)[source]

Bases: SICRequest

A SICRequest to command the gripper to move to a specific width.

see the api documentation for more details: https://jeanelsner.github.io/panda-py/panda_py.libfranka.html#panda_py.libfranka.Gripper.move

Parameters:
  • width – The distance between the fingers in meters. The width must be between 0.0 and 0.085 m.

  • speed – The speed of the gripper in meters per second. The speed must be between 0 and 0.1 m/s.

__init__(width, speed=0.1)[source]
class sic_framework.devices.common_franka.franka_motion.FrankaMotionActuator(*args, **kwargs)[source]

Bases: SICActuator

__init__(*args, **kwargs)[source]
static get_inputs()[source]

Define the input types the component needs as a list.

Must be implemented by the subclass.

Returns:

list of SIC messages

Return type:

List[Type[SICMessage]]

static get_output()[source]

Define the output type of the component.

Must be implemented by the subclass.

Returns:

SIC message

Return type:

Type[SICMessage]

on_message(message)[source]

Define the handler for input messages.

Parameters:

message (SICMessage) – The message to handle.

Returns:

The reply

Return type:

SICMessage

execute(request)[source]

Main function of the Actuator. Must return a SICMessage as a reply to the user.

Must be implemented by the subclass.

Parameters:

request (SICRequest) – input messages

Return type:

SICMessage

get_pose()[source]
class sic_framework.devices.common_franka.franka_motion.FrankaMotion(ip='localhost', conf=None, input_source=None)[source]

Bases: SICConnector

component_class

alias of FrankaMotionActuator

Motion Recorder

class sic_framework.devices.common_franka.franka_motion_recorder.StartTeachingRequest(request_id=None)[source]

Bases: SICRequest

A request to start teaching mode

class sic_framework.devices.common_franka.franka_motion_recorder.StopTeachingRequest(request_id=None)[source]

Bases: SICRequest

A request to stop teaching mode

class sic_framework.devices.common_franka.franka_motion_recorder.StartRecordingRequest(frequency=1000)[source]

Bases: SICRequest

Record motion of the joints, For more information see documentation https://github.com/JeanElsner/panda-py

Parameters:

frequency – Number of data points recorded per second. Higher values capture finer motion detail

__init__(frequency=1000)[source]
class sic_framework.devices.common_franka.franka_motion_recorder.StopRecordingRequest(request_id=None)[source]

Bases: SICRequest

A request to stop recording joint motion.

class sic_framework.devices.common_franka.franka_motion_recorder.GoHomeRequest(request_id=None)[source]

Bases: SICRequest

A request to move the robot to its home position.

class sic_framework.devices.common_franka.franka_motion_recorder.PlayRecordingRequest(joint_recording, frequency=1000)[source]

Bases: SICRequest

Play recorded joint positions and joint velocities.

Parameters:
  • joint_recording – Object contains PandaJointsRecording.

  • frequency – Number of data points recorded per second. This frequency should match how the initial trajectory was recorded/collected

__init__(joint_recording, frequency=1000)[source]
class sic_framework.devices.common_franka.franka_motion_recorder.PandaJointsRecording(recorded_joints_pos, recorded_joints_vel)[source]

Bases: SICMessage

A SICMessage containing recorded joint positions and velocities.

Parameters:
  • recorded_joints_pos – List of 7-element arrays representing recorded joint positions.

  • recorded_joints_vel – List of 7-element arrays representing recorded joint velocities.

__init__(recorded_joints_pos, recorded_joints_vel)[source]
save(filename)[source]

Save the recorded joint positions and velocities to a file.

Parameters:

filename – The name of the file to save. In demo, it ends with “.motion”.

classmethod load(filename)[source]

Load recorded joint positions and velocities from a “.motion”.

Parameters:

filename – The name of the file to load.

Returns:

An instance of PandaJointsRecording containing joint positions and velocities data.

class sic_framework.devices.common_franka.franka_motion_recorder.FrankaMotionRecorderActuator(*args, **kwargs)[source]

Bases: SICActuator

__init__(*args, **kwargs)[source]
static get_inputs()[source]

Define the input types the component needs as a list.

Must be implemented by the subclass.

Returns:

list of SIC messages

Return type:

List[Type[SICMessage]]

record_motion()[source]

Record joint motion when recording event is set.

reset_recording_variables(request)[source]

Reset recorded joint positions and velocities and set the recording frequency.

Parameters:

request – The StartRecordingRequest containing the desired recording frequency.

replay_recording(request)[source]

Replay recorded joint positions and velocities.

Parameters:

request – The PlayRecordingRequest containing recorded joint positions and velocities.

execute(request)[source]

Main function of the Actuator. Must return a SICMessage as a reply to the user.

Must be implemented by the subclass.

Parameters:

request (SICRequest) – input messages

Return type:

SICMessage

class sic_framework.devices.common_franka.franka_motion_recorder.FrankaMotionRecorder(ip='localhost', conf=None, input_source=None)[source]

Bases: SICConnector

component_class

alias of FrankaMotionRecorderActuator

NAO Stub Components

Stub components for NAO robot testing and simulation.

NAO stub components - provides the same interface as the real NAO robot but uses Desktop sensors/actuators where possible. NAO-specific actuators are stubbed with logging.

class sic_framework.devices.common_nao_stub.NaoStubMotion(ip='localhost', conf=None, input_source=None)[source]

Bases: SICConnector

component_class

alias of NaoStubMotionActuator

class sic_framework.devices.common_nao_stub.NaoStubMotionRecorder(ip='localhost', conf=None, input_source=None)[source]

Bases: SICConnector

component_class

alias of NaoStubMotionRecorderActuator

class sic_framework.devices.common_nao_stub.NaoStubTTS(ip='localhost', conf=None, input_source=None)[source]

Bases: SICConnector

component_class

alias of NaoStubTTSActuator

class sic_framework.devices.common_nao_stub.NaoStubStiffness(ip='localhost', conf=None, input_source=None)[source]

Bases: SICConnector

component_class

alias of NaoStubStiffnessActuator

class sic_framework.devices.common_nao_stub.NaoStubAutonomous(ip='localhost', conf=None, input_source=None)[source]

Bases: SICConnector

component_class

alias of NaoStubAutonomousActuator

class sic_framework.devices.common_nao_stub.NaoStubLEDs(ip='localhost', conf=None, input_source=None)[source]

Bases: SICConnector

component_class

alias of NaoStubLEDsActuator

class sic_framework.devices.common_nao_stub.NaoStubButtons(ip='localhost', conf=None, input_source=None)[source]

Bases: SICConnector

component_class

alias of NaoStubButtonsSensor

register_callback(callback)[source]

Stub callback registration for buttons.

class sic_framework.devices.common_nao_stub.NaoStubTracker(ip='localhost', conf=None, input_source=None)[source]

Bases: SICConnector

component_class

alias of NaoStubTrackerActuator

class sic_framework.devices.common_nao_stub.NaoStubLookAt(ip='localhost', conf=None, input_source=None)[source]

Bases: SICConnector

component_class

alias of NaoStubLookAtActuator

class sic_framework.devices.common_nao_stub.NaoStubMotionActuator(ready_event=None, stop_event=None, conf=None, input_channel=None, component_channel=None, req_reply_channel=None, client_id='', endpoint='', ip='', redis=None)[source]

Bases: SICActuator

Stub for NAO motion actuator - logs actions instead of executing them.

static get_conf()[source]

Define the expected configuration of the component using SICConfMessage.

Returns:

a SICConfMessage or None

Return type:

SICConfMessage

static get_inputs()[source]

Define the input types the component needs as a list.

Must be implemented by the subclass.

Returns:

list of SIC messages

Return type:

List[Type[SICMessage]]

static get_output()[source]

Define the output type of the component.

Must be implemented by the subclass.

Returns:

SIC message

Return type:

Type[SICMessage]

execute(request)[source]

Log the motion request instead of executing it.

on_message(message)[source]

Log incoming messages.

class sic_framework.devices.common_nao_stub.NaoStubMotionRecorderActuator(ready_event=None, stop_event=None, conf=None, input_channel=None, component_channel=None, req_reply_channel=None, client_id='', endpoint='', ip='', redis=None)[source]

Bases: SICActuator

Stub for NAO motion recorder - logs actions instead of executing them.

static get_conf()[source]

Define the expected configuration of the component using SICConfMessage.

Returns:

a SICConfMessage or None

Return type:

SICConfMessage

static get_inputs()[source]

Define the input types the component needs as a list.

Must be implemented by the subclass.

Returns:

list of SIC messages

Return type:

List[Type[SICMessage]]

static get_output()[source]

Define the output type of the component.

Must be implemented by the subclass.

Returns:

SIC message

Return type:

Type[SICMessage]

execute(request)[source]

Log the motion recorder request instead of executing it.

on_message(message)[source]

Log incoming messages.

stop()[source]

Stop the Motion recorder actuator.

class sic_framework.devices.common_nao_stub.NaoStubTTSActuator(ready_event=None, stop_event=None, conf=None, input_channel=None, component_channel=None, req_reply_channel=None, client_id='', endpoint='', ip='', redis=None)[source]

Bases: SICActuator

Stub for NAO TTS - logs what would be said instead of actually speaking.

static get_conf()[source]

Define the expected configuration of the component using SICConfMessage.

Returns:

a SICConfMessage or None

Return type:

SICConfMessage

static get_inputs()[source]

Define the input types the component needs as a list.

Must be implemented by the subclass.

Returns:

list of SIC messages

Return type:

List[Type[SICMessage]]

static get_output()[source]

Define the output type of the component.

Must be implemented by the subclass.

Returns:

SIC message

Return type:

Type[SICMessage]

execute(request)[source]

Log what would be spoken.

on_message(message)[source]

Handle incoming text messages.

stop()[source]

Stop the TTS actuator.

class sic_framework.devices.common_nao_stub.NaoStubStiffnessActuator(ready_event=None, stop_event=None, conf=None, input_channel=None, component_channel=None, req_reply_channel=None, client_id='', endpoint='', ip='', redis=None)[source]

Bases: SICActuator

Stub for NAO stiffness actuator - logs actions instead of executing them.

static get_conf()[source]

Define the expected configuration of the component using SICConfMessage.

Returns:

a SICConfMessage or None

Return type:

SICConfMessage

static get_inputs()[source]

Define the input types the component needs as a list.

Must be implemented by the subclass.

Returns:

list of SIC messages

Return type:

List[Type[SICMessage]]

static get_output()[source]

Define the output type of the component.

Must be implemented by the subclass.

Returns:

SIC message

Return type:

Type[SICMessage]

execute(request)[source]

Log the stiffness request instead of executing it.

on_message(message)[source]

Log incoming messages.

stop()[source]

Stop the Stiffness actuator.

class sic_framework.devices.common_nao_stub.NaoStubAutonomousActuator(ready_event=None, stop_event=None, conf=None, input_channel=None, component_channel=None, req_reply_channel=None, client_id='', endpoint='', ip='', redis=None)[source]

Bases: SICActuator

Stub for NAO autonomous behavior - logs actions instead of executing them.

static get_conf()[source]

Define the expected configuration of the component using SICConfMessage.

Returns:

a SICConfMessage or None

Return type:

SICConfMessage

static get_inputs()[source]

Define the input types the component needs as a list.

Must be implemented by the subclass.

Returns:

list of SIC messages

Return type:

List[Type[SICMessage]]

static get_output()[source]

Define the output type of the component.

Must be implemented by the subclass.

Returns:

SIC message

Return type:

Type[SICMessage]

execute(request)[source]

Log the autonomous request instead of executing it.

on_message(message)[source]

Log incoming messages.

stop()[source]

Stop the Autonomous actuator.

class sic_framework.devices.common_nao_stub.NaoStubLEDsActuator(ready_event=None, stop_event=None, conf=None, input_channel=None, component_channel=None, req_reply_channel=None, client_id='', endpoint='', ip='', redis=None)[source]

Bases: SICActuator

Stub for NAO LED actuator - logs actions instead of executing them.

static get_conf()[source]

Define the expected configuration of the component using SICConfMessage.

Returns:

a SICConfMessage or None

Return type:

SICConfMessage

static get_inputs()[source]

Define the input types the component needs as a list.

Must be implemented by the subclass.

Returns:

list of SIC messages

Return type:

List[Type[SICMessage]]

static get_output()[source]

Define the output type of the component.

Must be implemented by the subclass.

Returns:

SIC message

Return type:

Type[SICMessage]

execute(request)[source]

Log the LED request instead of executing it.

on_message(message)[source]

Log incoming messages.

stop()[source]

Stop the LEDs actuator.

class sic_framework.devices.common_nao_stub.NaoStubButtonsSensor(ready_event=None, stop_event=None, conf=None, input_channel=None, component_channel=None, req_reply_channel=None, client_id='', endpoint='', ip='', redis=None)[source]

Bases: SICSensor

Stub for NAO button sensor - logs but doesn’t generate events.

static get_conf()[source]

Define the expected configuration of the component using SICConfMessage.

Returns:

a SICConfMessage or None

Return type:

SICConfMessage

static get_inputs()[source]

Define the input types the component needs as a list.

Must be implemented by the subclass.

Returns:

list of SIC messages

Return type:

List[Type[SICMessage]]

static get_output()[source]

Define the output type of the component.

Must be implemented by the subclass.

Returns:

SIC message

Return type:

Type[SICMessage]

execute()[source]

Buttons don’t continuously produce data, so return None.

stop()[source]

Stop the Buttons sensor.

class sic_framework.devices.common_nao_stub.NaoStubTrackerActuator(ready_event=None, stop_event=None, conf=None, input_channel=None, component_channel=None, req_reply_channel=None, client_id='', endpoint='', ip='', redis=None)[source]

Bases: SICActuator

Stub for NAO tracker actuator - logs actions instead of executing them.

static get_conf()[source]

Define the expected configuration of the component using SICConfMessage.

Returns:

a SICConfMessage or None

Return type:

SICConfMessage

static get_inputs()[source]

Define the input types the component needs as a list.

Must be implemented by the subclass.

Returns:

list of SIC messages

Return type:

List[Type[SICMessage]]

static get_output()[source]

Define the output type of the component.

Must be implemented by the subclass.

Returns:

SIC message

Return type:

Type[SICMessage]

execute(request)[source]

Log the tracker request instead of executing it.

on_message(message)[source]

Log incoming messages.

stop()[source]

Stop the Tracker actuator.

class sic_framework.devices.common_nao_stub.NaoStubLookAtActuator(ready_event=None, stop_event=None, conf=None, input_channel=None, component_channel=None, req_reply_channel=None, client_id='', endpoint='', ip='', redis=None)[source]

Bases: SICActuator

Stub for NAO look-at actuator - logs actions instead of executing them.

static get_conf()[source]

Define the expected configuration of the component using SICConfMessage.

Returns:

a SICConfMessage or None

Return type:

SICConfMessage

static get_inputs()[source]

Define the input types the component needs as a list.

Must be implemented by the subclass.

Returns:

list of SIC messages

Return type:

List[Type[SICMessage]]

static get_output()[source]

Define the output type of the component.

Must be implemented by the subclass.

Returns:

SIC message

Return type:

Type[SICMessage]

execute(request)[source]

Log the look-at request instead of executing it.

on_message(message)[source]

Log incoming messages.

stop()[source]

Stop the LookAt actuator.

Autonomous

NAO stub autonomous behavior component.

class sic_framework.devices.common_nao_stub.nao_stub_autonomous.NaoStubAutonomousActuator(ready_event=None, stop_event=None, conf=None, input_channel=None, component_channel=None, req_reply_channel=None, client_id='', endpoint='', ip='', redis=None)[source]

Bases: SICActuator

Stub for NAO autonomous behavior - logs actions instead of executing them.

static get_conf()[source]

Define the expected configuration of the component using SICConfMessage.

Returns:

a SICConfMessage or None

Return type:

SICConfMessage

static get_inputs()[source]

Define the input types the component needs as a list.

Must be implemented by the subclass.

Returns:

list of SIC messages

Return type:

List[Type[SICMessage]]

static get_output()[source]

Define the output type of the component.

Must be implemented by the subclass.

Returns:

SIC message

Return type:

Type[SICMessage]

execute(request)[source]

Log the autonomous request instead of executing it.

on_message(message)[source]

Log incoming messages.

stop()[source]

Stop the Autonomous actuator.

class sic_framework.devices.common_nao_stub.nao_stub_autonomous.NaoStubAutonomous(ip='localhost', conf=None, input_source=None)[source]

Bases: SICConnector

component_class

alias of NaoStubAutonomousActuator

Buttons

NAO stub buttons component.

class sic_framework.devices.common_nao_stub.nao_stub_buttons.NaoStubButtonsSensor(ready_event=None, stop_event=None, conf=None, input_channel=None, component_channel=None, req_reply_channel=None, client_id='', endpoint='', ip='', redis=None)[source]

Bases: SICSensor

Stub for NAO button sensor - logs but doesn’t generate events.

static get_conf()[source]

Define the expected configuration of the component using SICConfMessage.

Returns:

a SICConfMessage or None

Return type:

SICConfMessage

static get_inputs()[source]

Define the input types the component needs as a list.

Must be implemented by the subclass.

Returns:

list of SIC messages

Return type:

List[Type[SICMessage]]

static get_output()[source]

Define the output type of the component.

Must be implemented by the subclass.

Returns:

SIC message

Return type:

Type[SICMessage]

execute()[source]

Buttons don’t continuously produce data, so return None.

stop()[source]

Stop the Buttons sensor.

class sic_framework.devices.common_nao_stub.nao_stub_buttons.NaoStubButtons(ip='localhost', conf=None, input_source=None)[source]

Bases: SICConnector

component_class

alias of NaoStubButtonsSensor

register_callback(callback)[source]

Stub callback registration for buttons.

LEDs

NAO stub LEDs component.

class sic_framework.devices.common_nao_stub.nao_stub_leds.NaoStubLEDsActuator(ready_event=None, stop_event=None, conf=None, input_channel=None, component_channel=None, req_reply_channel=None, client_id='', endpoint='', ip='', redis=None)[source]

Bases: SICActuator

Stub for NAO LED actuator - logs actions instead of executing them.

static get_conf()[source]

Define the expected configuration of the component using SICConfMessage.

Returns:

a SICConfMessage or None

Return type:

SICConfMessage

static get_inputs()[source]

Define the input types the component needs as a list.

Must be implemented by the subclass.

Returns:

list of SIC messages

Return type:

List[Type[SICMessage]]

static get_output()[source]

Define the output type of the component.

Must be implemented by the subclass.

Returns:

SIC message

Return type:

Type[SICMessage]

execute(request)[source]

Log the LED request instead of executing it.

on_message(message)[source]

Log incoming messages.

stop()[source]

Stop the LEDs actuator.

class sic_framework.devices.common_nao_stub.nao_stub_leds.NaoStubLEDs(ip='localhost', conf=None, input_source=None)[source]

Bases: SICConnector

component_class

alias of NaoStubLEDsActuator

Motion

NAO stub motion components.

class sic_framework.devices.common_nao_stub.nao_stub_motion.NaoStubMotionActuator(ready_event=None, stop_event=None, conf=None, input_channel=None, component_channel=None, req_reply_channel=None, client_id='', endpoint='', ip='', redis=None)[source]

Bases: SICActuator

Stub for NAO motion actuator - logs actions instead of executing them.

static get_conf()[source]

Define the expected configuration of the component using SICConfMessage.

Returns:

a SICConfMessage or None

Return type:

SICConfMessage

static get_inputs()[source]

Define the input types the component needs as a list.

Must be implemented by the subclass.

Returns:

list of SIC messages

Return type:

List[Type[SICMessage]]

static get_output()[source]

Define the output type of the component.

Must be implemented by the subclass.

Returns:

SIC message

Return type:

Type[SICMessage]

execute(request)[source]

Log the motion request instead of executing it.

on_message(message)[source]

Log incoming messages.

class sic_framework.devices.common_nao_stub.nao_stub_motion.NaoStubMotionRecorderActuator(ready_event=None, stop_event=None, conf=None, input_channel=None, component_channel=None, req_reply_channel=None, client_id='', endpoint='', ip='', redis=None)[source]

Bases: SICActuator

Stub for NAO motion recorder - logs actions instead of executing them.

static get_conf()[source]

Define the expected configuration of the component using SICConfMessage.

Returns:

a SICConfMessage or None

Return type:

SICConfMessage

static get_inputs()[source]

Define the input types the component needs as a list.

Must be implemented by the subclass.

Returns:

list of SIC messages

Return type:

List[Type[SICMessage]]

static get_output()[source]

Define the output type of the component.

Must be implemented by the subclass.

Returns:

SIC message

Return type:

Type[SICMessage]

execute(request)[source]

Log the motion recorder request instead of executing it.

on_message(message)[source]

Log incoming messages.

stop()[source]

Stop the Motion recorder actuator.

class sic_framework.devices.common_nao_stub.nao_stub_motion.NaoStubMotion(ip='localhost', conf=None, input_source=None)[source]

Bases: SICConnector

component_class

alias of NaoStubMotionActuator

class sic_framework.devices.common_nao_stub.nao_stub_motion.NaoStubMotionRecorder(ip='localhost', conf=None, input_source=None)[source]

Bases: SICConnector

component_class

alias of NaoStubMotionRecorderActuator

Stiffness

NAO stub stiffness component.

class sic_framework.devices.common_nao_stub.nao_stub_stiffness.NaoStubStiffnessActuator(ready_event=None, stop_event=None, conf=None, input_channel=None, component_channel=None, req_reply_channel=None, client_id='', endpoint='', ip='', redis=None)[source]

Bases: SICActuator

Stub for NAO stiffness actuator - logs actions instead of executing them.

static get_conf()[source]

Define the expected configuration of the component using SICConfMessage.

Returns:

a SICConfMessage or None

Return type:

SICConfMessage

static get_inputs()[source]

Define the input types the component needs as a list.

Must be implemented by the subclass.

Returns:

list of SIC messages

Return type:

List[Type[SICMessage]]

static get_output()[source]

Define the output type of the component.

Must be implemented by the subclass.

Returns:

SIC message

Return type:

Type[SICMessage]

execute(request)[source]

Log the stiffness request instead of executing it.

on_message(message)[source]

Log incoming messages.

stop()[source]

Stop the Stiffness actuator.

class sic_framework.devices.common_nao_stub.nao_stub_stiffness.NaoStubStiffness(ip='localhost', conf=None, input_source=None)[source]

Bases: SICConnector

component_class

alias of NaoStubStiffnessActuator

Tracker

NAO stub tracker and look-at components.

class sic_framework.devices.common_nao_stub.nao_stub_tracker.NaoStubTrackerActuator(ready_event=None, stop_event=None, conf=None, input_channel=None, component_channel=None, req_reply_channel=None, client_id='', endpoint='', ip='', redis=None)[source]

Bases: SICActuator

Stub for NAO tracker actuator - logs actions instead of executing them.

static get_conf()[source]

Define the expected configuration of the component using SICConfMessage.

Returns:

a SICConfMessage or None

Return type:

SICConfMessage

static get_inputs()[source]

Define the input types the component needs as a list.

Must be implemented by the subclass.

Returns:

list of SIC messages

Return type:

List[Type[SICMessage]]

static get_output()[source]

Define the output type of the component.

Must be implemented by the subclass.

Returns:

SIC message

Return type:

Type[SICMessage]

execute(request)[source]

Log the tracker request instead of executing it.

on_message(message)[source]

Log incoming messages.

stop()[source]

Stop the Tracker actuator.

class sic_framework.devices.common_nao_stub.nao_stub_tracker.NaoStubLookAtActuator(ready_event=None, stop_event=None, conf=None, input_channel=None, component_channel=None, req_reply_channel=None, client_id='', endpoint='', ip='', redis=None)[source]

Bases: SICActuator

Stub for NAO look-at actuator - logs actions instead of executing them.

static get_conf()[source]

Define the expected configuration of the component using SICConfMessage.

Returns:

a SICConfMessage or None

Return type:

SICConfMessage

static get_inputs()[source]

Define the input types the component needs as a list.

Must be implemented by the subclass.

Returns:

list of SIC messages

Return type:

List[Type[SICMessage]]

static get_output()[source]

Define the output type of the component.

Must be implemented by the subclass.

Returns:

SIC message

Return type:

Type[SICMessage]

execute(request)[source]

Log the look-at request instead of executing it.

on_message(message)[source]

Log incoming messages.

stop()[source]

Stop the LookAt actuator.

class sic_framework.devices.common_nao_stub.nao_stub_tracker.NaoStubTracker(ip='localhost', conf=None, input_source=None)[source]

Bases: SICConnector

component_class

alias of NaoStubTrackerActuator

class sic_framework.devices.common_nao_stub.nao_stub_tracker.NaoStubLookAt(ip='localhost', conf=None, input_source=None)[source]

Bases: SICConnector

component_class

alias of NaoStubLookAtActuator

Text-to-Speech

NAO stub text-to-speech component.

class sic_framework.devices.common_nao_stub.nao_stub_tts.NaoStubTTSActuator(ready_event=None, stop_event=None, conf=None, input_channel=None, component_channel=None, req_reply_channel=None, client_id='', endpoint='', ip='', redis=None)[source]

Bases: SICActuator

Stub for NAO TTS - logs what would be said instead of actually speaking.

static get_conf()[source]

Define the expected configuration of the component using SICConfMessage.

Returns:

a SICConfMessage or None

Return type:

SICConfMessage

static get_inputs()[source]

Define the input types the component needs as a list.

Must be implemented by the subclass.

Returns:

list of SIC messages

Return type:

List[Type[SICMessage]]

static get_output()[source]

Define the output type of the component.

Must be implemented by the subclass.

Returns:

SIC message

Return type:

Type[SICMessage]

execute(request)[source]

Log what would be spoken.

on_message(message)[source]

Handle incoming text messages.

stop()[source]

Stop the TTS actuator.

class sic_framework.devices.common_nao_stub.nao_stub_tts.NaoStubTTS(ip='localhost', conf=None, input_source=None)[source]

Bases: SICConnector

component_class

alias of NaoStubTTSActuator