Closed balandbal closed 2 years ago
As far as I understand, the problem is not, that the macro is not included, but it relies on a static mjModel called m
.
I like the enable and disable macros because they enhance readability, but I am trying to move away from functions using the static context and instead taking the variables as arguments.
I think redefining the macros in my own headers as
#define mjENABLED_ros(model, x) (model->opt.enableflags & (x))
#define mjDISABLED_ros(model, x) (model->opt.disableflags & (x))
would be more elegant. What do you think?
I agree; it makes more sense to me, too. Shall I add the definitions in mujoco_sim.h?
The macro mjENABLED defined in line 47 of mujoco.h was apparently not included and was breaking the build. The macro is adapted and expanded to fit the naming scheme.