pyrobosim.web.commands

World and robot commands for the web frontend.

These mirror the Qt GUI’s button callbacks: long-running actions (navigate, pick, place, detect, open, close) run on background daemon threads so the web callback returns immediately, while quick ones run inline.

Functions

cancel_action(robot)

Cancels any running action for a robot.

close_location(world, robot, goal)

Closes the robot's current location, or a named location if no robot.

detect(robot, query)

Detects objects at a robot's current location.

navigate(robot, goal)

Navigates a robot to a goal entity (resolved by the world).

open_location(world, robot, goal)

Opens the robot's current location, or a named location if no robot.

pick(robot, query)

Picks an object with a robot.

place(robot)

Places the object a robot is holding.

random_goal(world)

Samples a random navigation goal name (location, hallway, or room).

random_object(world)

Samples a random object name to use as a manipulation target.

randomize_pose(world, robot)

Moves a robot to a random collision-free pose.

reset_path_planner(robot)

Resets a robot's path planner.

resolve_robot(world, robot_name)

Resolves a robot name to a robot in the world.

run_async(fn)

Runs a callable on a background daemon thread.