# URDFJoint

class in `urdf-loader`, extends `Object3D`

```js
import { URDFJoint } from 'urdf-loader';
```

An object representing a robot joint.

Example: Setting joint values after loading a robot

```js
import { MathUtils } from 'three';
import URDFLoader from 'urdf-loader';

const URL = 'https://raw.githubusercontent.com/gkjohnson/urdf-loaders/master/urdf/T12/urdf/T12_flipped.URDF';
const robot = await new URDFLoader().loadAsync( URL );

const joint = robot.joints[ 'HP1' ];
joint.setJointValue( MathUtils.degToRad( 30 ) );

robot.setJointValue( 'KP1', MathUtils.degToRad( 120 ) );

console.log( joint.jointType, joint.angle, joint.limit.lower, joint.limit.upper );
```

## Properties

### .jointType: string

The type of joint. Can only be the URDF types of joints.

### .angle: number

readonly

The current position or angle for joint.

### .name: string

The name of the joint.

### .axis: Vector3

The axis described for the joint.

### .limit: Object

An object containing the `lower` and `upper` position constraints, as well as the `effort` and `velocity` limits for the joint. All fields default to zero if not specified in the URDF.

### .ignoreLimits: boolean

Whether or not to ignore the joint limits when setting a the joint position.

### .mimicJoints: Array<URDFMimicJoint>

A list of joints which mimic this joint. These joints are updated whenever this joint is.

## Methods

### .setJointValue

```js
.setJointValue( ...values: number | null ): boolean
```

Sets the joint value(s) for the given joint. The interpretation of the value depends on the
joint type. If the joint value specifies an angle it must be in radians. If the value
specifies a distance, it must be in meters. Passing null for any component of the value will
skip updating that particular component.

Returns true if the joint or any of its mimicking joints changed.

- `values`, `number | null`: The joint value components to set, optionally null for no-op

Returns `boolean`: Returns true if the joint or any of its mimicking joints changed.
