pyrobosim.core.objects.Object

class pyrobosim.core.objects.Object(*, name: str, category: str, parent: ~pyrobosim.core.types.Entity | None = None, pose: ~pyrobosim.utils.pose.Pose = Pose: [x=0.00, y=0.00, z=0.00, qw=1.000, qx=0.000, qy=-0.000, qz=0.000], inflation_radius: float = 0.0, color: ~typing.Sequence[float] | str | None = None)

Represents an object in the world.

Methods

__init__(*, name, category, parent, pose[, ...])

Creates an object instance.

add_metadata(filename)

Add object metadata from a new file to existing metadata.

clear_metadata()

Clear out old object metadata.

create_grasp_cuboid()

Fits a grasp cuboid from the object footprint and height.

create_polygons([inflation_radius])

Creates collision and visualization polygons for the object.

get_footprint()

Returns the object footprint coordinates.

get_grasp_cuboid_pose()

Gets the cuboid pose with respect to the reference world frame.

print_details()

Prints string with details.

set_pose(pose)

Sets the pose of an object, accounting for any height offsets in the target location, and update the corresponding object polygons.

to_dict()

Serializes the object to a dictionary.

update_collision_polygon([inflation_radius])

Updates the collision polygon using the specified inflation radius.

update_visualization_polygon()

Updates the visualization polygon for the object.

Attributes

height

Vertical height of object.

metadata

Metadata for object categories.

viz_color

Visualization color (RGB tuple).