Hello! I am facing awfully time-wrecking troubles, trying to implement a (fairly high gain) PD - joint controller with gravity compensation. Essentially what i am doing is: 1. call mj_step_1 2. compute input as u = K(q_d - q) + D_d*(dq_d - dq) + Cg //(mj_rne(flg_acc=0) 3. call mj_step_2 I am not using sensors to retrieve the current velocity and position of my joints but I am directly grabbing them from mj_data (after having called mj_step_1). -> Is there a difference between using sensors (assuming no noise/cutoff) and retrieving the values directly after mj_step_1? It seems as if the d-gain(should be aperiodically damped) in simulation causes instabilities very quickly. The velocities quickly evaluate to large values. Decreasing the simulation step-size didn't help either. What frustrates me most is that using a computed torque controller (M^-1*(K(q_d - q) + D_d*(dq_d - dq)) + Cg) allows one to robustly simulate enormously stiff pd controlled manipulators. Are there any suggestions/tips or am I assuming sth. awfully wrong with the way I utilize mj_data?