pyrobosim.core.world.World.sample_free_robot_pose_uniform

World.sample_free_robot_pose_uniform(robot=None, ignore_robots=True)

Sample an unoccupied robot pose in the world. This is done using uniform sampling within the world X-Y bounds and rejecting any samples that are in collision with entities in the world. If no valid samples could be found within the max_object_sample_tries instance attribute, this will return None. :param robot: Robot instance, if specified. :type robot: pyrobosim.core.robot.Robot, optional :param ignore_robots: If True, ignore collisions with other robots. :type ignore_robots: bool :return: Collision-free pose if found, else None. :rtype: pyrobosim.utils.pose.Pose