reachy-legacy icon indicating copy to clipboard operation
reachy-legacy copied to clipboard

OSError initialize robot

Open Net-Mist opened this issue 4 years ago • 5 comments

Hello,

I tried to connect to a new Reachy robot, but after installing the python module I get this error :

File "~/reachy/software/build/lib/reachy/reachy.py", line 79, in new robot = AbstractPoppyCreature.new(cls, *args, **kwargs) File "~/.local/lib/python3.6/site-packages/pypot/creatures/abstractcreature.py", line 128, in new raise OSError('Could not initalize robot: {} '.format(exc_inst)) OSError: Could not initalize robot: Could not find the motors (16, 10, 11, 12, 13, 14, 15) on bus /dev/ttyACM0.

So it seems Linux (Ubuntu 18.04 LTS) can see the robot, connect to it but can't find the motors.

Do you know why this error is happening ?

Net-Mist avatar Nov 27 '19 13:11 Net-Mist

Hi @Net-Mist!

This issue can come from a few different issues:

  • The USB2AX you are using is not mapped to '/dev/ttyACM0' (a simple ls /dev/ttyACM* should answer this)
  • one (or more) of the motors does not respond (it could be due to an unplug/dead motor, a broken wire, a wrong motor configuration). To investigate this you will need to use the low level communication (describe here)

pierre-rouanet avatar Nov 29 '19 08:11 pierre-rouanet

Hi !

The file /dev/ttyACM0 exists. I tried to use the low level communication to ping the motor but it failed. I'm using python 3.6.8, Ubuntu 18.04, pypot 3.1.3 I run :

import pypot
import pypot.dynamixel.protocol.v1 as protocol
from pypot.dynamixel import DxlIO
io = DxlIO(port='/dev/ttyACM0', baudrate=1000000)
ids = io.scan()

It raises an error : pypot.dynamixel.io.abstract_io.DxlCommunicationError: could not parse received data bytearray(b'\x00') after sending DxlPingPacket(id=0)

After searching on google it seems it means:

  • Several motors have the same id
  • or it is a power issue
  • or there is a driver issue (on Ubuntu ? Is it possible ?)

Do you think of other reasons why this is happening ? How can I check the power on Reachy ? The led are bright, but is it enough ? How can I check the motor's id ? What are Reachy default ids ?

Thank you for your help

Net-Mist avatar Nov 29 '19 15:11 Net-Mist

Yes it's usually one of:

  • Several motors have the same id
  • or it is a power issue

If you see the led turn red on the last motor of your chain when the power supply is plugged it should not be the issue. Are you using a 12V power supply?

To check the id you can use pypot with the scan function. The only option to debug the duplicate id is to connect the motor one by one. On reachy the ids should be [10, 11, 12, 13, 14, 15, 16]. And the default motor id (factory setting) is 1.

pierre-rouanet avatar Nov 29 '19 16:11 pierre-rouanet

I've tested all the motors and they are all good. I think the issue is in the way they are connected. One cable has been cut : the one in the middle of the 3-wire connector plugged in the power module on top of motor 10 (see picture : cut_wire ) The wire seems to be cut on both side of the cable, so I wonder if it is on purpose ? Do you have a wiring diagram so I can check all the connections ?

Net-Mist avatar Dec 04 '19 22:12 Net-Mist

This cut wired is indeed intentional. It lets the communication through and not the power. We used it to have two power supply on the robot: one for the first motor (the one using most torque) and the rest of the robot.

I'll post the wiring diagram soon.

pierre-rouanet avatar Dec 06 '19 13:12 pierre-rouanet