Demonstration scenes using AGX Dynamics SDK

The simulations start in paused mode. Continue simulation with the 'e' button

Keybindings and arguments for agxViewer

Picking small screws from a box

This scene demonstrates a picking device capable of picking screws that are 9mm long. By using AMOR (Automatic Model Reduction) the performance of a complex scene can be retained.

Keyboard bindings:

  • Left/Right - Move sideways (X)
  • Up/Down - Move Back/Front (Y)
  • 'z', 'x' - Open/Close
  • PageUp/PageDown - Up/down
  • Home/End - Rotate left/right
Picking screws

Flexible Beam

This script demonstrates a flexible beam modelled using lumped elements.

With the Direct solver, the beam can be arbitrarily stiff. When using the Iterative solver the beam will become soft/rubber-like due to the limited precision of the iterative solver.

Keybindings:

  • Up/Down - Increase/Decrease stiffness of the beam
  • Keypad Enter - Drop a box onto the beam
  • Left/Right - Use Direct/Iterative solver
beam

Grasping robot demonstration

This scene requires a Gamepad (XBox360 is recommended)

Gamepad bindings:

  • Right Stick Y - Moves the robot arm up/down
  • Left Stick X - Move the robot arm left/right
  • Left Stick Y - Move The robot arm in/out (from the base)
  • D-Pad (X/Y) - Controls the lower hinges which move the lower part of the robotic arm.
  • Button A/B - Open/Close Yaw
  • Right/Left Bumper - Rotate wrist left/right
Grasping robot

Robot manipulating sheet metal

This scene consists of a robot manipulating a sheet metal (flexible) object.

Robot and sheet metal

Twisting cables

This demonstrates how the Cable model can be used to simulate a set of cables being twisted.

Keyboard bindings:

  • Up/Down - Increase/Decrease stiffness in the cables
  • Page up/down - Start motor clockwise/counter clockwise.
  • Home - Stop motor.
Twisted Cables Simulation

Robot with cables

Required licenses: AGXCable

This scene demonstrates a robot moving with attached cables.

cables_on_robot

"peg-in-a-hole" demonstration

This show how an implementation of a stable peg in a hole scenario can be implemented. By using a constraint and collision sensors, a plausable simulation of this can be achieved.

Peg in a hole

Snakebot

Required licenses: AGXHydrodynamics

Demonstrates a "snakebot", a robot in water which use twiggling motions as propulsion. It can be controlled with arrow keys on the keyboard.

Snakebot

Ships

Required licenses: AGXHydrodynamics

Two ships floating in water connected with wires

Ships

Ice floes

Required licenses: AGXHydrodynamics

This scene demonstrates the hydrodynamic modelling of a large number of ice floes.

Ice floe

Cables

Required licenses: AGXCable

Demonstrates how agxCable::Cable can be used to model flexible structures such as cables and hoses.

Snakebot

Modelling Torsional spring with agxCable

Required licenses: AGXCable

This script creates a torsional spring using the agxCable API. By routing a agxCable::Cable in a spiral, then calling Cable::rebind() will reconfigure the cable so that the current state is the rest state.

Pressing up/down key will lift/push down the weight. Releasing the button will release the weight

Torsional spring

Overhead hanging conveyor

Showcases the SplineJoint for modelling an overhead hanging conveyor.

overheadConveyor

Bottles transported on a Conveyor

This scene contains a conveyorbelt model that transports a large number of bottles

bottlesOnConveyor

Curved surface velocity using SurfaceVelocityConveyorBelt

This script illustrates how you can define a curved velocity surface on a geometry with the SurfaceVelocityConveyorBelt class

surface_velocity_conveyor

Breaking a constraint

This exemplifies how to read constraint forces and disable them when the force/torque reaches a certain threshold.

break_door

Coupled simulation with a PID controller

This demo show how a PID controller can be used to control the speed of a hinge to achieve a sine motion.

With the pyqtgraph python module, additional plotting can be used. For more information of how to use additional python modules, see AGX Python

PIDControlledWheelSineRotation

Performance acceleration using AMOR

Adaptive MOdel REduction is a method for increasing performance by merging bodies while retaining mass properties.

This is a lot more general than ordinary sleep methods as it allows merging to dynamic objects. The relative velocity/acceleration is used for determining merge.

You can toggle AMOR using LEFT key

adaptive_model_order_reduction_AMOR

Simulation of a windmill

Required licenses: AGXHydrodynamics

In this demo the aerodynamic effect on the blade of the windmill is simulated

Change wind speed with up/down keys and drag coefficient with left/right.

windmill

Modelling a road roller

Required licenses: AGXTerrain, AGXGranular

This script demonstrate how to model a road roller running over a deformable terrain.

Road roller

Modelling a fire hose using a Wire

Required licenses: AGXWire

This script show how to use the agxWire::Wire class for simulating a fire hose

Fire hose

Demonstrating the use of the wire winch

Required licenses: AGXWire

The class agxWire::Winch is used for simulating a winch motor and brake. This script demonstrates how to control both the winch motor and the brake using force ranges.

winch_brake_demo

Using contact event listeners to count impacts

This script show how to use contact event listeners to detect impact between objects

put_out_fire

Pile of rocks under water

Required licenses: AGXHydrodynamics

In this script a number of rocks (mesh objects) are created and falling down through the water surface and lands onto the sea bed.

AMOR is used for improving performance

rock_pile

Kinematic coupling

This script demonstrates one way of achieving "kinematic split", splitting the simulation into two separate islands to improve performance.

The contact between the green/yellow object will be replaced by a contact between a dynamic object and a kinematic object, allowing the partitioner to split the system into two sub-islands.

When using two threads we get 100% speedup in this example.

Toggle kinematic coupling with the LEFT key.

Toggle between 1 and two threads with the RIGHT key.

kinematic_coupling

Custom gravity field

This script show how to use the class agx::CustomGravityField to implement any general gravity field.

This script cannot be run with more than 1 thread hower as Python cannot handle reentrant calls from different threads.

In C++ however this is not an issue.

custom_gravityField

Torque driven Winch

Required licenses: AGXWire, AGXDriveTrain

This script demonstrates how to build a torque driven winch that can spool in/out wire

By using a winch that drives a rotating shaft connected to the winch via a WireWinchActuator we can model a torque driven winch powered by a hinge, or one of the motor models available in AGX.

torque_driven_winch

Linear actuator

Required licenses: AGXWire, AGXDriveTrain

This script demonstrates how to build a torque driven linear actuator.

A motorized hinge is driving a rotating shaft, connected via a RotationalTranslationalHolonomicConnector

At the end of the drivetrain is a prismatic constraint that moves a rod.

linear_actuator

Simulating a Pulley

Required licenses: AGXWire

This script illustrates how to model a Pulley, where the wire is sliding over hinged cylinders.

Without the "Pulley" property on the Geometry, the wire would slip off.

wire_pulley

Modelling a Wheel loader

Required licenses: AGXTires

This script demonstrates how a wheel loader can be modelled.

The dynamics model is created in Algoryx Momentum and exported into a .agx file.

This .agx model file is then loaded into a simulation where a drivetrain including a combustion engine is created using the DriveTrain API.

One of the wheel loaders is controlled using the keyboard: forward/backward/left/right/a/z/s/x and the other using a Gamepad

wheel_loader

Bricard's mechanism

This script illustrates AGX Dynamics being able to handle overconstrained systems. The Bricard's example The system is composed of five rods and six hinge (rotational) constraints.

bricards_mechanism

Slack constraints

Constraints with slack can be used to model constraints which has a range of free motion. Slack can be defined for rotation or translation

slack_constraints

Connected Hinges

This script demonstrates how to connect several hinges together. Using the agxPowerLine API we can create a RotationalActuator and a Shaft which is connected between two hinges.

This means that if you want to rotate one of the bodies, you need to rotate all of them.

connected_hinges

Excavator and Granular simulation

This script showcases a model of an excavator together with Granular (NDEM) simulation.

The script can be modified to reduce the size of the particles to get a more realistic result.

Be aware that reducing the radius of the granular particles will affect performance dramatically.

excavator_granular

Synchronizing hinge rotation

In this script we demonstrate how two hinges can be connected using the agxDriveTrain API via a Gear to control the rotation between the two bodies.

synchronize_hinge_rotation

Remote operated vehicle (ROV)

This scene requires a gamepad for controlling an underwater ROV. The scene consists of umbilical cord, tether cable and a suction pile. This scene also demonstrates wire-wire and wire self-collision.

underwater_rov

Helicopter with winch

This demonstrates a helicopter suspended in a CylindricalJoint pulling a weight using a wire/winch.

The load and the wire are affected by aerodynamic forces.

helicopter

Ship floating in water

Required licenses: AGXHydrodynamics

This demonstrates a ship in water with a soft fender.

The ship can be controlled with up/down arrows to change the thrust

shipInWater

Intersecting the physics scene with the mouse/ray

Required licenses: AGXCore

agxOSG::GuiEventListener can be used to intersect the physics scene with a ray and get back data about the shape that is intersected.

In this example you can construct a spline by creating points on the surface of various objects. By using a SplineJoint, a rigid body can be made travelling along the spline.

Keyboard bindings:

  • Ctrl+Z - undo
  • Right ALTGR + Left mouse - Add point on the surface of a shape
  • Keypad Enter - Spawn a rigid body that moves along the spline
  • o - Write current points to a json file
  • i - Read points from a json file
mouse_intersect_gui_listener

Granular simulation of a galton board

Required licenses: AGXGranular

This script contains a simulation of a Glaton Board using granulars, demonstrating a binominal distribution.

Changing the properties of the board and contact material affects the probability of going left or right at each intersection and thus the properties ( variance and mean ) in the resulting distribution.

granular_galton_board

Deformable mine face simulation

Required licenses: AGXGranular

Demonstrates how to use the class agxModel.DeformableMineFace for simulating a deformable heightfield. In this scenario we are cutting into the heightfield using a geometry generating "muck", that is loose materials from the "blasting" operation that is emitted as granular objects.

deformableMineFace

Bending rod

Required licenses: AGX Core, AGX Cable

This scene demonstrates how a steel beam is bent using a medal bending jig.

The metal rod is modelled using the agxModel::Deformable1D class. This model includes elasticity as well as plasticity.

bending_rod

Mesh reduction

Required licenses: AGX Core

This example demonstrates the agxUtil::reduceMesh function for simplification of triangle meshes.

Keyboard bindings:

  • Up/Down - Change the target for reduction (in %) of the triangle mesh.
  • Left/Right - Change the aggressiveness of the mesh reduction algorithm.
reduce_mesh

Path planning of crane in Matlab

path: matlab/pathplanning

This matlab simulation show a dynamic simulation of a crane which is controlled from Matlab using inverse kinematics.

pathplanning