Niryo One¶
Niryo One is a robot from https://niryo.com/. It's interesting because it is completely Open Source, including the robot itself (which can be simply 3D printed). Some time ago I was asked to program it, this time to fix it since it wasn't calibrating anymore.
The Problem: no connection with motor 5...
After some experiments I figured out, that one of the motors is simply broken. I also found that it is nothing unusual with this model of niryo (https://blog.zhaw.ch/icclab/niryo-arm-motor-troubleshooting/).
The replacement of the motor is easy, but there is a catch.
First of all, forget the niryo studio for a while. To configure new motor, you have to login to your niryo via ssh. All tools needed to run, configure or debug your robot in ~/catkin_ws directory. I'm not providing exact locations, because it will be dependent on a version of your niryo (accuracy not precision).
The bottom line is, after installing new motor, it has to get the right ID. It can be set with dxl_debug_tools which you find in ~/catkin_ws directory. The catch however is that the new motor comes with a default boud rate which does not match the boud rate of other motors. Because of it, the motor is not visible when scanning the bus with dxl_debug_tools.
The solution.
Set the boud rate of the new motor to the boud rate within your niryo one (in my case it was 100k), and then scan the bus. The easiest way to do it, is to read the register of the existing, working motor (something like ./dxl_debug_tools --id 12 --get-register 2 4 1) and then set the same boud rate for the new one. Now you should be able see the new motor during bus scan, and you can set its ID to the expected value (in my case it was 3).
All of it can be done with the dxl_debug_tools. Just take a look at its help.
After setting the ID, robot does not complain about connection problem with one of the motors and can calibrate itself properly. And now you can go back to Niryo Studio and work with your robot using user friendly IDE.
Problem solved.