218 bool clampToJointLimits =
false);
238 bool clampToJointLimits =
false);
264 bool clampToJointLimits =
false);
319 class SerialKinematicChainData;
#define AGX_DECLARE_POINTER_TYPES(type)
A KinematicChain represents a chain consisting of multiple agx::RigidBody and agx::Constraint objects...
@ SUCCESS
Return value indicating success.
@ SOLVER_FAILURE
Failure due to solver not finding a solution. E.g. pose not reachable.
@ INVALID_CHAIN
Failure due to chain not being valid.
@ NO_SIMULATION
Failure due to operation requiring access to the Simulation holding bodies/constraints.
@ BAD_INPUT_ARGUMENTS
Failure due to input arguments being incorrect. E.g. wrong number of vector elements.
A Serial Kinematic Chain is a KinematicChain where there are no loops or branches.
const agx::ConstraintRefVector & getJoints() const
Get the joints that are in the chain.
KinematicChainStatus computeInverseKinematics(const agx::AffineMatrix4x4 &transform, const agx::RealVector ¤tJointPositions, agx::RealVector &outputJointPositions, agx::Real solverEpsilon=1e-5)
Compute joint positions needed for the end body in the chain to get the specified transform relative ...
agx::UInt getNumJoints() const
Returns number of joints in the chain where motion can occur.
KinematicChainStatus computeForwardKinematicsAll(const agx::RealVector &jointPositions, agx::AffineMatrix4x4Vector &outputTransforms, bool clampToJointLimits=false)
Compute the transform for all links in the chain relative the base given provided joint values.
SerialKinematicChain(agxSDK::Simulation &simulation, const agx::RigidBody &base, const agx::RigidBody &end, const agx::AffineMatrix4x4 *endLocalTransform=nullptr)
Create a serial chain from "base" to "end" by traversing the bodies and constraints in the simulation...
const agx::RigidBodyRefVector & getLinks() const
Get the links that are in the chain.
void setSimulation(agxSDK::Simulation *sim)
Set the Simulation that is used to read certain values needed for inverse dynamics computations.
KinematicChainStatus computeManipulatorJacobian(const agx::RealVector &jointPositions, agx::RealVector &jacobian)
Compute the manipulator jacobian relative the base.
bool isValid() const
Check if the chain was valid at time of creation.
KinematicChainStatus computeForwardKinematicsAll(const agx::RealVector &jointPositions, const agx::RealVector &jointVelocities, agx::AffineMatrix4x4Vector &outputTransforms, agx::Vec3Vector &outputLinearVelocities, agx::Vec3Vector &outputAngularVelocities, bool clampToJointLimits=false)
Compute the transforms and velocities for all links in the chain relative the base given provided joi...
KinematicChainStatus computeInverseDynamics(const agx::RealVector &jointAcceleration, agx::RealVector &tau)
Compute the torque/forces needed to get the specified jointAccelerations.
SerialKinematicChain(const agx::RigidBodyPtrVector &bodies, const agx::ConstraintPtrVector &constraints, const agx::AffineMatrix4x4 *endLocalTransform=nullptr)
Create a serial chain from the input bodies and constraints which are provided in the correct order.
agx::UInt getNumLinks() const
Returns number of links in the chain.
KinematicChainStatus computeInverseDynamics(const agx::RealVector &jointAcceleration, const agx::RealVector &externalForces, agx::RealVector &tau)
Compute the torque/forces needed to get the specified jointAccelerations.
KinematicChainStatus computeForwardKinematics(const agx::RealVector &jointPositions, agx::AffineMatrix4x4 &outputTransform, bool clampToJointLimits=false)
Compute the transform for the end of the chain relative the base given the provided joint values.
Simulation is a class that bridges the collision space agxCollide::Space and the dynamic simulation s...
Base class providing referencing counted objects.
The rigid body class, combining a geometric model and a frame of reference.
Contain classes for higher level modeling primitives, such as Tree, Terrain etc.
The agxSDK namespace contain classes to bridge the collision detection system and the dynamical simul...