CoolFace
Apppublic

sustainable-robotics/robot_chooser

sourceHugging Faceupdated 3mo agoView on Hugging Face
0likes
App README

Right-Sized Robot Selector

Advanced visual lab for analyzing robotic manipulator capabilities using Pinocchio, Three.js URDF rendering, and PyCapacity. The app now opens on a catalog screen with launch-time metrics for all supported robots, then lets you drill into a dedicated detail screen for full visualization and analysis.

Features

  • —Catalog landing page with a robot comparison table available at app launch
  • —30+ robotic manipulator models from the robot_descriptions package
  • —Launch-time metrics for mass, estimated payload min/avg/max, reachable volume, DoF, and reach estimate
  • —Dedicated robot detail screen with Three.js URDF visualization and cached reachable-space overlays
  • —Interactive joint sliders for manual robot configuration in the detail view
  • —Offline STL cache generation for reachable-space meshes, loaded instantly from the detail view

Requirements

  • —Python 3.10+
  • —Pinocchio
  • —Gradio
  • —robot_descriptions package
  • —PyCapacity

To run the app locally

  1. 1.Clone this repository.
  2. 2.Build the Docker image:
docker build -t right_sized_robot_selector .
  1. 1.Run the Docker container:
docker run -p 7860:7860 right_sized_robot_selector
  1. 1.Open your web browser and navigate to http://localhost:7860 to access the app.

Usage

  1. 1.Generate the catalog JSON (recommended offline):
conda run -n pycap python generate_catalog_json.py --output robot_catalog.json --samples 40
  1. 1.Start the app: the landing table is read from robot_catalog.json.
  2. 2.Fallback behavior: if robot_catalog.json is missing at startup, the app attempts to run the generator script automatically.
  3. 3.Open a robot detail view: click any row in the catalog table to switch to that robot's dedicated model view.
  4. 4.Adjust the robot pose: use sliders or the neutral-pose button to inspect robot configurations interactively.
  1. 1.Generate reachable-space STL caches (recommended offline):
python generate_reachable_space_stls.py --output-dir reachable_space_stls
  1. 1.Show cached reachable space: in the detail view, the button loads the corresponding STL from reachable_space_stls/ instead of solving the polytope at click time.

Note: heavy capacity calculations are intentionally moved out of the app runtime into offline JSON/STL generation steps.

How it works

  • —Pinocchio: Handles forward kinematics and Jacobian calculations
  • —PyCapacity: Computes reachable-space polytopes and force/payload capacities
  • —Three.js + URDFLoader: Provides interactive 3D visualization
  • —robot_descriptions: Provides standardized URDF models for the supported robots
  • —SciPy: Computes convex-hull workspace volume estimates for the launch-time catalog and detail metrics when available

Acknowledgements

  • —Pinocchio for rigid-body kinematics and dynamics tooling.
  • —robot_descriptions repository for robot model assets used in this app (all models are sourced from there).