Motor Control Module that allows the robot to push/draw the object and explore a tool.
Motor Control Module that allows the robot to push/draw the object and explore a tool.
Description
This module aims to control the robot hands in order to properly execute the push and the draw actions of an object within the KARMA experiment to then learn the corresponding affordance.
It also enable the tool exploration.
Libraries
Parameters
–robot robot
- Select the robot to connect to.
–name name
- Select the stem-name of the module used to open up ports. By default name is karmaMotor.
–elbow_set (<height> <weight>)
- To specify how to weigh the task to keep the elbow high.
Ports Accessed
Assume that iCubInterface (with ICartesianControl interface implemented) is running.
Ports Created
- /karmaMotor/rpc receives the information to execute the motor action as a Bottle. It manages the following commands:
- Push: [push] cx cy cz theta radius.
The coordinates (cx,cy,cz) represent in meters the position of the object's centroid to be pushed; theta, given in degrees, and radius, specified in meters, account for the point from which push the object, that is located onto the circle centered in (cx,cy,cz) and contained in the x-y plane.
The reply [ack] is returned as soon as the push is accomplished.
- Draw: [draw] cx cy cz theta radius dist.
The coordinates (cx,cy,cz) represent in meters the position of the object's centroid to be drawn closer; theta, given in degrees, and radius, specified in meters, account for the point from which draw the object, that is located onto the circle centered in (cx,cy,cz) and contained in the x-y plane. The parameter dist specifies the length in meters of the draw action.
The reply [ack] is returned as soon as the draw is accomplished.
- Virtual draw: [vdraw] cx cy cz theta radius dist.
Simulate the draw without performing any movement in order to test the quality of the action.
The reply [ack] val is returned at the end of the simulation, where val accounts for the quality of the action: the lower it is the better the action is.
- Tool-attach: [tool] [attach] arm x y z.
Attach a tool to the given arm whose dimensions are specified in the frame attached to the hand. The subsequent action will make use of this tool.
- Tool-get: [tool] [get].
Retrieve tool information as [ack] arm x y z.
- Tool-remove: [tool] [remove].
Remove the attached tool.
- Find: [find] arm eye.
An exploration is performed which aims at finding the tool dimension. It is possible to select the arm for executing the movement as well as the eye from which the motion is observed. The reply [ack] x y z returns the tool's dimensions with respect to reference frame attached to the robot hand.
- /karmaMotor/stop:i receives request for immediate stop of any ongoing processing.
- /karmaMotor/vision:i receives the information about the pixel corresponding to the tool tip during the tool exploration phase.
- /karmaMotor/finder:rpc communicates with the module in charge of solving for the tool's dimensions.
Tested OS
Windows, Linux
- Author
- Ugo Pattacini