poppy-project / poppy-creature

A depreciated project. Now integrated in pypot
GNU General Public License v3.0
5 stars 4 forks source link

KerError: 'lower_limit' for PoppyErgoJr #13

Closed show0k closed 8 years ago

show0k commented 8 years ago

@pierre-rouanet

In [1]: from poppy.creatures import PoppyErgoJr

In [2]: p = PoppyErgoJr()
---------------------------------------------------------------------------
KeyError                                  Traceback (most recent call last)
<ipython-input-2-fb1a637cf84f> in <module>()
----> 1 p = PoppyErgoJr()

/home/poppy/dev/poppy-creature/software/poppy/creatures/abstractcreature.pyc in __new__(cls, base_path, config, simulator, scene, host, port, id, use_snap, snap_host, snap_port, snap_quiet, use_http, http_host, http_port, http_quiet, use_remote, remote_host, remote_port, start_background_services, sync)
    141             print('RemoteRobotServer is now running on: http://{}:{}\n'.format(remote_host, remote_port))
    142 
--> 143         cls.setup(poppy_creature)
    144 
    145         if start_background_services:

/home/poppy/dev/poppy-ergo-jr/software/poppy_ergo_jr/poppy_ergo_jr.pyc in setup(cls, robot)
     23                                         motors=robot.motors,
     24                                         passiv=[],
---> 25                                         tip=[0, 0, -0.07])
     26 
     27         robot.chain = c

/home/poppy/dev/poppy-creature/software/poppy/creatures/ik.pyc in from_poppy_creature(cls, poppy, motors, passiv, tip, reversed_motors)
     36 
     37         for m, l in zip(chain.motors, chain.links[1:-1]):
---> 38             bounds = m.__dict__['lower_limit'], m.__dict__['upper_limit']
     39             l.bounds = tuple(map(rad2deg, bounds))
     40 

KeyError: 'lower_limit'
show0k commented 8 years ago

i just got the same issue with a PoppyTorso. It occurs randomly here.. EDIT: it occur only and everytime syncread is set to false in the config file. \o/

pierre-rouanet commented 8 years ago

I've managed to find two configurations for reproducing the problem:

The first case should be fixed by https://github.com/poppy-project/poppy-creature/pull/14 (the hack is a bit ugly but kind of make sense)

The second case should be fixed by https://github.com/poppy-project/pypot/pull/151

@show0k Do you see other cases that I could have missed?

show0k commented 8 years ago

No, it seems ok for me.