pyrobosim.core.world.World.remove_robot

World.remove_robot(robot: Robot | str, show: bool = True, remove_ros_interfaces: bool = True) bool

Removes a robot from the world.

Parameters:
  • robot – Robot instance or name to remove.

  • show – If True (default), causes the GUI to be updated. This is mostly for internal usage to speed up reloading.

  • remove_ros_interfaces – If True (default), and the world has a ROS interface, it removes them. This is configurable since resetting the world is prone to a rclpy bug. See https://github.com/ros2/rclpy/issues/1206 for more details.

Returns:

True if the robot was successfully removed, else False.