welcome: please sign in
location: wiki / pyrobots / actions

Documentation of pyRobots actions and helpers

Automatically generated from pyRobots source on February 27, 2014

Contents

  1. Documentation of pyRobots actions and helpers
    1. Actions
      1. Category administration
        1. Action configure_grippers
        2. Action display
        3. Action init
        4. Action lock_object
        5. Action settorso
        6. Action setup_scenario
        7. Action unlock_object
        8. Action wait
      2. Category configuration
        1. Action disabledevileye
        2. Action enabledevileye
        3. Action extractpose
        4. Action idle
        5. Action manipose
        6. Action movearm
        7. Action pointsat
        8. Action rest
        9. Action restpose
        10. Action setpose
        11. Action settorso
        12. Action tuckedpose
      3. Category manipulation
        1. Action amit_give
        2. Action attachobject
        3. Action basicgive
        4. Action basictake
        5. Action close_gripper
        6. Action configure_grippers
        7. Action grab_gripper
        8. Action handover
        9. Action hide
        10. Action open_gripper
        11. Action pick
        12. Action put
        13. Action put_accessible
        14. Action release_gripper
        15. Action show
        16. Action take
      4. Category games
        1. Action alternative_handsup_folded
        2. Action arms_against_torso
        3. Action basket
        4. Action gym
        5. Action handsup
        6. Action handsup_folded
        7. Action larm_swinging
        8. Action move_head
        9. Action rarm_swinging
        10. Action slow_arms_swinging
        11. Action speed_arms_swinging
        12. Action wait
      5. Category nav
        1. Action cancel_follow
        2. Action carry
        3. Action follow
        4. Action goto
        5. Action moveclose
        6. Action waypoints
      6. Category look_at
        1. Action cancel_track
        2. Action glance_to
        3. Action look_at
        4. Action look_at_ros
        5. Action look_at_xyz_with_moveHead
        6. Action lookat
        7. Action setpose
        8. Action sweep
        9. Action switch_active_stereo_pair
        10. Action track
      7. Category primitive_nav
        1. Action dock
        2. Action rotate
        3. Action setpose
        4. Action translate
    2. Helpers
      1. Category position
        1. Helper distance
        2. Helper human
        3. Helper inframe
        4. Helper myself
      2. Category geometric_planning
        1. Helper handover
        2. Helper manipulation
      3. Category state
        1. Helper distance2obstacle
        2. Helper fingerpressed
        3. Helper getjoint
        4. Helper getpose
        5. Helper hasinhand
        6. Helper isseen
        7. Helper distance2obstacle
        8. Helper fingerpressed
        9. Helper getjoint
        10. Helper getpose
        11. Helper isseen
        12. Helper distance2obstacle
        13. Helper fingerpressed
        14. Helper getjoint
        15. Helper getpose
        16. Helper isseen

Actions

Category administration

Action configure_grippers

{i} Action <configure_grippers> does not specify platform requirements

Parameters

Example:

   1 import robots
   2 pr2 = robots.PR2() # Pass 'dummy=True' to test without the real robot
   3 
   4 grab_acc = GRAB_ACC # define here a grab_acc
   5 grab_slip = GRAB_SLIP # define here a grab_slip
   6 release_acc = RELEASE_ACC # define here a release_acc
   7 release_slip = RELEASE_SLIP # define here a release_slip
   8 force = FORCE # define here a force
   9 pr2.configure_grippers(grab_acc, grab_slip, release_acc, release_slip, force)

Action display

{i} Action <display> does not specify platform requirements

Parameters

Example:

   1 import robots
   2 pr2 = robots.PR2() # Pass 'dummy=True' to test without the real robot
   3 
   4 window = WINDOW # define here a window
   5 host = HOST # define here a host
   6 pr2.display(window, host)

Action init

{i} Action <init> does not specify platform requirements

Example:

   1 import robots
   2 pr2 = robots.PR2() # Pass 'dummy=True' to test without the real robot
   3 
   4 pr2.init()

Action lock_object

{i} Action <lock_object> does not specify platform requirements

Parameters

Example:

   1 import robots
   2 pr2 = robots.PR2() # Pass 'dummy=True' to test without the real robot
   3 
   4 object = OBJECT # an object ID, as spelled by SPARK/Viman
   5 pr2.lock_object(object)

Action settorso

{i} Action <settorso> does not specify platform requirements

Parameters

Example:

   1 import robots
   2 pr2 = robots.PR2() # Pass 'dummy=True' to test without the real robot
   3 
   4 height = HEIGHT # define here a height
   5 callback = CALLBACK # a function (or functor) to call when the action is done
   6 pr2.settorso(height, callback)

Action setup_scenario

{i} Action <setup_scenario> does not specify platform requirements

Parameters

Example:

   1 import robots
   2 pr2 = robots.PR2() # Pass 'dummy=True' to test without the real robot
   3 
   4 scenario = SCENARIO # define here a scenario
   5 pr2.setup_scenario(scenario)

Action unlock_object

{i} Action <unlock_object> does not specify platform requirements

Parameters

Example:

   1 import robots
   2 pr2 = robots.PR2() # Pass 'dummy=True' to test without the real robot
   3 
   4 object = OBJECT # an object ID, as spelled by SPARK/Viman
   5 pr2.unlock_object(object)

Action wait

{i} Action <wait> does not specify platform requirements

Parameters

Example:

   1 import robots
   2 pr2 = robots.PR2() # Pass 'dummy=True' to test without the real robot
   3 
   4 seconds = SECONDS # define here a seconds
   5 pr2.wait(seconds)

Category configuration

Action disabledevileye

{i} Action <disabledevileye> requires ROS].

Example:

   1 import robots
   2 pr2 = robots.PR2() # Pass 'dummy=True' to test without the real robot
   3 
   4 pr2.disabledevileye()

Action enabledevileye

{i} Action <enabledevileye> requires ROS].

Example:

   1 import robots
   2 pr2 = robots.PR2() # Pass 'dummy=True' to test without the real robot
   3 
   4 pr2.enabledevileye()

Action extractpose

{i} Action <extractpose> does not specify platform requirements

Parameters

Example:

   1 import robots
   2 pr2 = robots.PR2() # Pass 'dummy=True' to test without the real robot
   3 
   4 callback = CALLBACK # a function (or functor) to call when the action is done
   5 pr2.extractpose(callback)

Action idle

/!\ Action currently broken!

{i} Action <idle> does not specify platform requirements

Parameters

Example:

   1 import robots
   2 pr2 = robots.PR2() # Pass 'dummy=True' to test without the real robot
   3 
   4 choice = CHOICE # define here a choice
   5 callback = CALLBACK # a function (or functor) to call when the action is done
   6 pr2.idle(choice, callback)

Action manipose

{i} Action <manipose> requires either [NaoQI] or [Pocolibs (with mhp, pr2SoftMotion)] or [Pocolibs (with mhp, lwr)].

Parameters

Example:

   1 import robots
   2 nao = robots.Nao() # Pass 'dummy=True' to test without the real robot
   3 
   4 no_head = NO_HEAD # define here a no_head
   5 callback = CALLBACK # a function (or functor) to call when the action is done
   6 nao.manipose(no_head, callback)

Action movearm

{i} Action <movearm> requires either [NaoQI] or [ROS].

Parameters

Example:

   1 import robots
   2 nao = robots.Nao() # Pass 'dummy=True' to test without the real robot
   3 
   4 target = TARGET # a final position ([x,y,z], [x,y,z,qx,qy,qz,qw], a SPARK object or a ROS frame)
   5 nao.movearm(target)

Action pointsat

{i} Action <pointsat> requires either [NaoQI] or [ROS].

Example:

   1 import robots
   2 nao = robots.Nao() # Pass 'dummy=True' to test without the real robot
   3 
   4 nao.pointsat()

Action rest

{i} Action <rest> requires either [NaoQI] or [Pocolibs (with mhp, pr2SoftMotion)] or [Pocolibs (with mhp, lwr)].

Parameters

Example:

   1 import robots
   2 nao = robots.Nao() # Pass 'dummy=True' to test without the real robot
   3 
   4 no_head = NO_HEAD # define here a no_head
   5 callback = CALLBACK # a function (or functor) to call when the action is done
   6 nao.rest(no_head, callback)

Action restpose

{i} Action <restpose> requires either [NaoQI] or [Pocolibs (with mhp, pr2SoftMotion)] or [Pocolibs (with mhp, lwr)].

Example:

   1 import robots
   2 nao = robots.Nao() # Pass 'dummy=True' to test without the real robot
   3 
   4 nao.restpose()

Action setpose

{i} Action <setpose> requires either [NaoQI] or [Pocolibs (with mhp, pr2SoftMotion)] or [Pocolibs (with mhp, lwr)].

Parameters

Example:

   1 import robots
   2 nao = robots.Nao() # Pass 'dummy=True' to test without the real robot
   3 
   4 posture = POSTURE # define here a posture
   5 part = PART # define here a part
   6 collision_avoidance = COLLISION_AVOIDANCE # define here a collision_avoidance
   7 relative = RELATIVE # define here a relative
   8 obj = OBJ # define here a obj
   9 support = SUPPORT # define here a support
  10 callback = CALLBACK # a function (or functor) to call when the action is done
  11 nao.setpose(posture, part, collision_avoidance, relative, obj, support, callback)

Action settorso

{i} Action <settorso> does not specify platform requirements

Parameters

Example:

   1 import robots
   2 pr2 = robots.PR2() # Pass 'dummy=True' to test without the real robot
   3 
   4 height = HEIGHT # define here a height
   5 callback = CALLBACK # a function (or functor) to call when the action is done
   6 pr2.settorso(height, callback)

Action tuckedpose

{i} Action <tuckedpose> does not specify platform requirements

Parameters

Example:

   1 import robots
   2 pr2 = robots.PR2() # Pass 'dummy=True' to test without the real robot
   3 
   4 callback = CALLBACK # a function (or functor) to call when the action is done
   5 no_head = NO_HEAD # define here a no_head
   6 pr2.tuckedpose(callback, no_head)

Category manipulation

Action amit_give

{i} Action <amit_give> does not specify platform requirements

Example:

   1 import robots
   2 pr2 = robots.PR2() # Pass 'dummy=True' to test without the real robot
   3 
   4 pr2.amit_give()

Action attachobject

{i} Action <attachobject> does not specify platform requirements

Parameters

Example:

   1 import robots
   2 pr2 = robots.PR2() # Pass 'dummy=True' to test without the real robot
   3 
   4 obj = OBJ # define here a obj
   5 attach = ATTACH # define here a attach
   6 pr2.attachobject(obj, attach)

Action basicgive

{i} Action <basicgive> does not specify platform requirements

Example:

   1 import robots
   2 pr2 = robots.PR2() # Pass 'dummy=True' to test without the real robot
   3 
   4 pr2.basicgive()

Action basictake

{i} Action <basictake> requires either [NaoQI] or [Pocolibs (with pr2SoftMotion)].

Example:

   1 import robots
   2 nao = robots.Nao() # Pass 'dummy=True' to test without the real robot
   3 
   4 nao.basictake()

Action close_gripper

{i} Action <close_gripper> requires either [NaoQI] or [Pocolibs (with pr2SoftMotion)].

Parameters

Example:

   1 import robots
   2 nao = robots.Nao() # Pass 'dummy=True' to test without the real robot
   3 
   4 gripper = GRIPPER # define here a gripper
   5 callback = CALLBACK # a function (or functor) to call when the action is done
   6 nao.close_gripper(gripper, callback)

Action configure_grippers

{i} Action <configure_grippers> does not specify platform requirements

Parameters

Example:

   1 import robots
   2 pr2 = robots.PR2() # Pass 'dummy=True' to test without the real robot
   3 
   4 grab_acc = GRAB_ACC # define here a grab_acc
   5 grab_slip = GRAB_SLIP # define here a grab_slip
   6 release_acc = RELEASE_ACC # define here a release_acc
   7 release_slip = RELEASE_SLIP # define here a release_slip
   8 force = FORCE # define here a force
   9 pr2.configure_grippers(grab_acc, grab_slip, release_acc, release_slip, force)

Action grab_gripper

{i} Action <grab_gripper> requires either [NaoQI] or [Pocolibs (with pr2SoftMotion)].

Parameters

Example:

   1 import robots
   2 nao = robots.Nao() # Pass 'dummy=True' to test without the real robot
   3 
   4 gripper = GRIPPER # define here a gripper
   5 nao.grab_gripper(gripper)

Action handover

{i} Action <handover> does not specify platform requirements

Parameters

Example:

   1 import robots
   2 pr2 = robots.PR2() # Pass 'dummy=True' to test without the real robot
   3 
   4 human = HUMAN # define here a human
   5 mobility = MOBILITY # define here a mobility
   6 feedback = FEEDBACK # define here a feedback
   7 pr2.handover(human, mobility, feedback)

Action hide

/!\ Action currently broken!

{i} Action <hide> does not specify platform requirements

Example:

   1 import robots
   2 pr2 = robots.PR2() # Pass 'dummy=True' to test without the real robot
   3 
   4 pr2.hide()

Action open_gripper

{i} Action <open_gripper> requires either [NaoQI] or [Pocolibs (with pr2SoftMotion)].

Parameters

Example:

   1 import robots
   2 nao = robots.Nao() # Pass 'dummy=True' to test without the real robot
   3 
   4 gripper = GRIPPER # define here a gripper
   5 callback = CALLBACK # a function (or functor) to call when the action is done
   6 nao.open_gripper(gripper, callback)

Action pick

{i} Action <pick> does not specify platform requirements

Parameters

Example:

   1 import robots
   2 pr2 = robots.PR2() # Pass 'dummy=True' to test without the real robot
   3 
   4 object = OBJECT # an object ID, as spelled by SPARK/Viman
   5 pr2.pick(object)

Action put

{i} Action <put> does not specify platform requirements

Parameters

Example:

   1 import robots
   2 pr2 = robots.PR2() # Pass 'dummy=True' to test without the real robot
   3 
   4 object = OBJECT # an object ID, as spelled by SPARK/Viman
   5 support = SUPPORT # define here a support
   6 pr2.put(object, support)

Action put_accessible

{i} Action <put_accessible> does not specify platform requirements

Example:

   1 import robots
   2 pr2 = robots.PR2() # Pass 'dummy=True' to test without the real robot
   3 
   4 pr2.put_accessible()

Action release_gripper

{i} Action <release_gripper> requires either [NaoQI] or [Pocolibs (with pr2SoftMotion)].

Parameters

Example:

   1 import robots
   2 nao = robots.Nao() # Pass 'dummy=True' to test without the real robot
   3 
   4 gripper = GRIPPER # define here a gripper
   5 nao.release_gripper(gripper)

Action show

{i} Action <show> does not specify platform requirements

Example:

   1 import robots
   2 pr2 = robots.PR2() # Pass 'dummy=True' to test without the real robot
   3 
   4 pr2.show()

Action take

{i} Action <take> does not specify platform requirements

Example:

   1 import robots
   2 pr2 = robots.PR2() # Pass 'dummy=True' to test without the real robot
   3 
   4 pr2.take()

Category games

Action alternative_handsup_folded

{i} Action <alternative_handsup_folded> does not specify platform requirements

Example:

   1 import robots
   2 pr2 = robots.PR2() # Pass 'dummy=True' to test without the real robot
   3 
   4 pr2.alternative_handsup_folded()

Action arms_against_torso

{i} Action <arms_against_torso> does not specify platform requirements

Example:

   1 import robots
   2 pr2 = robots.PR2() # Pass 'dummy=True' to test without the real robot
   3 
   4 pr2.arms_against_torso()

Action basket

{i} Action <basket> does not specify platform requirements

Example:

   1 import robots
   2 pr2 = robots.PR2() # Pass 'dummy=True' to test without the real robot
   3 
   4 pr2.basket()

Action gym

{i} Action <gym> does not specify platform requirements

Example:

   1 import robots
   2 pr2 = robots.PR2() # Pass 'dummy=True' to test without the real robot
   3 
   4 pr2.gym()

Action handsup

{i} Action <handsup> does not specify platform requirements

Example:

   1 import robots
   2 pr2 = robots.PR2() # Pass 'dummy=True' to test without the real robot
   3 
   4 pr2.handsup()

Action handsup_folded

{i} Action <handsup_folded> does not specify platform requirements

Example:

   1 import robots
   2 pr2 = robots.PR2() # Pass 'dummy=True' to test without the real robot
   3 
   4 pr2.handsup_folded()

Action larm_swinging

{i} Action <larm_swinging> does not specify platform requirements

Example:

   1 import robots
   2 pr2 = robots.PR2() # Pass 'dummy=True' to test without the real robot
   3 
   4 pr2.larm_swinging()

Action move_head

{i} Action <move_head> does not specify platform requirements

Example:

   1 import robots
   2 pr2 = robots.PR2() # Pass 'dummy=True' to test without the real robot
   3 
   4 pr2.move_head()

Action rarm_swinging

{i} Action <rarm_swinging> does not specify platform requirements

Example:

   1 import robots
   2 pr2 = robots.PR2() # Pass 'dummy=True' to test without the real robot
   3 
   4 pr2.rarm_swinging()

Action slow_arms_swinging

{i} Action <slow_arms_swinging> does not specify platform requirements

Example:

   1 import robots
   2 pr2 = robots.PR2() # Pass 'dummy=True' to test without the real robot
   3 
   4 pr2.slow_arms_swinging()

Action speed_arms_swinging

{i} Action <speed_arms_swinging> does not specify platform requirements

Example:

   1 import robots
   2 pr2 = robots.PR2() # Pass 'dummy=True' to test without the real robot
   3 
   4 pr2.speed_arms_swinging()

Action wait

{i} Action <wait> does not specify platform requirements

Parameters

Example:

   1 import robots
   2 pr2 = robots.PR2() # Pass 'dummy=True' to test without the real robot
   3 
   4 seconds = SECONDS # define here a seconds
   5 pr2.wait(seconds)

Category nav

Action cancel_follow

{i} Action <cancel_follow> does not specify platform requirements

Example:

   1 import robots
   2 pr2 = robots.PR2() # Pass 'dummy=True' to test without the real robot
   3 
   4 pr2.cancel_follow()

Action carry

{i} Action <carry> does not specify platform requirements

Parameters

Example:

   1 import robots
   2 pr2 = robots.PR2() # Pass 'dummy=True' to test without the real robot
   3 
   4 target = TARGET # a final position ([x,y,z], [x,y,z,qx,qy,qz,qw], a SPARK object or a ROS frame)
   5 callback = CALLBACK # a function (or functor) to call when the action is done
   6 pr2.carry(target, callback)

Action follow

{i} Action <follow> does not specify platform requirements

Parameters

Example:

   1 import robots
   2 pr2 = robots.PR2() # Pass 'dummy=True' to test without the real robot
   3 
   4 target = TARGET # a final position ([x,y,z], [x,y,z,qx,qy,qz,qw], a SPARK object or a ROS frame)
   5 pr2.follow(target)

Action goto

{i} Action <goto> does not specify platform requirements

Parameters

Example:

   1 import robots
   2 pr2 = robots.PR2() # Pass 'dummy=True' to test without the real robot
   3 
   4 target = TARGET # a final position ([x,y,z], [x,y,z,qx,qy,qz,qw], a SPARK object or a ROS frame)
   5 callback = CALLBACK # a function (or functor) to call when the action is done
   6 feedback = FEEDBACK # define here a feedback
   7 pr2.goto(target, callback, feedback)

Action moveclose

{i} Action <moveclose> does not specify platform requirements

Parameters

Example:

   1 import robots
   2 pr2 = robots.PR2() # Pass 'dummy=True' to test without the real robot
   3 
   4 target = TARGET # a final position ([x,y,z], [x,y,z,qx,qy,qz,qw], a SPARK object or a ROS frame)
   5 distance = DISTANCE # define here a distance
   6 callback = CALLBACK # a function (or functor) to call when the action is done
   7 feedback = FEEDBACK # define here a feedback
   8 pr2.moveclose(target, distance, callback, feedback)

Action waypoints

{i} Action <waypoints> does not specify platform requirements

Parameters

Example:

   1 import robots
   2 pr2 = robots.PR2() # Pass 'dummy=True' to test without the real robot
   3 
   4 waypoints = WAYPOINTS # a list of positions ([x,y,z], [x,y,z,qx,qy,qz,qw], a SPARK object or a ROS frame)
   5 callback = CALLBACK # a function (or functor) to call when the action is done
   6 feedback = FEEDBACK # define here a feedback
   7 pr2.waypoints(waypoints, callback, feedback)

Category look_at

Action cancel_track

{i} Action <cancel_track> requires either [NaoQI] or [Pocolibs (with platine)] or [Pocolibs (with pr2SoftMotion)].

Example:

   1 import robots
   2 nao = robots.Nao() # Pass 'dummy=True' to test without the real robot
   3 
   4 nao.cancel_track()

Action glance_to

{i} Action <glance_to> requires either [NaoQI] or [Pocolibs (with platine)] or [Pocolibs (with pr2SoftMotion)].

Example:

   1 import robots
   2 nao = robots.Nao() # Pass 'dummy=True' to test without the real robot
   3 
   4 nao.glance_to()

Action look_at

{i} Action <look_at> requires either [NaoQI] or [Pocolibs (with platine)] or [Pocolibs (with pr2SoftMotion)].

Example:

   1 import robots
   2 nao = robots.Nao() # Pass 'dummy=True' to test without the real robot
   3 
   4 nao.look_at()

Action look_at_ros

/!\ Action currently broken!

{i} Action <look_at_ros> requires ROS (with /head_traj_controller/point_head_action)].

Parameters

Example:

   1 import robots
   2 pr2 = robots.PR2() # Pass 'dummy=True' to test without the real robot
   3 
   4 place = PLACE # a position ([x,y,z], [x,y,z,qx,qy,qz,qw], a SPARK object or a ROS frame)
   5 pr2.look_at_ros(place)

Action look_at_xyz_with_moveHead

{i} Action <look_at_xyz_with_moveHead> does not specify platform requirements

Parameters

Example:

   1 import robots
   2 pr2 = robots.PR2() # Pass 'dummy=True' to test without the real robot
   3 
   4 x = X # define here a x
   5 y = Y # define here a y
   6 z = Z # define here a z
   7 frame = FRAME # define here a frame
   8 pr2.look_at_xyz_with_moveHead(x, y, z, frame)

Action lookat

{i} Action <lookat> requires either [NaoQI] or [Pocolibs (with platine)] or [Pocolibs (with pr2SoftMotion)].

Parameters

Example:

   1 import robots
   2 nao = robots.Nao() # Pass 'dummy=True' to test without the real robot
   3 
   4 place = PLACE # a position ([x,y,z], [x,y,z,qx,qy,qz,qw], a SPARK object or a ROS frame)
   5 nao.lookat(place)

Action setpose

{i} Action <setpose> requires either [NaoQI] or [Pocolibs (with mhp, pr2SoftMotion)] or [Pocolibs (with mhp, lwr)].

Parameters

Example:

   1 import robots
   2 nao = robots.Nao() # Pass 'dummy=True' to test without the real robot
   3 
   4 posture = POSTURE # define here a posture
   5 part = PART # define here a part
   6 collision_avoidance = COLLISION_AVOIDANCE # define here a collision_avoidance
   7 relative = RELATIVE # define here a relative
   8 obj = OBJ # define here a obj
   9 support = SUPPORT # define here a support
  10 callback = CALLBACK # a function (or functor) to call when the action is done
  11 nao.setpose(posture, part, collision_avoidance, relative, obj, support, callback)

Action sweep

{i} Action <sweep> requires either [NaoQI] or [Pocolibs (with platine)] or [Pocolibs (with pr2SoftMotion)].

Parameters

Example:

   1 import robots
   2 nao = robots.Nao() # Pass 'dummy=True' to test without the real robot
   3 
   4 amplitude = AMPLITUDE # define here a amplitude
   5 speed = SPEED # define here a speed
   6 nao.sweep(amplitude, speed)

Action switch_active_stereo_pair

{i} Action <switch_active_stereo_pair> requires ROS].

Example:

   1 import robots
   2 pr2 = robots.PR2() # Pass 'dummy=True' to test without the real robot
   3 
   4 pr2.switch_active_stereo_pair()

Action track

{i} Action <track> requires either [NaoQI] or [Pocolibs (with platine)] or [Pocolibs (with pr2SoftMotion)].

Parameters

Example:

   1 import robots
   2 nao = robots.Nao() # Pass 'dummy=True' to test without the real robot
   3 
   4 target = TARGET # a final position ([x,y,z], [x,y,z,qx,qy,qz,qw], a SPARK object or a ROS frame)
   5 nao.track(target)

Category primitive_nav

Action dock

{i} Action <dock> does not specify platform requirements

Example:

   1 import robots
   2 pr2 = robots.PR2() # Pass 'dummy=True' to test without the real robot
   3 
   4 pr2.dock()

Action rotate

/!\ Action currently broken!

{i} Action <rotate> does not specify platform requirements

Get the robot to turn on itself of the given angle

Parameters

Example:

   1 import robots
   2 pr2 = robots.PR2() # Pass 'dummy=True' to test without the real robot
   3 
   4 theta = THETA # define here a theta
   5 pr2.rotate(theta)

Action setpose

{i} Action <setpose> requires either [NaoQI] or [Pocolibs (with mhp, pr2SoftMotion)] or [Pocolibs (with mhp, lwr)].

Parameters

Example:

   1 import robots
   2 nao = robots.Nao() # Pass 'dummy=True' to test without the real robot
   3 
   4 posture = POSTURE # define here a posture
   5 part = PART # define here a part
   6 collision_avoidance = COLLISION_AVOIDANCE # define here a collision_avoidance
   7 relative = RELATIVE # define here a relative
   8 obj = OBJ # define here a obj
   9 support = SUPPORT # define here a support
  10 callback = CALLBACK # a function (or functor) to call when the action is done
  11 nao.setpose(posture, part, collision_avoidance, relative, obj, support, callback)

Action translate

{i} Action <translate> does not specify platform requirements

Move the robot base in XY, relatively to its current position.

Parameters

Example:

   1 import robots
   2 pr2 = robots.PR2() # Pass 'dummy=True' to test without the real robot
   3 
   4 x = X # define here a x
   5 y = Y # define here a y
   6 speed = SPEED # define here a speed
   7 pr2.translate(x, y, speed)

Helpers

Category position

Helper distance

Helper not tested!

Example:

   1 import robots
   2 nao = robots.Nao() # Pass 'dummy=True' to test without the real robot
   3 
   4 nao.poses.distance()

Helper human

Helper not tested!

Example:

   1 import robots
   2 nao = robots.Nao() # Pass 'dummy=True' to test without the real robot
   3 
   4 nao.poses.human()

Helper inframe

Helper not tested!

Example:

   1 import robots
   2 nao = robots.Nao() # Pass 'dummy=True' to test without the real robot
   3 
   4 nao.poses.inframe()

Helper myself

Helper not tested!

Example:

   1 import robots
   2 nao = robots.Nao() # Pass 'dummy=True' to test without the real robot
   3 
   4 nao.poses.myself()

Category geometric_planning

Helper handover

Helper tested on the 14/06/2012

Parameters

Return value

Example:

   1 import robots
   2 nao = robots.Nao() # Pass 'dummy=True' to test without the real robot
   3 
   4 human = HUMAN # define here a human
   5 standing = STANDING # define here a standing
   6 mobility = MOBILITY # define here a mobility
   7 nao.handover(human, standing, mobility)

Helper manipulation

Helper not tested!

Parameters

Example:

   1 import robots
   2 nao = robots.Nao() # Pass 'dummy=True' to test without the real robot
   3 
   4 action = ACTION # define here a action
   5 obj = OBJ # define here a obj
   6 receiver = RECEIVER # define here a receiver
   7 performer = PERFORMER # define here a performer
   8 pick_first = PICK_FIRST # define here a pick_first
   9 timeout = TIMEOUT # define here a timeout
  10 adapt_candidate_search_space_with_object = ADAPT_CANDIDATE_SEARCH_SPACE_WITH_OBJECT # define here a adapt_candidate_search_space_with_object
  11 nao.manipulation(action, obj, receiver, performer, pick_first, timeout, adapt_candidate_search_space_with_object)

Category state

Helper distance2obstacle

Helper not tested!

Example:

   1 import robots
   2 nao = robots.Nao() # Pass 'dummy=True' to test without the real robot
   3 
   4 nao.state.distance2obstacle()

Helper fingerpressed

Helper not tested!

Parameters

Example:

   1 import robots
   2 nao = robots.Nao() # Pass 'dummy=True' to test without the real robot
   3 
   4 gripper = GRIPPER # define here a gripper
   5 nao.fingerpressed(gripper)

Helper getjoint

Helper not tested!

Example:

   1 import robots
   2 nao = robots.Nao() # Pass 'dummy=True' to test without the real robot
   3 
   4 nao.state.getjoint()

Helper getpose

Helper not tested!

Returns to current whole-body joint state of the robot.

Example:

   1 import robots
   2 nao = robots.Nao() # Pass 'dummy=True' to test without the real robot
   3 
   4 nao.state.getpose()

Helper hasinhand

Helper not tested!

Example:

   1 import robots
   2 nao = robots.Nao() # Pass 'dummy=True' to test without the real robot
   3 
   4 nao.state.hasinhand()

Helper isseen

Helper not tested!

Parameters

Example:

   1 import robots
   2 nao = robots.Nao() # Pass 'dummy=True' to test without the real robot
   3 
   4 object = OBJECT # an object ID, as spelled by SPARK/Viman
   5 nao.isseen(object)

Helper distance2obstacle

Helper not tested!

Example:

   1 import robots
   2 nao = robots.Nao() # Pass 'dummy=True' to test without the real robot
   3 
   4 nao.state.distance2obstacle()

Helper fingerpressed

Helper not tested!

Example:

   1 import robots
   2 nao = robots.Nao() # Pass 'dummy=True' to test without the real robot
   3 
   4 nao.state.fingerpressed()

Helper getjoint

Helper not tested!

Example:

   1 import robots
   2 nao = robots.Nao() # Pass 'dummy=True' to test without the real robot
   3 
   4 nao.state.getjoint()

Helper getpose

Helper not tested!

Example:

   1 import robots
   2 nao = robots.Nao() # Pass 'dummy=True' to test without the real robot
   3 
   4 nao.state.getpose()

Helper isseen

Helper not tested!

Parameters

Example:

   1 import robots
   2 nao = robots.Nao() # Pass 'dummy=True' to test without the real robot
   3 
   4 object = OBJECT # an object ID, as spelled by SPARK/Viman
   5 nao.isseen(object)

Helper distance2obstacle

Helper not tested!

Example:

   1 import robots
   2 nao = robots.Nao() # Pass 'dummy=True' to test without the real robot
   3 
   4 nao.state.distance2obstacle()

Helper fingerpressed

Helper not tested!

Parameters

Example:

   1 import robots
   2 nao = robots.Nao() # Pass 'dummy=True' to test without the real robot
   3 
   4 gripper = GRIPPER # define here a gripper
   5 nao.fingerpressed(gripper)

Helper getjoint

Helper not tested!

Example:

   1 import robots
   2 nao = robots.Nao() # Pass 'dummy=True' to test without the real robot
   3 
   4 nao.state.getjoint()

Helper getpose

Helper not tested!

Example:

   1 import robots
   2 nao = robots.Nao() # Pass 'dummy=True' to test without the real robot
   3 
   4 nao.state.getpose()

Helper isseen

Helper not tested!

Parameters

Example:

   1 import robots
   2 nao = robots.Nao() # Pass 'dummy=True' to test without the real robot
   3 
   4 object = OBJECT # an object ID, as spelled by SPARK/Viman
   5 nao.isseen(object)

OpenrobotsWiki: wiki/pyrobots/actions (last edited 2014-02-27 10:18:17 by slemaign)