Rigid Body Dynamics Library
luamodel.h
Go to the documentation of this file.
1#ifndef _RBDL_LUAMODEL_H
2#define _RBDL_LUAMODEL_H
3
4#include <rbdl/rbdl_config.h>
5#include <string>
6#include <vector>
7#include "luastructs.h"
8
9#include <rbdl/rbdl_math.h>
10
11#ifdef RBDL_BUILD_ADDON_MUSCLE
12namespace RigidBodyDynamics{
13 namespace Addons{
14 namespace Muscle{
16 }
17 }
18}
19#endif
20
21extern "C" {
22 struct lua_State;
23};
24
25
26
27namespace RigidBodyDynamics {
28
29struct Model;
30struct ConstraintSet;
31
32namespace Addons {
33
276RBDL_ADDON_DLLAPI
278 const char* filename,
279 Model* upd_model,
280 bool verbose = false);
281
282RBDL_ADDON_DLLAPI
284 const Model* model,
285 std::vector< std::string >& updGeneralizedPositionNames,
286 std::vector< std::string >& updGeneralizedVelocityNames,
287 std::vector< std::string >& updGeneralizedForceNames);
288
291RBDL_ADDON_DLLAPI
292std::vector<std::string> LuaModelGetConstraintSetNames(const char* filename);
293
294RBDL_ADDON_DLLAPI
295bool LuaModelGetConstraintSetPhases(const char* filename,
296 const std::vector<std::string> &constraint_set_names,
297 std::vector< unsigned int > &constraint_set_phases);
298
310RBDL_ADDON_DLLAPI
312 const char* filename,
313 const Model* model,
314 std::vector<MotionCaptureMarker> &upd_marker_set,
315 bool verbose=false);
316
328RBDL_ADDON_DLLAPI
330 const char* filename,
331 const Model* model,
332 std::vector<Point> &upd_point_set,
333 bool verbose=false);
334
346RBDL_ADDON_DLLAPI
348 const char* filename,
349 const Model* model,
350 std::vector<LocalFrame> &upd_local_frame_set,
351 bool verbose=false);
352
353
371RBDL_ADDON_DLLAPI
373 const char* filename,
374 Model* upd_model,
375 std::vector<ConstraintSet>& constraint_sets,
376 const std::vector<std::string>& constraint_set_names,
377 bool verbose = false);
378
388RBDL_ADDON_DLLAPI
390 lua_State* L,
391 Model* model,
392 bool verbose = false);
393
403RBDL_ADDON_DLLAPI
405 const char* filename,
406 HumanMetaData &human_meta_data,
407 bool verbose = false);
408
409
410#ifdef RBDL_BUILD_ADDON_MUSCLE
411
434RBDL_ADDON_DLLAPI
436 const char* filename,
437 const RigidBodyDynamics::Model *model,
438 const HumanMetaData &human_meta_data,
439 std::vector <RigidBodyDynamics::Addons::
441 std::vector <Millard2016TorqueMuscleConfig> &updMtgSetInfo,
442 bool verbose = false);
443
444#endif
445
459RBDL_ADDON_DLLAPI
460bool LuaModelWriteModelHeaderEntries(const char* header_file_name,
461 const RigidBodyDynamics::Model &model,
462 bool append);
469RBDL_ADDON_DLLAPI
470bool LuaModelAddHeaderGuards(const char* header_file_name);
471
482RBDL_ADDON_DLLAPI
483bool LuaModelWritePointsHeaderEntries(const char* header_file_name,
484 const std::vector<Point> &point_set,
485 bool append);
486
498RBDL_ADDON_DLLAPI
500 const char* header_file_name,
501 const std::vector< MotionCaptureMarker > &marker_set,
502 bool append);
503
515RBDL_ADDON_DLLAPI
516bool LuaModelWriteLocalFrameHeaderEntries(const char* header_file_name,
517 const std::vector<LocalFrame> &local_frame_set,
518 bool append);
519
533RBDL_ADDON_DLLAPI
534bool LuaModelWriteConstraintSetHeaderEntries(const char* header_file_name,
535 const std::vector< std::string > &constraint_set_names,
536 const std::vector<RigidBodyDynamics::ConstraintSet> &constraint_sets,
537 bool append);
538
553RBDL_ADDON_DLLAPI
554bool LuaModelWriteConstraintSetPhaseHeaderEntries(const char* header_file_name,
555 const std::vector< std::string > &constraint_set_names,
556 const std::vector< unsigned int > &constraint_phases,
557 bool append);
558
559#ifdef RBDL_BUILD_ADDON_MUSCLE
570RBDL_ADDON_DLLAPI
572 const char* header_file_name,
573 const std::vector<RigidBodyDynamics::Addons::Muscle
574 ::Millard2016TorqueMuscle> &mtg_set,
575 const std::vector<Millard2016TorqueMuscleConfig > &mtg_set_info,
576 bool append);
577
578#endif
580}
581
582}
583
584/* _RBDL_LUAMODEL_H */
585#endif
This class implements a rigid-tendon muscle-torque-generator (MTG) for a growing list of joints and t...
RBDL_ADDON_DLLAPI bool LuaModelReadFromFileWithConstraints(const char *filename, Model *upd_model, std::vector< ConstraintSet > &constraint_sets, const std::vector< std::string > &constraint_set_names, bool verbose=false)
Reads a model and constraint sets from a Lua file.
RBDL_ADDON_DLLAPI bool LuaModelWriteConstraintSetHeaderEntries(const char *header_file_name, const std::vector< std::string > &constraint_set_names, const std::vector< RigidBodyDynamics::ConstraintSet > &constraint_sets, bool append)
RBDL_ADDON_DLLAPI void LuaModelGetCoordinateNames(const Model *model, std::vector< std::string > &updGeneralizedPositionNames, std::vector< std::string > &updGeneralizedVelocityNames, std::vector< std::string > &updGeneralizedForceNames)
RBDL_ADDON_DLLAPI std::vector< std::string > LuaModelGetConstraintSetNames(const char *filename)
Reads a model file and returns the names of all constraint sets.
RBDL_ADDON_DLLAPI bool LuaModelWriteMillard2016TorqueMuscleHeaderEntries(const char *header_file_name, const std::vector< RigidBodyDynamics::Addons::Muscle ::Millard2016TorqueMuscle > &mtg_set, const std::vector< Millard2016TorqueMuscleConfig > &mtg_set_info, bool append)
RBDL_ADDON_DLLAPI bool LuaModelReadMotionCaptureMarkers(const char *filename, const Model *model, std::vector< MotionCaptureMarker > &upd_marker_set, bool verbose=false)
RBDL_ADDON_DLLAPI bool LuaModelReadMillard2016TorqueMuscleSets(const char *filename, const RigidBodyDynamics::Model *model, const HumanMetaData &human_meta_data, std::vector< RigidBodyDynamics::Addons::Muscle::Millard2016TorqueMuscle > &updMtgSet, std::vector< Millard2016TorqueMuscleConfig > &updMtgSetInfo, bool verbose=false)
RBDL_ADDON_DLLAPI bool LuaModelReadHumanMetaData(const char *filename, HumanMetaData &human_meta_data, bool verbose=false)
RBDL_ADDON_DLLAPI bool LuaModelReadLocalFrames(const char *filename, const Model *model, std::vector< LocalFrame > &upd_local_frame_set, bool verbose=false)
RBDL_ADDON_DLLAPI bool LuaModelAddHeaderGuards(const char *header_file_name)
RBDL_ADDON_DLLAPI bool LuaModelWriteMotionCaptureMarkerHeaderEntries(const char *header_file_name, const std::vector< MotionCaptureMarker > &marker_set, bool append)
RBDL_ADDON_DLLAPI bool LuaModelWritePointsHeaderEntries(const char *header_file_name, const std::vector< Point > &point_set, bool append)
RBDL_ADDON_DLLAPI bool LuaModelReadFromLuaState(lua_State *L, Model *model, bool verbose=false)
Reads a model from a lua_State.
RBDL_ADDON_DLLAPI bool LuaModelWriteModelHeaderEntries(const char *header_file_name, const RigidBodyDynamics::Model &model, bool append)
RBDL_ADDON_DLLAPI bool LuaModelWriteConstraintSetPhaseHeaderEntries(const char *header_file_name, const std::vector< std::string > &constraint_set_names, const std::vector< unsigned int > &constraint_phases, bool append)
RBDL_ADDON_DLLAPI bool LuaModelWriteLocalFrameHeaderEntries(const char *header_file_name, const std::vector< LocalFrame > &local_frame_set, bool append)
RBDL_ADDON_DLLAPI bool LuaModelReadFromFile(const char *filename, Model *upd_model, bool verbose=false)
Reads a model from a Lua file.
RBDL_ADDON_DLLAPI bool LuaModelReadPoints(const char *filename, const Model *model, std::vector< Point > &upd_point_set, bool verbose=false)
RBDL_ADDON_DLLAPI bool LuaModelGetConstraintSetPhases(const char *filename, const std::vector< std::string > &constraint_set_names, std::vector< unsigned int > &constraint_set_phases)