RobWorkProject
23.9.11-
|
The recursive Newton-Euler method is used for calculating inverse dynamics of a kinematic tree. More...
#include <RecursiveNewtonEuler.hpp>
Classes | |
struct | Motion |
Motion of a body defined as velocity and acceleration. More... | |
Public Types | |
typedef rw::core::Ptr< RecursiveNewtonEuler > | Ptr |
smart pointer type to this class | |
Public Member Functions | |
RecursiveNewtonEuler (rw::core::Ptr< rwsim::dynamics::RigidDevice > device) | |
Constructor for inverse dynamics for a RigidDevice. More... | |
virtual | ~RecursiveNewtonEuler () |
Destructor. | |
rw::math::Vector3D | getGravity () const |
Get the used gravity in base coordinates. More... | |
void | setGravity (const rw::math::Vector3D<> &gravity) |
Set the gravity used. More... | |
rw::math::Vector3D | getPayloadCOM () const |
Get the center of mass of the payload in the tool frame. More... | |
double | getPayloadMass () const |
Get the mass of the payload. More... | |
rw::math::InertiaMatrix | getPayloadInertia () const |
Get the inertia of the payload. More... | |
void | setPayload (const rw::math::Vector3D<> &com, double payload, const rw::math::InertiaMatrix<> &inertia) |
Set the payload relative to the end frame of the device. More... | |
rw::math::Wrench6D | getEnvironment () const |
Get the force and torque that the robot exerts on the environment at the TCP frame in base coordinates. More... | |
void | setEnvironment (const rw::math::Wrench6D<> &wrench) |
Set the force and torque that the robot exerts on the environment at the TCP frame in base coordinates. More... | |
std::vector< Motion > | getBodyMotion (const rw::kinematics::State &state, const rw::math::Q &dq, const rw::math::Q &ddq) const |
Get the Motion of each link and the payload for a device that have accelerating joints. More... | |
std::vector< rw::math::Wrench6D<> > | getBodyNetForces (const std::vector< Motion > &motions, const rw::kinematics::State &state) const |
Determine the net force and torque acting on each link to achieve the given motion. More... | |
std::vector< rw::math::Wrench6D<> > | getJointForces (const std::vector< rw::math::Wrench6D<>> &bodyNetForces, const rw::kinematics::State &state) const |
Determine the forces and torques acting in each joint to achieve the given net forces and torques on the links and payload. More... | |
std::vector< rw::math::Wrench6D<> > | solve (const rw::kinematics::State &state, const rw::math::Q dq=rw::math::Q(), const rw::math::Q ddq=rw::math::Q()) const |
Do inverse dynamics for a robot in motion. More... | |
std::vector< double > | solveMotorTorques (const rw::kinematics::State &state, const rw::math::Q &dq, const rw::math::Q &ddq) const |
Get the torque provided by each motor. More... | |
bool | validate () const |
Check if solver will work for the given device - if not an exception will be thrown when trying to solve. More... | |
The recursive Newton-Euler method is used for calculating inverse dynamics of a kinematic tree.
Constructor for inverse dynamics for a RigidDevice.
device | [in] a rigid device |
std::vector<Motion> getBodyMotion | ( | const rw::kinematics::State & | state, |
const rw::math::Q & | dq, | ||
const rw::math::Q & | ddq | ||
) | const |
Get the Motion of each link and the payload for a device that have accelerating joints.
state | [in] the state of the device |
dq | [in] joint speeds |
ddq | [in] joint accelerations |
std::vector<rw::math::Wrench6D<> > getBodyNetForces | ( | const std::vector< Motion > & | motions, |
const rw::kinematics::State & | state | ||
) | const |
Determine the net force and torque acting on each link to achieve the given motion.
motions | [in] the motion of each link |
state | [in] state (position) of the robot |
rw::math::Wrench6D getEnvironment | ( | ) | const |
Get the force and torque that the robot exerts on the environment at the TCP frame in base coordinates.
rw::math::Vector3D getGravity | ( | ) | const |
Get the used gravity in base coordinates.
std::vector<rw::math::Wrench6D<> > getJointForces | ( | const std::vector< rw::math::Wrench6D<>> & | bodyNetForces, |
const rw::kinematics::State & | state | ||
) | const |
Determine the forces and torques acting in each joint to achieve the given net forces and torques on the links and payload.
bodyNetForces | [in] the desired net forces and torques acting on each link in link local coordinate frames |
state | [in] state (position) of the robot |
rw::math::Vector3D getPayloadCOM | ( | ) | const |
Get the center of mass of the payload in the tool frame.
rw::math::InertiaMatrix getPayloadInertia | ( | ) | const |
Get the inertia of the payload.
double getPayloadMass | ( | ) | const |
Get the mass of the payload.
void setEnvironment | ( | const rw::math::Wrench6D<> & | wrench | ) |
Set the force and torque that the robot exerts on the environment at the TCP frame in base coordinates.
wrench | [in] the wrench the robot exerts on the environment |
void setGravity | ( | const rw::math::Vector3D<> & | gravity | ) |
Set the gravity used.
gravity | [in] vector giving the gravity in base coordinates. |
void setPayload | ( | const rw::math::Vector3D<> & | com, |
double | payload, | ||
const rw::math::InertiaMatrix<> & | inertia | ||
) |
Set the payload relative to the end frame of the device.
com | [in] the center of mass in the end frame. |
payload | [in] the mass of the payload |
inertia | [in] the inertia of the payload |
std::vector<rw::math::Wrench6D<> > solve | ( | const rw::kinematics::State & | state, |
const rw::math::Q | dq = rw::math::Q() , |
||
const rw::math::Q | ddq = rw::math::Q() |
||
) | const |
Do inverse dynamics for a robot in motion.
state | [in] state (position) of the robot |
dq | [in] the joint velocities |
ddq | [in] the joint accelerations |
std::vector<double> solveMotorTorques | ( | const rw::kinematics::State & | state, |
const rw::math::Q & | dq, | ||
const rw::math::Q & | ddq | ||
) | const |
Get the torque provided by each motor.
state | [in] state (position) of the robot |
dq | [in] the joint velocities |
ddq | [in] the joint accelerations |
bool validate | ( | ) | const |
Check if solver will work for the given device - if not an exception will be thrown when trying to solve.