Skip to content

REST API that gives robots step-by-step instructions on how to hug humans safely

License

Notifications You must be signed in to change notification settings

israelburns/hug-bot-api

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

3 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

HugBot API

A REST API that provides step-by-step instructions for robots on how to give safe, comfortable hugs to humans.

Endpoints

Method Endpoint Description
GET / API info and endpoint list
GET /hugs List all available hug types
GET /hugs/<type> Get instructions for a specific hug type
GET /hugs/random Get a random hug instruction set
GET /safety Safety rules all hugging robots must follow
POST /hugs/calibrate Calculate adjusted parameters for a specific human

Hug Types

  • standard - Classic two-arm embrace (beginner)
  • gentle - Light, soft hug for sensitive situations (beginner)
  • bear - Firm, enthusiastic hug (intermediate)
  • side - One-arm side hug (beginner)
  • group - Multi-human group hug (advanced)

Quick Start

pip install -r requirements.txt
python app.py

API runs at http://localhost:5000

Example

curl http://localhost:5000/hugs/bear

Returns step-by-step motor instructions, pressure limits, and timing for a bear hug.

Safety

Every hug instruction set includes force limits (in Newtons), approach speed caps, and abort conditions. The /safety endpoint returns the full safety ruleset including emergency stop triggers and fragile-human detection.

Calibration

POST to /hugs/calibrate with human parameters to get adjusted instructions:

curl -X POST http://localhost:5000/hugs/calibrate \
  -H "Content-Type: application/json" \
  -d '{"human_height_m": 1.1, "human_age_estimate": 8, "hug_type": "gentle"}'

This auto-reduces force for children, elderly, and smaller humans.

About

REST API that gives robots step-by-step instructions on how to hug humans safely

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Languages