Login| Sign Up| Help| Contact|

Patent Searching and Data


Title:
METHOD FOR PROGRAMMING AN INDUSTRIAL ROBOT BY LEAD-THROUGH
Document Type and Number:
WIPO Patent Application WO/2010/088959
Kind Code:
A1
Abstract:
The present invention relates to a method for programming an industrial robot comprising a manipulator (1 ) movable about a plurality of axes and a robot controller (2) controlling the movements of the manipulator and configured to switch between a position control mode and a floating control mode in which the manipulator has a reduced stiffness in at least one of the axes or in at least one Cartesian direction or orientation, wherein the method comprises: - switching the robot controller to the floating control mode, and - programming the robot by means of lead-through of the robot while at the same time the controller is in the floating control mode.

Inventors:
GROTH, Tomas (Källtorpsvägen 31, Västerås, S-724 80, SE)
BRANTMARK, Håkan (Snödroppsvägen 41, Västerås, S-722 46, SE)
STRANDBERG, Morten (Egilsvägen 32, Västerås, S-723 55, SE)
Application Number:
EP2009/051359
Publication Date:
August 12, 2010
Filing Date:
February 06, 2009
Export Citation:
Click for automatic bibliography generation   Help
Assignee:
ABB TECHNOLOGY AB (S- Västerås, 721 83, SE)
GROTH, Tomas (Källtorpsvägen 31, Västerås, S-724 80, SE)
BRANTMARK, Håkan (Snödroppsvägen 41, Västerås, S-722 46, SE)
STRANDBERG, Morten (Egilsvägen 32, Västerås, S-723 55, SE)
International Classes:
G05B19/423
Attorney, Agent or Firm:
REYIER, Ann-Mari et al. (Bjerkéns Patentbyrå KB, Box 128, Västerås, S-721 05, SE)
Download PDF:
Claims:
CLAIMS

1 . A method for programming an industrial robot comprising a manipulator (1 ) movable about a plurality of axes and a robot controller (2) controlling the movements of the manipulator and configured to switch between a position control mode and a floating control mode in which the manipulator has a reduced stiffness in at least one of the axes or in at least one Cartesian direction or orientation, wherein the method comprises: - switching the robot controller to the floating control mode, and

- programming the robot by means of lead-through of the robot while at the same time the controller is in the floating control mode.

2. The method according to claim 1 , wherein the lead-through programming comprises:

- leading the robot to a wanted position by moving the robot by human power,

- recording the positions of the axes of the manipulator at the desired position, and

- creating a robot program based on the recorded axes positions of the robot.

3. The method according to claim 1 or 2, wherein the robot con- troller comprises a plurality of position control loops (30) having position control gains (Kp), and when the robot controller is switched to the floating control mode the gains of the position loops are significantly reduced such that the manipulator has a reduced stiffness in at least one of the axes or in at least one Cartesian direction or orientation.

4. The method according to claim 3, wherein when the robot controller is switched to the floating control mode, the gain of at least one of the control loops is set at zero or close to zero.

5. The method according to claim 3 or 4, wherein the robot controller further comprises a plurality of speed control loops (31 ) having speed control gains (Kv), and when the robot controller is switched to the floating control mode the gain of at least one of the speed loops is significantly reduced.

6. The method according to any of the claims 3 - 5, wherein the method comprises: providing the robot with a user interface that makes it pos- sible for a user to select in which axes, Cartesian directions and orientations the manipulator shall have a high stiffness and in which axes, Cartesian directions and orientations the manipulator shall have a low stiffness when the robot is in the floating control mode, receiving information regarding user selections on the stiffness of the axes, Cartesian directions, and orientations, and adjusting the position control gains in accordance with the received user selections.

7. The method according to any of the previous claims, wherein the method comprises: providing the robot with a switch (20) configured to be operated by a user for switching the robot controller between the position control mode and the floating control mode.

8. The method according to any of the previous claims, wherein the robot comprises a plurality of motors (M) for actuating the axes of the manipulator (1 ), and the robot controller (2) comprises a plurality of servo controllers generating torque control signals (TC) controlling the torque of the motors, wherein the method comprises: providing the manipulator with a device (22) for generating information on in which direction a user intends to move the manipulator during programming of the robot, transferring said information on in which direction the user intends to move the manipulator to the robot controller, increasing the torque control signals in the intended direction until friction has been overcome, and thereafter moving the robot by human power in the intended direction.

9. The method according to claim 8, wherein the method comprises receiving position information (PosM) from the manipulator and based thereon detecting when the manipulator begins to move in the intended direction, and increasing the torque control signals (TC) until it is detected that the manipulator begins to move in the intended direction.

10. The method according to claim 8 or 9, wherein the torque control signal (TC) is increased in the desired direction by providing a feed-forward signal (TFF) to the servo controller such that the strength of the feed-forward signal increases until a movement of the manipulator is detected.

1 1 . The method according to claim 10, wherein said servo controller includes a position control loop (30), a speed control loop (31 ), and a torque control loop (32), and said feed-forward signal (TFF) is provided to the torque control loop.

12. The method according to any of the previous claims, wherein said device (22) comprises a sensor for sensing direc- tions of forces or torques from a user, the method comprises attaching said device to the manipulator during programming of the robot.

13. The method according to claim 12, wherein said sensor senses forces in three degrees of freedom and/or torques in three degrees of freedom.

Description:
Reference: 400850PCT Applicant: ABB Technology AB

METHOD FOR PROGRAMMING AN INDUSTRIAL ROBOT BY LEAD-THROUGH

FIELD OF THE INVENTION

The present invention relates to a method for programming an industrial robot comprising a manipulator movable about a plurality of axes and a robot controller controlling the movements of the manipulator and configured to switch between a position control mode and a floating control mode in which the manipula- tor has a reduced stiffness in at least one of the axes or in at least one Cartesian direction or orientation.

PRIOR ART

Traditionally, a robot controller of an industrial robot is provided with servo controllers for controlling the positions of the motors driving the motion of the manipulator. The servo controller comprises a position controller including a position control loop configured to calculate speed references based on a position error, which is calculated as the difference between position references from a main computer of the robot and measured positions from a position sensor. The position error is multiplied by a constant denoted the position control gain K P . The strength of the position control depends on the value of the position control gain. The servo controller further comprises a speed controller including a speed control loop configured to calculate a speed error based on the difference between the speed references from the position controller and speed measurements, and further to calculate torque references for the motor based on the speed error multiplied by a constant denoted the speed control gain K v . The strength of the speed control depends on the value of the speed control gain.

During normal operation of the robot, the gain of the position loop and the speed loop are set at a high value such that the robot is stiff in all directions and orientations. A problem with operating such a robot is that it has no ability to absorb a strong force applied from the outside. For example, in a case when the robot aims to work in operations to receive a force applied from an external machine. In order to overcome this problem many robots have been provided with the possibility to switch the robot into a compliance control mode. In the compliance control mode the gains of the position loop and the speed loop are significantly reduced such that the stiffness of the manipulator is reduced. This allows the robot to effectively perform like a mechanical spring when encountering resistance during operation, thereby enabling the robot to deviate from the programmed path and thus cope with tolerances in fixtures and tools.

US 5,581 , 167 discloses a robot arm driven by a servomotor which is controlled through position and speed control loops. The position and speed loops are adjusted in response to a flexible command. Upon receipt of the flexible command, the position gain and the speed gain are lowered in accordance with a set degree of flexibility. Thereby the flexibility of the robot arm is increased, and in case an obstacle is placed in the transfer path of the robot arm, the arm can be moved by human power to avoid the obstacle. This method is applied during operation of the robot, and makes it possible to manually locate the robot arm in a position different from the instructed position in the robot program.

US 5,994,864 discloses an industrial robot including a robot controller which performs operations while switching between a position control and a compliance control. When the robot is switched to the position control the gain of the position loop and the speed loop is set at a large value in order to make the manipulator stiff. When the robot controller is set to the compliance control, the position gain and the speed gain are lowered in accordance with the degree of setting flexibility. When the robot controller is switched to the compliance control the manipulator will act like a spring when colliding with an obstacle, which means that the manipulator, after it has been moved due to the collision, will strive to move back to it original position.

In addition to the compliance control it is also known to switch the robot controller to a floating mode in which the manipulator is compliant, but does not act like a spring, in any chosen linear direction. With this function it is possible to make the robot with its tool "floating" in any arbitrary direction in the Cartesian space. When the robot has been moved, for example, due to a collision with another moving object, the manipulator will stay in its new position and will not strive to move back to it original position. Different manufactures have different names for the floating mode, such as soft float, soft move, soft servo, soft ab- sorber, and servo float. The floating mode is achieved by reducing the position gain in the position loop to zero or to almost zero. The floating mode is used during operation of the robot. A typical use is tending die-cast or injection moulding machines, where the robot is pushed out by the machine as the part is ejected, enabling the robot to follow the machine and thus reducing cycle time. Further examples are placing/picking a work- piece in a tool, placing a molded or cast part in a fixture, and tool exchanging on peripheral machines. The switching to the compliance control and to floating control is made in the robot program.

Because of the complexity of robot programming, it is difficult for small and medium sized enterprises to invest in robotics. Thus, new program methods are needed to facilitate for craftsmen to transfer their skill to programs for industrial robots. A technique called lead-through programming has been recognized as a very convenient way of programming robots. During lead-through programming, the programmer moves the tool or work object mounted on the robot by hand to positions along the robot path to be programmed, and records the motions into a memory in the robot controller. A problem with this method is that the manipulator has to be mechanically balanced and have a rather light weight. In recent solutions force sensors and force control have been used to detect the force applied by the hand and to move the tool in a corresponding direction. A disadvantage with this solution is the high cost for the additional equipment, and in particular for the force sensor. The force sensor in this case is normally mounted between the robot flange and the tool and therefore has to be rigid.

US 4,408,286 generally discloses lead-through robot programming. The robot is moved through a programming path. Instead of using a remotely located interface device to move the robot to the points of the programming path, the operator actuates a force sensor or another control mechanism on the robot, typi- cally on the end-effector of the robot, to move the robot to points on the programming path.

US 4589810 discloses a system for lead-through programming of an industrial robot. The system includes a handgrip sensor unit including a sensor for measuring forces and torques. The sensor is integrated in a handle, which is attached to the tool or work object carried by the robot. The handle is used by the operator to guide the tool along a desired robot path during programming of the robot. The sensor is arranged to measure forces and torques exerted by human hand on the handle. The output from the sensor is transferred to a data processing unit, which converts the output signals from the sensor into data corresponding to forces and torques applied by the operator to the handle. The data processing unit includes an algorithm that con- verts the output signals from the sensor into drive commands for the joint drives of the robot. OBJECTS AND SUMMARY OF THE INVENTION

The object of the present invention is to provide an improved method for programming an industrial robot by means of lead- through, which does not require any expensive additional equipment beyond the robot and the robot controller.

This object is achieved by a method as defined in claim 1 .

According to the invention, the robot controller is switched into a floating control mode, in which the manipulator has a reduced stiffness in at least one of the axes or in at least one Cartesian direction or orientation, before the programming begins. There- after the robot is programmed by means of lead-through of the robot at the same time as the controller is in the floating control mode. By switching the robot into the floating control mode the manipulator is made compliant and easy to move by hand. The invention makes it easy for a programmer to move the manipula- tor along the desired path. For example, the programmer grasps the tool or a handle on the tool, and leads the robot tool to a desired position and with a desired orientation. Of course, the programmer may push on or pull any part of the manipulator in order to move the tool to the desired position. The invention makes it possible to program a robot which is rather heavy and/or not so well mechanically balanced by means of lead- through. The method does not require any expensive force sensor.

A further advantage with the invention is that the tool can be moved into contact with a work object during the programming, without running the risk of collisions and servo errors. This makes it possible to program a path when in contact with the work object. This is advantageous in all applications where the robot will work in contact or very close to contact, such as arc welding. By Cartesian directions of the manipulator are meant linear directions in a linear coordinate system defined with respect to the manipulator, for example, a tool coordinate system or a work object coordinate system. By Cartesian orientations is meant the orientations of the axes in the linear coordinate system. By the axes of the manipulator is meant the rotational axes of the manipulator.

When the robot is in the position control mode, the manipulator is stiff in all Cartesian directions and orientations, and in all of its axes. This leads to a manipulator that is almost impossible to move by human power.

When the robot is in the floating control mode the stiffness of the manipulator is reduced in one or more Cartesian directions and orientations, or in one or more of its axes. The stiffness is reduced such that the manipulator becomes compliant, but not resilient, i.e it does not act like a spring. Thus, when the robot is in the floating control mode it is easy for the programmer to move the robot tool, by pushing or pulling the robot, to a desired position, and when the programmer stops the movement, the manipulator will stay in the desired position, since there is no resilience in the floating control mode.

The lead-through programming comprises the following steps: leading the robot to a desired position or orientation by moving the manipulator by human power, recording the position and orientation of the robot at the desired position, and creating a robot program based on the recorded position of the robot. For example, the position of the robot is recorded upon receiving a voice command or by means of a separate button on the manipulator or on a handle.

The robot controller comprises a plurality of position control loops having position control gains and a plurality of speed control loops having speed control gains, and when the robot con- troller is switched to the floating control mode the gains of the position loops are significantly reduced such that the manipulator has a reduced stiffness in at least one of the axes or in at least one Cartesian direction or orientation. Which of the posi- tion loop gains to be reduced depends on in which direction or orientation, or about which axes the manipulator is to be made compliant. When the robot controller is switched to the floating control mode, the gain of at least one of the position control loops is set at zero or close to zero. Thereby it is ensured that the manipulator becomes compliant, but not resilient, i.e it does not act like a spring. Preferably, the gain of at least one of the speed loops is also significantly reduced when the robot controller is switched to the floating control mode. When the gains of the speed loops are high the manipulator is heavy to move. By reducing the gain of at least one of the speed loops it becomes easier to move the manipulator. Which of the speed loop gains to be reduces depends on in which direction the manipulator is to be made compliant.

During programming of the robot, it is possible to program linear movements along Cartesian directions and rotational movements about the Cartesian directions. The Cartesian directions and orientations are defined in relation to the tool. Further, it is possible to program rotational movements about the axes of the manipulator. Although it is possible to reduce the stiffness of the manipulator in all directions and orientations at the same time, this is not suitable when programming the robot.

According to an embodiment of the invention, the method com- prises providing the robot with a user interface that makes it possible for a user to select in which axes, Cartesian directions and orientations the manipulator shall have a high stiffness and in which axes, Cartesian directions and orientations the manipulator shall have a low stiffness when the robot is in the floating control mode, receiving information regarding user selections on the stiffness of the axes, Cartesian directions, and orientations, and adjusting the position control gains in accordance with the received user selections. This embodiment makes it possible for a programmer during programming of the robot to have a high stiffness in some axes, directions and orientations and have a reduced stiffness in other axes, directions and orientations.

This embodiment also makes it possible for the programmer to change in which axes, directions and orientations the manipulator is stiff and in which axes, directions and orientations the ma- nipulator is compliant during the programming and thereby to adapt the flexibility and stiffness of the manipulator to the movement to be programmed. For example, if the robot is to be programmed to move in a certain Cartesian direction it is advantageous to reduce the stiffness only in that direction since it makes it easier for the programmer to move the robot in that direction and to avoid moving the robot in the other directions. Further, if the movement to be programmed only involves rotational movements about the axes of the manipulator it is advantageous to reduce the stiffness only in the axes involved in the movement and to keep a high stiffness in the other axes and in the Cartesian directions and orientations. In another advantageous example, the stiffness is reduced in all Cartesian directions, but a high stiffness is kept for movements about all Cartesian orientations. This embodiment also makes it possible to toggle between a first mode, in which the manipulator is compliant in Cartesian directions and orientations but is stiff when moved about the axes of the manipulator, and a second mode in which the manipulator is compliant about the axes of the manipulator and stiff in Cartesian directions and orientations. This embodiment facilitates the programming of the robot.

According to an embodiment of the invention, the method comprises providing the robot with a switch configured to be operated by a user for switching the robot controller between the po- sition control mode and the floating control mode. The switch is arranging so that it is accessible to a user during programming of the robot. This embodiment enables a user to switch the robot controller to the floating control mode during programming of the robot. In the prior art it is only possible to switch the robot controller to the floating control mode during automatic operation of the robot, i.e. when the robot program is executed.

The above described method for programming an industrial robot with lead-through in combination with setting the robot controller into a floating control mode is suitable for small and me- dium sized manipulators. However, larger robots tend to have a large static friction and the force needed to move the manipulator is hence very large. This makes it heavy for the programmer to move the robot by hand although the robot is in the floating mode.

The robot comprises a plurality of motors for actuating the axes of the manipulator, and the robot controller comprises a plurality of servo controllers generating torque control signals controlling the torque of the motors. According to an embodiment of the in- vention, the method comprises providing the manipulator with a device for generating information on in which direction a programmer intends to move the manipulator during programming of the robot, transferring the information on in which direction the programmer intends to move the manipulator to the robot controller, increasing the torque control signals in the intended direction until friction has been overcome, and thereafter moving the robot by human power in the intended direction. The manipulator is actuated in the intended direction by means of the motors until friction has been overcome, and the manipulator begins to move. Thereafter, the robot is moved only by human power. Accordingly, the motors of the manipulator are used only to overcome friction and not to move the manipulator along the programming path. This embodiment enables large robots with large static friction to be programmed by lead-through in combi- nation with having the robot in the floating mode. The device for generating information on an intended direction can be made very simple and accordingly cheep. The device can, for example, be a set of buttons representing different directions or a joystick.

According to an embodiment of the invention, said device comprises a sensor for sensing directions of forces or torques from a user, the method comprises attaching said device to the manipulator during programming of the robot. A commercially available joystick, which is suitable to use for generating information on an intended direction, includes a sensor sensing forces in three degrees of freedom and/or torques in three degrees of freedom. Such a joystick is called a SpaceMouse.

Since the robot is in floating control mode the speed, or torque, reference in the intended direction only has to be above the friction level to make the robot move. In the floating mode the robot does not have any strong position loop, which means that the risk of damage to the tool is very small.

According to an embodiment of the invention, the method comprises receiving position information from the manipulator and based thereon detecting when the manipulator begins to move in the intended direction, and increasing the torque control signals until it is detected that the manipulator begins to move in the in- tended direction. It is detected that friction has been overcome by detecting when the manipulator begins to move.

According to an embodiment of the invention, the torque control signal is increased in the desired direction by providing a feed- forward signal to the servo controller such that the strength of the feed-forward signal increases until a movement of the manipulator is detected. The manipulator is actuated by the motors in the intended direction until friction is overcome by providing a feed-forward signal to the servo controller. The feed-forward signal is increased until friction is overcome, i.e. until the manipulator is moving in the intended direction. According to an embodiment of the invention, the servo controller includes, a position control loop, a speed control loop, and a torque control loop, and said feed-forward signal is provided to the torque control loop. This embodiment is easy to implement.

According to an embodiment of the invention, the method further comprises: attaching a handle-grip unit to the manipulator, the handle-grip unit including a sensor for sensing the directions of forces or torques from a user, transferring information on sensed directions from the sensor to the robot controller, and actuating the manipulator in a direction sensed by the sensor until friction has been overcome.

BRIEF DESCRIPTION OF THE DRAWINGS

The invention will now be explained more closely by the description of different embodiments of the invention and with reference to the appended figures.

Fig. 1 shows an industrial robot to be programmed by a programmer by lead-through.

Fig. 2 shows a servo controller for controlling a motor of the robot configured to switch between a position control mode and a floating control mode.

Fig. 3 shows an example of a Torque Feed Forward signal.

Fig. 4 shows a flow diagram of a method for programming an industrial robot according to a first embodiment of the invention.

Fig. 5 shows a flow diagram of a method for programming an industrial robot according to a second embodiment of the invention. DETAILED DESCRIPTION OF PREFERRED EMBODIMENTS OF THE INVENTION

Figure 1 shows an industrial robot comprising a manipulator 1 movable about a plurality of axes, and a robot controller 2 controlling the movements of the manipulator. The robot controller 2 is configured to switch between a position control mode and a floating control mode in which the manipulator has a reduced stiffness in at least one of the axes of the manipulator or in at least one Cartesian direction or orientation. The robot controller 2 includes traditional hardware such as a central processing unit (CPU), internal memory, and means for communicating with the manipulator, the TPU and other external equipment. In this ex- ample, the manipulator 1 has three main axes and three wrist axes. The manipulator comprises a stationary foot 3, usually referred to as the base of the robot. The base 3 supports a stand 4, which is rotatable about a first axis. The stand 4 supports a first arm 5, which is rotatable about a second axis. The first arm 5 supports a second arm 6 which is rotatable about a third axis. The second arm 6 supports a wrist unit 7 which is rotatable about a fourth, a fifth and a sixth axis. The wrist supports a tool 8, or a work object, in which an operating point, called TCP (tool centre point) is defined. In this example a workpiece 10 is posi- tioned on a table. A robot path 12 is to be programmed on the workpiece 10.

A tool coordinate system x, y, z is defined with relation to the tool 8. The origin of the tool coordinate system is in the TCP. A workpiece coordinate system x', y', z' is defined in fixed relation to the workpiece 10. Typically, when the robot is moved in a Cartesian direction or orientation the robot is moved in the tool coordinate system or in the work object coordinate system. The movements of the axes of the manipulator are controlled by the robot controller 2. The robot further comprises a portable operator control device 14, generally denoted a teach pendant unit (TPU). A robot operator uses the TPU for manually controlling the robot, for example to jog the robot. The TPU may also be used for monitor- ing robot program, changing certain variables in the program, starting, stopping and editing the program. The TPU comprises operator control means, for example a joystick 16 and/or a set of buttons 15, a visual display unit 17 and safe equipment 18. The TPU 14 is connected to the robot controller 2 either via a cable or wireless.

In the embodiment shown in figure 1 the robot is provided with a switch 20 configured to be operated by an operator for switching the robot controller between the position control mode and the floating control mode. In this embodiment the switch 20 is arranged on the TPU in the form of a pushbutton. Alternatively, the switch may be provided on the manipulator. Alternatively, the switch can be a soft button displayed on the display unit 17, or as an alternative on a menu displayed on the display unit 17. When the robot controller is switched to position control mode the manipulator is stiff in all axes, and in all tool directions and orientations. When the robot controller is switched to floating control mode the manipulator is soft, i.e. has a low stiffness, in at least one of the axes, and/or at least one of the tool direc- tions and/or at least one of the tool orientations. The position control mode is the default mode used during normal operation of the robot. In the following the term soft is used synonymously with having a reduced stiffness.

In the embodiment shown in figure 1 , the robot is provided with a user interface that makes it possible for a user to select in which axes, Cartesian directions and/or Cartesian orientations the manipulator shall be stiff and in which axes, tool directions and/or orientations the manipulator shall be soft when the robot is in the floating control mode. By Cartesian directions of the manipulator are meant linear directions in a linear coordinate system defined with respect to the manipulator, for example, the tool coordinate system and by Cartesian orientations is meant the orientations of the axes in the linear coordinate system. By the axes of the manipulator are meant the rotational axes of the manipulator.

In this embodiment the user interface is displayed on the display unit 17 on the teach pendant unit 14. For example, when the user operates the switch 20 so that the robot controller is switched to the floating control mode, a menu is displayed on the display unit 17 showing options regarding in which axes, directions and orientations the manipulator shall be soft in the floating control mode. In one embodiment, the user is provided with two choices: a first choice to select that rotation around the tool/work object coordinate system axes is possible and that the robot is stiff along the linear directions, and a second choice to select that movements about all axes of the manipulator are stiff and that movements along all the Cartesian directions and orientations of the manipulator are soft.

In an alternative embodiment, all axes of the manipulator and the Cartesian directions and orientations of the tool are displayed on the display unit 17 and it is possible to select which axes, directions, and orientations to be soft in the floating con- trol mode. The display unit 17 is, for example, a touch screen and the user selects axes, directions and orientations by pointing on the displayed options. The selected axes, directions, and/or orientations are transferred from the teach pendant unit 14 to the robot controller 2, and the position control gains of the position control loops are adjusted in accordance with the received user selections.

In one embodiment of the invention, the manipulator is provided with a device 22 for generating information on in which direction a programmer intends to move the manipulator during programming of the robot. The device is, for example, a set of buttons each representing a Cartesian direction or orientation, or a handgrip unit including a sensor sensing directions of forces or torques from a user. The device is, for example, a space mouse sensing forces in three degrees of freedom and torques in three degrees of freedom. The device 22 is in communication with the robot controller 2 and transfers information on the intended direction to the robot controller 2. The device 22 is to be used when programming a heavy robot having large static friction. For small and medium sized manipulators it might not be necessary to use the device 22. The device 22 can be mounted anywhere on the manipulator. However, if the device is mounted in a similar position as the tool, no transformation is needed. Otherwise a frame transformation will be needed to make the sensed direction correspond to a movement in the desired direction. To find out how the device is mounted on the manipulator compared to a base frame, a small weight could be attached to the device. By moving the robot to some fixed known positions and looking at the sensor readings, the gravity direction can be evaluated and hence a sensor frame can be calculated.

Figure 2 shows a servo controller for controlling a motor M. The robot controller 2 includes one servo controller for each axis. Accordingly, the robot controller 2 comprises six servo loops. The servo controller is provided with a position reference Pos- ref from a main computer. The motor is provided with a position sensor (not shown) measuring the position of a shaft driven by a motor. The servo controller comprises a position controller, in the form of a position loop 30, configured to calculate a speed reference based on the difference between the reference posi- tion Pos-ref and the measured position PosM from the motor. The position error is multiplied by a value K p , which is denoted the position control gain. The position control gain K p is variable. A high value of the position control gain makes the axis controlled by the servo motor stiff, and a low value of the posi- tion control gain makes the axis controlled by the servo motor soft. Further, the servo controller is provided with a speed controller including a speed loop 31 configured to calculate a torque reference Tref for the motor based on the speed error. The speed error is calculated as the difference between the measured speed and the speed reference from the position controller. In this embodiment, the measured speed is calculated by differentiation of the measured position from the position sensor. The speed control loop has a speed control gain K v. , and the speed error is multiplied by the speed control gain K v . The speed control gain K v is variable. When the gains of the speed loops are high the manipulator is slow to move. By reducing the gain of at least one of the speed loops it becomes easier to move the manipulator. When the robot is in the floating control mode the po- sition control gain is set to zero and the speed control gain is significantly reduced.

The servo controller also includes a torque control block 32. In the torque control loop a torque control signal TC is generated by adding a torque feed-forward TFF signal to the torque reference Tref from the speed controller 31 .

TC = TFF + T ref (1 )

The torque control signal TC is transferred to a drive unit 33 configured to provide the motor with current in dependence on the torque control signal. Traditionally, the torque feed-forward signal TFF is provided for some compensations needed for different motions, such as compensation of the gravitational force acting on the manipulator. According to an embodiment of the invention, the torque feed-forward signal also includes a component for compensation of static friction.

TFF = T fric + T grav (2) The robot controller is further provided with a computing unit 38. The computing unit 38 is configured to calculate the position control gain K p and the speed control gain K v , and the torque feed-forward signal TFF. The computing unit 38 receives a sig- nal P/F from the switch 20 regarding whether the robot controller is to be operated in position control mode or floating control mode. The computing unit 38 further receives information S from the user interface 17 regarding user selections on which axes, directions and orientations is to be stiff and which is to be soft. The computing unit is configured to adjust the position control gain and the speed control gain in accordance with the received user selections.

The computing unit further receives information from the device 22 on in which direction the programmer intends to move the manipulator and is configured to increase torque feed-forward signal TFF until friction has been overcome in the intended direction. It is the component T fric that is increased. The computing unit also receives measured positions from the motors of the other axes of the robot. The measured positions are used for determining if friction has been overcome. The robot controller comprises a servo controller for each motor and accordingly for each axis. If the user selects to reduce the stiffness of a certain axis the position control gain K p is set to zero or close to zero and the speed gain is significantly reduced. If the user selects to reduce the stiffness in a certain Cartesian direction the position control gain and speed control gain is reduced for the axes involved in the motion of the manipulator in a selected direction. The theoretical background on how to reduce the stiffness of the manipulator is discussed in "Introduction to robotics mechanics and control", third edition, by John J Craig page 333-334.

Figure 3 shows an example of a torque feed-forward signal TFF when the programmer intends to moves the manipulator in a cer- tain direction during programming of the robot. As long as the computing unit 38 does not receive any information about any intended direction for moving the manipulator, the torque feedforward signal only includes the component T grav, which compensates for gravitational forces on the manipulator. At a point in time A the computing unit receives information on that the programmer intends to move the manipulator in a certain direction, and the torque feed-forward signal is then increased for all motors which need to be involved in the motion in the specified direction until the computing unit detects that the manipulator begins to move in the specified direction. The torque feed- forward signal is increased by increasing the component T fric in equation 1 . The torque feed-forward signal is increased until a movement of the manipulator is detected. How much the torque feed-forward signal is increased depends on the intended direction. At a point in time B the manipulator begins to move in the specified direction, and a change in the measured position from the motor is detected. Thereafter, the torque feed-forward signal might be slightly decreased to compensate for the fact that the friction becomes lower once the robot begins to move.

Figure 4 is a flow diagram illustration of a method according to an embodiment of the present invention. In a first step the programmer switches the robot controller to the floating control mode, block 40. When the operator actuates the switch 20 an order is sent to the robot controller 2 to switch the controller to floating control mode. The robot controller receives the switching order. In the next step, which is an option, a user interface is displayed to the programmer, for example, on the display unit 17 of the TPU. The user interface displays choices for the user to select in which axis, Cartesian directions and/or orientations the manipulator shall have a high stiffness and in which axis, Cartesian directions and/or orientations the manipulator shall have a low stiffness. When the programmer has made his selections information on the selected axes, Cartesian directions and/or orientations of the manipulator are sent to the robot controller, block 41 . When the robot controller has received the user selections regarding the stiffness of the axes, Cartesian directions and/or orientations the selections are directed to the concerned servo controller, and the computing units of the servo controllers calculate new values for the position gains K p and speed gains K v , block 42. For example, if the user selects to reduce the stiff- ness for an axis driven by the motor and servo controller disclosed in figure 2, the value of the position gain K p is set to zero or close to zero and the speed gain K v is reduced at least to half its value compared to the value in the position control mode. If the user selects to reduce the stiffness in a Cartesian direction and/or orientation, the position gain and speed gain are reduced for the servo controllers of the motors involved in the movement in the selected direction and/or orientation. Now the manipulator is in the floating control mode and is soft, i.e. has a reduced stiffness, in the selected axes, directions and/or orientations and the robot is ready to be programmed by lead-through.

When programming the robot by lead-through the programmer grasps the tool, or any other suitable part of the manipulator and moves the tool, or a work object held by the robot to a desired position and orientation on the robot path to be programmed. Accordingly, the manipulator is led to the desired position and orientation by human power. The positions of the axes of the manipulator at the desired position are stored, block 46, upon receiving a record command from the programmer, block 44. The record command can be produced in several different ways, for example, by a voice command. The programmer continues to move the tool along the path to be programmed and to record positions of the robot axes at a plurality of waypoints along the path. When the last point has been recorded, block 47, a robot program is generated based on the stored positions of the axes, block 48. When the programmer has finished the programming he may actuate the switch 20 and thereby switch the robot controller back to the position control mode. The programming method described with reference to figure 4 is suitable for a small and medium sized robot having a rather low static friction when moving the manipulator. Figure 5 is a flow diagram illustrating a further embodiment of the method according to the invention. This embodiment is suitable for heavy robots having a large static friction. The steps 40- 42 are the same as shown in figure 4 and is not discussed with reference to figure 5. In the same way as in the previous embodiment, block 41 , is optional. In an alternative embodiment it could be pre-programmed in which axes, directions and/or orientations the manipulator has reduced stiffness in the floating con- trol mode. When the robot has been set to the floating control mode, the programmer starts the programming by grasping the device 22 which generates information on in which direction the programmer intends to move the manipulator. For example, if the device 22 is a joystick the manipulator moves the joystick in the direction in which he intends to move the robot. Information on the intended direction is transferred from the device 22 to the robot controller 2 and is transferred to the computing units 38 of the concerned servo controllers, block 50. The concerned computing unit begins to increase the torque control signal, such as the torque feed-forward signal, block 52. If the manipulator is to be moved in a Cartesian direction more than one of the motors is involved and accordingly more than one of the servo controllers are concerned. The torque control signal is increased for the servo controllers for the motors concerned.

Each of the concerned servo controllers receives and supervises a measured position from the motor, and detects if the position changes, block 54. Alternatively, it is detected if the speed is changed. If there is a change in the measured position, which means that the manipulator has start to move, block 56, the increasing of the torque control signal is stopped. However, the value of the torque control signal is increased until it is detected that the measured position has been changed. When it is detected that the position is changed this means that friction has been overcome and the robot has begun to move. When friction has been overcome the torque control signal can be reduced again, block 58. Thereafter, the programmer moves the manipulator by hand in the intended direction until the tool is in a wanted position and orientation on the robot path to be programmed. When the tool is in the desired position and orienta- tion the programmer sends a record command to the robot controller, block 60. Upon receiving the record command the robot controller stores the positions of the axes of the robot, block 62. The programmer continues to move the tool along the path in the intended direction and stores positions of the axes at way points along the path. When the programmer intends to change the direction he operates the device 22 in the new direction, and information on the new direction is sent to the robot controller, block 64. When there is a change of direction the steps 50-58 are repeated. When the last point has been recorded on the path, block 66, a robot program is generated based on the stored positions of the axes, block 68.

The present invention is not limited to the embodiments disclosed but may be varied and modified within the scope of the following claims. For example, a torque control signal can be added to the speed control loop 31 instead of to the torque control loop 32 in order to increase the torque signal to the motor to overcome friction.