Torso: unable to start PoppyTorso in python

when I run this i get the error message. Is there any solusion?

from poppy.creatures import PoppyTorso
robot = PoppyTorso(use_http=True)
---------------------------------------------------------------------------
KeyError                                  Traceback (most recent call last)
<ipython-input-1-09d542b5ab49> in <module>()
      1 from poppy.creatures import PoppyTorso
----> 2 robot = PoppyTorso(use_http=True)

/home/poppy/.pyenv/versions/2.7.11/lib/python2.7/site-packages/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, **extra)
    117         else:
    118             try:
--> 119                 poppy_creature = from_json(config, sync, **extra)
    120             except IndexError as e:
    121                 raise IOError('Connection to the robot failed! {}'.format(e.message))

/home/poppy/.pyenv/versions/2.7.11/lib/python2.7/site-packages/pypot/robot/config.pyc in from_json(json_file, sync, strict, use_dummy_io, **extra)
    270         config = json.load(f, object_pairs_hook=OrderedDict)
    271 
--> 272     return from_config(config, sync=sync, strict=strict, use_dummy_io=use_dummy_io, **extra)
    273 
    274 

/home/poppy/.pyenv/versions/2.7.11/lib/python2.7/site-packages/pypot/robot/config.pyc in from_config(config, strict, sync, use_dummy_io, **extra)
     62             dxl_io = dxl_io_from_confignode(config, c_params, attached_ids, strict)
     63 
---> 64             check_motor_eprom_configuration(config, dxl_io, motor_names)
     65 
     66             logger.info('Instantiating controller on %s with motors %s',

/home/poppy/.pyenv/versions/2.7.11/lib/python2.7/site-packages/pypot/robot/config.pyc in check_motor_eprom_configuration(config, dxl_io, motor_names)
    218 
    219     if changed_angle_limits:
--> 220         dxl_io.set_angle_limit(changed_angle_limits)
    221         time.sleep(0.5)
    222 

/home/poppy/.pyenv/versions/2.7.11/lib/python2.7/site-packages/pypot/dynamixel/io/io.pyc in set_angle_limit(self, limit_for_id, **kwargs)
     50         convert = kwargs['convert'] if 'convert' in kwargs else self._convert
     51 
---> 52         if 'wheel' in self.get_control_mode(limit_for_id.keys()):
     53             raise ValueError('can not change the angle limit of a motor in wheel mode')
     54 

/home/poppy/.pyenv/versions/2.7.11/lib/python2.7/site-packages/pypot/dynamixel/io/io.pyc in get_control_mode(self, ids)
     26         self._known_mode.update(zip(to_get_ids, modes))
     27 
---> 28         return tuple(self._known_mode[id] for id in ids)
     29 
     30     def set_wheel_mode(self, ids):

/home/poppy/.pyenv/versions/2.7.11/lib/python2.7/site-packages/pypot/dynamixel/io/io.pyc in <genexpr>((id,))
     26         self._known_mode.update(zip(to_get_ids, modes))
     27 
---> 28         return tuple(self._known_mode[id] for id in ids)
     29 
     30     def set_wheel_mode(self, ids):

KeyError: 34

Paul,

By the looks of it one of your motors is configured in wheel mode.
Run Herborist on the motors and try to identify which one is the culprit then change it back to joint mode.

Alex.

Hi everybody,
I have the same problem (KeyError: 33) on the fonction PoppyTorso(), and I have check all motors, they are in joint mode.
I’m blocked…
Thx for your future help.

Hi all,
I solved this issue by configuring manually limit angles of each motors, referring on the json robot configuration file.
Gab