sustainable-robotics/robot_chooser
0
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_descriptionspackage - 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
- Clone this repository.
- Build the Docker image:
docker build -t right_sized_robot_selector .- Run the Docker container:
docker run -p 7860:7860 right_sized_robot_selector- Open your web browser and navigate to
http://localhost:7860to access the app.
Usage
- Generate the catalog JSON (recommended offline):
conda run -n pycap python generate_catalog_json.py --output robot_catalog.json --samples 40- Start the app: the landing table is read from
robot_catalog.json. - Fallback behavior: if
robot_catalog.jsonis missing at startup, the app attempts to run the generator script automatically. - Open a robot detail view: click any row in the catalog table to switch to that robot's dedicated model view.
- Adjust the robot pose: use sliders or the neutral-pose button to inspect robot configurations interactively.
- Generate reachable-space STL caches (recommended offline):
python generate_reachable_space_stls.py --output-dir reachable_space_stls- 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).
