All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
Classes | Public Member Functions | Protected Member Functions | Protected Attributes | List of all members
Joint_TEST Class Reference

#include <Joint_TEST.hh>

Inheritance diagram for Joint_TEST:
Inheritance graph
[legend]

Classes

class  SpawnJointOptions
 Class to hold parameters for spawning joints. More...
 

Public Member Functions

void ForceTorque1 (const std::string &_physicsEngine)
 Load example world with a few joints Measure / verify static force torques against analytical answers. More...
 
void ForceTorque2 (const std::string &_physicsEngine)
 Load example world with a few joints Measure / verify static force torques against analytical answers. More...
 
void GetForceTorqueWithAppliedForce (const std::string &_physicsEngine)
 Load example world with a few joints. More...
 
void JointCreationDestructionTest (const std::string &_physicsEngine)
 Create and destroy joints repeatedly, monitors memory usage. More...
 
void JointTorqueTest (const std::string &_physicsEngine)
 Create a hinge joint between link and world. More...
 
virtual void SetUp ()
 
physics::JointPtr SpawnJoint (const std::string &_type, bool _worldChild=false, bool _worldParent=false, common::Time _wait=common::Time(99, 0))
 Spawn a model with a joint connecting to the world. More...
 
physics::JointPtr SpawnJoint (const SpawnJointOptions &_opt)
 Spawn a model with a joint connecting to the world. More...
 
void SpawnJointRotational (const std::string &_physicsEngine, const std::string &_jointType)
 Spawn model with rotational joints. More...
 
void SpawnJointRotationalWorld (const std::string &_physicsEngine, const std::string &_jointType)
 Spawn model with rotational joints. More...
 
void SpawnJointTypes (const std::string &_physicsEngine, const std::string &_jointType)
 Spawn model with each type of joint. More...
 

Protected Member Functions

 Joint_TEST ()
 

Protected Attributes

std::string jointType
 Joint type for test. More...
 
std::string physicsEngine
 Physics engine for test. More...
 

Constructor & Destructor Documentation

Joint_TEST::Joint_TEST ( )
inlineprotected

Member Function Documentation

void Joint_TEST::ForceTorque1 ( const std::string &  _physicsEngine)

Load example world with a few joints Measure / verify static force torques against analytical answers.

Parameters
[in]_physicsEngineType of physics engine to use.
void Joint_TEST::ForceTorque2 ( const std::string &  _physicsEngine)

Load example world with a few joints Measure / verify static force torques against analytical answers.

Change gravity to tip over the joints. Wait until joint stops are hit and joint motion settles, then check force torques values against analytical values.

Parameters
[in]_physicsEngineType of physics engine to use.
void Joint_TEST::GetForceTorqueWithAppliedForce ( const std::string &  _physicsEngine)

Load example world with a few joints.

Servo the joints to a fixed target position using simple PID controller. Measure / verify static force torques against analytical answers.

Parameters
[in]_physicsEngineType of physics engine to use.
void Joint_TEST::JointCreationDestructionTest ( const std::string &  _physicsEngine)

Create and destroy joints repeatedly, monitors memory usage.

Parameters
[in]_physicsEngineType of physics engine to use.
void Joint_TEST::JointTorqueTest ( const std::string &  _physicsEngine)

Create a hinge joint between link and world.

Apply force and check acceleration against analytical solution.

Parameters
[in]_physicsEngineType of physics engine to use.
virtual void Joint_TEST::SetUp ( )
inlinevirtual

References gzdbg.

physics::JointPtr Joint_TEST::SpawnJoint ( const std::string &  _type,
bool  _worldChild = false,
bool  _worldParent = false,
common::Time  _wait = common::Time(99, 0) 
)
inline

Spawn a model with a joint connecting to the world.

The function will wait for duration _wait for the model to spawn and attempt to return a pointer to the spawned joint. This function is not guaranteed to return a valid JointPtr, so the output should be checked.

Parameters
[in]_typeType of joint to create.
[in]_worldChildFlag to set child link to the world.
[in]_worldParentFlag to set parent link to the world.
[in]_waitLength of time to wait for model to spawn in order to return Joint pointer.

References Joint_TEST::SpawnJointOptions::type, Joint_TEST::SpawnJointOptions::wait, Joint_TEST::SpawnJointOptions::worldChild, and Joint_TEST::SpawnJointOptions::worldParent.

physics::JointPtr Joint_TEST::SpawnJoint ( const SpawnJointOptions _opt)
inline

Spawn a model with a joint connecting to the world.

The function will wait for duration _wait for the model to spawn and attempt to return a pointer to the spawned joint. This function is not guaranteed to return a valid JointPtr, so the output should be checked.

Parameters
[in]_optOptions for spawned model and joint.

References Joint_TEST::SpawnJointOptions::axis, Joint_TEST::SpawnJointOptions::childLinkPose, gazebo::physics::get_world(), gazebo::common::Time::GetWallTime(), gzwarn, Joint_TEST::SpawnJointOptions::jointPose, Joint_TEST::SpawnJointOptions::modelPose, gazebo::common::Time::MSleep(), NULL, Joint_TEST::SpawnJointOptions::parentLinkPose, Joint_TEST::SpawnJointOptions::type, Joint_TEST::SpawnJointOptions::wait, Joint_TEST::SpawnJointOptions::worldChild, Joint_TEST::SpawnJointOptions::worldParent, and gazebo::common::Time::Zero.

void Joint_TEST::SpawnJointRotational ( const std::string &  _physicsEngine,
const std::string &  _jointType 
)

Spawn model with rotational joints.

Set velocity on parent and make sure child follows.

Parameters
[in]_physicsEngineType of physics engine to use.
[in]_jointTypeType of joint to spawn and test.
void Joint_TEST::SpawnJointRotationalWorld ( const std::string &  _physicsEngine,
const std::string &  _jointType 
)

Spawn model with rotational joints.

Attach to world and make sure it doesn't fall.

Parameters
[in]_physicsEngineType of physics engine to use.
[in]_jointTypeType of joint to spawn and test.
void Joint_TEST::SpawnJointTypes ( const std::string &  _physicsEngine,
const std::string &  _jointType 
)

Spawn model with each type of joint.

Parameters
[in]_physicsEngineType of physics engine to use.
[in]_jointTypeType of joint to spawn and test.

Member Data Documentation

std::string Joint_TEST::jointType
protected

Joint type for test.

std::string Joint_TEST::physicsEngine
protected

Physics engine for test.


The documentation for this class was generated from the following file: