def grid_to_world_2d()

in simulation_ws/src/aws_robomaker_simulation_common/nodes/route_manager.py [0:0]


    def grid_to_world_2d(self, x, y):
        """
        Transform x-y planar grid coordinates to world coordinates.

        The function adheres to the assumption that
            grid-world transform is only x-y translation and yaw rotation.

        Args
        ----
            x(int): in grid coordinates
            x(int): in grid coordinates

        Returns
        -------
            List(int): in world coordinates

        """
        x_world = self.map_origin_x0 + \
            (cos(self.map_yaw) * (self.resolution * x)
                - sin(self.map_yaw) * (self.resolution * y))
        y_world = self.map_origin_y0 + \
            (sin(self.map_yaw) * (self.resolution * x) +
                cos(self.map_yaw) * (self.resolution * y))

        return [x_world, y_world]