Skip to content

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

@smbutler-ire

Description

@smbutler-ire

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.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions