Rigid Body Dynamics Library
rbdl_utils.h
Go to the documentation of this file.
1/*
2 * RBDL - Rigid Body Dynamics Library
3 * Copyright (c) 2011-2018 Martin Felis <martin@fysx.org>
4 *
5 * Licensed under the zlib license. See LICENSE for more details.
6 */
7
8#ifndef RBDL_UTILS_H
9#define RBDL_UTILS_H
10
11#include <string>
12#include <rbdl/rbdl_config.h>
13#include <rbdl/rbdl_math.h>
14
15namespace RigidBodyDynamics {
16
17struct Model;
18
20namespace Utils {
21#ifndef RBDL_USE_CASADI_MATH
23RBDL_DLLAPI std::string GetModelHierarchy (const Model &model);
24#endif
25#ifndef RBDL_USE_CASADI_MATH
27RBDL_DLLAPI std::string GetModelDOFOverview (const Model &model);
28#endif
30RBDL_DLLAPI std::string GetNamedBodyOriginsOverview (Model &model);
31
53RBDL_DLLAPI void CalcCenterOfMass (
54 Model &model,
55 const Math::VectorNd &q,
56 const Math::VectorNd &qdot,
57 const Math::VectorNd *qddot,
58 Math::Scalar &mass,
59 Math::Vector3d &com,
60 Math::Vector3d *com_velocity = NULL,
61 Math::Vector3d *com_acceleration = NULL,
62 Math::Vector3d *angular_momentum = NULL,
63 Math::Vector3d *change_of_angular_momentum = NULL,
64 bool update_kinematics = true
65);
66
78RBDL_DLLAPI void CalcZeroMomentPoint (
79 Model &model,
80 const Math::VectorNd &q, const Math::VectorNd &qdot, const Math::VectorNd &qddot,
81 Math::Vector3d* zmp,
82 const Math::Vector3d &normal = Math::Vector3d (0., 0., 1.),
83 const Math::Vector3d &point = Math::Vector3d (0., 0., 0.),
84 bool update_kinematics = true
85);
86
88RBDL_DLLAPI Math::Scalar CalcPotentialEnergy (Model &model, const Math::VectorNd &q, bool update_kinematics = true);
89
91RBDL_DLLAPI Math::Scalar CalcKineticEnergy (Model &model, const Math::VectorNd &q, const Math::VectorNd &qdot, bool update_kinematics = true);
92}
93
94}
95
96/* RBDL_UTILS_H */
97#endif
RBDL_DLLAPI std::string GetModelHierarchy(const Model &model)
Creates a human readable overview of the model.
Definition: rbdl_utils.cc:157
RBDL_DLLAPI Scalar CalcKineticEnergy(Model &model, const Math::VectorNd &q, const Math::VectorNd &qdot, bool update_kinematics)
Computes the kinetic energy of the full model.
Definition: rbdl_utils.cc:390
RBDL_DLLAPI std::string GetModelDOFOverview(const Model &model)
Creates a human readable overview of the Degrees of Freedom.
Definition: rbdl_utils.cc:66
RBDL_DLLAPI void CalcCenterOfMass(Model &model, const Math::VectorNd &q, const Math::VectorNd &qdot, const Math::VectorNd *qddot, Scalar &mass, Math::Vector3d &com, Math::Vector3d *com_velocity, Math::Vector3d *com_acceleration, Math::Vector3d *angular_momentum, Math::Vector3d *change_of_angular_momentum, bool update_kinematics)
Computes the Center of Mass (COM) and optionally its linear velocity.
Definition: rbdl_utils.cc:190
RBDL_DLLAPI void CalcZeroMomentPoint(Model &model, const Math::VectorNd &q, const Math::VectorNd &qdot, const Math::VectorNd &qddot, Vector3d *zmp, const Math::Vector3d &normal, const Math::Vector3d &point, bool update_kinematics)
Computes the Zero-Moment-Point (ZMP) on a given contact surface.
Definition: rbdl_utils.cc:282
RBDL_DLLAPI Scalar CalcPotentialEnergy(Model &model, const Math::VectorNd &q, bool update_kinematics)
Computes the potential energy of the full model.
Definition: rbdl_utils.cc:363
RBDL_DLLAPI std::string GetNamedBodyOriginsOverview(Model &model)
Creates a human readable overview of the locations of all bodies that have names.
Definition: rbdl_utils.cc:167