maxspahn / gym_envs_planar

Planar gym environments
7 stars 4 forks source link

n_link_researcher does not work after upgrading #46

Closed SkyloveQiu closed 2 years ago

SkyloveQiu commented 2 years ago

Hi, I am trying to make stable-baselines3 work in this project, after updating a few packages, all other examples keep working. However, n_link_researcher reports the following error

Traceback (most recent call last): File "/home/skylove/test/gym_envs_planar/examples/n_link_reacher.py", line 47, in <module> main() File "/home/skylove/test/gym_envs_planar/examples/n_link_reacher.py", line 41, in main ob, _, _, _ = env.step(action) File "/home/skylove/.cache/pypoetry/virtualenvs/planarenvs-_YPGfD7A-py3.9/lib/python3.9/site-packages/gym/wrappers/order_enforcing.py", line 11, in step observation, reward, done, info = self.env.step(action) File "/home/skylove/test/gym_envs_planar/planarenvs/planar_common/planar_env.py", line 115, in step self.render() File "/home/skylove/test/gym_envs_planar/planarenvs/n_link_reacher/envs/n_link_reacher_env.py", line 48, in render self.render_common(bounds) File "/home/skylove/test/gym_envs_planar/planarenvs/planar_common/planar_env.py", line 185, in render_common goal.renderGym(self._viewer, rendering, t=self.t()) File "/home/skylove/.cache/pypoetry/virtualenvs/planarenvs-_YPGfD7A-py3.9/lib/python3.9/site-packages/MotionPlanningGoal/dynamicSubGoal.py", line 49, in renderGym tf2 = rendering.Transform(rotation=self.angle()) File "/home/skylove/.cache/pypoetry/virtualenvs/planarenvs-_YPGfD7A-py3.9/lib/python3.9/site-packages/gym/envs/classic_control/rendering.py", line 228, in __init__ self.set_rotation(rotation) File "/home/skylove/.cache/pypoetry/virtualenvs/planarenvs-_YPGfD7A-py3.9/lib/python3.9/site-packages/gym/envs/classic_control/rendering.py", line 246, in set_rotation self.rotation = float(new) TypeError: float() argument must be a string or a number, not 'NoneType'

When I downgrade the following packages, the n_link_researcher does not report any errors:

• Updating wrapt (1.14.1 -> 1.14.0) • Updating astroid (2.11.5 -> 2.11.3) • Updating pylint (2.13.9 -> 2.13.7) • Updating forwardkinematics (0.7.0 -> 0.6.0 f06f2ea) • Updating motion-planning-scenes (0.1.16 -> 0.1.13 86976ff) • Updating pyglet (1.5.24 -> 1.5.23)

I have tested that the forwardkinematics , pyglet could not be the cause(manually change the version, it does not break the code).

SkyloveQiu commented 2 years ago

motion-planning-scenes seems to be the problem, keep old version 0.1.13 should be good.

SkyloveQiu commented 2 years ago

due to an update of !motion-planning-scnecs MotionPlanningGoal/dynamicSubGoal.py, the angle is not set, so the n_link_researcher does not work.

maxspahn commented 2 years ago

Good catch! I'll fix that!

SkyloveQiu commented 2 years ago

fixed by #47