voxcraft / voxcraft-sim

a GPU-accelerated voxel-based physics engine
Creative Commons Zero v1.0 Universal
43 stars 10 forks source link

Control signals for simulated robot #11

Closed jrieffel closed 4 years ago

jrieffel commented 4 years ago

Hi Team!

What's the easiest way to change the control signals of the active soft materials? From what I understand they are simply actuated by a sinusoidal wave. Can we modify (either pre-simulation or during simulation) the phase/frequency/amplitude of the control signal? Is it possible to have separate control signals for different material types?

Thanks as always!

skriegman commented 4 years ago

Hey @jrieffel below is an example of how to change the phase/frequency/amplitude. Phase offset is per voxel.

More details here: https://gpuvoxels.readthedocs.io/en/docs/vxa-vxd/tags.html

If you still are having trouble changing the settings of actuation, feel free to email me.

<Environment>
    <Thermal>
        <TempEnabled>1</TempEnabled>
        <TempAmplitude>14.4714</TempAmplitude>
        <TempBase>25</TempBase>
        <TempPeriod>0.2</TempPeriod>
    </Thermal>
</Environment>

<Structure Compression="ASCII_READABLE">
    <X_Voxels>2</X_Voxels>
    <Y_Voxels>2</Y_Voxels>
    <Z_Voxels>2</Z_Voxels>
    <Data>
        <Layer><![CDATA[1111]]></Layer>
        <Layer><![CDATA[0011]]></Layer>
    </Data>
    <PhaseOffset>
        <Layer><![CDATA[0, 0, 0, 0, ]]></Layer>
        <Layer><![CDATA[0, 0, 0, 0, ]]></Layer>
    </PhaseOffset>
</Structure>