Server Example: Granular Media
Overview
Stands a PD-controlled ANYmal on a native granular bed created with
World::addGranularParticles (raisim::GranularSystem). The grains are
streamed to the viewer as instanced sphere visuals. See Granular Media.
Target
CMake target: granular_media. The source is
examples/src/benchmark/granular_media.cpp.
Run
Run the build-tree executable:
./build-examples/examples/granular_media
On Windows, run granular_media.exe instead.
This example uses RaisimServer. Start rayrai_tcp_viewer and connect to port
8080. Without --steps, the simulation starts once a viewer connects and
runs until you stop it.
Options
--steps Nruns a fixed number of steps without waiting for a viewer, then prints the time per step and averaged contact statistics. The exit code is 2 if the bed became unstable (non-finite positions or grains faster than--max-allowed-speed).--port=Nchanges the server port.--resolution,--layers,--radius,--spacing,--bed-length, and--bed-widthset the bed geometry;--substeps,--stiffness,--damping,--tangential-stiffness,--tangential-damping,--friction,--rolling-friction, and--hertzset the granular contact model.--settle-stepsand--robot-settle-stepsset how many steps run before the server starts, to let the bed and then the robot settle.