Hey,
In my program i use the RevoluteJoint to build a multibody. These multijoints have a motor. Everything works until here. What i would like to know is how can i access the motors and change their values during simulation. E.g. if a user is controlling a car and the wheels are connected to the mainbody of the car and he increases the velocity during simulation.
I guess there might be a way using the bodyset and maybe handles? However i can not figure it out.
Thanks in advance

You can follow that example which enables/disables a motor depending on the position of a pin-slot joint. The following snippet assumes your multibody has the handle multibody_handle and the multibody link which has the joint you want to modify is the link_id-th:

Thanks a lot. That already was a big help and worked so far. Could you also show how you could iterate through the bodyset and manipulate all revolute motors that you can find? That would be a big help.
Thank you!