Difference between revisions of "K-Scale Onshape Library"

From Humanoid Robots Wiki
Jump to: navigation, search
(Created page with "The '''K-Scale Onshape Library'''<ref>https://github.com/kscalelabs/onshape</ref> is a tool developed by K-Scale Labs to convert Onshape files into simulation artifacts....")
 
 
(One intermediate revision by the same user not shown)
Line 3: Line 3:
 
=== Sample Script ===
 
=== Sample Script ===
  
Below is a sample script for converting a [[Stompy]] Onshape model to a URDF.
+
Below is a sample script for converting a [[Stompy]] Onshape model to a URDF<ref>https://github.com/kscalelabs/sim/blob/master/sim/scripts/download_urdf.sh</ref>.
  
 
<syntaxhighlight lang="bash>
 
<syntaxhighlight lang="bash>
 
#!/bin/zsh
 
#!/bin/zsh
# ./sim/scripts/download_urdf.sh
 
  
 
# URL of the latest model.
 
# URL of the latest model.

Latest revision as of 19:07, 30 April 2024

The K-Scale Onshape Library[1] is a tool developed by K-Scale Labs to convert Onshape files into simulation artifacts.

Sample Script[edit]

Below is a sample script for converting a Stompy Onshape model to a URDF[2].

#!/bin/zsh

# URL of the latest model.
url=https://cad.onshape.com/documents/71f793a23ab7562fb9dec82d/w/6160a4f44eb6113d3fa116cd/e/1a95e260677a2d2d5a3b1eb3

# Output directory.
output_dir=${MODEL_DIR}/robots/stompy

kol urdf ${url} \
    --max-ang-velocity 31.4 \
    --suffix-to-joint-effort \
        dof_x4_h=1.5 \
        dof_x4=1.5 \
        dof_x6=3 \
        dof_x8=6 \
        dof_x10=12 \
        knee_revolute=13.9 \
        ankle_revolute=6 \
    --output-dir ${output_dir} \
    --disable-mimics \
    --mesh-ext obj