Skip to content

set_origin_poseSetOriginPoseSetOriginPoseset_origin_poseT_set_origin_pose🔗

Short description🔗

set_origin_poseSetOriginPoseSetOriginPoseset_origin_poseT_set_origin_pose — Translate the origin of a 3D pose.

Signature🔗

set_origin_pose( pose PoseIn, real DX, real DY, real DZ, out pose PoseNewOrigin )void SetOriginPose( const HTuple& PoseIn, const HTuple& DX, const HTuple& DY, const HTuple& DZ, HTuple* PoseNewOrigin )static void HOperatorSet.SetOriginPose( HTuple poseIn, HTuple DX, HTuple DY, HTuple DZ, out HTuple poseNewOrigin )def set_origin_pose( pose_in: Sequence[Union[int, float]], dx: float, dy: float, dz: float ) -> Sequence[Union[int, float]]

Herror T_set_origin_pose( const Htuple PoseIn, const Htuple DX, const Htuple DY, const Htuple DZ, Htuple* PoseNewOrigin )

HPose HPose::SetOriginPose( double DX, double DY, double DZ ) const

HPose HPose.SetOriginPose( double DX, double DY, double DZ )

Description🔗

set_origin_poseSetOriginPose translates the origin of the 3D pose PoseInposeInpose_in by the vector given by DXDXdx, DYDYdy, and DZDZdz and returns the result in PoseNewOriginposeNewOriginpose_new_origin. Note that the translation is performed relative to the local coordinate system of the pose itself. For example, if PoseInposeInpose_in describes the pose of an object in camera coordinates, PoseNewOriginposeNewOriginpose_new_origin is obtained by translating the object’s coordinate system by DXDXdx along its own x-axis (and so on for the other axes) and not along the x-axis of the camera coordinate system. This corresponds to the following chain of transformations:

\[\begin{eqnarray*} \textrm{PoseNewOrigin} = \textrm{PoseIn} \cdot \mvHomMatrixThreeDRotTrans{ \mvMatrixPlain{1 & 0 & 0 \\ 0 & 1 & 0 \\ 0 & 0 & 1}}{ \mvVectorThreeD{\textrm{DX}}{\textrm{DY}}{\textrm{DZ}}} \end{eqnarray*}\]

Thus, set_origin_poseSetOriginPose is a shortcut for the following sequence of operator calls:

 
pose_to_hom_mat3d(PoseIn, HomMat3DIn)PoseToHomMat3d(PoseIn, HomMat3DIn)PoseToHomMat3d(PoseIn, HomMat3DIn)pose_to_hom_mat3d(PoseIn, HomMat3DIn)pose_to_hom_mat3d(PoseIn, HomMat3DIn)
hom_mat3d_translate_local(HomMat3DIn, DX, DY, DZ, HomMat3DNewOrigin)HomMat3dTranslateLocal(HomMat3DIn, DX, DY, DZ, HomMat3DNewOrigin)HomMat3dTranslateLocal(HomMat3DIn, DX, DY, DZ, HomMat3DNewOrigin)hom_mat3d_translate_local(HomMat3DIn, DX, DY, DZ, HomMat3DNewOrigin)hom_mat3d_translate_local(HomMat3DIn, DX, DY, DZ, HomMat3DNewOrigin)
hom_mat3d_to_pose(HomMat3DNewOrigin, PoseNewOrigin)HomMat3dToPose(HomMat3DNewOrigin, PoseNewOrigin)HomMat3dToPose(HomMat3DNewOrigin, PoseNewOrigin)hom_mat3d_to_pose(HomMat3DNewOrigin, PoseNewOrigin)hom_mat3d_to_pose(HomMat3DNewOrigin, PoseNewOrigin)

A typical application of this operator when defining a world coordinate system by placing the standard calibration plate on the plane of measurements. In this case, the external camera parameters returned by camera_calibrationCameraCalibration correspond to a coordinate system that lies above the measurement plane, because the coordinate system of the calibration plate is located on its surface and the plate has a certain thickness. To correct the pose, call set_origin_poseSetOriginPose with the translation vector (0,0,\(D\)), where \(D\) is the thickness of the calibration plate.

Execution information🔗

Execution information
  • Multithreading type: reentrant (runs in parallel with non-exclusive operators).

  • Multithreading scope: global (may be called from any thread).

  • Processed without parallelization.

Parameters🔗

PoseInposeInpose_in (input_control) pose → (real / integer)HTuple (double / Hlong)HPose, HTuple (double / int / long)Sequence[Union[int, float]]Htuple (double / Hlong)

original 3D pose.

Number of elements: 7

DXDXdx (input_control) real → (real)HTuple (double)HTuple (double)floatHtuple (double)

translation of the origin in x-direction.

Default: 00

DYDYdy (input_control) real → (real)HTuple (double)HTuple (double)floatHtuple (double)

translation of the origin in y-direction.

Default: 00

DZDZdz (input_control) real → (real)HTuple (double)HTuple (double)floatHtuple (double)

translation of the origin in z-direction.

Default: 00

PoseNewOriginposeNewOriginpose_new_origin (output_control) pose → (real / integer)HTuple (double / Hlong)HPose, HTuple (double / int / long)Sequence[Union[int, float]]Htuple (double / Hlong)

new 3D pose after applying the translation.

Number of elements: 7

Result🔗

set_origin_poseSetOriginPose returns 2 (H_MSG_TRUE) if all parameter values are correct. If necessary, an exception is raised.

Combinations with other operators🔗

Combinations

Possible predecessors

create_poseCreatePose, hom_mat3d_to_poseHomMat3dToPose, camera_calibrationCameraCalibration, hand_eye_calibrationHandEyeCalibration

Possible successors

write_poseWritePose, pose_to_hom_mat3dPoseToHomMat3d, image_points_to_world_planeImagePointsToWorldPlane, contour_to_world_plane_xldContourToWorldPlaneXld

See also

hom_mat3d_translate_localHomMat3dTranslateLocal

Module🔗

Foundation