Set position/velocity control mode via code
Posted: 23 Jun 2022, 13:17
I need to set position / velocity mode via Lua code (not via the GUI) because I want to be able to switch between these modes.
1)
It seems like I need this parameter from joint reference
"sim.jointfloatparam_dynctrlmode
int32 parameter: the dynamic control mode of the joint"
But it does not seem that the parameter is available to be set because when I query the parameter I get an error. I tried this:
print(sim.getObjectInt32Param(joint,sim.jointfloatparam_dynctrlmode))
where joint is the handle of a joint that has already been defined. This code returns an error.
2)
There are different modes for the joint, free, position, torque, velocity. How to set these modes via code? I am using Lua.
1)
It seems like I need this parameter from joint reference
"sim.jointfloatparam_dynctrlmode
int32 parameter: the dynamic control mode of the joint"
But it does not seem that the parameter is available to be set because when I query the parameter I get an error. I tried this:
print(sim.getObjectInt32Param(joint,sim.jointfloatparam_dynctrlmode))
where joint is the handle of a joint that has already been defined. This code returns an error.
2)
There are different modes for the joint, free, position, torque, velocity. How to set these modes via code? I am using Lua.