Skip to content

Changelog: v2.19 ​

v2.19.0 (2026-11-29) ​

RaiSim

  • Magnetic grippers can have a rectangular pad sampled at a grid of points instead of a single point: <pad size="0.06 0.04" samples="6 4" x_axis="1 0 0"/> in a <gripper type="magnetic">, or GripperDefinition::padSize, padSamples and padXAxis. Each of the nx×ny samples, at the centers of equal cells of the pad, casts its own ray along the axis and pulls the magnetic surface it finds with Fmax/(nxny)(1−dk/r)2 at its own gap dk; the pull acts on the body where that ray hit and, opposite, on the link at the sample. The pull of a pad therefore follows how much of it faces magnetic material and acts where that material is: a pad half over the edge of a steel plate pulls with half its force, at the middle of the half over the plate, a pad whose center is just off the plate still holds with the samples over it, a tilted pad pulls harder on its low side, and a pad across two steel parts pulls both. GripperState::engagedSamples counts the samples that pulled, force is their total, gap the smallest gap, position the pull-weighted mean of their hit points and object the body that took the largest pull; ArticulatedSystem::getGripperSamplePositions() returns the samples in the world frame. A grid of one sample (the default) is the point magnet with identical results. The grids are kept by world XML export and import, checkpoints and World::joinObjects() / detachJoint(), and raisimPy binds them. In thrusters_grippers (new cases), 25 lifters with 4 x 4 pads take 29.4 µs per step instead of 22.9 µs with point magnets while the pads find nothing magnetic, and 126 µs instead of 80 µs while they hold steel boxes; point magnets and suction cups give bit-identical results, and the other cases of the benchmark are unchanged except the overhanging-cup cases (1 or 25 fixed suction cups on static boxes, nothing else moving), 3-6% (11-17 ns per cup per step) slower. See Magnet pads.
  • Depth and segmentation cameras of robots created from one ArticulatedSystemResource share one table of per-pixel ray directions instead of each computing and keeping its own (74 KB for a 64x48 camera, 75 MB for 1024 RL environments); DepthCamera::updateRayDirections() or SegmentationCamera::setProperties() gives a camera a table of its own. New: CameraRayDirections, makeCameraRayDirections() and SegmentationCamera::getRayDirections(). The reference that DepthCamera::getPrecomputedRayDir() returns is now invalidated by updateRayDirections() and World::restoreCheckpoint(), which replace the table. The layout of DepthCamera and SegmentationCamera changed: rebuild code compiled against the old headers (new test SharedResources.CamerasShareRayDirectionsUntilTheirPropertiesChange).

rayrai

  • New raisin::SensorBatchRenderer (rayrai/SensorBatchRenderer.hpp) renders the cameras and spinning LiDARs of many Worlds together, for vectorized RL environments: depth cameras, segmentation cameras, RGB cameras (with simplified shading: albedo, ambient and one directional light, no shadows; setRgbLighting() for domain randomization), fisheye lenses for all three, and spinning LiDARs cast on the GPU. It mirrors every World from physics snapshots, loads each mesh file once for all of them, draws the cameras of one kind, resolution and lens type into tiles of one render target and reads their images back with one read per column of tiles into contiguous [camera][row][column] arrays; LiDAR rasters share one target and one read, and each LiDAR keeps a full-turn range image. capture() takes no OpenGL, so environment workers can capture their Worlds in parallel right after stepping them; the apply*Noise() and write*ToSensor() calls apply each sensor's noise model and fill the sensors. Each camera skips the meshes outside its view one by one (height maps in chunks of 32 x 32 cells), so a camera mounted on a robot does not draw the robot's own body or terrain out of its view, and height maps with equal heights (copies of one HeightMapResource, for instance) share one geometry and one set of meshes across all Worlds. In rsg_anymal_depth student training this raises 1024 environments from 9.7k to 70k steps per second and cuts its memory from 42.7 to 5.8 GB of RAM; 2048 environments, which ran out of memory, train at 72k steps per second in 6.4 GB. With 80x60 cameras on ANYmal C over a height map, a step of 256 environments takes 3.24 ms for depth, 4.08 ms for segmentation and 3.22 ms for RGB instead of at best 27.4, 26.6 and 77.0 ms with one RayraiWindow per environment, 10.3 ms instead of 21.5 ms for 64x512 LiDARs, and 18.4 ms instead of 187 ms for all four sensors together (new benchmark rayrai_sensor_batch_benchmark). Depth and segmentation agree with renderDepthPlaneDistance() and renderSegmentation() up to rare edge pixels, LiDAR scans with measureSpinningLidarSingleDrawGPU() exactly. It needs desktop OpenGL and is not part of the browser build; see Many environments.
  • Camera::setSensorProjection() sets the projection of a depth, RGB or segmentation camera without allocating render targets, Camera::setFisheyeRemapUniforms() sets the lens uniforms of a fisheye remap shader, and OpenGLMesh::setInstancedVaoFirstInstance() makes instanced draws start at a later record of their instance buffer on contexts without GL_ARB_base_instance.
  • Fixed: a height map with more samples per side than the GPU's largest texture made measureSpinningLidarSingleDrawGPU() throw once and then vanish from later scans without an error; it throws every time now.
  • Fixed: measureSpinningLidarSingleDrawGPU() unbound the caller's framebuffers when it created or enlarged its render target, and an exception while casting left rayrai's texture-binding cache stale, so that a later draw could sample a LiDAR table.

raisimGymTorch

  • New environment rsg_anymal_depth: ANYmal C learns to follow velocity commands (1.0 to 3.6 m/s forward, approached by a command curriculum) over rough terrain from its front depth camera, tilted 50 degrees down. Each environment walks terrains of eight kinds (terrain/types: rough noise, terraces, blocks, stairs up and down with risers of up to 25 cm, slopes of up to 0.45, and gaps of up to 30 cm) on ten levels, 128 m wide for the teacher, so that no robot reaches their edge in an episode, and 32 m wide for the student; each robot climbs a curriculum of its own on each kind. runner.py trains a teacher with PPO on 270 terrain heights, with energy, posture, foot-clearance, touchdown, foot-slip and trot terms on top of the legged_gym reward, all costs growing over training and counting per commanded meter above 1 m/s (with a velocity error relative to the command), and a step whose costs exceed its rewards counting a tenth of its sum, for an efficient, natural trot (the student's cost of transport is 0.37 at 0.9 m/s and 0.62 at 1.8 m/s); student.py trains a student on proprioception and 64x48 depth images with DAgger, records a video at every checkpoint as the teacher does, and evaluates falls, speed and gait per terrain level, per kind of terrain and at fixed speeds. Over all levels and commands the student falls in 13% of its 20 s episodes (its teacher 11%); on the hardest level it walks rough terrain and slopes, while the 25 cm stairs and 30 cm gaps defeat it. check.py checks every observation entry, reward term, statistic, reset, curriculum level and depth image against quantities they do not come from. See Walking on rough terrain from depth images.
  • Evaluation videos of an environment with depth cameras show the first camera's depth image in the top-right corner of every frame (new unit test raisimgym_video_test).
  • Environments that define depthCameras() render the depth images of every environment in one batch on the GPU (render_depth() in Python, rayrai's SensorBatchRenderer; every environment must have as many cameras, new unit test raisimgym_depth_camera_count_test), and environments that define statisticNames() and statistics() report values for logging (get_statistics()).
  • The RaisimGymTorch page is rewritten: each of the three environments is explained with a video of its trained policy, figures show what the depth environment's teacher and student observe and its eight terrain types, and a new section explains how environments are stepped and rendered in batches and share their robot model, terrains and render meshes, with the measured rollout throughput against the number of threads (diagrams and chart from docs/image_generators/raisim_gym_figures.py).
  • Modules built with Clang train nearly as fast as with GCC: rsg_anymal takes 0.073 s per iteration against GCC's 0.066 s, where it took 0.58 s. PyTorch's OpenMP runtime (libgomp) bound the main thread to one core when the runners set OMP_PROC_BIND, and LLVM's runtime (libomp) then ran every environment thread on it; libomp also put its threads to sleep after every step on processors with performance and efficient cores. The runners now call configure_threads() (raisimGymTorch/env/openmp.py), which binds threads only for modules built with GCC, and VectorizedEnvironment keeps libomp's threads awake for 1 ms after each step unless KMP_BLOCKTIME or OMP_WAIT_POLICY is set (new unit test raisimgym_openmp_test).
  • RAISIMGYM_RAISIM_ROOT and RAISIMGYM_RAYRAI_ROOT build raisimGymTorch against other RaiSim and rayrai installations than ../raisim and ../rayrai.
  • Fixed: the environment configuration parser (Yaml.cpp) rejected a list written at its key's indentation (types: followed by - rough), which is how ruamel.yaml, used by the training scripts, writes lists, and const Yaml::Node::operator[](size_t) was declared but not defined. New unit test raisimgym_yaml_test (-DRAISIMGYM_BUILD_TESTS=ON).

RaiSim — physics for robotics and AI.