Go to the documentation of this file.
25 #include <boost/filesystem.hpp>
30 #ifndef PINOCCHIO_MODEL_DIR
31 #define PINOCCHIO_MODEL_DIR "path_to_the_model_dir"
34 #define BOOST_CHECK(check) \
36 std::cout << BOOST_STRINGIZE(check) << " has failed" << std::endl;
40 template<
typename T1,
typename T2 = T1>
43 static bool run(
const T1 & v1,
const T2 & v2)
80 void generic_test(
const T &
object,
const std::string & filename,
const std::string & tag_name)
85 const std::string txt_filename =
filename +
".txt";
89 T & object_loaded = *empty_contructor<T>();
95 delete &object_loaded;
99 std::stringstream ss_out;
103 T & object_loaded = *empty_contructor<T>();
104 std::istringstream is(ss_out.str());
110 delete &object_loaded;
117 T & object_loaded = *empty_contructor<T>();
118 std::string str_in(str_out);
124 delete &object_loaded;
128 const std::string xml_filename =
filename +
".xml";
129 saveToXML(
object, xml_filename, tag_name);
132 T & object_loaded = *empty_contructor<T>();
133 loadFromXML(object_loaded, xml_filename, tag_name);
138 delete &object_loaded;
142 const std::string bin_filename =
filename +
".bin";
146 T & object_loaded = *empty_contructor<T>();
152 delete &object_loaded;
156 boost::asio::streambuf buffer;
160 T & object_loaded = *empty_contructor<T>();
166 delete &object_loaded;
174 T & object_loaded = *empty_contructor<T>();
180 delete &object_loaded;
186 namespace fs = boost::filesystem;
193 fs::path data_path = fs::temp_directory_path() /
"GeometryData";
204 #ifdef PINOCCHIO_WITH_HPP_FCL
205 #if HPP_FCL_VERSION_AT_LEAST(3, 0, 0)
230 #endif // hpp-fcl >= 3.0.0
231 #endif // PINOCCHIO_WITH_HPP_FCL
void loadFromXML(T &object, const std::string &filename, const std::string &tag_name)
Loads an object from a XML file.
void forwardKinematics(const ModelTpl< Scalar, Options, JointCollectionTpl > &model, DataTpl< Scalar, Options, JointCollectionTpl > &data, const Eigen::MatrixBase< ConfigVectorType > &q)
Update the joint placements according to the current joint configuration.
void updateGeometryPlacements(const ModelTpl< Scalar, Options, JointCollectionTpl > &model, DataTpl< Scalar, Options, JointCollectionTpl > &data, const GeometryModel &geom_model, GeometryData &geom_data, const Eigen::MatrixBase< ConfigVectorType > &q)
Apply a forward kinematics and update the placement of the geometry objects.
static pinocchio::GeometryObject * run()
static bool run(const T1 &v1, const T2 &v2)
void loadFromString(T &object, const std::string &str)
Loads an object from a std::string.
void saveToBinary(const T &object, const std::string &filename)
Saves an object inside a binary file.
Static buffer with pre-allocated memory.
std::string saveToString(const T &object)
Saves an object inside a std::string.
void saveToText(const T &object, const std::string &filename)
Saves an object inside a TXT file.
bool run_call_equality_op(const T &v1, const T &v2)
void loadFromStringStream(T &object, std::istringstream &is)
Loads an object from a std::stringstream.
void saveToStringStream(const T &object, std::stringstream &ss)
Saves an object inside a std::stringstream.
JointCollectionTpl const Eigen::MatrixBase< ConfigVectorType > & q
void saveToXML(const T &object, const std::string &filename, const std::string &tag_name)
Saves an object inside a XML file.
void loadFromBinary(T &object, const std::string &filename)
Loads an object from a binary file.
void humanoid(ModelTpl< Scalar, Options, JointCollectionTpl > &model, bool usingFF=true)
Create a 28-DOF kinematic chain of a floating humanoid robot.
void loadFromText(T &object, const std::string &filename)
Loads an object from a TXT file.
void neutral(const ModelTpl< Scalar, Options, JointCollectionTpl > &model, const Eigen::MatrixBase< ReturnType > &qout)
Return the neutral configuration element related to the model configuration space.
std::shared_ptr< fcl::CollisionGeometry > CollisionGeometryPtr
void generic_test(const T &object, const std::string &filename, const std::string &tag_name)
JointCollectionTpl & model
Main pinocchio namespace.
#define BOOST_CHECK(check)
pinocchio
Author(s):
autogenerated on Sat Jun 1 2024 02:40:37