pyrobosim.core.robot.Robot

class pyrobosim.core.robot.Robot(name: str = 'robot', 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], radius: float = 0.0, height: float = 0.0, color: ~typing.Sequence[float] = (0.8, 0.0, 0.8), max_linear_velocity: float = inf, max_angular_velocity: float = inf, max_linear_acceleration: float = inf, max_angular_acceleration: float = inf, path_planner: ~pyrobosim.navigation.types.PathPlanner | None = None, path_executor: ~pyrobosim.navigation.types.PathExecutor | None = None, grasp_generator: ~pyrobosim.manipulation.grasping.GraspGenerator | None = None, sensors: dict[str, ~pyrobosim.sensors.types.Sensor] | None = None, start_sensor_threads: bool = True, partial_obs_objects: bool = False, partial_obs_hallways: bool = False, action_execution_options: dict[str, ~pyrobosim.planning.actions.ExecutionOptions] = {}, initial_battery_level: float = 100.0)

Representation of a robot in the world.

Methods

__init__(name, pose[, y, z, qw, qx, qy, qz])

Creates a robot instance.

at_object_spawn()

Checks whether a robot is at an object spawn.

at_openable_location()

Checks whether the robot is at an openable location.

cancel_actions()

Cancels any currently running actions for the robot.

close_location()

Closes the robot's current location, if available.

detect_objects([target_object])

Detects all objects at the robot's current location.

do_start_sensor_threads()

Starts the robot's sensor threads.

execute_action(action[, realtime_factor])

Executes an action, specified as a pyrobosim.planning.actions.TaskAction object.

execute_plan(plan[, delay, realtime_factor])

Executes a task plan, specified as a pyrobosim.planning.actions.TaskPlan object.

follow_path(path[, realtime_factor])

Follows a specified path using the attached path executor.

get_known_closed_hallways()

Returns a list of closed hallway recorded by the robot.

get_known_objects()

Returns a list of objects known by the robot.

get_pose()

Gets the robot pose.

is_busy()

Checks whether the robot is currently executing an action or plan.

is_in_collision([pose])

Checks whether the last step of dynamics put the robot in collision.

is_moving()

Checks whether the robot is moving, either due to a navigation action or velocity commands.

navigate([start, goal, path, realtime_factor])

Executes a navigation task, which combines path planning and following.

open_location()

Opens the robot's current location, if available.

pick_object(obj_query[, grasp_pose])

Picks up an object in the world given an object and/or location query.

place_object([pose])

Places an object in a target location and (optionally) pose.

plan_path([start, goal])

Plans a path to a goal position.

print_details()

Prints string with details.

reset_path_planner()

Resets the robot's path planner, if available.

set_path_executor(path_executor)

Sets a path executor for navigation.

set_path_planner(path_planner)

Sets a path planner for navigation.

set_pose(pose)

Sets the robot pose.

set_sensors(sensors)

Sets a list of sensors.

stop_sensor_threads()

Stops the robot's active sensor threads.

to_dict()

Serializes the robot to a dictionary.

update_polygons()

Updates the world's collision polygons when hallway state changes.

Attributes

viz_color

The color of the visualization polygon patch and text.