Error while connecting the Poppy Humanoid robot to the PC


#1

Hello there,

I tried many ways and I finally am able to ping the robot in my PC. I used http://poppy.local and I was able to open the web interface. But when I go to python Terminal it shows the connection is refused,

It shows the following error in the logs:
Attempt 1 to start the robot…
Could not initalize robot: Cannot configure port, something went wrong. Original message: WindowsError(87, ‘The parameter is incorrect.’)
Attempt 2 to start the robot…
Could not initalize robot: Cannot configure port, something went wrong. Original message: WindowsError(87, ‘The parameter is incorrect.’)
Attempt 3 to start the robot…
Could not initalize robot: Cannot configure port, something went wrong. Original message: WindowsError(87, ‘The parameter is incorrect.’)
Attempt 4 to start the robot…
Could not initalize robot: Cannot configure port, something went wrong. Original message: WindowsError(87, ‘The parameter is incorrect.’)
Attempt 5 to start the robot…
Could not initalize robot: Cannot configure port, something went wrong. Original message: WindowsError(87, ‘The parameter is incorrect.’)
Could not start up the robot…

OSErrorTraceback (most recent call last)
in ()
----> 1 poppy = PoppyHumanoid()

C:\Users\sboosi\AppData\Local\Continuum\anaconda2\lib\site-packages\pypot\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, use_ws, ws_host, ws_port, start_background_services, sync, **extra)
123
124 else:
–> 125 raise OSError('Could not initalize robot: {} '.format(exc_inst))
126 poppy_creature.simulated = False
127

OSError: Could not initalize robot: Cannot configure port, something went wrong. Original message: WindowsError(87, ‘The parameter is incorrect.’)

Your insight into this error will be appreciated.
Thanks. :slight_smile:


#2

Hi,
Could you upgrate pypot to the last version (pip install pypot -U), the error message should be clearer. I’m not sure to understand. On which platform are run running the code ? It seams to be windows, but you say you have the web interface on the robot…


#3

Hi Theo,

I am running the robot on Windows platform on my PC but the odroid board in the robot has a Ubuntu Linux platform. I tried to link the humanoid with my PC using the ethernet cable via a switch and I was able to ping the IP address of the robot from the PC. only when I type http://10.118.18.89/ I get the following web interface which seems to be working

but if I type http://poppy.local I got an error message saying the following

But I ignored the poppy.local link and I have approached the web interface using the IP address. If I go to python terminal, it says connection failed. And I got these errors in the log file of web interface:

Logs:

No handlers could be found for logger "poppy.creatures.abstractcreature"
Attempt 1 to start the robot…
[Errno 16] could not open port /dev/ttyACM1: [Errno 16] Device or resource busy: '/dev/ttyACM1’
Attempt 2 to start the robot…
[Errno 16] could not open port /dev/ttyACM1: [Errno 16] Device or resource busy: '/dev/ttyACM1’
Attempt 3 to start the robot…
Connection to the robot failed! No suitable port found for ids [31, 32, 33, 34, 35, 36, 37, 41, 42, 43, 44, 51, 52, 53, 54]. These ids are missing [32, 33, 34, 35, 36, 37, 41, 42, 43, 44, 51, 52, 53, 54, 31] !
Attempt 4 to start the robot…
Connection to the robot failed! No suitable port found for ids [31, 32, 33, 34, 35, 36, 37, 41, 42, 43, 44, 51, 52, 53, 54]. These ids are missing [32, 33, 34, 35, 36, 37, 41, 42, 43, 44, 51, 52, 53, 54, 31] !
Attempt 5 to start the robot…
SnapRobotServer is now running on: http://0.0.0.0:6969

You can open Snap! interface with loaded blocks at “http://snap.berkeley.edu/snapsource/snap.html#open:http://10.104.55.51:6969/snap-blocks.xml

HTTPRobotServer is now running on: http://0.0.0.0:8080

Robot created and running!
tract_io.py", line 357, in my_getter
return self._get_control_value(control, ids, **kwargs)
File “/home/poppy/.pyenv/versions/2.7.11/lib/python2.7/site-packages/pypot/dynamixel/io/abstract_io.py”, line 412, in _get_control_value
sp = self._send_packet(rp, error_handler=error_handler)
File “/home/poppy/.pyenv/versions/2.7.11/lib/python2.7/site-packages/pypot/dynamixel/io/abstract_io.py”, line 529, in _send_packet
sp = self.__real_send(instruction_packet, wait_for_status_packet, _force_lock)
File “/home/poppy/.pyenv/versions/2.7.11/lib/python2.7/site-packages/pypot/dynamixel/io/abstract_io.py”, line 494, in __real_send
status_packet = self.__real_read(instruction_packet, _force_lock=True)
File “/home/poppy/.pyenv/versions/2.7.11/lib/python2.7/site-packages/pypot/dynamixel/io/abstract_io.py”, line 505, in __real_read
data = self._serial.read(self._protocol.DxlPacketHeader.length)
File “/home/poppy/.pyenv/versions/2.7.11/lib/python2.7/site-packages/serial/serialposix.py”, line 495, in read
raise SerialException(‘device reports readiness to read but returned no data (device disconnected or multiple access on port?)’)
SerialException: device reports readiness to read but returned no data (device disconnected or multiple access on port?)

Exception in thread Thread-1:
Traceback (most recent call last):
File “/home/poppy/.pyenv/versions/2.7.11/lib/python2.7/threading.py”, line 801, in __bootstrap_inner
self.run()
File “/home/poppy/.pyenv/versions/2.7.11/lib/python2.7/threading.py”, line 754, in run
self.__target(*self.__args, **self.__kwargs)
File “/home/poppy/.pyenv/versions/2.7.11/lib/python2.7/site-packages/pypot/utils/stoppablethread.py”, line 121, in _wrapped_target
self._setup()
File “/home/poppy/.pyenv/versions/2.7.11/lib/python2.7/site-packages/pypot/dynamixel/syncloop.py”, line 22, in setup
[c.start() for c in self.controllers]
File “/home/poppy/.pyenv/versions/2.7.11/lib/python2.7/site-packages/pypot/robot/controller.py”, line 25, in start
self.wait_to_start()
File “/home/poppy/.pyenv/versions/2.7.11/lib/python2.7/site-packages/pypot/utils/stoppablethread.py”, line 86, in wait_to_start
’for details.’.format(self._thread.name))
RuntimeError: Setup failed, see Thread-2 Tracebackfor details.

Attempt 1 to start the robot…
[Errno 16] could not open port /dev/ttyACM1: [Errno 16] Device or resource busy: '/dev/ttyACM1’
Attempt 2 to start the robot…
Connection to the robot failed! No suitable port found for ids [31, 32, 33, 34, 35, 36, 37, 41, 42, 43, 44, 51, 52, 53, 54]. These ids are missing [31] !
Attempt 3 to start the robot…
Connection to the robot failed! No suitable port found for ids [31, 32, 33, 34, 35, 36, 37, 41, 42, 43, 44, 51, 52, 53, 54]. These ids are missing [32, 34, 35, 36, 37, 41, 42, 43, 44, 51, 52, 53, 54, 31] !
Attempt 4 to start the robot…
Setup failed, see Thread-1 Tracebackfor details.
Attempt 5 to start the robot…
Connection to the robot failed! No suitable port found for ids [31, 32, 33, 34, 35, 36, 37, 41, 42, 43, 44, 51, 52, 53, 54]. These ids are missing [32, 33, 34, 35, 36, 37, 41, 42, 43, 44, 51, 52, 53, 54, 31] !
Could not start up the robot…
Traceback (most recent call last):
File “/home/poppy/.pyenv/versions/2.7.11/bin/poppy-services”, line 9, in
load_entry_point(‘poppy-creature==1.8.1’, ‘console_scripts’, ‘poppy-services’)()
File “/home/poppy/.pyenv/versions/2.7.11/lib/python2.7/site-packages/poppy/creatures/services_launcher.py”, line 179, in main
with closing(start_poppy_with_services(args)):
File “/home/poppy/.pyenv/versions/2.7.11/lib/python2.7/site-packages/poppy/creatures/services_launcher.py”, line 38, in start_poppy_with_services
raise exc_inst
IOError: Connection to the robot failed! No suitable port found for ids [31, 32, 33, 34, 35, 36, 37, 41, 42, 43, 44, 51, 52, 53, 54]. These ids are missing [32, 33, 34, 35, 36, 37, 41, 42, 43, 44, 51, 52, 53, 54, 31] !

Then I decided to go to the python notebook not through the web interface of the robot but through the anaconda navigator and I wrote the following code to see what happens

  from pypot.creatures import PoppyHumanoid

  poppy = PoppyHumanoid()

Then I got all the errors that I have listed in my previous post .

So the problem is that, I am not able to operate the web interface properly and I am getting all sorts of errors.

I hope I have explained my doubt.
@pierre and @theo, you guys can be very helpful.

Thanks in advance for the help. :slight_smile:


#4

@shashank6 were you able to fix that issue??