components.robot.common package¶
Submodules¶
components.robot.common.check_args module¶
test_args module contains test for input arguments. It checks if input argument passed by user is valid or not. If any invalid data is found, the called function in test_args returns false
-
components.robot.common.check_args.
is_mat_list
(list_matrices)¶ is_mat_list checks(arg1) checks if arg1 is a list containing numpy matrix data type elements or not. If not, False is returned.
-
components.robot.common.check_args.
is_vector
(item)¶
-
components.robot.common.check_args.
np2vtk
(mat)¶
-
components.robot.common.check_args.
rpy2r
(theta, order)¶
-
components.robot.common.check_args.
se2_constructor_args_check
(x, y, rot, theta, so2, se2)¶
-
components.robot.common.check_args.
se2_valid
(obj)¶
-
components.robot.common.check_args.
so2_angle_list_check
(ang_list)¶
-
components.robot.common.check_args.
so2_input_matrix
(args_in)¶
-
components.robot.common.check_args.
so2_input_types_check
(args_in)¶
-
components.robot.common.check_args.
so2_interp_check
(obj1, obj2, s)¶
-
components.robot.common.check_args.
so2_valid
(obj)¶
-
components.robot.common.check_args.
so3_constructor_args_check
(args_in)¶
-
components.robot.common.check_args.
super_pose_add_sub_check
(obj, other)¶
-
components.robot.common.check_args.
super_pose_appenditem
(obj, item)¶
-
components.robot.common.check_args.
super_pose_divide_check
(obj, other)¶
-
components.robot.common.check_args.
super_pose_multiply_check
(obj, other)¶
-
components.robot.common.check_args.
super_pose_subclass_check
(obj, other)¶
-
components.robot.common.check_args.
tr2angvec
(tr, unit)¶
-
components.robot.common.check_args.
tr2eul
(tr, unit, flip)¶
-
components.robot.common.check_args.
tr2rpy
(tr, unit, order)¶
-
components.robot.common.check_args.
unit_check
(unit)¶
-
components.robot.common.check_args.
valid_pose
(obj)¶
components.robot.common.common module¶
Common Module contains code shared by robotics and machine vision toolboxes
-
components.robot.common.common.
create_homogeneous_transform_from_point
(p)¶ Create a homogeneous transform to move to a given point
Parameters: p (numpy.ndarray) – The (x, y, z) point we want our homogeneous tranform to move to Returns: 4x4 Homogeneous Transform of a point Return type: numpy.matrix
-
components.robot.common.common.
create_point_from_homogeneous_transform
(T)¶ Create a point from a homogeneous transform
Parameters: T (numpy matrix) – The 4x4 homogeneous transform Returns: The (x, y, z) coordinates of a point from a transform Return type: np.ndarray
-
components.robot.common.common.
flip_base
(ee_pos, direction, value, animation=False)¶
-
components.robot.common.common.
get_rotation_from_homogeneous_transform
(transform)¶ Extract the rotation section of the homogeneous transformation
Parameters: transform (numpy.ndarray) – The 4x4 homogeneous transform to extract the rotation matrix from. Returns: 3x3 Rotation Matrix Return type: numpy.matrix
-
components.robot.common.common.
ishomog
(tr, dim, rtest='')¶ ISHOMOG Test if SE(3) homogeneous transformation matrix. ISHOMOG(T) is true if the argument T is of dimension 4x4 or 4x4xN, else false. ISHOMOG(T, ‘valid’) as above, but also checks the validity of the rotation sub-matrix. See Also: isrot, ishomog2, isvec
-
components.robot.common.common.
isrot
(rot, dtest=False)¶ ISROT Test if SO(2) or SO(3) rotation matrix ISROT(rot) is true if the argument if of dimension 2x2, 2x2xN, 3x3, or 3x3xN, else false (0). ISROT(rot, ‘valid’) as above, but also checks the validity of the rotation. See also ISHOMOG, ISROT2, ISVEC.
-
components.robot.common.common.
isrot2
(rot, dtest=False)¶
-
components.robot.common.common.
isvec
(v, l=3)¶ ISVEC Test if vector
-
components.robot.common.common.
round_end_effector_position
(ee_pos, direction, point, offset=None)¶
components.robot.common.pose module¶
-
class
components.robot.common.pose.
SE2
(theta=None, unit='rad', x=None, y=None, rot=None, so2=None, se2=None, null=False)¶ Bases:
components.robot.common.pose.SO2
-
SE3
()¶
-
inv
()¶ Returns an inverse SE2 object of same length
-
static
is_valid
(obj)¶ Checks if a np.matrix is a valid SO2 pose.
-
log
()¶
-
classmethod
rand
()¶
-
t_matrix
()¶ Returns list of translation matrices of SE2 object
-
transl
¶
-
transl_vec
¶ Returns list of translation vectors of SE2 object
-
xyt
(unit='rad')¶ Return list of 3x1 dimension vectors containing x, y translation components and theta
-
-
class
components.robot.common.pose.
SE3
(x=None, y=None, z=None, rot=None, so3=None, se3=None, null=False)¶ Bases:
components.robot.common.pose.SO3
-
classmethod
Rx
(theta, unit='rad', x=None, y=None, z=None)¶
-
classmethod
Ry
(theta, unit='rad', x=None, y=None, z=None)¶
-
classmethod
Rz
(theta, unit='rad', x=None, y=None, z=None)¶
-
static
form_trans_matrix
(rot, transl)¶
-
classmethod
np
(arg_in)¶
-
classmethod
rand
()¶
-
classmethod
se3
(args_in)¶
-
transl
¶
-
classmethod
-
class
components.robot.common.pose.
SO2
(args_in=None, unit='rad', null=False)¶ Bases:
components.robot.common.super_pose.SuperPose
-
SE2
()¶ Returns SE2 object with same rotational component as SO2 and a zero translation component
-
angle
¶ Returns angle of SO2 object matrices in unit radians
-
static
check
(obj)¶
-
det
¶ Returns a list containing determinants of all matrices in a SO2 object
-
eig
()¶
-
static
exp
()¶
-
static
form_trans_matrix
(rot, transl)¶
-
interp
(other, s)¶ Returns the interpolated SO2 object
-
inv
()¶ Returns inverse SO2 object
-
static
is_valid
(obj)¶ Checks if a np.matrix is a valid SO2 pose.
-
log
()¶
-
new
()¶ Returns a deep copy of SO2 object
-
plot
()¶
-
classmethod
rand
()¶
-
t_matrix
()¶ Returns a list of transformation matrices
-
unit
¶
-
-
class
components.robot.common.pose.
SO3
(args_in=None, null=False)¶ Bases:
components.robot.common.super_pose.SuperPose
-
classmethod
Rx
(theta, unit='rad')¶
-
classmethod
Ry
(theta, unit='rad')¶
-
classmethod
Rz
(theta, unit='rad')¶
-
angvec
()¶
-
animate
(other=None, duration=5, gif=None)¶
-
approach_vec
()¶
-
static
check
(self)¶
-
ctraj
(T1, N)¶
-
det
()¶
-
eig
()¶
-
classmethod
eul
(theta, unit='rad')¶
-
exp
()¶
-
interp
()¶
-
inv
()¶
-
log
()¶
-
new
()¶
-
norm_vec
()¶
-
classmethod
np
(args_in)¶
-
classmethod
oa
(o, a)¶
-
orient_vec
()¶
-
plot
()¶
-
classmethod
rand
()¶
-
rotation
()¶
-
classmethod
rpy
(thetas, order='zyx', unit='rad')¶
-
classmethod
se3
(args_in)¶
-
classmethod
so3
(args_in)¶
-
t_matrix
()¶ Returns transformation matrices associated with the pose object. Return data type is list or np.matrix depending on number of transformation matrices present.
-
to_se3
()¶
-
toangvec
()¶
-
toeul
()¶
-
torpy
()¶
-
trnorm
()¶
-
classmethod
components.robot.common.quaternion module¶
-
class
components.robot.common.quaternion.
Quaternion
(s=None, v=None)¶ Bases:
object
-
conj
()¶
-
double
()¶ Return the quaternion as 4-element vector. Code retrieved from: https://github.com/petercorke/robotics-toolbox-python/blob/master/robot/Quaternion.py Original authors: Luis Fernando Lara Tobar and Peter Corke @rtype: 4-vector @return: the quaternion elements
-
inv
()¶
-
matrix
()¶
-
norm
()¶ Return the norm of this quaternion. Code retrieved from: https://github.com/petercorke/robotics-toolbox-python/blob/master/robot/Quaternion.py Original authors: Luis Fernando Lara Tobar and Peter Corke @rtype: number @return: the norm
-
classmethod
pure
(vec)¶
-
classmethod
qt
(arg_in)¶
-
r
()¶ Return an equivalent rotation matrix. Code retrieved from: https://github.com/petercorke/robotics-toolbox-python/blob/master/robot/Quaternion.py Original authors: Luis Fernando Lara Tobar and Peter Corke @rtype: 3x3 orthonormal rotation matrix @return: equivalent rotation matrix
-
tr
()¶
-
unit
()¶ Return an equivalent unit quaternion Code retrieved from: https://github.com/petercorke/robotics-toolbox-python/blob/master/robot/Quaternion.py Original authors: Luis Fernando Lara Tobar and Peter Corke @rtype: quaternion @return: equivalent unit quaternion
-
-
class
components.robot.common.quaternion.
UnitQuaternion
(s=None, v=None)¶ Bases:
components.robot.common.quaternion.Quaternion
-
classmethod
Rx
(angle, unit='rad')¶
-
classmethod
Ry
(angle, unit='rad')¶
-
classmethod
Rz
(angle, unit='rad')¶
-
classmethod
angvec
(theta, v, unit='rad')¶
-
animate
(qr=None, duration=5, gif=None)¶
-
dot
(omega)¶
-
dotb
(omega)¶
-
classmethod
eul
(arg_in, unit='rad')¶
-
interp
(qr, r=0.5, shortest=False)¶ Algorithm source: https://en.wikipedia.org/wiki/Slerp :param qr: UnitQuaternion :param shortest: Take the shortest path along the great circle :param r: interpolation point :return: interpolated UnitQuaternion
-
matrix
()¶
-
new
()¶
-
classmethod
omega
(w)¶
-
plot
()¶
-
q2r
()¶
-
q2tr
()¶
-
classmethod
qt
(arg_in)¶
-
classmethod
rot
(arg_in)¶
-
classmethod
rpy
(arg_in, unit='rad')¶
-
to_angvec
(unit='rad')¶
-
to_rot
()¶
-
to_rpy
()¶
-
to_se3
()¶
-
to_so3
()¶
-
to_vec
()¶
-
static
tr2q
(t)¶ Converts a homogeneous rotation matrix to a Quaternion object Code retrieved from: https://github.com/petercorke/robotics-toolbox-python/blob/master/robot/Quaternion.py Original authors: Luis Fernando Lara Tobar and Peter Corke :param t: homogeneous matrix :return: quaternion object
-
classmethod
vec
(arg_in)¶
-
classmethod
components.robot.common.serial_link module¶
-
class
components.robot.common.serial_link.
Link
(j, theta, d, a, alpha, length, offset=None, kind='', mdh=0, flip=None, qlim=None)¶ Bases:
abc.ABC
Link object class.
-
A
(q)¶
-
display
(unit='rad')¶ Display the link’s properties nicely
Return type: None
-
set_theta
(theta)¶ Sets theta to the new theta and computes the new transformation matrix
Parameters: theta (int) – The new theta for the link Return type: None
-
update_velocity
(accel, time)¶ Updates the current velocity of the link when acted upon by some acceleration over some time
Parameters: - accel (int) – The acceleration acting upon the link (radians per second^2)
- time (int) – The time the accelration is applied over (seconds)
Return type: None
-
-
class
components.robot.common.serial_link.
Prismatic
(j, theta, d, a, alpha, offset, qlim, length)¶ Bases:
components.robot.common.serial_link.Link
Prismatic object class.
-
class
components.robot.common.serial_link.
Revolute
(j, theta, d, a, alpha, offset, qlim, length)¶ Bases:
components.robot.common.serial_link.Link
Revolute object class.
-
class
components.robot.common.serial_link.
SerialLink
(links, name=None, base=None, tool=None, stl_files=None, q=None, colors=None, param=None, blueprint=None)¶ Bases:
object
SerialLink object class.
-
fkine
(stance, unit='rad', apply_stance=False, num_links=4)¶ Calculates forward kinematics for a list of joint angles. :param stance: stance is list of joint angles. :param unit: unit of input angles. :param apply_stance: If True, then applied tp actor_list. :param actor_list: Passed to apply transformations computed by fkine. :param timer: internal use only (for animation). :return: homogeneous transformation matrix.
-
length
¶ length property :return: int
-
components.robot.common.states module¶
-
class
components.robot.common.states.
Block
(position, status, final_destination)¶ Bases:
object
-
class
components.robot.common.states.
BlockFace
(xPos, yPos, zPos, face, blockWidth=0.49)¶ Bases:
object
-
get_face_coordinate
()¶
-
-
class
components.robot.common.states.
BuildingStates
¶ Bases:
enum.IntEnum
An enumeration.
-
DONE
= 3¶
-
DONE_ORIGIN
= 2¶
-
EMPTY
= 4¶
-
WAITING_FOR_FERRYING
= 0¶
-
WAITING_FOR_FILLING
= 1¶
-
-
class
components.robot.common.states.
MoveBlocksStore
(blocks_to_remove, division)¶ Bases:
object
-
class
components.robot.common.states.
PathPlanners
¶ Bases:
enum.Enum
An enumeration.
-
AStar
= 1¶
-
FaceStar
= 0¶
-
-
class
components.robot.common.states.
RobotBehaviors
¶ Bases:
enum.Enum
An enumeration.
-
BUILD
= 3¶
-
FERRY
= 0¶
-
MOVE
= 2¶
-
SIMULATION
= 5¶
-
UPDATE
= 4¶
-
WAIT
= 1¶
-
-
class
components.robot.common.states.
RobotCommunicator
(robot_communicator, robot_id)¶ Bases:
object
components.robot.common.super_pose module¶
-
class
components.robot.common.super_pose.
SuperPose
¶ Bases:
abc.ABC
-
append
(item)¶
-
data
¶ Always returns a list containing the matrices of the pose object. :return: A list of matrices.
-
dim
¶ Returns dimensions of first matrix in pose object. Assumed that all matrices have same dimension. :return: tuple
-
isSE
¶ Checks if object is of type SE2 or SE3 or none of them. :return: bool
-
is_equal
(other)¶
-
ishomog
()¶
-
ishomog2
()¶
-
isrot
()¶
-
isrot2
()¶
-
length
¶ Property to return number of matrices in pose object :return: int
-
mat
¶ Property to return the matrices of pose object. :return: Returns np.matrix type if only one matrix is present. Else returns a list of np.matrix.
-
render
()¶
-
t_2_r
()¶
-
tr_2_rt
()¶
-
tranimate
()¶
-
trplot
()¶
-
trplot2
()¶
-
trprint
()¶
-
components.robot.common.transforms module¶
This file contains all of the transforms functions that will be used within the toolbox
-
components.robot.common.transforms.
angvec2r
(theta, v)¶ ANGVEC2R(THETA, V) is an orthonormal rotation matrix (3x3) equivalent to a rotation of THETA about the vector V.
Parameters: - theta – rotation in radians
- v – vector
Returns: rotation matrix
Notes:: - If THETA == 0 then return identity matrix. - If THETA ~= 0 then V must have a finite length.
-
components.robot.common.transforms.
angvec2tr
(theta, v)¶ ANGVEC2TR(THETA, V) is a homogeneous transform matrix (4x4) equivalent to a rotation of THETA about the vector V.
Parameters: - theta – rotation in radians
- v – vector
Returns: homogenous transform matrix
Notes:: - The translational part is zero. - If THETA == 0 then return identity matrix. - If THETA ~= 0 then V must have a finite length.
-
components.robot.common.transforms.
eul2r
(phi, theta=None, psi=None, unit='rad')¶ EUL2R Convert Euler angles to rotation matrix
Parameters: - phi – x axis rotation
- theta – y axis rotation
- psi – z axis rotation
- unit – ‘rad’ or ‘deg’ for angles
Returns: rotation matrix
R = EUL2R(PHI, THETA, PSI, UNIT) is an SO(3) orthonornal rotation matrix (3x3) equivalent to the specified Euler angles. These correspond to rotations about the Z, Y, Z axes respectively. If PHI, THETA, PSI are column vectors (Nx1) then they are assumed to represent a trajectory and R is a three-dimensional matrix (3x3xN), where the last index corresponds to rows of PHI, THETA, PSI.
R = EUL2R(EUL, OPTIONS) as above but the Euler angles are taken from the vector (1x3) EUL = [PHI THETA PSI]. If EUL is a matrix (Nx3) then R is a three-dimensional matrix (3x3xN), where the last index corresponds to rows of RPY which are assumed to be [PHI,THETA,PSI].
Options:: ‘deg’ Angles given in degrees (radians default)
Note:: - The vectors PHI, THETA, PSI must be of the same length.
-
components.robot.common.transforms.
eul2tr
(phi, theta=None, psi=None, unit='rad')¶ EUL2TR Convert Euler angles to homogeneous transform
Parameters: - phi – x axis rotation
- theta – y axis rotation
- psi – z axis rotation
- unit – ‘rad’ or ‘deg’ for angles
Returns: rotation matrix
T = EUL2TR(PHI, THETA, PSI, OPTIONS) is an SE(3) homogeneous transformation matrix (4x4) with zero translation and rotation equivalent to the specified Euler angles. These correspond to rotations about the Z, Y, Z axes respectively. If PHI, THETA, PSI are column vectors (Nx1) then they are assumed to represent a trajectory and R is a three-dimensional matrix (4x4xN), where the last index corresponds to rows of PHI, THETA, PSI.
R = EUL2R(EUL, OPTIONS) as above but the Euler angles are taken from the vector (1x3) EUL = [PHI THETA PSI]. If EUL is a matrix (Nx3) then R is a three-dimensional matrix (4x4xN), where the last index corresponds to rows of RPY which are assumed to be [PHI,THETA,PSI].
Options:: ‘deg’ Angles given in degrees (radians default)
Note:: - The vectors PHI, THETA, PSI must be of the same length. - The translational part is zero.
-
components.robot.common.transforms.
np2vtk
(mat)¶
-
components.robot.common.transforms.
oa2r
(o, a=None)¶ OA2R Convert orientation and approach vectors to rotation matrix
Parameters: - o – vector parallel to Y- axes
- a – vector parallel to the z-axes
Returns: rotation matrix
R = OA2R(O, A) is an SO(3) rotation matrix (3x3) for the specified orientation and approach vectors (3x1) formed from 3 vectors such that R = [N O A] and N = O x A.
Notes:: - The matrix is guaranteed to be orthonormal so long as O and A are not parallel. - The vectors O and A are parallel to the Y- and Z-axes of the coordinate frame.
-
components.robot.common.transforms.
oa2tr
(o, a=None)¶ OA2TR Convert orientation and approach vectors to homogeneous transformation
Parameters: - o – vector parallel to Y- axes
- a – vector parallel to the z-axes
Returns: homogeneous transform
T = OA2TR(O, A) is an SE(3) homogeneous tranformation (4x4) for the specified orientation and approach vectors (3x1) formed from 3 vectors such that R = [N O A] and N = O x A.
Notes:: - The rotation submatrix is guaranteed to be orthonormal so long as O and A are not parallel. - The translational part is zero. - The vectors O and A are parallel to the Y- and Z-axes of the coordinate frame.
-
components.robot.common.transforms.
r2t
(rmat)¶ R2T Convert rotation matrix to a homogeneous transform
Parameters: rmat – rotation matrix Returns: homogeneous transformation R2T(rmat) is an SE(2) or SE(3) homogeneous transform equivalent to an SO(2) or SO(3) orthonormal rotation matrix rmat with a zero translational component. Works for T in either SE(2) or SE(3): if rmat is 2x2 then return is 3x3, or if rmat is 3x3 then return is 4x4.
Translational component is zero.
-
components.robot.common.transforms.
rot2
(theta, unit='rad')¶ ROT2 SO(2) Rotational Matrix
Parameters: - theta – rotation in radians or degrees
- unit – “rad” or “deg” to indicate unit being used
Returns: rotational matrix (2x2)
ROT2(THETA) is an SO(2) rotation matrix (2x2) representing a rotation of THETA radians. ROT2(THETA, ‘deg’) as above but THETA is in degrees.
-
components.robot.common.transforms.
rotx
(theta, unit='rad')¶ ROTX gives rotation about X axis
Parameters: - theta – angle for rotation matrix
- unit – unit of input passed. ‘rad’ or ‘deg’
Returns: rotation matrix
rotx(THETA) is an SO(3) rotation matrix (3x3) representing a rotation of THETA radians about the x-axis rotx(THETA, “deg”) as above but THETA is in degrees
-
components.robot.common.transforms.
roty
(theta, unit='rad')¶ ROTY Rotation about Y axis
Parameters: - theta – angle for rotation matrix
- unit – unit of input passed. ‘rad’ or ‘deg’
Returns: rotation matrix
roty(THETA) is an SO(3) rotation matrix (3x3) representing a rotation of THETA radians about the y-axis roty(THETA, “deg”) as above but THETA is in degrees
-
components.robot.common.transforms.
rotz
(theta, unit='rad')¶ ROTZ Rotation about Z axis
Parameters: - theta – angle for rotation matrix
- unit – unit of input passed. ‘rad’ or ‘deg’
Returns: rotation matrix
rotz(THETA) is an SO(3) rotation matrix (3x3) representing a rotation of THETA radians about the z-axis rotz(THETA, “deg”) as above but THETA is in degrees
-
components.robot.common.transforms.
rpy2r
(thetas, order='zyx', unit='rad')¶ RPY2R Roll-pitch-yaw angles to rotation matrix
Parameters: - thetas – list of angles
- order – ‘xyz’, ‘zyx’ or ‘yxz’
- unit – ‘rad’ or ‘deg’
Returns: rotation matrix
RPY2R(ROLL, PITCH, YAW, OPTIONS) is an SO(3) orthonormal rotation matrix (3x3) equivalent to the specified roll, pitch, yaw angles angles. These correspond to rotations about the Z, Y, X axes respectively. If ROLL, PITCH, YAW are column vectors (Nx1) then they are assumed to represent a trajectory and R is a three-dimensional matrix (3x3xN), where the last index corresponds to rows of ROLL, PITCH, YAW.
R = RPY2R(RPY, OPTIONS) as above but the roll, pitch, yaw angles are taken from the vector (1x3) RPY=[ROLL,PITCH,YAW]. If RPY is a matrix(Nx3) then R is a three-dimensional matrix (3x3xN), where the last index corresponds to rows of RPY which are assumed to be [ROLL,PITCH,YAW].
- Options::
- ‘deg’ Compute angles in degrees (radians default) ‘xyz’ Rotations about X, Y, Z axes (for a robot gripper) ‘yxz’ Rotations about Y, X, Z axes (for a camera)
Note:: - Toolbox rel 8-9 has the reverse angle sequence as default. - ZYX order is appropriate for vehicles with direction of travel in the X direction. XYZ order is appropriate if direction of travel is in the Z direction.
-
components.robot.common.transforms.
rpy2tr
(thetas, order='zyx', unit='rad')¶ RPY2TR Roll-pitch-yaw angles to homogeneous transform
Parameters: - thetas – list of angles
- order – order can be ‘xyz’/’arm’, ‘zyx’/’vehicle’, ‘yxz’/’camera’
- unit – unit of input angles
Returns: homogeneous transformation matrix
T = RPY2TR(ROLL, PITCH, YAW, OPTIONS) is an SE(3) homogeneous transformation matrix (4x4) with zero translation and rotation equivalent to the specified roll, pitch, yaw angles angles. These correspond to rotations about the Z, Y, X axes respectively. If ROLL, PITCH, YAW are column vectors (Nx1) then they are assumed to represent a trajectory and R is a three-dimensional matrix (4x4xN), where the last index corresponds to rows of ROLL, PITCH, YAW.
T = RPY2TR(RPY, OPTIONS) as above but the roll, pitch, yaw angles are taken from the vector (1x3) RPY=[ROLL,PITCH,YAW]. If RPY is a matrix (Nx3) then R is a three-dimensional matrix (4x4xN), where the last index corresponds to rows of RPY which are assumed to be ROLL,PITCH,YAW].
- Options::
- ‘deg’ Compute angles in degrees (radians default) ‘xyz’ Rotations about X, Y, Z axes (for a robot gripper) ‘yxz’ Rotations about Y, X, Z axes (for a camera)
Note:: - Toolbox rel 8-9 has the reverse angle sequence as default. - ZYX order is appropriate for vehicles with direction of travel in the X direction. XYZ order is appropriate if direction of travel is in the Z direction.
-
components.robot.common.transforms.
rt2tr
(r, t)¶ RT2TR Convert rotation and translation to homogeneous transform
Parameters: - r – rotation matrix
- t – translation
Returns: homogeneous transform
RT2TR(R, t) is a homogeneous transformation matrix (N+1xN+1) formed from an orthonormal rotation matrix R (NxN) and a translation vector t (Nx1). Works for R in SO(2) or SO(3): - If R is 2x2 and t is 2x1, then TR is 3x3 - If R is 3x3 and t is 3x1, then TR is 4x4
-
components.robot.common.transforms.
skew
(v)¶ SKEW creates Skew-symmetric metrix from vector
Parameters: v – 1 or 3 vector Returns: skew-symmetric matrix SKEW(V) is a skew-symmetric matrix formed from V.
- If V (1x1) then S =
- 0 -v |v 0 |
- and if V (1x3) then S =
- 0 -vz vy |vz 0 -vx |
|-vy vx 0 |
Notes:: - This is the inverse of the function VEX(). - These are the generator matrices for the Lie algebras so(2) and so(3).
-
components.robot.common.transforms.
skewa
(s)¶ SKEWA creates augmented skew-symmetric matrix
Parameters: s – 3 or 6 vector Returns: augmented skew-symmetric matrix SKEWA(V) is an augmented skew-symmetric matrix formed from V.
- If V (1x3) then S =
- 0 -v3 v1 |v3 0 v2 |0 0 0 |
- and if V (1x6) then S =
- 0 -v6 v5 v1 |v6 0 -v4 v2 |
|-v5 v4 0 v3 | | 0 0 0 0 |
Notes:: - This is the inverse of the function VEXA(). - These are the generator matrices for the Lie algebras se(2) and se(3). - Map twist vectors in 2D and 3D space to se(2) and se(3).
-
components.robot.common.transforms.
t2r
(tmat)¶ R2T Convert homogeneous transform to a rotation matrix
Parameters: tmat – homogeneous transform Returns: rotation matrix T2R(tmat) is the orthonormal rotation matrix component of homogeneous transformation matrix tmat. Works for T in SE(2) or SE(3) if tmat is 3x3 then return is 2x2, or if tmat is 4x4 then return is 3x3.
Validity of rotational part is not checked
-
components.robot.common.transforms.
tr2angvec
(tr, unit='rad')¶ TR2ANGVEC Convert rotation matrix to angle-vector form :param tr: Rotation matrix :param unit: ‘rad’ or ‘deg’ :return: Angle-vector form TR2ANGVEC(R, OPTIONS) is rotation expressed in terms of an angle THETA (1x1) about the axis V (1x3) equivalent to the orthonormal rotation matrix R (3x3). TR2ANGVEC(T, OPTIONS) as above but uses the rotational part of the homogeneous transform T (4x4). If R (3x3xK) or T (4x4xK) represent a sequence then THETA (Kx1)is a vector of angles for corresponding elements of the sequence and V (Kx3) are the corresponding axes, one per row. Options:: ‘deg’ Return angle in degrees Notes:: - For an identity rotation matrix both THETA and V are set to zero. - The rotation angle is always in the interval [0 pi], negative rotation is handled by inverting the direction of the rotation axis. - If no output arguments are specified the result is displayed.
-
components.robot.common.transforms.
tr2eul
(tr, unit='rad', flip=False)¶ TR2EUL Convert homogeneous transform to Euler angles :param tr: Homogeneous transformation :param unit: ‘rad’ or ‘deg’ :param flip: True or False :return: Euler angles TR2EUL(T, OPTIONS) are the ZYZ Euler angles (1x3) corresponding to the rotational part of a homogeneous transform T (4x4). The 3 angles EUL=[PHI,THETA,PSI] correspond to sequential rotations about the Z, Y and Z axes respectively. TR2EUL(R, OPTIONS) as above but the input is an orthonormal rotation matrix R (3x3). If R (3x3xK) or T (4x4xK) represent a sequence then each row of EUL corresponds to a step of the sequence. Options:: ‘deg’ Compute angles in degrees (radians default) ‘flip’ Choose first Euler angle to be in quadrant 2 or 3. Notes:: - There is a singularity for the case where THETA=0 in which case PHI is arbitrarily set to zero and PSI is the sum (PHI+PSI). - Translation component is ignored.
-
components.robot.common.transforms.
tr2rpy
(tr, unit='rad', order='zyx')¶ TR2RPY Convert a homogeneous transform to roll-pitch-yaw angles :param tr: Homogeneous transformation :param unit: ‘rad’ or ‘deg’ :param order: ‘xyz’, ‘zyx’ or ‘yxz’ :return: Roll-pitch-yaw angle TR2RPY(T, options) are the roll-pitch-yaw angles (1x3) corresponding to the rotation part of a homogeneous transform T. The 3 angles RPY=[R,P,Y] correspond to sequential rotations about the Z, Y and X axes respectively. TR2RPY(R, options) as above but the input is an orthonormal rotation matrix R (3x3). If R (3x3xK) or T (4x4xK) represent a sequence then each row of RPY corresponds to a step of the sequence. Options:: ‘deg’ Compute angles in degrees (radians default) ‘xyz’ Return solution for sequential rotations about X, Y, Z axes ‘yxz’ Return solution for sequential rotations about Y, X, Z axes Notes:: - There is a singularity for the case where P=pi/2 in which case R is arbitrarily set to zero and Y is the sum (R+Y). - Translation component is ignored. - Toolbox rel 8-9 has the reverse default angle sequence as default
-
components.robot.common.transforms.
tr2rt
(t)¶ TR2RT Convert homogeneous transform to rotation and translation
Parameters: t – homogeneous transform matrix Returns: Rotation and translation of the homogeneous transform TR2RT(TR) splits a homogeneous transformation matrix (NxN) into an orthonormal rotation matrix R (MxM) and a translation vector T (Mx1), where N=M+1.
Works for TR in SE(2) or SE(3) - If TR is 4x4, then R is 3x3 and T is 3x1. - If TR is 3x3, then R is 2x2 and T is 2x1.
-
components.robot.common.transforms.
transl
(x=None, y=None, z=None)¶ TRANSL Create or unpack an SE(3) translational homogeneous transform
Parameters: - x – translation along x axes, homogeneous transform or a list of translations
- y – translation along y axes
- z – translation along z axes
Returns: homogeneous transform with pure translation
Create a translational SE(3) matrix:
T = TRANSL(X, Y, Z) is an SE(3) homogeneous transform (4x4) representing a pure translation of X, Y and Z.
T = TRANSL(P) is an SE(3) homogeneous transform (4x4) representing a translation of P=[X,Y,Z]. If P (Mx3) it represents a sequence and T (4x4xM) is a sequence of homogeneous transforms such that T(:,:,i) corresponds to the i’th row of P.
Extract the translational part of an SE(3) matrix:
P = TRANSL(T) is the translational part of a homogeneous transform T as a 3-element column vector. If T (4x4xM) is a homogeneous transform sequence the rows of P (Mx3) are the translational component of the corresponding transform in the sequence.
[X,Y,Z] = TRANSL(T) is the translational part of a homogeneous transform T as three components. If T (4x4xM) is a homogeneous transform sequence then X,Y,Z (1xM) are the translational components of the corresponding transform in the sequence.
-
components.robot.common.transforms.
transl2
(x=None, y=None)¶ TRANSL2 Create or unpack an SE(2) translational homogeneous transform
Parameters: - x – x translation, homogeneous transform or a list of translations
- y – y translation
Returns: homogeneous transform matrix or the translation elements of a
homogeneous transform
Create a translational SE(2) matrix:
T = TRANSL2(X, Y) is an SE(2) homogeneous transform (3x3) representing a pure translation.
T = TRANSL2(P) is a homogeneous transform representing a translation or point P=[X,Y]. If P (Mx2) it represents a sequence and T (3x3xM) is a sequence of homogeneous transforms such that T(:,:,i) corresponds to the i’th row of P.
Extract the translational part of an SE(2) matrix:
P = TRANSL2(T) is the translational part of a homogeneous transform as a 2-element column vector. If T (3x3xM) is a homogeneous transform sequence the rows of P (Mx2) are the translational component of the corresponding transform in the sequence.
-
components.robot.common.transforms.
trexp
(S, theta=None)¶ TREXP matrix exponential for so(3) and se(3)
Parameters: - S – SO(3), SE(3), unit vector or twist vector
- theta – Rotation in radians
Returns: matrix exponential
For so(3):
TREXP(OMEGA) is the matrix exponential (3x3) of the so(3) element OMEGA that yields a rotation matrix (3x3).
TREXP(OMEGA, THETA) as above, but so(3) motion of THETA*OMEGA.
TREXP(S, THETA) as above, but rotation of THETA about the unit vector S.
TREXP(W) as above, but the so(3) value is expressed as a vector W (1x3) where W = S * THETA. Rotation by ||W|| about the vector W.
For se(3):
TREXP(SIGMA) is the matrix exponential (4x4) of the se(3) element SIGMA that yields a homogeneous transformation matrix (4x4).
TREXP(TW) as above, but the se(3) value is expressed as a twist vector TW (1x6).
TREXP(SIGMA, THETA) as above, but se(3) motion of SIGMA*THETA, the rotation part of SIGMA (4x4) must be unit norm.
TREXP(TW, THETA) as above, but se(3) motion of TW*THETA, the rotation part of TW (1x6) must be unit norm.
Notes:: - Efficient closed-form solution of the matrix exponential for arguments that are so(3) or se(3). - If theta is given then the first argument must be a unit vector or a skew-symmetric matrix from a unit vector. - Angle vector argument order is different to ANGVEC2R.
-
components.robot.common.transforms.
trexp2
(S, theta=None)¶ TREXP2 matrix exponential for so(2) and se(2)
:param S:S: SO(2), SE(2) or unit vector :param theta: :return: matrix exponential
R = TREXP2(OMEGA) is the matrix exponential (2x2) of the so(2) element OMEGA that yields a rotation matrix (2x2).
R = TREXP2(THETA) as above, but rotation by THETA (1x1).
SE(2):
T = TREXP2(SIGMA) is the matrix exponential (3x3) of the se(2) element SIGMA that yields a homogeneous transformation matrix (3x3).
T = TREXP2(TW) as above, but the se(2) value is expressed as a vector TW (1x3).
T = TREXP2(SIGMA, THETA) as above, but se(2) rotation of SIGMA*THETA, the rotation part of SIGMA (3x3) must be unit norm.
T = TREXP(TW, THETA) as above, but se(2) rotation of TW*THETA, the rotation part of TW must be unit norm.
Notes:: - Efficient closed-form solution of the matrix exponential for arguments that are
so(2) or se(2).- If theta is given then the first argument must be a unit vector or a skew-symmetric matrix from a unit vector.
-
components.robot.common.transforms.
trlog
(T)¶ TRLOG logarithm of SO(3) or SE(3) matrix
Parameters: T – SO(3) or SE(3) Matrix Returns: [rotation, vector] [theta,w] = trlog(R) as above but returns directly theta the rotation angle and w (3x1) the unit-vector indicating the rotation axis.
[theta,twist] = trlog(T) as above but returns directly theta the rotation angle and a twist vector (6x1) comprising [v w].
Notes:: - Efficient closed-form solution of the matrix logarithm for arguments that are SO(3) or SE(3). - Special cases of rotation by odd multiples of pi are handled. - Angle is always in the interval [0,pi].
-
components.robot.common.transforms.
trot2
(theta, unit='rad')¶ TROT2 SE2 rotation matrix
Parameters: - theta – rotation in radians or degrees
- unit – “rad” or “deg” to indicate unit being used
Returns: homogeneous transform matrix (3x3)
TROT2(THETA) is a homogeneous transformation (3x3) representing a rotation of THETA radians. TROT2(THETA, ‘deg’) as above but THETA is in degrees. Notes:: - Translational component is zero.
-
components.robot.common.transforms.
trotx
(theta, unit='rad', xyz=[0, 0, 0])¶ TROTX Rotation about X axis
Parameters: - theta – rotation in radians or degrees
- unit – “rad” or “deg” to indicate unit being used
- xyz – the xyz translation, if blank defaults to [0,0,0]
Returns: homogeneous transform matrix
trotx(THETA) is a homogeneous transformation (4x4) representing a rotation of THETA radians about the x-axis. trotx(THETA, ‘deg’) as above but THETA is in degrees trotx(THETA, ‘rad’, [x,y,z]) as above with translation of [x,y,z]
-
components.robot.common.transforms.
troty
(theta, unit='rad', xyz=[0, 0, 0])¶ TROTY Rotation about Y axis
Parameters: - theta – rotation in radians or degrees
- unit – “rad” or “deg” to indicate unit being used
- xyz – the xyz translation, if blank defaults to [0,0,0]
Returns: homogeneous transform matrix
troty(THETA) is a homogeneous transformation (4x4) representing a rotation of THETA radians about the y-axis. troty(THETA, ‘deg’) as above but THETA is in degrees troty(THETA, ‘rad’, [x,y,z]) as above with translation of [x,y,z]
-
components.robot.common.transforms.
trotz
(theta, unit='rad', xyz=[0, 0, 0])¶ TROTZ Rotation about Z axis
Parameters: - theta – rotation in radians or degrees
- unit – “rad” or “deg” to indicate unit being used
- xyz – the xyz translation, if blank defaults to [0,0,0]
Returns: homogeneous transform matrix
trotz(THETA) is a homogeneous transformation (4x4) representing a rotation of THETA radians about the z-axis. trotz(THETA, ‘deg’) as above but THETA is in degrees trotz(THETA, ‘rad’, [x,y,z]) as above with translation of [x,y,z]
-
components.robot.common.transforms.
unitize
(v)¶ UNIT Unitize a vector
Parameters: v – given unit vector Returns: a unit-vector parallel to V. Reports error for the case where V is non-symbolic and norm(V) is zero
-
components.robot.common.transforms.
vex
(s)¶ VEX Convert skew-symmetric matrix to vector
:param s:skew-symmetric matrix :return: vector
VEX(S) is the vector which has the corresponding skew-symmetric matrix S. In the case that S (2x2) then V is 1x1
- S = | 0 -v |
- v 0 |
- In the case that S (3x3) then V is 3x1.
- 0 -vz vy |
- S = | vz 0 -vx |
- |-vy vx 0 |
Notes:: - This is the inverse of the function SKEW(). - Only rudimentary checking (zero diagonal) is done to ensure that the matrix is actually skew-symmetric. - The function takes the mean of the two elements that correspond to each unique element of the matrix.


--- layout: post title: Good Geoprocessing practices date: 2010-08-22 18:39:22.000000000 -05:00 type: post published: true status: publish categories: - Geoprocessing with Python tags: - GIS Geoprocessing in Python meta: _edit_last: '15714693' _wp_old_slug: '' _wpas_skip_twitter: '1' author: login: broberts65 email<EMAIL_ADDRESS>display_name: Bob Roberts first_name: '' last_name: '' ---
Something that I learned as good practice is working with copies of my shapefiles and not the originals. When doing this you do create several temporary tables and/or shapefiles and these need to be cleaned up.
[sourcecode language="Python"]
## System arguments
# Input Streets shapefile
Streets = sys.argv[1]
# Output Streets shapefile
Streets_output = sys.argv[2]
# Output Streets shapefile
Streets_output2 = sys.argv[3]
# facility streets layer
facilstr = sys.argv[5]
# Set the workspace for the processing files
gp.workspace = os.path.dirname(sys.argv[2])
# Make copies so that processing doesn't take place on the original.
gp.AddMessage("\nCreating processing files...")
gp.Copy_management(Streets, "Streets_process.shp")
gp.Copy_management(facilstr, "facilstreets.shp")
gp.AddMessage ("Copies created")
[/sourcecode]
This creates copies of the input shapefiles which I then use for processing. Because there are these temp files, in the end of the script I need to delete those temp files. For this you need to import the "os" and "glob" functions such as import os, glob in the beginning of the script. Then at the end of the script we use these functions to clean up the temp files. I also cleanup the xml files that are created when working with temporary tables.
[sourcecode language="Python"]
gp.AddMessage("Cleanup...")
# Delete "process" files
for file in glob.glob(gp.workspace+"/Streets_process*"):
os.remove(file)
for file in glob.glob(gp.workspace+"/facilstreets*"):
os.remove(file)
for file in glob.glob(gp.workspace+"/*.xml"):
os.remove(file)
gp.AddMessage("\nDone.\n")
[/sourcecode]


Pennsylvania man who requested friends for Thanksgiving gets overwhelming response
by Bob D'Angelo, Cox Media Group National Content DeskARCHIBALD. Pa. -
All Carl Braun wanted was some friends for Thanksgiving. Members of a Pennsylvania community stepped up to make sure he was not alone.
Braun left a message on WNEP's "Talkback 16" line Wednesday night, the television station reported.
"I've got a request. I don't want no food. How about some friends? Fifteen years, I haven't had anybody to spend Thanksgiving with -- my birthday, Christmas, New Year's. It's getting boring as hell, but I love what you're doing to help other people," Braun said in his message.
More than 100 people braved rainy weather and gathered in Archibald to wish Braun a Happy Thanksgiving, WNEP reported.
That came after officials at the television station called Braun, 60, a disabled veteran.
"I seriously thought it was a joke," Braun told WNEP.
It wasn't. Thanks to word of mouth and social media, people gathered at a park in Archibald to pass along Thanksgiving wishes to the lonely guy.
"I just could not believe that many people did have open hearts, that cared," Braun told the television station.
Braun suddenly had an invitation for Thanksgiving dinner and has already been invited to a Christmas Eve bash.
"In over 25 years, since I lost my mom, this is one of the first Thanksgivings where I can actually say I'm having fun," Braun told WNEP.


Thanks for your reply I appreciate it. I really want to get get into game development. Would this be a waste of time for me? Or would this help me with building lets say like a 2d map builder for a game engine
Writing games has never really interested me so I can't comment on the usefulness for that but yes it could be useful for making tools to support other aspects such as a map builder.*
_______________________________________________________
* I'm assuming that you are talking CLR (.net) in general rather than C++/CLI (C++/CLI is a different language to C++).


I chose to explore the path traversed by the viewer* as (s)he witnesses fruit rotting.
* powerless, disgusted, morally/emotionally implied (despite logic)
Focus on fruit?
Fruit as videos: hovering to play (3fps?), clicking to fast-forward (increments of 3fps?)
powerlessness through minimal power: we are used to having no power on the internet and scrolling/clicking away is easy....
Disgust element through clarity
real videos (of fruit rotting, from YouTube) within shape of given fruit, highly simplified
or
animation
or
abstract animation with text overlay
decisions:
video in basic shape reminiscent of fruit size/shape
fast-forward when click?
layered?
hover: become top layer, play
active:frame
rotate when scroll away?
click to move?
However the "fruit" appear, I want there to be three exceptions to the rules: one (tomato?) will be fixed, so that it is impossible to scroll away/forget it (and somewhat difficult to avoid, at least at first); one will bounce along the screen; one will not rot at all (again, troubling certain elements of inevitability to increase sense of inevitability)


Welcome to Hex.pm, the Erlang community's package hosting service. The purpose of this project is three-fold:
The project was started in January 2014 by Eric Meadows-Jönsson, and has since grown to include the contribution of over over 35 Programmers and millions of package downloads.
Some insights into the technical aspects of the site: It's 100% Elixir. The main site and API is a Phoenix application. Packages are hosted on Amazon S3, and the time between publishing a new package and having it ready for installation is minimal. For more info, please check out the code, which is APACHE licensed over at GitHub.


vignettes/a04_understanding_overall_suit.Rmd
a04_understanding_overall_suit.Rmd
The overall suitability can be computed using the
overall_suit
function, which takes an object of class
suitability. For example,
## Loading required package: Rcpp
banana_suit <- suit("banana", terrain=MarinduqueLT)
## Warning in suitability(terrain, crop_soil, mf = mf, sow_month = NULL, minimum
## = minimum, : maximum is set to 16 for factor CECc since all parameter intervals
## are equal.
class(banana_suit[["terrain"]])
## [1] "character"
class(banana_suit[["soil"]])
## [1] "suitability"
If we take a look at the output of both terrain and soil characteristics, we have:
lapply(banana_suit[["terrain"]], function(x) head(x)) # lapply is used to show the head of each item in the list
## [[1]]
## [1] "Error: No factor(s) to be evaluated, since none matches with the crop requirements. If water or temp characteristics was specified then maybe you forgot to specify the sow_month argument, read doc for suit."
## $`Factors Evaluated`
## [1] "CFragm" "CECc" "pHH2O" "SoilTe"
##
## $`Suitability Score`
## CFragm CECc pHH2O SoilTe
## 1 0.8533333 0.7500 0 0.96
## 2 0.8800000 0.7500 0 0.96
## 3 0.8666667 0.7500 0 0.96
## 4 0.8666667 0.7500 0 0.96
## 5 0.8400000 0.7500 0 0.96
## 6 0.8533333 0.8125 0 0.96
##
## $`Suitability Class`
## CFragm CECc pHH2O SoilTe
## 1 S1 S1 N S1
## 2 S1 S1 N S1
## 3 S1 S1 N S1
## 4 S1 S1 N S1
## 5 S1 S1 N S1
## 6 S1 S1 N S1
##
## $`Factors' Minimum Values`
## CFragm CECc pHH2O SoilTe
## 0 0 0 0
##
## $`Factors' Maximum Values`
## CFragm CECc pHH2O SoilTe
## 75.00 16.00 8.94 12.50
##
## $`Factors' Weights`
## [1] 3 3 3 2
##
## $`Crop Evaluated`
## [1] "BANANASoil"
##
## $Warning
## [1] "maximum is set to 16 for factor CECc since all parameter intervals are equal."
There are no factors targetted for the terrain characteristics, that is why the returned value is a string error. Thus, only the soil characteristics can have an overall suitability, and is computed as follows:
ovsuit <- overall_suit(banana_suit[["soil"]])
head(ovsuit)
## Score Class
## 1 0 N
## 2 0 N
## 3 0 N
## 4 0 N
## 5 0 N
## 6 0 N
By default, the overall_suit
function uses minimum as a
summary statistics, hence the 0 scores and N classes across land units.
To adjust this to average aggregation, use the method
argument to specify.
ovsuit <- overall_suit(banana_suit[["soil"]], method="average")
head(ovsuit)
## Score Class
## 1 0.6505051 S2
## 2 0.6569697 S2
## 3 0.6537374 S2
## 4 0.6537374 S2
## 5 0.6472727 S2
## 6 0.6656566 S2
By default, the overall_suit
uses an equally spaced
interval for the suitability classes, that is, N [0, 0.25), S3 [0.25,
0.50), S2 [0.50, 0.75), and S1 [0.75, 1]. This can be changed using the
interval
argument, for example
ovsuit <- overall_suit(banana_suit[["soil"]], method="average", interval=c(0, 0.6, 0.7, 0.9, 1))
head(ovsuit)
## Score Class
## 1 0.6505051 S3
## 2 0.6569697 S3
## 3 0.6537374 S3
## 4 0.6537374 S3
## 5 0.6472727 S3
## 6 0.6656566 S3
The above code sets the suitability class intervals into: N [0,
0.60), S3 [0.60, 0.70), S2 [0.70, 0.90), and S1 [0.90, 1]. It should be
emphasized that the interval
argument cannot be set to
unbias
as in the case of the interval
argument
of the suit
function. This follows from the fact that the
overall_suit
function does not use a membership function
for computing the score, but an aggregation function.


{% extends "main/baseloggedin.html" %} {% load crispy_forms_tags %} {% load static %} {% block content %}
You will be presented with two data entries from your training dataset below. Please compare the records and decide whether they are distinct or duplicate (i.e. if they refer to the same entity or not). It is recommended to provide at least 10 examples of duplicate and distinct entries before storing the data.
| Entity 1 | Entity 2 |
|---|


TO CONTACT ME:
NATASHA WACHIRA
004 Posts
2891 Followers
Follow
Message
Have a lovely day ahead!
THANKYOU VERY MUCH FOR VISITING MY WEBSITE.


The Document Object Model (DOM) is a programming interface for HTML and XML documents. It represents the page so that programs can change the document structure, style, and content. The DOM represents the document as nodes and objects. That way, programming languages can connect to the page. A Web page is a document. This document can be either displayed in the browser window or as the HTML source. But it is the same document in both cases. The Document Object Model (DOM) represents that same document so it can be manipulated. The DOM is an object-oriented representation of the web page, which can be modified with a scripting language such as JavaScript.
All of the properties, methods, and events available for manipulating and creating web pages are organized into objects (for example, the document object that represents the document itself, the table object that implements the special HTMLTableElement DOM interface for accessing HTML tables, and so forth). This documentation provides an object-by-object reference to the DOM. The modern DOM is built using multiple APIs that work together. The core DOM defines the objects that fundamentally describe a document and the objects within it. This is expanded upon as needed by other APIs that add new features and capabilities to the DOM. For example, the HTML DOM API adds support for representing HTML documents to the core DOM.
var paragraphs = document.getElementsByTagName("p");
// paragraphs[0] is the first element
// paragraphs[1] is the second
element, etc.
alert(paragraphs[0].nodeName);


Repository Management¶
Cloning the repository¶
You can clone this repository from GitHub using HTTPS or SSH, but it is recommended that that you use SSH: first ensure that you have generated an SSH key pair on your local machine and add the public key of that pair to your GitHub account (use the GitHub guide at https://help.github.com/articles/connecting-to-github-with-ssh/). Then run
git clone --recursive<EMAIL_ADDRESS>To clone over HTTPS use
git clone --recursive https://github.com/OasisLMF/OasisApi
You may receive a password prompt - to bypass the password prompt use
git clone --recursive https://<GitHub user name:GitHub<EMAIL_ADDRESS>The --recursive
option ensures the cloned repository contains the
necessary Oasis repositories oasis_utils and
OasisAPIClient as Git submodules.
Managing the submodules¶
Run the command
git submodule
to list the submodules (latest commit IDs, paths and branches). If any are missing then you can add them using
git submodule add <submodule GitHub repo URL> <local path/destination>
It is a quirk of Git that the first time you clone a repository with submodules they will be checked out as commits not branches, which is not what you want. You should run the command
git submodule foreach 'git checkout master'
to ensure that the submodules are checked out on the master
branches.
If you’ve already cloned the repository and wish to update the submodules (all at once) in your working directory from their GitHub repositories then run
git submodule foreach 'git pull origin'
You can also update the submodules individually by pulling from within them.
Unless you’ve been given read access to this repository on GitHub (via
an OasisLMF organizational team) you should not make any local changes
to these submodules because you have read-only access to their GitHub
repositories. So submodule changes can only propagate from GitHub to
your local repository. To detect these changes you can run
git status -uno
and to commit them you can add the paths and commit
them in the normal way.


Dependencies ({{ existDependencies?.length+dependencies?.length }})
No Dependencies Added
You can add dependencies either by searching or by going to 'choose dependencies' section by clicking 'View Dependency List'
OR
You can choose to add dependencies mentioned in the insights section.


--- layout: default title: Forks permalink: /housekeeping-forks ---
Forks to personal user accounts are a great way to contribute code.
Forks to organizations can be troublesome, as they promote multiple (sometimes even incompatible) versions of the same component within a company.
Therefore, you should try to reduce them.
See this blog post for more information.


--- layout: post title: Can't help but feel a little smug tags: - Security - Web status: publish type: post published: true meta: _edit_last: '451289' --- BBC NEWS | Technology | Hi-tech criminals target Twitter
Only those using Microsoft Windows are vulnerable to infection from these malicious programs.It perhaps aught to read "... and are stupid enough to download unknown material" as well?


Please sign in
Email Address
Password
* Attention! You have only 3 attempts.
Have no account?
Sign Up
Forgot password?
If you have any issues please write to:
<EMAIL_ADDRESS>Code
* Attention! You have only 3 attempts.
Please sign up
Email Address
Password
Confirm password
* Password must be at least 8 characters long. It should contain uppercase and lowercase letters, numbers and special characters.
← Sign In
Email sending... Please wait the server response!
Please type your email
Email Address
← Sign In
Email sending... Please wait the server response!
{{errorMessage}}
{{resetAnswer}}
You have the wrong password 3 times.
Your account was blocked.
It will unblock after
{{blockTimeLeft}}
.
If you have any issues please write to:
<EMAIL_ADDRESS>Your account has been unlocked.
Please
Login