Left Arm and Head Errors

Hello, this is Paul Backus in California. I’m currently working with the beginning Instantiate algorithm:
from reachy import Reachy, parts

reachy = Reachy(
left_arm=parts.LeftArm(
io=‘/dev/ttyUSB*’,
hand=‘force_gripper’,
),
right_arm=parts.RightArm(
io=‘/dev/ttyUSB*’,
hand=‘force_gripper’,
),
head=parts.Head(
io=‘/dev/ttyUSB*’,
),
)

When I execute the code in Python, I receive the following errors:
Traceback (most recent call last):
File “/home/pi/dev/reachy/software/reachy/io/luos.py”, line 122, in find_module
return getattr(self.shared_io, module_name)
AttributeError: ‘Device’ object has no attribute ‘dxl_21’

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
File “/home/pi/Instantiate.py”, line 6, in
hand=‘force_gripper’,
File “/home/pi/dev/reachy/software/reachy/parts/arm.py”, line 217, in init
hand=hand)
File “/home/pi/dev/reachy/software/reachy/parts/arm.py”, line 51, in init
self.attach_dxl_motors(dxl_motors)
File “/home/pi/dev/reachy/software/reachy/parts/part.py”, line 49, in attach_dxl_motors
m = DynamixelMotor(self, motor_name, self.io.find_dxl(motor_name, config), config)
File “/home/pi/dev/reachy/software/reachy/io/luos.py”, line 137, in find_dxl
m = self.find_module(module_name)
File “/home/pi/dev/reachy/software/reachy/io/luos.py”, line 126, in find_module
missing_module=module_name,
reachy.error.LuosModuleNotFoundError: Could not find module “dxl_21” on bus “/dev/ttyUSB2”

I couldn’t spot any noticeably loose wires on the left arm or shoulder, and would greatly appreciate any additional guidance to troubleshoot! Thanks in advance :slight_smile:

Also, when attempting to calibrate the head with following command:
reachy.head.neck.disk_top_target_rot_position=20

I receive the following errors that did not present during the instantiate sequence:
Traceback (most recent call last):
File “/home/pi/dev/reachy/software/reachy/io/luos.py”, line 122, in find_module
return getattr(self.shared_io, module_name)
AttributeError: ‘Device’ object has no attribute ‘disk_bottom’

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
File “/home/pi/Head.py”, line 4, in
io=‘/dev/ttyUSB*’,
File “/home/pi/dev/reachy/software/reachy/parts/head.py”, line 43, in init
self.neck = self.create_orbita_actuator(‘neck’, Head.orbita_config)
File “/home/pi/dev/reachy/software/reachy/parts/part.py”, line 60, in create_orbita_actuator
luos_disks_motor = self.io.find_orbita_disks()
File “/home/pi/dev/reachy/software/reachy/io/luos.py”, line 152, in find_orbita_disks
for name in [‘disk_bottom’, ‘disk_middle’, ‘disk_top’]
File “/home/pi/dev/reachy/software/reachy/io/luos.py”, line 152, in
for name in [‘disk_bottom’, ‘disk_middle’, ‘disk_top’]
File “/home/pi/dev/reachy/software/reachy/io/luos.py”, line 126, in find_module
missing_module=module_name,
reachy.error.LuosModuleNotFoundError: Could not find module “disk_bottom” on bus “/dev/ttyUSB1”

Again, so nice to meet you Pierre, and I look forward to working with you on our Reachy!

Hello @MrBackus,
Did you turned on the switch button for the motors? Both switch buttons should be turned on, one is for the Raspberry and one for the motors.

@Simon thanks for the reply!

Yes, Reachy was turned on. To clarify, I was performing the Python code directly on Reachy, connected to a mouse, keyboard, and monitor. What I believe the errors as copied and pasted above are really telling me, is that the Instantiate algorithm is successful for the head and right arm but not the left arm. The right arm moves, and the second set of errors presents when I attempt to move the head.

I’m pretty good with computers generally, can usually troubleshoot computer-based coding at a high school student level, but am totally new to robot based coding and all of the extra possibilities for errors that accompany these types of devices. Very excited to be jumping into this world though!

From the error you showed, it says that the motors of the left arm were not found when you tried to instanciate the Reachy(left_arm=…, right_arm=…, head=…) object.

When you type the following:

reachy = Reachy(
left_arm=parts.LeftArm(
io=’/dev/ttyUSB*’,
hand=‘force_gripper’,
),
right_arm=parts.RightArm(
io=’/dev/ttyUSB*’,
hand=‘force_gripper’,
),
head=parts.Head(
io=’/dev/ttyUSB*’,
),
)

it first tries to connect the left arm, then to the right arm and finally to the head. If one of the connection fails, the following will not be tried. That is why you did not get any errors about the right arm or the head, because the connection with the left arm failed. This does not mean that either the head or the right arm were detected.

To be sure that the head and right arm work, could you try to connect to each of them separately.
Even if you have two arms and one head, you can instantiate a Reachy object with only one part.

First, try to connect only to the right arm:

right_arm = Reachy(
    left_arm=parts.RightArm(
    io=’/dev/ttyUSB*’,
    hand=‘force_gripper’,
)

see what happens and then try to connect only to the head

head = Reachy(
    head=parts.Head(
    io=’/dev/ttyUSB*’,
)

Tell me if both these commands worked.

We can schedule a video chat if needed :slight_smile:

1 Like

Thanks Stephan! I tried both my original code, for each part separately, as well as the code that you suggested, without errors. I’m guessing that the second line in the first code block you sent was intended to read right_arm=parts.RightArm(

When I did change all of the right arm variables to left arm, I received the same error messages as before. So, that means that the head and right arm are successfully connecting, but not the left arm?

I’d love to set up a video chat sometime to get both arms and basic functions working :slight_smile: I can be flexible with my normal work start time of 8am, California time, to compromise on a time that’s more convenient for both of us.

1 Like

Hi Simon,

Thanks so much for the video tutorial and troubleshooting session. Good luck with your wisdom teeth! I managed to get the left arm connected. I had some errors with the head, but it looks like I was able to fix them on my own. Hopefully I’m getting the hang of this :slight_smile:
Next step, it would be great to access the Jupyter Notebooks and connect to Reachy from my work laptop. I’m looking into this now.

3 Likes

Great, thanks Paul!
To access the jupyter notebook from your laptop, type in a terminal in Reachy

jupyter notebook --ip=0.0.0.0

It should give you a like in “reachy:…”. Copy paste this link in the navigator of your laptop and it should work. Keep in mind that your laptop and Reachy should be on the same network.

1 Like

Hi Simon, after several attempts, I finally got this process of sending Reachy Jupyter Notebook commands through my laptop! Did I need to establish the ssh connection as well? That is something I had not tried until recently.

One thing that I might be able to give back to the community, is some clarified step by step instructions with screenshots, for the procedures that work for me at this time. Do you see that being useful to future Reachy adapters? I will most likely create them for myself anyway.