Nate711 / PupperPythonSim

46 stars 19 forks source link

Simulation with MuJoCo and PyBullet results in near instant NaN in simulation #3

Open smbutler-ire opened 4 years ago

smbutler-ire commented 4 years ago

In both simulations, robot drops from height and then falls forward resulting in "invalid value encountered in arccos" error.

Joint Angles: [[-0.12971291 0.12971291 -0.12971291 0.12971291] [ 0.91785808 0.91785808 0.91785808 0.91785808] [ 0.76873907 0.76873907 0.76873907 0.76873907]] Servo Pulse Width (uS): [[1552.07517356 1778.52482644 1346.87517356 1607.52482644] [1459.08090847 1575.11909153 1436.28090847 1518.11909153] [2480.91874854 644.48125146 2446.71874854 621.68125146]]

/home/stephen/PupperPythonSim/src/Kinematics.py:87: RuntimeWarning: invalid value encountered in arccos / (2 config.LEG_L1 R_hip_foot) /home/stephen/PupperPythonSim/src/Kinematics.py:96: RuntimeWarning: invalid value encountered in arccos / (2 config.LEG_L1 config.LEG_L2) Joint Angles: [[-0.12971291 0.12971291 -0.12971291 0.12971291] [ nan nan nan nan] [ nan nan nan nan]] Servo Pulse Width (uS): [[1552.07517356 1778.52482644 1346.87517356 1607.52482644] [ nan nan nan nan] [ nan nan nan nan]]

Traceback (most recent call last): File "simulate.py", line 102, in sim.step() File "mujoco_py/mjsim.pyx", line 126, in mujoco_py.cymj.MjSim.step File "mujoco_py/cymj.pyx", line 156, in mujoco_py.cymj.wrap_mujoco_warning.exit File "mujoco_py/cymj.pyx", line 77, in mujoco_py.cymj.c_warning_callback File "/home/stephen/.local/lib/python3.6/site-packages/mujoco_py/builder.py", line 363, in user_warning_raise_exception raise MujocoException(warn + 'Check for NaN in simulation.') mujoco_py.builder.MujocoException: Unknown warning type Time = 0.9250.Check for NaN in simulation.