Base Localizer

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

Bases: pyrobot.algorithms.algorithm.Algorithm

Base class of Base Localizer algorithms.

Specifically, this algorithm handles getting base state in world frame.

__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 base localizer instances in constructor.

Specifically, it checks for:
  1. The base localizer algorithm handles one robot, and one robot only

  2. The robot has a base

For any algorithm specific config checks, please extend the check_cfg function

with customized algorithm config checks after calling this function using super().check_cfg()

get_odom_state()[source]
Returns:

xyt_state: a size-3 array in the form of [[x], [y], [t]] where x, y is the 2D translation from world frame to robot base in meters and t is the planer orientation from world frame to robot base in radius.