import{S as pt,i as dt,s as mt,e as n,k as m,w as nt,t as u,M as ut,c as s,d as a,m as h,a as i,x as st,h as f,b as A,G as e,g as w,y as it,L as ht,q as rt,o as ct,B as lt,v as ft}from"../../chunks/vendor-hf-doc-builder.js";import{D as gt}from"../../chunks/Docstring-hf-doc-builder.js";import{I as yt}from"../../chunks/IconCopyLink-hf-doc-builder.js";function vt(K){let r,P,c,p,L,g,I,$,O,S,o,y,C,x,R,F,N,H,W,v,E,B,G,_,J,M,V,j,U,b,z,D;return g=new yt({}),y=new gt({props:{name:"class simulate.Actuator",anchor:"simulate.Actuator",parameters:[{name:"mapping",val:": typing.List[simulate.assets.action_mapping.ActionMapping]"},{name:"actuator_tag",val:": typing.Optional[str] = None"},{name:"n",val:": typing.Union[int, typing.List[int], NoneType] = None"},{name:"low",val:": typing.Union[float, typing.List[float], numpy.ndarray, NoneType] = None"},{name:"high",val:": typing.Union[float, typing.List[float], numpy.ndarray, NoneType] = None"},{name:"shape",val:": typing.Optional[typing.List[int]] = None"},{name:"dtype",val:": str = 'float32'"},{name:"seed",val:": typing.Optional[int] = None"}],parametersDescription:[{anchor:"simulate.Actuator.mapping",description:`<strong>mapping</strong> (<code>List[ActionMapping]</code>) &#x2014;
A list of ActionMapping (to physics engine behaviors)`,name:"mapping"},{anchor:"simulate.Actuator.actuator_tag",description:`<strong>actuator_tag</strong> (<code>str</code>, <em>optional</em>, defaults to &#x201C;actuator&#x201D;) &#x2014;:
A string tag for the actuator that is used to group actuators together when sending actions
(we always have a scene-level gym dict space).`,name:"actuator_tag"},{anchor:"simulate.Actuator.n",description:`<strong>n</strong> (<code>int</code> or <code>List[int]</code>, <em>optional</em>, defaults to <code>None</code>) &#x2014;
For discrete actions, the number of possible actions.
For multi-binary actions, the number of possible binary actions or a list of the number of possible actions
for each dimension.`,name:"n"},{anchor:"simulate.Actuator.low",description:`<strong>low</strong> (<code>float</code> or <code>List[float]</code> or <code>np.ndarray</code>, <em>optional</em>, defaults to <code>None</code>) &#x2014;
Low bound of continuous action space dimensions, either a float or list of floats.`,name:"low"},{anchor:"simulate.Actuator.high",description:`<strong>high</strong> (<code>float</code> or <code>List[float]</code> or <code>np.ndarray</code>, <em>optional</em>, defaults to <code>None</code>) &#x2014;
High bound of continuous action space dimensions, either a float or list of floats.`,name:"high"},{anchor:"simulate.Actuator.shape",description:`<strong>shape</strong> (<code>List[int]</code>, <em>optional</em>, defaults to <code>None</code>) &#x2014;
Shape of continuous action space, should match low/high.`,name:"shape"},{anchor:"simulate.Actuator.dtype",description:`<strong>dtype</strong> (<code>str</code>, <em>optional</em>, defaults to <code>&quot;float32&quot;</code>) &#x2014;
Sampling type for continuous action spaces only.`,name:"dtype"}],source:"https://github.com/huggingface/simulate/blob/vr_332/src/simulate/assets/actuator.py#L41"}}),{c(){r=n("meta"),P=m(),c=n("h1"),p=n("a"),L=n("span"),nt(g.$$.fragment),I=m(),$=n("span"),O=u("Actuators"),S=m(),o=n("div"),nt(y.$$.fragment),C=m(),x=n("p"),R=u(`An Asset Actuator can be used to move an asset in the scene.
The actuator is designed to be a part of an Actor that manipulates a scene.`),F=m(),N=n("p"),H=u("We define:"),W=m(),v=n("ul"),E=n("li"),B=u(`the space were the actions operate (discrete, continuous), it\u2019s similar to gym spaces in RL,
self.action_space is a gym.space (define the space action happens in and allow to sample)`),G=m(),_=n("li"),J=u(`a mapping to the physics engine behavior
self.mapping is a list of `),M=n("code"),V=u("ActionMapping"),j=u(" (to physics engine behaviors)"),U=m(),b=n("p"),z=u("Under construction \u{1F6A7}."),this.h()},l(t){const l=ut('[data-svelte="svelte-1phssyn"]',document.head);r=s(l,"META",{name:!0,content:!0}),l.forEach(a),P=h(t),c=s(t,"H1",{class:!0});var T=i(c);p=s(T,"A",{id:!0,class:!0,href:!0});var Q=i(p);L=s(Q,"SPAN",{});var X=i(L);st(g.$$.fragment,X),X.forEach(a),Q.forEach(a),I=h(T),$=s(T,"SPAN",{});var Y=i($);O=f(Y,"Actuators"),Y.forEach(a),T.forEach(a),S=h(t),o=s(t,"DIV",{class:!0});var d=i(o);st(y.$$.fragment,d),C=h(d),x=s(d,"P",{});var Z=i(x);R=f(Z,`An Asset Actuator can be used to move an asset in the scene.
The actuator is designed to be a part of an Actor that manipulates a scene.`),Z.forEach(a),F=h(d),N=s(d,"P",{});var tt=i(N);H=f(tt,"We define:"),tt.forEach(a),W=h(d),v=s(d,"UL",{});var k=i(v);E=s(k,"LI",{});var et=i(E);B=f(et,`the space were the actions operate (discrete, continuous), it\u2019s similar to gym spaces in RL,
self.action_space is a gym.space (define the space action happens in and allow to sample)`),et.forEach(a),G=h(k),_=s(k,"LI",{});var q=i(_);J=f(q,`a mapping to the physics engine behavior
self.mapping is a list of `),M=s(q,"CODE",{});var at=i(M);V=f(at,"ActionMapping"),at.forEach(a),j=f(q," (to physics engine behaviors)"),q.forEach(a),k.forEach(a),d.forEach(a),U=h(t),b=s(t,"P",{});var ot=i(b);z=f(ot,"Under construction \u{1F6A7}."),ot.forEach(a),this.h()},h(){A(r,"name","hf:doc:metadata"),A(r,"content",JSON.stringify(_t)),A(p,"id","simulate.Actuator"),A(p,"class","header-link block pr-1.5 text-lg no-hover:hidden with-hover:absolute with-hover:p-1.5 with-hover:opacity-0 with-hover:group-hover:opacity-100 with-hover:right-full"),A(p,"href","#simulate.Actuator"),A(c,"class","relative group"),A(o,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8")},m(t,l){e(document.head,r),w(t,P,l),w(t,c,l),e(c,p),e(p,L),it(g,L,null),e(c,I),e(c,$),e($,O),w(t,S,l),w(t,o,l),it(y,o,null),e(o,C),e(o,x),e(x,R),e(o,F),e(o,N),e(N,H),e(o,W),e(o,v),e(v,E),e(E,B),e(v,G),e(v,_),e(_,J),e(_,M),e(M,V),e(_,j),w(t,U,l),w(t,b,l),e(b,z),D=!0},p:ht,i(t){D||(rt(g.$$.fragment,t),rt(y.$$.fragment,t),D=!0)},o(t){ct(g.$$.fragment,t),ct(y.$$.fragment,t),D=!1},d(t){a(r),t&&a(P),t&&a(c),lt(g),t&&a(S),t&&a(o),lt(y),t&&a(U),t&&a(b)}}}const _t={local:"simulate.Actuator",title:"Actuators"};function At(K){return ft(()=>{new URLSearchParams(window.location.search).get("fw")}),[]}class $t extends pt{constructor(r){super();dt(this,r,At,vt,mt,{})}}export{$t as default,_t as metadata};
