Skip to content
This repository has been archived by the owner on Feb 4, 2020. It is now read-only.

OSError initialize robot #6

Open
Net-Mist opened this issue Nov 27, 2019 · 5 comments
Open

OSError initialize robot #6

Net-Mist opened this issue Nov 27, 2019 · 5 comments

Comments

@Net-Mist
Copy link

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 ?

@pierre-rouanet
Copy link
Member

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)

@Net-Mist
Copy link
Author

Net-Mist commented Nov 29, 2019

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

@pierre-rouanet
Copy link
Member

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.

@Net-Mist
Copy link
Author

Net-Mist commented Dec 4, 2019

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 ?

@pierre-rouanet
Copy link
Member

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.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants