An external force target generating device of a legged mobile robot, which sequentially generates a target related to an external force to be applied to the robot in a state where a motion of the robot is being controlled so that an actual motion of the robot follows a desired motion of the robot, to cause the robot to implement a motion while having a plurality of portions of the robot in contact with a plurality of different surfaces to be contacted, which exists in an operating environment of the robot, the external force target generating device comprising at least one processor, the at least one processor comprising:
- a virtual surface group setting unit which uses a virtual surface group that is constituted of a plurality of virtual surfaces having a predetermined posture relationship to each other to virtually set the virtual surface group in the space of an operating environment of the robot such that the plurality of virtual surfaces of the virtual surface group turn into surfaces that match or approximate the plurality of surfaces to be contacted;
- a basic required total external force determining unit which determines, on the basis of the desired motion, a basic required total translational external force, which is a translational force component of a total external force to be applied to the robot to implement the desired motion and a basic required total moment external force, which is a moment component of the total external force about a predetermined reference point fixed relative to the virtual surface group;
- a translational external force compensation amount determining unit which sequentially calculates a first motional state amount error that is a difference between an observed value of a predetermined first motional state amount of the robot and a desired value of the first motional state amount in the desired motion, and based on the first motional state amount error, determines a translational external force compensation amount that is a translational force to be additionally applied to the robot in order to approximate the first motional state amount error to zero;
- a moment external force compensation amount determining unit which sequentially calculates a second motional state amount error that is a difference between an observed value of a predetermined second motional state amount of the robot and a desired value of the second motional state amount in the desired motion, and based on the second motional state amount error, determines a moment external force compensation amount that is a moment generated about the reference point to be additionally applied to the robot in order to approximate the second motional state amount error to zero;
- a provisional required virtual surface translational force determining unit, which is a unit that determines a provisional value of a required virtual surface translational force, which is the translational force to be applied to the robot from each of the plurality of virtual surfaces of the virtual surface group to attain a compensation total translational external force obtained by adding the determined translational external force compensation amount to the determined basic required total translational external force, and determines the provisional value of the required virtual surface translational force in each virtual surface such that at least a first requirement that the resultant force of the required virtual surface translational forces in the plurality of virtual surfaces coincide with the determined compensation total translational external force, and, regarding a virtual surface normal force component of a required virtual surface translational force in each virtual surface, which is a component perpendicular to the virtual surface, and a virtual surface frictional force component, which is a component parallel to the virtual surface, a second requirement that the magnitude of the virtual surface frictional force component be not more than a first predetermined value set on the basis of at least the virtual surface normal force component, are satisfied;
- a provisional required virtual surface translational force dependent moment calculating unit which calculates a provisional value of a required virtual surface translational force dependent moment, which is a total moment generated about the predetermined reference point by a required virtual surface translational force on each of the plurality of virtual surfaces, assuming that the provisional value of the determined required virtual surface translational force in each virtual surface acts on a provisional on-virtual-surface external force action point, which is a point obtained by projecting a provisional external force action point that is an external force action point provisionally set on the surface to be contacted corresponding to the virtual surface, onto the virtual surface;
- a moment compensation amount determining unit which calculates a moment error, which is a difference between a compensation total moment external force obtained by adding the determined moment external force compensation amount to the determined basic required total moment external force and the calculated provisional value of the required virtual surface translational force dependent moment, and determines, by using the moment error, a moment compensation amount which is formed of a correction amount of one or more of the provisional on-virtual-surface external force action points and includes at least one of a first compensation amount which satisfies an external force action point existence region condition that each provisional on-virtual-surface external force action point after having been corrected using the correction amount exists in an on-virtual-surface external force action point permissible region obtained by projecting an external force action point existence permissible region set on the surface to be contacted corresponding to a virtual surface, on which the provisional on-virtual-surface external force action point exists, onto the virtual surface, a second compensation amount which is composed of the correction amounts of virtual surface frictional force components in two or more virtual surfaces and the total sum of the correction amounts is zero, and a third compensation amount composed of a twisting force additionally applied to the robot from the virtual surface about an axis in a direction perpendicular to one or more virtual surfaces, as a compensation amount for canceling the moment error;
- and
- a desired surface-to-be-contacted external force and action point determining unit which determines a desired external force to be applied to the robot from a surface to be contacted corresponding to each virtual surface and a desired external force action point, which indicates the desired position of the action point of the desired external force, on the basis of at least the provisional value of the required virtual surface translational force determined in association with each virtual surface and the determined moment compensation amount, and outputs the determined desired external force and the determined desired external force action point as constituent elements of the target related to the external force.