pyrobosim.core.world.World.add_object

World.add_object(**object_config)

Adds an object to a specific location.

If the object does not have a specified name, it will be given an automatic name using its category, e.g., "apple0".

If the location contains multiple object spawns, one will be selected at random.

Parameters:

**object_config

Keyword arguments describing the object.

You can use object=Object(...) to directly pass in a pyrobosim.core.objects.Object object, or alternatively use the same keyword arguments you would use to create an Object instance.

You can also pass in the parent entity name as the parent argument, and it will be resolved to an actual entity, if it exists in the world.

Returns:

Object instance if successfully created, else None.

Return type:

pyrobosim.core.objects.Object