Mujoco warning: Linesearch objective is not convex

Discussion in 'Simulation' started by Youngwoon Lee, Jun 16, 2019.

  1. I'm using mujoco-py and I recently got the error ('Linesearch objective is not convex') in sim.step() or sim.forward() methods.

    It seldom happens, like once a 100k steps, so it is difficult for me to spot the problem.

    Can you give some possible reasons for this error?
  2. Just a blatant guess: Do you modify values such as mass online. I can imagine that if you do sth. stupid like setting a mass to a negative value ...
  3. Thanks for the answer.

    I didn't change a mass, but I set ctrl, qvel, and qacc to zero to make a robot stable after moving to a certain configuration (like every 10 step function calls).
    Can this cause the problem?
  4. qacc is the output of the forward dynamics so there is no point in setting it. You can set qvel to zero but I think its implausible to do so. I have no idea whats actuall wrong in your simulation, you approach to stabilizing the robot sounds somewhat hacky. Id try to use some joint damping or maybe just a pd controller.