Robotsystem from Robot Group Leipzig: UniversalJoint Class Reference

- Main Page
- Modules
- Namespaces
- Classes
- Files
- Directories
- Examples

- Class List
- Alphabetical List
- Class Hierarchy
- Class Members

# UniversalJoint Class Reference

`#include <joint.h>`

Inheritance diagram for UniversalJoint:

[legend]
Collaboration diagram for UniversalJoint:

[legend]
List of all members.

## Detailed Description

Definition at line 213 of file joint.h.

## Public Member Functions
| UniversalJoint (Primitive *part1, Primitive *part2, const osg::Vec3 &anchor, const Axis &axis1, const Axis &axis2)
virtual | ~UniversalJoint ()
virtual void | init (const OdeHandle &odeHandle, const OsgHandle &osgHandle, bool withVisual=true, double visualSize=0.2)
| initialises (and creates) the joint.
virtual void | update ()
| should syncronise the Ode stuff and the OSG notes (if any)
virtual void | addTorques (double t1, double t2)
| adds torques to axis 1 and 2
virtual double | getPosition1 ()
virtual double | getPosition2 ()
virtual double | getPosition1Rate ()
virtual double | getPosition2Rate ()
virtual void | setParam (int parameter, double value)
| sets the ODE joint parameter (see ODE manual)
virtual double | getParam (int parameter)
| return the ODE joint parameter (see ODE manual)
## Protected Attributes
OSGPrimitive * | visual1
OSGPrimitive * | visual2

## Constructor & Destructor Documentation

UniversalJoint | ( | Primitive * | part1,
|  | Primitive * | part2,
|  | const osg::Vec3 & | anchor,
|  | const Axis & | axis1,
|  | const Axis & | axis2
| ) |

| Definition at line 255 of file joint.cpp.

~UniversalJoint | ( |  | ) | `[virtual]`

| Definition at line 260 of file joint.cpp.

## Member Function Documentation

void addTorques | ( | double | t1,
|  | double | t2
| ) | `[virtual]`

| adds torques to axis 1 and 2 Definition at line 305 of file joint.cpp.

double getParam | ( | int | parameter | ) | `[virtual]`

| return the ODE joint parameter (see ODE manual) Implements Joint. Definition at line 329 of file joint.cpp.

double getPosition1 | ( |  | ) | `[virtual]`

| Implements OneAxisJoint. Definition at line 309 of file joint.cpp.

double getPosition1Rate | ( |  | ) | `[virtual]`

| Implements OneAxisJoint. Definition at line 317 of file joint.cpp.

double getPosition2 | ( |  | ) | `[virtual]`

| Implements TwoAxisJoint. Definition at line 313 of file joint.cpp.

double getPosition2Rate | ( |  | ) | `[virtual]`

| Implements TwoAxisJoint. Definition at line 321 of file joint.cpp.

void init | ( | const OdeHandle & | odeHandle,
|  | const OsgHandle & | osgHandle,
|  | bool | withVisual = `true`,
|  | double | visualSize = `0.2`
| ) | `[virtual]`

| initialises (and creates) the joint. If visual is true then axix1 and axis2 of the joints is also drawn as a slim cylinder. visualSize is the length of the cylinder. Implements Joint. Definition at line 265 of file joint.cpp.

void setParam | ( | int | parameter,
|  | double | value
| ) | `[virtual]`

| sets the ODE joint parameter (see ODE manual) Implements Joint. Definition at line 325 of file joint.cpp.

void update | ( |  | ) | `[virtual]`

| should syncronise the Ode stuff and the OSG notes (if any) Implements Joint. Definition at line 284 of file joint.cpp.

## Member Data Documentation

OSGPrimitive* visual1`[protected]`

| Definition at line 239 of file joint.h.

OSGPrimitive* visual2`[protected]`

| Definition at line 240 of file joint.h.