pyicub package
Subpackages
- pyicub.controllers package
- Submodules
- pyicub.controllers.gaze module
GazeControllerPolyDriver
GazeController
GazeController.__logger__
GazeController.__driver__
GazeController.__mot_id__
GazeController.__IGazeControl__
GazeController.isValid()
GazeController.init()
GazeController.PolyDriver
GazeController.IGazeControl
GazeController.blockEyes()
GazeController.blockNeck()
GazeController.clearEyes()
GazeController.clearNeck()
GazeController.lookAtAbsAngles()
GazeController.lookAtRelAngles()
GazeController.lookAtFixationPoint()
GazeController.reset()
GazeController.setParams()
GazeController.setTrackingMode()
GazeController.waitMotionDone()
GazeController.waitMotionOnset()
- pyicub.controllers.position module
ICUB_PARTS
iCubPart
JointPose
RemoteControlboard
PositionController
PositionController.WAITMOTIONDONE_PERIOD
PositionController.MOTION_COMPLETE_AT
PositionController.isValid()
PositionController.init()
PositionController.PolyDriver
PositionController.getIPositionControl()
PositionController.getIEncoders()
PositionController.getIControlLimits()
PositionController.isMoving()
PositionController.stop()
PositionController.move()
PositionController.setPositionControlMode()
PositionController.setCustomWaitMotionDone()
PositionController.unsetCustomWaitMotionDone()
PositionController.waitMotionDone()
PositionController.waitMotionDone2()
PositionController.waitMotionDone3()
PositionController.waitMotionDone4()
- Module contents
- pyicub.core package
- pyicub.modules package
- Submodules
- pyicub.modules.camera module
- pyicub.modules.emotions module
emotionsPyCtrl
emotionsPyCtrl.smile()
emotionsPyCtrl.eb_smile()
emotionsPyCtrl.eb_surprised()
emotionsPyCtrl.surprised()
emotionsPyCtrl.neutral()
emotionsPyCtrl.sad()
emotionsPyCtrl.openingEyes()
emotionsPyCtrl.closingEyes()
emotionsPyCtrl.cun()
emotionsPyCtrl.angry()
emotionsPyCtrl.evil()
emotionsPyCtrl.sendCmd()
emotionsPyCtrl.setColor()
emotionsPyCtrl.setBrightness()
- pyicub.modules.face module
- pyicub.modules.faceLandmarks module
- pyicub.modules.speech module
- Module contents
Submodules
pyicub.actions module
- class pyicub.actions.JointsTrajectoryCheckpoint(pose: JointPose, duration: float = 0.0, timeout: float = 30.0, joints_speed=[])
Bases:
object
- toJSON()
- class pyicub.actions.LimbMotion(part: iCubPart)
Bases:
object
- createJointsTrajectory(pose: JointPose, duration: float = 0.0, timeout: float = 30.0, joints_speed=[])
- toJSON()
- class pyicub.actions.GazeMotion(lookat_method: str)
Bases:
object
- addCheckpoint(value: list)
- toJSON()
- class pyicub.actions.iCubFullbodyStep(offset_ms=None, name=None, JSON_dict=None, JSON_file=None)
Bases:
object
- prepare()
- createCustomCall(target, args=())
- createGazeMotion(lookat_method: str)
- createPart(name, robot_part, joints_nr, joints_list, joints_speed)
- exportJSONFile(filepath)
- importFromJSONDict(json_dict)
- importFromJSONFile(JSON_file)
- join(step)
- setLimbMotion(limb_motion: LimbMotion)
- setCustomCall(custom_call: PyiCubCustomCall)
- setGazeMotion(gaze_motion: GazeMotion)
- toJSON()
- class pyicub.actions.iCubFullbodyAction(description='empty', name=None, offset_ms=None, JSON_dict=None, JSON_file=None)
Bases:
object
- prepare()
- addAction(action)
- addStep(step: iCubFullbodyStep, wait_for_completed: bool = True)
- importFromJSONDict(json_dict)
- importFromJSONFile(JSON_file)
- exportJSONFile(filepath)
- setName(name)
- setDescription(description)
- setOffset(offset_ms)
- toJSON()
- class pyicub.actions.TemplateParameter(name: str, value: object)
Bases:
object
- value()
- name()
- exportJSONFile(filepath)
- toJSON()
- class pyicub.actions.iCubActionTemplate(name='TemplateAction', description='empty', offset_ms=None)
Bases:
iCubFullbodyAction
- prepare_params()
- createParam(name)
- getActionDict()
- getAction(action_name=None)
- getParams()
- getParam(name)
- setParams(params)
- setParam(name, value)
- class pyicub.actions.iCubActionTemplateImportedJSON(JSON_dict)
Bases:
iCubActionTemplate
- getActionDict()
- prepare_params()
- prepare()
- setParam(JSON_file)
- class pyicub.actions.ActionsManager
Bases:
object
- addAction(action: iCubFullbodyAction, action_id=None)
- importActionsFromModule(module)
- getAction(action_id: str)
- getActions()
- exportActions(path)
- importTemplateFromJSONFile(JSON_file)
- importTemplateFromJSONDict(JSON_dict)
- importTemplateJSONFile(JSON_file)
pyicub.fsm module
- class pyicub.fsm.FSM(name='', JSON_dict=None, JSON_file=None, session_id=0, auto_transitions=False)
Bases:
object
- INIT_STATE = 'init'
- property name
- on_exit_init(*args, **kwargs)
- addState(name, description='', on_enter_callback=None, on_exit_callback=None)
- addTransition(trigger='', source='init', dest='', conditions=None, unless=None, before=None, after=None, prepare=None)
- draw(filepath)
- exportJSONFile(filepath)
- getCurrentState()
- getState(name)
- getStates()
- getTransitions()
- getTriggers()
- getCurrentTriggers()
- getStateTriggers(state_name)
- importFromJSONDict(data)
- importFromJSONFile(filepath)
- runStep(trigger, **kargs)
- setSessionID(session_id)
- getSessionID()
- getSessionCount()
- toJSON()
pyicub.helper module
- class pyicub.helper.iCubSingleton
Bases:
type
- class pyicub.helper.iCub(*args, **kwargs)
Bases:
object
- close()
- property logger
- property gaze
- property face
- property facelandmarks
- property cam_right
- property cam_left
- property request_manager
- property actions_manager
- property emo
- property speech
- property parts
- property robot_name
- addRuntimeModule(name, module)
- addAction(action: iCubFullbodyAction, action_id=None)
- exists()
- portmonitor(yarp_src_port, activate_function, callback)
- execCustomCall(custom_call: PyiCubCustomCall, prefix='', ts_ref=0.0)
- execCustomCalls(calls, prefix='', ts_ref=0.0)
- exportAction(action_id: str, path)
- getAction(action_id)
- getActions()
- importAction(JSON_file)
- importActionFromJSONDict(JSON_dict, name_prefix=None)
- importActionFromJSONFile(JSON_file)
- importActionFromTemplate(template: iCubActionTemplate, action_id=None)
- importTemplate(JSON_file)
- movePart(limb_motion: LimbMotion, prefix='', ts_ref=0.0)
- moveStep(step, prefix='', ts_ref=0.0)
- moveSteps(steps, checkpoints, prefix, offset_ms=0.0)
- playAction(action_id: str, wait_for_completed=True, offset_ms=0.0)
- runAction(action: iCubFullbodyAction, wait_for_completed=True, offset_ms=0.0)
- moveGaze(gaze_motion: GazeMotion, prefix='', ts_ref=0.0)
pyicub.requests module
- class pyicub.requests.iCubRequest(req_id, timeout, target, logger, ts_ref=0.0, tag='')
Bases:
object
- INIT = 'INIT'
- RUNNING = 'RUNNING'
- TIMEOUT = 'TIMEOUT'
- DONE = 'DONE'
- FAILED = 'FAILED'
- TIMEOUT_REQUEST = 120.0
- property creation_time
- property duration
- property end_time
- property exception
- property future_target
- property future_req
- property req_id
- property retval
- property status
- property start_time
- property tag
- property target
- run(*args, **kwargs)
- cancel()
- wait_for_completed()
- info()
- class pyicub.requests.iCubRequestsManager(*args, **kwargs)
Bases:
object
- CSV_COLUMNS = ['req_id', 'target', 'tag', 'status', 'creation_time', 'start_time', 'end_time', 'duration', 'exception', 'retval']
- property pending_futures
- property logger
- create(timeout, target, name='', ts_ref=0.0, prefix='')
- join_requests(requests)
- join_pending_requests(timeout=120.0)
- run_request(req, wait_for_completed, *args, **kwargs)
pyicub.rest module
- class pyicub.rest.GenericType(data)
Bases:
object
- pyicub.rest.custom_serializer(obj: Any) Any
- class pyicub.rest.RESTTopic(name=None, robot_name=None, app_name=None, subscriber_rule=None, json_dict=None)
Bases:
RESTJSON
- class pyicub.rest.iCubRESTService(name=None, robot_name=None, app_name=None, url=None, target=None, signature=None, json_dict=None)
Bases:
RESTJSON
- class pyicub.rest.RESTService(service: iCubRESTService = None, json_dict=None)
Bases:
RESTJSON
- class pyicub.rest.iCubRESTServer(*args, **kwargs)
Bases:
object
- property logger
- header(host, port)
- server_rule(host=None, port=None)
- robot_rule(robot_name, host=None, port=None)
- app_rule(robot_name, app_name, host=None, port=None)
- target_rule(robot_name, app_name, target_name, host=None, port=None)
- run_forever()
- shutdown()
- wrapper_target(robot_name, app_name, target_name)
- process_target_remote(service)
- info()
- get_tree()
- get_robots()
- get_apps(robot_name)
- get_services(robot_name, app_name)
- is_local_register(host, port)
- remote_register()
- remote_unregister()
- register(robot_name, app_name, target_name, target, target_signature, url)
- unregister(robot_name, app_name, target_name, url)
- remote_subscribe()
- remote_unsubscribe()
- remote_notify()
- subscribe(topic_uri, on_enter, on_exit)
- unsubscribe(topic_uri)
- class pyicub.rest.iCubRESTManager(*args, **kwargs)
Bases:
iCubRESTServer
- property request_manager
- property proxy_host
- proxy_rule()
- amiproxy()
- requests()
- processes()
- proc_info(name)
- req_info(req_id)
- single_req_info(robot_name, app_name, target_name, local_id)
- subscribe_topic(robot_name, app_name, target_name, subscriber_rule)
- unsubscribe_topic(robot_name, app_name, target_name, subscriber_rule)
- target_requests(target)
- status_requests(status)
- subscribers()
- pending_requests()
- process_target(service)
- notify_subscriber(subscriber_url, target_rule, req, input_json)
- register_target(robot_name, app_name, target_name, target, target_signature)
- unregister_target(robot_name, app_name, target_name, host, port)
- class pyicub.rest.PyiCubApp(*args, **kwargs)
Bases:
object
- property logger
- property request_manager
- property rest_manager
- pyicub.rest.rest_service(func)
- class pyicub.rest.PyiCubRESTfulServer(*args, **kwargs)
Bases:
PyiCubApp
- custom_rest_services = {}
- configure(input_args)
- property name
- property robot_name
- property fsm
- getServices()
- getArgsTemplate()
- initHelper()
- getArgs()
- setArgs(input_args: dict)
- getArg(name: str)
- setArg(name: str, value: object)
- class pyicub.rest.iCubRESTApp(*args, **kwargs)
Bases:
PyiCubRESTfulServer
- configure(input_args)
- info()
- importActionFromJSONFile(JSON_file)
- importActions(path)
- importActionFromJSONDict(JSON_dict, name_prefix=None)
- playAction(action_id: str, wait_for_completed=True)
- getActions()
- importAction(action: iCubFullbodyAction, name_prefix=None)
- property icub
- class pyicub.rest.iCubRESTSubscriber(*args, **kwargs)
Bases:
PyiCubApp
- subscribe_topic(topic_uri, on_enter=None, on_exit=None)
- run_forever()
- class pyicub.rest.RESTSubscriberFSM(*args, **kwargs)
Bases:
iCubRESTSubscriber
- refresh_targets()
- on_enter_state(fsm_name, session_id, session_count, state_name)
- on_exit_state(fsm_name, session_id, session_count, state_name)
- on_enter_fsm(fsm_name, session_id, session_count)
- on_exit_fsm(fsm_name, session_id, session_count)
- class pyicub.rest.iCubFSM(JSON_dict=None, JSON_file=None)
Bases:
FSM
- property actions
- property icub
- setApp(app: iCubRESTApp)
- addAction(action: iCubFullbodyAction)
- addTemplate(template: iCubActionTemplate, template_params: list)
- importFromJSONDict(data)
- exportJSONFile(filepath)
- class pyicub.rest.PyiCubRESTfulClient(host, port, rule_prefix='pyicub')
Bases:
object
- fsm_runStep(robot_name, app_name, trigger, **kargs)
- get_fsm(robot_name, app_name)
- get_version()
- get_robots()
- get_apps(robot_name)
- get_services(robot_name, app_name)
- get_robot_actions(robot_name)
- play_action(robot_name, action_id, sync=True)
- run_target(robot_name, app_name, target_name, *args, **kwargs)
- run_target_async(robot_name, app_name, target_name, *args, **kwargs)
- get_request_info(req_id)
- is_request_running(req_id)
- wait_until_completed(req_id)
pyicub.utils module
- class pyicub.utils.SingletonMeta
Bases:
type
- pyicub.utils.vector_distance(v, w)
- pyicub.utils.norm(v)
- pyicub.utils.getPublicMethods(obj)
- pyicub.utils.getDecoratedMethods(obj, decorator_name)
- pyicub.utils.getPyiCubInfo()
- pyicub.utils.firstAvailablePort(host, start_port)
- pyicub.utils.importFromJSONFile(JSON_file)
- pyicub.utils.exportJSONFile(filepath, obj)