ロボットの身体はリンクとジョイントから構成されるが、それぞれ
bodyset-link
とjoint
クラスを利用しモデル絵を作成する。ロ
ボットの身体はこれらの要素を含んだcascaded-link
という,連結リン
クとしてモデルを生成する.
実際にはjoint
は抽象クラスであり
rotational-joint
,linear-joint
,
wheel-joint
,omniwheel-joint
,
sphere-joint
を選択肢、また四肢を持つロボットの場合は
cascaded-link
ではなくrobot-model
クラスを利用する。
joint [クラス]
:super propertied-object
:slots parent-link child-link joint-angle min-angle max-angle default-coords joint-velocity joint-acceleration joint-torque max-joint-velocity max-joint-torque joint-min-max-table joint-min-max-target
-
-
-
- abstract class of joint, users need to use rotational-joint, linear-joint, sphere-joint, 6dof-joint, wheel-joint or omniwheel-joint.
use :parent-link/:child-link for specifying links that this joint connect to and :min/:min for range of joint angle in degree.
:min-angle &optional v [メソッド]
-
- If v is set, it updates min-angle of this instance. :min-angle returns minimal angle of this joint in degree.
:max-angle &optional v [メソッド]
-
- If v is set, it updates max-angle of this instance. :max-angle returns maximum angle of this joint in degree.
:parent-link &rest args [メソッド]
-
- Returns parent link of this joint. if any arguments is set, it is passed to the parent-link.
:child-link &rest args [メソッド]
-
- Returns child link of this joint. if any arguments is set, it is passed to the child-link.
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
rotational-joint [クラス]
:super joint
:slots axis
-
-
-
- create instance of rotational-joint. :axis is either (:x, :y, :z) or vector. :min-angle and :max-angle takes in radius, but velocity and torque are given in SI units.
-
- Return joint-angle if v is not set, if v is given, set joint angle. v is rotational value in degree.
:joint-dof [メソッド]
-
- Returns DOF of rotational joint, 1.
-
-
-
-
-
-
-
-
linear-joint [クラス]
:super joint
:slots axis
-
-
-
- Create instance of linear-joint. :axis is either (:x, :y, :z) or vector. :min-angle and :max-angle takes in [mm], but velocity and torque are given in SI units.
-
- return joint-angle if v is not set, if v is given, set joint angle. v is linear value in [mm].
:joint-dof [メソッド]
-
- Returns DOF of linear joint, 1.
-
-
-
-
-
-
-
-
wheel-joint [クラス]
:super joint
:slots axis
-
-
-
- Create instance of wheel-joint.
-
- return joint-angle if v is not set, if v is given, set joint angle. v is joint-angle vector, which is (float-vector translation-x[mm] rotation-z[deg])
:joint-dof [メソッド]
-
- Returns DOF of linear joint, 2.
-
-
-
-
-
-
-
-
omniwheel-joint [クラス]
:super joint
:slots axis
-
-
-
- create instance of omniwheel-joint.
-
- return joint-angle if v is not set, if v is given, set joint angle. v is joint-angle vector, which is (float-vector translation-x[mm] translation-y[mm] rotation-z[deg])
:joint-dof [メソッド]
-
- Returns DOF of linear joint, 3.
-
-
-
-
-
-
-
-
sphere-joint [クラス]
:super joint
:slots axis
-
-
-
- Create instance of sphere-joint. min/max are defiend as a region of angular velocity in degree.
-
- return joint-angle if v is not set, if v is given, set joint angle.
v is joint-angle vector [deg] by axis-angle representation, i.e (scale rotation-angle-from-default-coords[deg] axis-unit-vector)
:joint-angle-rpy &optional v &key relative [メソッド]
-
- Return joint-angle if v is not set, if v is given, set joint-angle vector by RPY representation, i.e. (float-vector yaw[deg] roll[deg] pitch[deg])
:joint-dof [メソッド]
-
- Returns DOF of linear joint, 3.
-
- Return joint-angle if v is not set, if v is given, set joint-angle vector by euler representation.
-
-
-
-
-
-
-
-
6dof-joint [クラス]
:super joint
:slots axis
-
-
-
- Create instance of 6dof-joint.
-
- Return joint-angle if v is not set, if v is given, set joint angle vector, which is 6D vector of 3D translation[mm] and 3D rotation[deg], i.e. (find-if #'(lambda (x) (eq (send (car x) :name) 'sphere-joint)) (documentation :joint-angle))
:joint-angle-rpy &optional v &key relative [メソッド]
-
- Return joint-angle if v is not set, if v is given, set joint angle. v is joint-angle vector, which is 6D vector of 3D translation[mm] and 3D rotation[deg], for rotation, please see (find-if #'(lambda (x) (eq (send (car x) :name) 'sphere-joint)) (documentation :joint-angle-rpy))
:joint-dof [メソッド]
-
- Returns DOF of linear joint, 6.
-
-
-
-
-
-
-
-
bodyset-link [クラス]
:super bodyset
:slots joint parent-link child-links analysis-level default-coords weight acentroid inertia-tensor angular-velocity angular-acceleration spacial-velocity spacial-acceleration momentum-velocity angular-momentum-velocity momentum angular-momentum force moment ext-force ext-moment
-
-
-
- Create instance of bodyset-link.
:worldcoords &optional (level analysis-level) [メソッド]
-
- Returns a coordinates object which represents this coord in the world by concatenating all the cascoords from the root to this coords.
:analysis-level &optional v [メソッド]
-
- Change analysis level :coords only changes kinematics level and :body changes geometry too.
:weight &optional w [メソッド]
-
- Returns a weight of the link. If w is given, set weight.
:centroid &optional c [メソッド]
-
- Returns a centroid of the link. If c is given, set new centroid.
:inertia-tensor &optional i [メソッド]
-
- Returns a inertia tensor of the link. If c is given, set new intertia tensor.
:joint &rest args [メソッド]
-
- Returns a joint associated with this link. If args is given, args are forward to the joint.
:add-joint j [メソッド]
-
- Set j as joint of this link
:del-joint [メソッド]
-
- Remove current joint of this link
:parent-link [メソッド]
-
- Returns parent link
:child-links [メソッド]
-
- Returns child links
:add-child-links l [メソッド]
-
- Add l to child links
:add-parent-link l [メソッド]
-
- Set l as parent link
:del-child-link l [メソッド]
-
- Delete l from child links
:del-parent-link [メソッド]
-
- Delete parent link
-
-
cascaded-link [クラス]
:super cascaded-coords
:slots links joint-list bodies collision-avoidance-links end-coords-list
-
-
-
- Create cascaded-link.
:init-ending [メソッド]
-
- This method is to called finalize the instantiation of the cascaded-link. This update bodies and child-link and parent link from joint-list
:links &rest args [メソッド]
-
- Returns links, or args is passed to links
:joint-list &rest args [メソッド]
-
- Returns joint list, or args is passed to joints
:link name [メソッド]
-
- Return a link with given name.
:joint name [メソッド]
-
- Return a joint with given name.
:end-coords name [メソッド]
-
- Returns end-coords with given name
:bodies &rest args [メソッド]
-
- Return bodies of this object. If args is given it passed to all bodies
:faces [メソッド]
-
- Return faces of this object.
:angle-vector &optional vec (angle-vector (instantiate float-vector (calc-target-joint-dimension joint-list))) [メソッド]
-
- Returns angle-vector of this object, if vec is given, it updates angles of all joint. If given angle-vector violate min/max range, the value is modified.
:link-list to &optional from [メソッド]
-
- Find link list from to link to from link.
:plot-joint-min-max-table joint0 joint1 [メソッド]
-
- Plot joint min max table on Euslisp window.
-
- Calculate jacobian matrix from link-list and move-target. Unit system is [m] or [rad], not [mm] or [deg].
-
- :inverse-kinematics-loop is one loop calculation for :inverse-kinematics.
In this method, joint position difference satisfying workspace difference (dif-pos, dif-rot) are calculated and euslisp model joint angles are updated.
Optional arguments:
:additional-check
This argument is to add optional best-effort convergence conditions.
:additional-check should be function or lambda.
best-effort =>In :inverse-kinematics-loop, 'success' is overwritten by '(and success additional-check)'
In :inverse-kinematics, 'success is not overwritten.
So, :inverse-kinematics-loop wait until ':additional-check' becomes 't' as possible,
but ':additional-check' is neglected in the final :inverse-kinematics return.
:min-loop
Minimam loop count (nil by default).
If integer is specified, :inverse-kinematics-loop does returns :ik-continues and continueing solving IK.
If min-loop is nil, do not consider loop counting for IK convergence.
-
- Move move-target to target-coords.
dump-command should be t, nil, :always, :fail-only, :always-with-debug-log, or :fail-only-with-debug-log.
Log are success/fail log and ik debug information log.
t or :always : dump log both in success and fail (for success/fail log).
:always-with-debug-log : dump log both in success and fail (for success/fail log and ik debug information log).
:fail-only : dump log only in fail (for success/fail log).
:always-with-debug-log : dump log only in fail (for success/fail log and ik debug information log).
nil : do not dump log.
-
- Calc grasp matrix.
Grasp matrix is defined as
| E_3 0 E_3 0 ... |
| p1x E_3 p2x E_3 ... |
Arguments:
contact-points is list of contact points[mm].
contact-rots is list of contact coords rotation[rad].
If contact-rots is specified, grasp matrix as follow:
| R1 0 R2 0 ... |
| p1xR1 R1 p2xR2 R2 ... |
-
- Solve inverse-kinematics for closed loop forward kinematics.
Move move-target to target-coords with link-list.
link-list loop should be close when move-target reachs target-coords.
constrained-joint-list is list of joints specified given joint angles in closed loop.
constrained-joint-angle-list is list of joint-angle for constrained-joint-list.
:calc-jacobian-for-interlocking-joints link-list &key (interlocking-joint-pairs (send self :interlocking-joint-pairs)) [メソッド]
-
- Calculate jacobian to keep interlocking joint velocity same.
dtheta_0 = dtheta_1 =>[... 0 1 0 ... 0 -1 0 .... ][...dtheta_0...dtheta_1...]
:calc-vel-for-interlocking-joints link-list &key (interlocking-joint-pairs (send self :interlocking-joint-pairs)) [メソッド]
-
- Calculate 0 velocity for keeping interlocking joint at the same joint angle.
:set-midpoint-for-interlocking-joints &key (interlocking-joint-pairs (send self :interlocking-joint-pairs)) [メソッド]
-
- Set interlocking joints at mid point of each joint angle.
:interlocking-joint-pairs [メソッド]
-
- Interlocking joint pairs.
pairs are (list (cons joint0 joint1) ... )
If users want to use interlocking joints, please overwrite this method.
-
- Check if all interlocking joint pairs are same values.
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
eusmodel-validity-check robot [関数]
-
- Check if the robot model is validate
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
bodyset [クラス]
:super cascaded-coords
:slots (geometry::bodies :type cons)
-
-
-
- Create bodyset object
-
-
-
-
-
-
-
-
midcoords geometry::p geometry::c1 geometry::c2 [関数]
-
- Returns mid (or p) coordinates of given two cooridnates c1 and c2
orient-coords-to-axis geometry::target-coords geometry::v &optional (geometry::axis :z) [関数]
-
- orient 'axis' in 'target-coords' to the direction specified by 'v' destructively.
'v' must be non-zero vector.
geometry::face-to-triangle-aux geometry::f [関数]
-
- triangulate the face.
geometry::face-to-triangle geometry::f [関数]
-
- convert face to set of triangles.
geometry::face-to-tessel-triangle geometry::f geometry::num [関数]
-
- return polygon if triangable, return nil if it is not.
body-to-faces geometry::abody [関数]
-
- return triangled faces of given body
make-sphere geometry::r &rest args [関数]
-
- make sphere of given r
make-ring geometry::ring-radius geometry::pipe-radius &rest args &key (geometry::segments 16) [関数]
-
- make ring of given ring and pipe radius
-
- make a cylinder whose base face is a fan. the angle of fan
is defined by :angle keyword. and, the csg of the returned body is
(:cylinder radius height segments angle)
x-of-cube geometry::cub [関数]
-
- return x of cube.
y-of-cube geometry::cub [関数]
-
- return y of cube.
z-of-cube geometry::cub [関数]
-
- return z of cube.
height-of-cylinder geometry::cyl [関数]
-
- return height of cylinder.
radius-of-cylinder geometry::cyl [関数]
-
- return radius of cylinder.
radius-of-sphere geometry::sp [関数]
-
- return radius of shape.
geometry::make-faceset-from-vertices geometry::vs [関数]
-
- create faceset from vertices.
matrix-to-euler-angle geometry::m geometry::axis-order [関数]
-
- return euler angle from matrix.
geometry::quaternion-from-two-vectors geometry::a geometry::b [関数]
-
- Comupute quaternion which rotate vector a into b.
-
-
-
-
-
-
-
-
-
-
robot-model [クラス]
:super cascaded-link
:slots larm-end-coords rarm-end-coords lleg-end-coords rleg-end-coords head-end-coords torso-end-coords larm-root-link rarm-root-link lleg-root-link rleg-root-link head-root-link torso-root-link larm-collision-avoidance-links rarm-collision-avoidance-links larm rarm lleg rleg torso head force-sensors imu-sensors cameras support-polygons
-
-
:camera sensor-name [メソッド]
-
- Returns camera with given name
:force-sensor sensor-name [メソッド]
-
- Returns force sensor with given name
:imu-sensor sensor-name [メソッド]
-
- Returns imu sensor of given name
:force-sensors [メソッド]
-
- Returns force sensors.
:imu-sensors [メソッド]
-
- Returns imu sensors.
:cameras [メソッド]
-
- Returns camera sensors.
:look-at-hand l/r [メソッド]
-
- look at hand position, l/r supports :rarm, :larm, :arms, and '(:rarm :larm)
-
- solve inverse kinematics, move move-target to target-coords
look-at-target suppots t, nil, float-vector, coords, list of float-vector, list of coords
link-list is set by default based on move-target ->root link link-list
-
- move move-target using dif-pos and dif-rot,
look-at-target suppots t, nil, float-vector, coords, list of float-vector, list of coords
link-list is set by default based on move-target ->root link link-list
:look-at-target look-at-target &key (target-coords) [メソッド]
-
- move robot head to look at targets, look-at-target support t/nil float-vector coordinates, center of list of float-vector or list of coordinates
:init-pose [メソッド]
-
- Set robot to initial posture.
-
- Returns torque vector
-
- Calculates end-effector force and moment from joint torques.
-
- fullbody inverse kinematics for legged robot.
necessary args : target-coords, move-target, and link-list must include legs' (or leg's) parameters
ex. (send robot:fullbody-inverse-kinematics (list rarm-tc rleg-tc lleg-tc) :move-target (list rarm-mt rleg-mt lleg-mt) :link-list (list rarm-ll rleg-ll lleg-ll))
:print-vector-for-robot-limb vec [メソッド]
-
- Print angle vector with limb alingment and limb indent.
For example, if robot is rarm, larm, and torso, print result is:
#f(
rarm-j0 ... rarm-jN
larm-j0 ... larm-jN
torso-j0 ... torso-jN
)
-
- Calculate zmp[mm] from sensor local forces and moments
If force_z is large, zmp can be defined and returns 3D zmp.
Otherwise, zmp cannot be defined and returns nil.
:foot-midcoords &optional (mid 0.5) [メソッド]
-
- Calculate midcoords of :rleg and :lleg end-coords.
In the following codes, leged robot is assumed.
-
- Fix robot's legs to a coords
In the following codes, leged robot is assumed.
-
- Move robot COG to change centroid-on-foot location,
leg : legs for target of robot's centroid, which should be :both, :rleg, and :lleg.
fix-limbs : limb names which are fixed in this IK.
-
- Calculate walking pattern from foot step list and return pattern list as a list of angle-vector, root-coords, time, and so on.
:gen-footstep-parameter &key (ratio 1.0) [メソッド]
-
- Generate footstep parameter
-
- Calculate foot step list from goal x position [mm], goal y position [mm], and goal yaw orientation [deg].
:go-pos-quadruped-params->footstep-list xx yy th &key (type :crawl) [メソッド]
-
- Calculate foot step list for quadruped walking from goal x position [mm], goal y position [mm], and goal yaw orientation [deg].
:support-polygons [メソッド]
-
- Return support polygons.
:support-polygon name [メソッド]
-
- Return support polygon.
If name is list, return convex hull of all polygons.
Otherwise, return polygon with given name
:make-default-linear-link-joint-between-attach-coords attach-coords-0 attach-coords-1 end-coords-name linear-joint-name [メソッド]
-
- Make default linear arctuator module such as muscle and cylinder and append lins and joint-list.
Module includes parent-link =>(j0) =>l0 =>(j1) =>l1 (linear actuator) =>(j2) =>l2 =>end-coords.
attach-coords-0 is root side coords which linear actulator is attached to.
attach-coords-1 is end side coords which linear actulator is attached to.
end-coords-name is the name of end-coords.
linear-joint-name is the name of linear actuator.
-
- Calculate static balance point which is equivalent to static extended ZMP.
target-points are end-effector points on which force-list and moment-list apply.
force-list [N] and moment-list [Nm] are list of force and moment at target-points.
static-balance-point-height is height of static balance point [mm].
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
2016-04-05