zlp_utils module¶
Complementary module with useful classes to support the usage of zlp libraries.
-
class
z_laser_zlp1.zlp_utils.
UserT
(x0, y0, resolution, size_horiz, size_vert)[source]¶ Bases:
object
This class provides a method to calculate the user points T1, T2, T3 from T0 and the properties of the reference system.
Parameters: - x0 (float) – x-position of the user T0 point
- y0 (float) – y-position of the user T0 point
- resolution (float) – resolution of the user reference system {T}
- size_horiz (float) – horizontal dimension of the refence system in real dimensions {P}
- size_vert (float) – vertical size of the refence system in real dimensions {P}
-
class
z_laser_zlp1.zlp_utils.
CoordinateSystemParameters
[source]¶ Bases:
object
This class is used as data object with the necessary parameters to define a coordinate system.
-
DEFAULT_SHOW_TIME
= 1
-
static
req_to_param
(req)[source]¶ Convert ROS request object to CoordinateSystemParameters object.
Parameters: req (object) – ROS request object with the parameters of a coordinate system Returns: same parameters of the coordinate system now in a CoordinateSystemParameters object Return type: object
-
static
param_to_req
(params)[source]¶ Convert CoordinateSystemParameters object to ROS request object.
Parameters: params (object) – CoordinateSystemParameters object with the parameters of a coordinate system Returns: same parameters of the coordinate system now in a ROS request object Return type: object
-
-
class
z_laser_zlp1.zlp_utils.
ProjectionElementParameters
[source]¶ Bases:
object
This class is used as data object with the necessary information to create a projection element.
-
position
¶ object with the x,y,z position of the projection element’s characteristic point
Type: object
-
figures_list
= ['/polyline/', '/circle/', '/arc/', '/oval/', '/text/', '/pointer/']
-
-
class
z_laser_zlp1.zlp_utils.
GeometryTool
(thrift_client)[source]¶ Bases:
object
This class implement functions to generate basic geometry and math tools.
Parameters: thrift_client (object) – object with the generated client to communicate with the projector -
create_matrix4x4
()[source]¶ Initialize 4x4 matrix.
Returns: matrix object initialized with empty values Return type: object
-
create_2d_point
(x=0, y=0)[source]¶ Initialize 2-dimension array.
Parameters: Returns: object with the values of the 2 axes (x,y)
Return type:
-
create_3d_point
(x=0, y=0, z=0)[source]¶ Initialize 3-dimension array.
Parameters: Returns: object with the values of the 3 axes (x,y,z)
Return type:
-
static
vector_point_distance
(point1, point2)[source]¶ Return the euclidean distance between 2 points.
Parameters: Returns: euclidean distance between point1 and point2
Return type:
-