Instructions to use devkumarhf/ur7e-sac-line-following with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- stable-baselines3
How to use devkumarhf/ur7e-sac-line-following with stable-baselines3:
from huggingface_sb3 import load_from_hub checkpoint = load_from_hub( repo_id="devkumarhf/ur7e-sac-line-following", filename="{MODEL FILENAME}.zip", ) - Notebooks
- Google Colab
- Kaggle
Download kinematics.py from devkumarhf/ur7e-sac-line-following: direct link, hf CLI and curl.
- Browser
- Download file 767 Bytes
-
https://huggingface.co/devkumarhf/ur7e-sac-line-following/resolve/main/kinematics.py
- Command line
-
hf download hf://devkumarhf/ur7e-sac-line-following/kinematics.py
-
curl -L -o kinematics.py https://huggingface.co/devkumarhf/ur7e-sac-line-following/resolve/main/kinematics.py
767 Bytes
| """Portable NumPy FK from exported original IKPy link transforms.""" | |
| from pathlib import Path | |
| import json,numpy as np | |
| CONFIG=json.loads(Path(__file__).with_name('kinematics.json').read_text()) | |
| HOME_CONFIG=np.array(CONFIG['home'],dtype=np.float32) | |
| JOINT_LIMITS=CONFIG['limits'] | |
| def chain_points(q): | |
| t=np.eye(4);points=[] | |
| for link in CONFIG['links']: | |
| t=t@np.array(link['base_matrix']) | |
| if link['joint'] is not None: | |
| x,y,z=link['axis'];a=float(q[link['joint']]);c=np.cos(a);s=np.sin(a);v=1-c | |
| r=np.eye(4);r[:3,:3]=[[x*x*v+c,x*y*v-z*s,x*z*v+y*s],[y*x*v+z*s,y*y*v+c,y*z*v-x*s],[z*x*v-y*s,z*y*v+x*s,z*z*v+c]];t=t@r | |
| points.append(t[:3,3].copy()) | |
| return points | |
| def fk(q):return chain_points(q)[-1].astype(np.float32) | |