RobotConverterConfig.h
Go to the documentation of this file.
1 /*
2  * Copyright 2022 CNRS-UM LIRMM, CNRS-AIST JRL
3  */
4 
5 #pragma once
6 
7 #include <mc_rbdyn/api.h>
8 
9 namespace mc_rbdyn
10 {
11 
16 {
18  bool mbcToOutMbc_ = true;
23  bool copyJointCommand_ = true;
24  bool copyJointVelocityCommand_ = true;
25  bool copyJointAccelerationCommand_ = true;
26  bool copyJointTorqueCommand_ = true;
28 
30  bool encodersToOutMbc_ = false;
32  bool encodersToOutMbcOnce_ = true;
34  bool enforceMimics_ = true;
35 
36  /* Copy the input robot's position in the world into the output
37  *
38  * This also triggers the robot's kinematic update (outputRobot.forwardKinematics()), if this option is false the
39  * update must be done outside of the robot converter if the accurate position of the robot is needed
40  */
41  bool copyPosWorld_ = true;
42 
43 #define ROBOT_CONVERTER_PROPERTY(NAME) \
44  inline RobotConverterConfig & NAME(bool b) noexcept \
45  { \
46  NAME##_ = b; \
47  return *this; \
48  }
49 
50  ROBOT_CONVERTER_PROPERTY(mbcToOutMbc)
51  ROBOT_CONVERTER_PROPERTY(copyJointCommand)
52  ROBOT_CONVERTER_PROPERTY(copyJointVelocityCommand)
53  ROBOT_CONVERTER_PROPERTY(copyJointAccelerationCommand)
54  ROBOT_CONVERTER_PROPERTY(copyJointTorqueCommand)
55  ROBOT_CONVERTER_PROPERTY(encodersToOutMbc)
56  ROBOT_CONVERTER_PROPERTY(encodersToOutMbcOnce)
57  ROBOT_CONVERTER_PROPERTY(enforceMimics)
58  ROBOT_CONVERTER_PROPERTY(copyPosWorld)
59 
60 #undef ROBOT_CONVERTER_PROPERTY
61 };
62 
63 } // namespace mc_rbdyn
mc_rbdyn::RobotConverterConfig
Configuration for mc_rbdyn::RobotConverter.
Definition: RobotConverterConfig.h:15
ROBOT_CONVERTER_PROPERTY
#define ROBOT_CONVERTER_PROPERTY(NAME)
Definition: RobotConverterConfig.h:43
api.h
MC_RBDYN_DLLAPI
#define MC_RBDYN_DLLAPI
Definition: api.h:50
mc_rbdyn
Definition: generic_gripper.h:14