Frame Transform

class pyrobot.algorithms.frame_transform.FrameTransform(configs, world, ros_launch_manager=None, robots={}, sensors={}, algorithms={})[source]

Bases: pyrobot.algorithms.algorithm.Algorithm

Base class of frame transformation algorithms.

Specifically, this algorithm handles getting transformation of the latest known timestamp, including position and orientation, between two frames.

__init__(configs, world, ros_launch_manager=None, robots={}, sensors={}, algorithms={})[source]

Initialize self. See help(type(self)) for accurate signature.

check_cfg()[source]

This function checks required configs shared by all frameTransform instances in constructor.

get_transform(source_frame, target_frame)[source]
This function takes in a source frame and a target frame,

get a transform from source frame to target frame.

Args:

source_frame: string of source frame name target_frame: string of target frame name

Returns:

position: list of position vector in the form of [x, y, z]. Unit: meters. quarternion: list of quaternion vector in the form of [x, y, z, w]

If a transform cannot be found, this function should raise an error.