libtf

Library for coordinate transformation using TF.

class libtf.LibTF

Bases: object

Coordinate transformation library using TF.

delete()
euler2quaternion(euler)

Convert from euler angles to quaternion.

Parameters

euler (geometry_msgs/Pose2D, geometry_msgs/Point, list) – Euler angles before conversion.

Returns

Quaternion.

Return type

geometry_msgs/Quaternion

frame_exists(frame)

Check for the exists of frames.

Parameters

frame (str) – Name of the check frame.

Returns

Whether it exists or not.

Return type

bool

get_pose_with_offset(conv_frame, origin_frame, buf_frame, pose)

Coordinate transformation with offset.

Parameters
  • conv_frame (str) – Name of the converted frame.

  • origin_frame (str) – Name of the original frame.

  • buf_frame (str) – Name of the buffer frame.

  • pose (geometry_msgs/Pose) – Amount of offset from the coordinate system before transformation.

Returns

Transformed pose.

Return type

geometry_msgs/Pose

get_pose_without_offset(conv_frame, origin_frame)

Coordinate transformation without offset.

Parameters
  • conv_frame (str) – Name of the converted frame.

  • origin_frame (str) – Name of the original frame.

Returns

Transformed pose.

Return type

geometry_msgs/Pose

quaternion2euler(quaternion)

Convert from quaternion to euler angles.

Parameters

quaternion (geometry_msgs/Quaternion) – Quaternion before conversion.

Returns

roll, pitch, yaw [rad].

Return type

float

send_transform(conv_frame, origin_frame, pose)

Coordinate transformation broadcast function.

Parameters
  • conv_frame (str) – Name of the converted frame.

  • origin_frame (str) – Name of the original frame.

  • pose (geometry_msgs/Pose) – Amount of offset from the coordinate system before transformation.