newton.sim#

Submodules

ik

Classes

CollisionPipeline

Contacts

Provides contact information to be consumed by a solver.

Control

Time-varying control data for a Model.

Model

Holds the definition of the simulation model

ModelBuilder

A helper class for building simulation models at runtime.

ShapeGeometry

Represents the geometry of a shape.

ShapeMaterials

Represents the contact material properties of a shape.

State

Time-varying state data for a Model.

Style3DModel

Style3DModel derived from newton model, contains extended simulation attributes.

Style3DModelBuilder

A helper class for building style3d simulation models at runtime.

Functions

color_graph(num_nodes, graph_edge_indices[, ...])

A function that generates coloring for a graph, which is represented by the number of nodes and an array of edges.

count_rigid_contact_points(model)

Counts the maximum number of rigid contact points that need to be allocated.

eval_fk(model, joint_q, joint_qd, state[, mask])

Evaluates the model's forward kinematics given the joint coordinates and updates the state's body information (State.body_q and State.body_qd).

eval_ik(model, state, joint_q, joint_qd)

Evaluates the model's inverse kinematics given the state's body information (State.body_q and State.body_qd) and updates the generalized joint coordinates joint_q and joint_qd.

get_joint_dof_count(joint_type, num_axes)

Return the number of degrees of freedom in position and velocity for a given joint type.

plot_graph(vertices, edges[, edge_labels])

Plots a graph using matplotlib and networkx.

Constants

Name

Value

JOINT_BALL

2

JOINT_D6

6

JOINT_DISTANCE

5

JOINT_FIXED

3

JOINT_FREE

4

JOINT_MODE_NONE

0

JOINT_MODE_TARGET_POSITION

1

JOINT_MODE_TARGET_VELOCITY

2

JOINT_PRISMATIC

0

JOINT_REVOLUTE

1

NOTIFY_FLAG_BODY_INERTIAL_PROPERTIES

16

NOTIFY_FLAG_BODY_PROPERTIES

8

NOTIFY_FLAG_DOF_PROPERTIES

4

NOTIFY_FLAG_JOINT_AXIS_PROPERTIES

2

NOTIFY_FLAG_JOINT_PROPERTIES

1

NOTIFY_FLAG_SHAPE_PROPERTIES

32