Verified Commit cd688230 authored by Justin Carpentier's avatar Justin Carpentier
Browse files

all: add PINOCCHIO_ALIGNED_STD_VECTOR to define the aligned vector

parent ab1e2fcd
//
// Copyright (c) 2018 CNRS
// Copyright (c) 2020 CNRS INRIA
//
#include "pinocchio/algorithm/joint-configuration.hpp"
......@@ -151,10 +151,10 @@ int main(int argc, const char ** argv)
Data data(model);
VectorXd qmax = Eigen::VectorXd::Ones(model.nq);
container::aligned_vector<VectorXd> qs (NBT);
container::aligned_vector<VectorXd> qdots (NBT);
container::aligned_vector<VectorXd> qddots (NBT);
container::aligned_vector<VectorXd> taus (NBT);
PINOCCHIO_ALIGNED_STD_VECTOR(VectorX)> qs (NBT);
PINOCCHIO_ALIGNED_STD_VECTOR(VectorXd qdots (NBT);
PINOCCHIO_ALIGNED_STD_VECTOR(VectorXd) qddots (NBT);
PINOCCHIO_ALIGNED_STD_VECTOR(VectorXd) taus (NBT);
for(size_t i=0;i<NBT;++i)
{
......
//
// Copyright (c) 2018 CNRS
// Copyright (c) 2018-2020 CNRS INRIA
//
#include "pinocchio/bindings/python/algorithm/algorithms.hpp"
......@@ -16,7 +16,9 @@ namespace pinocchio
{
computeABADerivatives(model,data,q,v,tau);
}
typedef container::aligned_vector<Force> ForceAlignedVector;
typedef PINOCCHIO_ALIGNED_STD_VECTOR(Force) ForceAlignedVector;
void computeABADerivatives_fext(const Model & model, Data & data,
const Eigen::VectorXd & q,
const Eigen::VectorXd & v,
......
//
// Copyright (c) 2018-2019 CNRS INRIA
// Copyright (c) 2018-2020 CNRS INRIA
//
#include "pinocchio/bindings/python/algorithm/algorithms.hpp"
......@@ -10,7 +10,7 @@ namespace pinocchio
namespace python
{
typedef container::aligned_vector<Force> ForceAlignedVector;
typedef PINOCCHIO_ALIGNED_STD_VECTOR(Force) ForceAlignedVector;
Data::MatrixXs computeGeneralizedGravityDerivatives(const Model & model, Data & data,
const Eigen::VectorXd & q)
......@@ -32,9 +32,9 @@ namespace pinocchio
}
void computeRNEADerivatives(const Model & model, Data & data,
const Eigen::VectorXd & q,
const Eigen::VectorXd & v,
const Eigen::VectorXd & a)
const Eigen::VectorXd & q,
const Eigen::VectorXd & v,
const Eigen::VectorXd & a)
{
pinocchio::computeRNEADerivatives(model,data,q,v,a);
// Symmetrize M
......
//
// Copyright (c) 2016-2017 CNRS
// Copyright (c) 2016-2020 CNRS INRIA
//
#ifndef __pinocchio_container_aligned_vector_hpp__
......@@ -8,10 +8,15 @@
#include <vector>
#include <Eigen/StdVector>
#define PINOCCHIO_ALIGNED_STD_VECTOR(Type) \
::pinocchio::container::aligned_vector<Type>
// std::vector<Type,Eigen::aligned_allocator<Type> >
namespace pinocchio
{
namespace container
{
///
/// \brief Specialization of an std::vector with an aligned allocator. This specialization might be used when the type T is or contains some Eigen members.
///
......@@ -21,6 +26,9 @@ namespace pinocchio
struct aligned_vector : public std::vector<T, Eigen::aligned_allocator<T> >
{
typedef ::std::vector<T, Eigen::aligned_allocator<T> > vector_base;
typedef const vector_base & const_vector_base_ref;
typedef vector_base & vector_base_ref;
typedef T value_type;
typedef typename vector_base::allocator_type allocator_type;
typedef typename vector_base::size_type size_type;
......@@ -37,6 +45,9 @@ namespace pinocchio
aligned_vector & operator=(const aligned_vector& x)
{ vector_base::operator=(x); return *this; }
operator vector_base_ref() { return base(); }
operator const_vector_base_ref() const { return base(); }
vector_base & base() { return *static_cast<vector_base*>(this); }
const vector_base & base() const { return *static_cast<const vector_base*>(this); }
......@@ -45,8 +56,7 @@ namespace pinocchio
template<class T>
bool operator==(const aligned_vector<T>& lhs, const aligned_vector<T>& rhs)
{
typedef typename aligned_vector<T>::vector_base vector_base;
return *static_cast<const vector_base*>(&lhs) == *static_cast<const vector_base*>(&rhs);
return lhs.base() == rhs.base();
}
} // namespace container
......
//
// Copyright (c) 2015-2019 CNRS INRIA
// Copyright (c) 2015-2020 CNRS INRIA
// Copyright (c) 2015 Wandercraft, 86 rue de Paris 91400 Orsay, France.
//
......@@ -53,8 +53,8 @@ namespace pinocchio
typedef JointModelTpl<Scalar,Options,JointCollectionTpl> JointModel;
typedef JointDataTpl<Scalar,Options,JointCollectionTpl> JointData;
typedef container::aligned_vector<JointModel> JointModelVector;
typedef container::aligned_vector<JointData> JointDataVector;
typedef PINOCCHIO_ALIGNED_STD_VECTOR(JointModel) JointModelVector;
typedef PINOCCHIO_ALIGNED_STD_VECTOR(JointData) JointDataVector;
typedef Eigen::Matrix<Scalar,Eigen::Dynamic,Eigen::Dynamic,Options> MatrixXs;
typedef Eigen::Matrix<Scalar,Eigen::Dynamic,1,Options> VectorXs;
......@@ -87,42 +87,42 @@ namespace pinocchio
JointDataVector joints;
/// \brief Vector of joint accelerations expressed at the centers of the joints frames.
container::aligned_vector<Motion> a;
PINOCCHIO_ALIGNED_STD_VECTOR(Motion) a;
/// \brief Vector of joint accelerations expressed at the origin of the world.
container::aligned_vector<Motion> oa;
PINOCCHIO_ALIGNED_STD_VECTOR(Motion) oa;
/// \brief Vector of joint accelerations due to the gravity field.
container::aligned_vector<Motion> a_gf;
PINOCCHIO_ALIGNED_STD_VECTOR(Motion) a_gf;
/// \brief Vector of joint accelerations expressed at the origin of the world including gravity contribution.
container::aligned_vector<Motion> oa_gf;
PINOCCHIO_ALIGNED_STD_VECTOR(Motion) oa_gf;
/// \brief Vector of joint velocities expressed at the centers of the joints.
container::aligned_vector<Motion> v;
PINOCCHIO_ALIGNED_STD_VECTOR(Motion) v;
/// \brief Vector of joint velocities expressed at the origin.
container::aligned_vector<Motion> ov;
PINOCCHIO_ALIGNED_STD_VECTOR(Motion) ov;
/// \brief Vector of body forces expressed in the local frame of the joint. For each body, the force represents the sum of
/// all external forces acting on the body.
container::aligned_vector<Force> f;
PINOCCHIO_ALIGNED_STD_VECTOR(Force) f;
/// \brief Vector of body forces expressed in the world frame. For each body, the force represents the sum of
/// all external forces acting on the body.
container::aligned_vector<Force> of;
PINOCCHIO_ALIGNED_STD_VECTOR(Force) of;
/// \brief Vector of spatial momenta expressed in the local frame of the joint.
container::aligned_vector<Force> h;
PINOCCHIO_ALIGNED_STD_VECTOR(Force) h;
/// \brief Vector of spatial momenta expressed in the world frame.
container::aligned_vector<Force> oh;
PINOCCHIO_ALIGNED_STD_VECTOR(Force) oh;
/// \brief Vector of absolute joint placements (wrt the world).
container::aligned_vector<SE3> oMi;
PINOCCHIO_ALIGNED_STD_VECTOR(SE3) oMi;
/// \brief Vector of relative joint placements (wrt the body parent).
container::aligned_vector<SE3> liMi;
PINOCCHIO_ALIGNED_STD_VECTOR(SE3) liMi;
/// \brief Vector of joint torques (dim model.nv).
TangentVectorType tau;
......@@ -138,14 +138,14 @@ namespace pinocchio
VectorXs g;
/// \brief Vector of absolute operationnel frame placements (wrt the world).
container::aligned_vector<SE3> oMf;
PINOCCHIO_ALIGNED_STD_VECTOR(SE3) oMf;
/// \brief Vector of sub-tree composite rigid body inertias, i.e. the apparent inertia of the subtree supported by the joint
/// and expressed in the local frame of the joint..
container::aligned_vector<Inertia> Ycrb;
PINOCCHIO_ALIGNED_STD_VECTOR(Inertia) Ycrb;
/// \brief Vector of sub-tree composite rigid body inertia time derivatives \f$ \dot{Y}_{crb}\f$. See Data::Ycrb for more details.
container::aligned_vector<Matrix6> dYcrb; // TODO: change with dense symmetric matrix6
PINOCCHIO_ALIGNED_STD_VECTOR(Matrix6) dYcrb; // TODO: change with dense symmetric matrix6
/// \brief The joint space inertia matrix (a square matrix of dim model.nv).
MatrixXs M;
......@@ -178,16 +178,16 @@ namespace pinocchio
Matrix6x IS;
/// \brief Right variation of the inertia matrix
container::aligned_vector<Matrix6> vxI;
PINOCCHIO_ALIGNED_STD_VECTOR(Matrix6) vxI;
/// \brief Left variation of the inertia matrix
container::aligned_vector<Matrix6> Ivx;
PINOCCHIO_ALIGNED_STD_VECTOR(Matrix6) Ivx;
/// \brief Inertia quantities expressed in the world frame
container::aligned_vector<Inertia> oYcrb;
PINOCCHIO_ALIGNED_STD_VECTOR(Inertia) oYcrb;
/// \brief Time variation of the inertia quantities expressed in the world frame
container::aligned_vector<Matrix6> doYcrb;
PINOCCHIO_ALIGNED_STD_VECTOR(Matrix6) doYcrb;
/// \brief Temporary for derivative algorithms
Matrix6 Itmp;
......@@ -202,7 +202,7 @@ namespace pinocchio
// ABA internal data
/// \brief Inertia matrix of the subtree expressed as dense matrix [ABA]
container::aligned_vector<Matrix6> Yaba; // TODO: change with dense symmetric matrix6
PINOCCHIO_ALIGNED_STD_VECTOR(Matrix6) Yaba; // TODO: change with dense symmetric matrix6
/// \brief Intermediate quantity corresponding to apparent torque [ABA]
TangentVectorType u; // Joint Inertia
......@@ -234,7 +234,7 @@ namespace pinocchio
Inertia Ig;
/// \brief Spatial forces set, used in CRBA and CCRBA
container::aligned_vector<Matrix6x> Fcrb;
PINOCCHIO_ALIGNED_STD_VECTOR(Matrix6x) Fcrb;
/// \brief Index of the last child (for CRBA)
std::vector<int> lastChild;
......@@ -299,16 +299,16 @@ namespace pinocchio
MatrixXs ddq_dv;
/// \brief Vector of joint placements wrt to algorithm end effector.
container::aligned_vector<SE3> iMf;
PINOCCHIO_ALIGNED_STD_VECTOR(SE3) iMf;
/// \brief Vector of subtree center of mass positions expressed in the root joint of the subtree. In other words, com[j] is the CoM position of the subtree supported by joint \f$ j \f$ and expressed in the joint frame \f$ j \f$. The element com[0] corresponds to the center of mass position of the whole model and expressed in the global frame.
container::aligned_vector<Vector3> com;
PINOCCHIO_ALIGNED_STD_VECTOR(Vector3) com;
/// \brief Vector of subtree center of mass linear velocities expressed in the root joint of the subtree. In other words, vcom[j] is the CoM linear velocity of the subtree supported by joint \f$ j \f$ and expressed in the joint frame \f$ j \f$. The element vcom[0] corresponds to the velocity of the CoM of the whole model expressed in the global frame.
container::aligned_vector<Vector3> vcom;
PINOCCHIO_ALIGNED_STD_VECTOR(Vector3) vcom;
/// \brief Vector of subtree center of mass linear accelerations expressed in the root joint of the subtree. In other words, acom[j] is the CoM linear acceleration of the subtree supported by joint \f$ j \f$ and expressed in the joint frame \f$ j \f$. The element acom[0] corresponds to the acceleration of the CoM of the whole model expressed in the global frame.
container::aligned_vector<Vector3> acom;
PINOCCHIO_ALIGNED_STD_VECTOR(Vector3) acom;
/// \brief Vector of subtree mass. In other words, mass[j] is the mass of the subtree supported by joint \f$ j \f$. The element mass[0] corresponds to the total mass of the model.
std::vector<Scalar> mass;
......
//
// Copyright (c) 2015-2019 CNRS INRIA
// Copyright (c) 2015-2020 CNRS INRIA
//
#ifndef __pinocchio_multibody_geometry_hpp__
......@@ -30,7 +30,7 @@ namespace pinocchio
typedef SE3Tpl<Scalar,Options> SE3;
typedef ::pinocchio::GeometryObject GeometryObject;
typedef container::aligned_vector<GeometryObject> GeometryObjectVector;
typedef PINOCCHIO_ALIGNED_STD_VECTOR(GeometryObject) GeometryObjectVector;
typedef std::vector<CollisionPair> CollisionPairVector;
typedef pinocchio::GeomIndex GeomIndex;
......@@ -184,7 +184,7 @@ namespace pinocchio
/// oMg is used for pinocchio (kinematics) computation but is translated to fcl type
/// for fcl (collision) computation. The copy is done in collisionObjects[i]->setTransform(.)
///
container::aligned_vector<SE3> oMg;
PINOCCHIO_ALIGNED_STD_VECTOR(SE3) oMg;
#ifdef PINOCCHIO_WITH_HPP_FCL
///
......
//
// Copyright (c) 2016-2019 CNRS INRIA
// Copyright (c) 2016-2020 CNRS INRIA
//
#ifndef __pinocchio_joint_composite_hpp__
......@@ -71,7 +71,7 @@ namespace pinocchio
typedef JointCollectionTpl<Scalar,Options> JointCollection;
typedef JointDataTpl<Scalar,Options,JointCollectionTpl> JointDataVariant;
typedef container::aligned_vector<JointDataVariant> JointDataVector;
typedef PINOCCHIO_ALIGNED_STD_VECTOR(JointDataVariant) JointDataVector;
// JointDataComposite() {} // can become necessary if we want a vector of JointDataComposite ?
......@@ -104,10 +104,10 @@ namespace pinocchio
JointDataVector joints;
/// \brief Transforms from previous joint to last joint
container::aligned_vector<Transformation_t> iMlast;
PINOCCHIO_ALIGNED_STD_VECTOR(Transformation_t) iMlast;
/// \brief Transforms from previous joint to joint i
container::aligned_vector<Transformation_t> pjMi;
PINOCCHIO_ALIGNED_STD_VECTOR(Transformation_t) pjMi;
Constraint_t S;
Transformation_t M;
......@@ -162,7 +162,7 @@ namespace pinocchio
typedef MotionTpl<Scalar,Options> Motion;
typedef InertiaTpl<Scalar,Options> Inertia;
typedef container::aligned_vector<JointModelVariant> JointModelVector;
typedef PINOCCHIO_ALIGNED_STD_VECTOR(JointModelVariant) JointModelVector;
using Base::id;
using Base::idx_q;
......@@ -366,7 +366,7 @@ namespace pinocchio
/// \brief Vector of joints contained in the joint composite.
JointModelVector joints;
/// \brief Vector of joint placements. Those placements correspond to the origin of the joint relatively to their parent.
container::aligned_vector<SE3> jointPlacements;
PINOCCHIO_ALIGNED_STD_VECTOR(SE3) jointPlacements;
template<typename D>
typename SizeDepType<NQ>::template SegmentReturn<D>::ConstType
......
//
// Copyright (c) 2016-2019 CNRS INRIA
// Copyright (c) 2016-2020 CNRS INRIA
//
#ifndef __pinocchio_joint_generic_hpp__
......@@ -229,8 +229,8 @@ namespace pinocchio
}
};
typedef container::aligned_vector<JointData> JointDataVector;
typedef container::aligned_vector<JointModel> JointModelVector;
typedef PINOCCHIO_ALIGNED_STD_VECTOR(JointData) JointDataVector;
typedef PINOCCHIO_ALIGNED_STD_VECTOR(JointModel) JointModelVector;
} // namespace pinocchio
......
//
// Copyright (c) 2015-2019 CNRS INRIA
// Copyright (c) 2015-2020 CNRS INRIA
// Copyright (c) 2015 Wandercraft, 86 rue de Paris 91400 Orsay, France.
//
......@@ -53,10 +53,10 @@ namespace pinocchio
typedef JointModelTpl<Scalar,Options,JointCollectionTpl> JointModel;
typedef JointDataTpl<Scalar,Options,JointCollectionTpl> JointData;
typedef container::aligned_vector<JointModel> JointModelVector;
typedef container::aligned_vector<JointData> JointDataVector;
typedef PINOCCHIO_ALIGNED_STD_VECTOR(JointModel) JointModelVector;
typedef PINOCCHIO_ALIGNED_STD_VECTOR(JointData) JointDataVector;
typedef container::aligned_vector<Frame> FrameVector;
typedef PINOCCHIO_ALIGNED_STD_VECTOR(Frame) FrameVector;
typedef Eigen::Matrix<Scalar,Eigen::Dynamic,1,Options> VectorXs;
typedef Eigen::Matrix<Scalar,3,1,Options> Vector3;
......@@ -86,10 +86,10 @@ namespace pinocchio
int nframes;
/// \brief Spatial inertias of the body *i* expressed in the supporting joint frame *i*.
container::aligned_vector<Inertia> inertias;
PINOCCHIO_ALIGNED_STD_VECTOR(Inertia) inertias;
/// \brief Placement (SE3) of the input of joint *i* regarding to the parent joint output *li*.
container::aligned_vector<SE3> jointPlacements;
PINOCCHIO_ALIGNED_STD_VECTOR(SE3) jointPlacements;
/// \brief Model of joint *i*, encapsulated in a JointModelAccessor.
JointModelVector joints;
......
//
// Copyright (c) 2015-2019 CNRS INRIA
// Copyright (c) 2015-2020 CNRS INRIA
// Copyright (c) 2015 Wandercraft, 86 rue de Paris 91400 Orsay, France.
//
......@@ -229,7 +229,7 @@ namespace pinocchio
ModelTpl<Scalar,Options,JointCollectionTpl>::
getFrameId(const std::string & name, const FrameType & type) const
{
typename container::aligned_vector<Frame>::const_iterator it
typename PINOCCHIO_ALIGNED_STD_VECTOR(Frame)::const_iterator it
= std::find_if(frames.begin()
,frames.end()
,details::FilterFrame(name, type));
......
//
// Copyright (c) 2015-2018 CNRS
// Copyright (c) 2015-2020 CNRS
// Copyright (c) 2015 Wandercraft, 86 rue de Paris 91400 Orsay, France.
//
......@@ -124,7 +124,7 @@ namespace pinocchio
std::ostringstream oss;
oss << joint_name << " already inserted as a frame. Current frames "
"are [";
for (typename container::aligned_vector<Frame>::const_iterator it =
for (typename PINOCCHIO_ALIGNED_STD_VECTOR(Frame)::const_iterator it =
model.frames.begin (); it != model.frames.end (); ++it) {
oss << "\"" << it->name << "\",";
}
......
//
// Copyright (c) 2018 CNRS, INRIA
// Copyright (c) 2018-2020 CNRS INRIA
//
#include "pinocchio/multibody/model.hpp"
......@@ -174,7 +174,7 @@ BOOST_AUTO_TEST_CASE(test_aba_derivatives_fext)
VectorXd tau(VectorXd::Random(model.nv));
VectorXd a(aba(model,data_ref,q,v,tau));
typedef container::aligned_vector<Force> ForceVector;
typedef PINOCCHIO_ALIGNED_STD_VECTOR(Force) ForceVector;
ForceVector fext((size_t)model.njoints);
for(ForceVector::iterator it = fext.begin(); it != fext.end(); ++it)
(*it).setRandom();
......
//
// Copyright (c) 2016-2018 CNRS, INRIA
// Copyright (c) 2016-2020 CNRS INRIA
//
#include "pinocchio/spatial/fwd.hpp"
......@@ -166,7 +166,7 @@ BOOST_AUTO_TEST_CASE ( test_aba_with_fext )
VectorXd v = VectorXd::Random(model.nv);
VectorXd a = VectorXd::Random(model.nv);
container::aligned_vector<Force> fext(model.joints.size(), Force::Random());
PINOCCHIO_ALIGNED_STD_VECTOR(Force) fext(model.joints.size(), Force::Random());
crba(model, data, q);
computeJointJacobians(model, data, q);
......
//
// Copyright (c) 2019 INRIA
// Copyright (c) 2019-2020 INRIA
//
#include "pinocchio/algorithm/jacobian.hpp"
......@@ -49,7 +49,7 @@ BOOST_AUTO_TEST_CASE ( test_FD_with_contact_cst_gamma )
VectorXd ddq_ref = data.ddq;
Force::Vector6 contact_force_ref = data.lambda_c;
container::aligned_vector<Force> fext((size_t)model.njoints,Force::Zero());
PINOCCHIO_ALIGNED_STD_VECTOR(Force) fext((size_t)model.njoints,Force::Zero());
fext[RF_id] = ForceRef<Force::Vector6>(contact_force_ref);
// check call to RNEA
......@@ -206,7 +206,7 @@ BOOST_AUTO_TEST_CASE ( test_FD_with_contact_varying_gamma )
VectorXd ddq_ref = x_ref.head(model.nv);
Force::Vector6 contact_force_ref = x_ref.tail(6);
container::aligned_vector<Force> fext((size_t)model.njoints,Force::Zero());
PINOCCHIO_ALIGNED_STD_VECTOR(Force) fext((size_t)model.njoints,Force::Zero());
fext[RF_id] = ForceRef<Force::Vector6>(contact_force_ref);
// check call to RNEA
......
......@@ -84,4 +84,17 @@ BOOST_AUTO_TEST_SUITE(BOOST_TEST_MODULE)
BOOST_CHECK(data != data_copy);
}
BOOST_AUTO_TEST_CASE(test_container_aligned_vector)
{
Model model;
buildModels::humanoidRandom(model);
Data data(model);
container::aligned_vector<Data::Force> & f = data.f;
data.f[0].setRandom();
BOOST_CHECK(data.f[0] == f[0]);
}
BOOST_AUTO_TEST_SUITE_END()
//
// Copyright (c) 2017-2019 CNRS INRIA
// Copyright (c) 2017-2020 CNRS INRIA
//
#include "pinocchio/multibody/model.hpp"
......@@ -76,7 +76,7 @@ BOOST_AUTO_TEST_CASE(test_generalized_gravity_derivatives_fext)
model.upperPositionLimit.head<3>().fill( 1.);
VectorXd q = randomConfiguration(model);
typedef container::aligned_vector<Force> ForceVector;
typedef PINOCCHIO_ALIGNED_STD_VECTOR(Force) ForceVector;
ForceVector fext((size_t)model.njoints);
for(ForceVector::iterator it = fext.begin(); it != fext.end(); ++it)
(*it).setRandom();
......@@ -319,7 +319,7 @@ BOOST_AUTO_TEST_CASE(test_rnea_derivatives_fext)
VectorXd v(VectorXd::Random(model.nv));
VectorXd a(VectorXd::Random(model.nv));
typedef container::aligned_vector<Force> ForceVector;
typedef PINOCCHIO_ALIGNED_STD_VECTOR(Force) ForceVector;
ForceVector fext((size_t)model.njoints);
for(ForceVector::iterator it = fext.begin(); it != fext.end(); ++it)
(*it).setRandom();
......
//
// Copyright (c) 2015-2019 CNRS INRIA
// Copyright (c) 2015-2020 CNRS INRIA
//
/*
......@@ -147,7 +147,7 @@ BOOST_AUTO_TEST_CASE (test_rnea_with_fext)
VectorXd v (VectorXd::Random(model.nv));
VectorXd a (VectorXd::Random(model.nv));
container::aligned_vector<Force> fext(model.joints.size(), Force::Zero());
PINOCCHIO_ALIGNED_STD_VECTOR(Force) fext(model.joints.size(), Force::Zero());
JointIndex rf = model.getJointId("rleg6_joint"); Force Frf = Force::Random();
fext[rf] = Frf;
......@@ -215,7 +215,7 @@ BOOST_AUTO_TEST_CASE(test_compute_static_torque)
VectorXd q = randomConfiguration(model);
typedef container::aligned_vector<Force> ForceVector;
typedef PINOCCHIO_ALIGNED_STD_VECTOR(Force) ForceVector;
ForceVector fext((size_t)model.njoints);
for(ForceVector::iterator it = fext.begin(); it != fext.end(); ++it)
(*it).setRandom();
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment