0
$\begingroup$

I recently purchased an Elephant Robotics myCobot 280 Pi 2023 model off of Amazon. The Pi boots up fine and I could log in with ssh/vnc using er:Elephant, so I haven't connected a keyboard, but do have a display setup for monitoring.

What I hope is that someone can tell me how the Pi <-> M5 (or whatever they call the motion path controller) communication is configured and how M5 firmware is updated such that I can debug the connection. I've not been able to find schematics on-line.

I've tried running the demos I can understand. Many elements are in Chinese, so I'm not having the easiest time, but I'm able to try some of the Python and Blockly based demos reasonably. The result is no movement to the arm and no change to the LEDs on the arm which are all lit green.

The application that looked most direct to be able to jog the arm is RoboFlow, but, oddly, the Pi in my arm was not preconfigured with it as an icon and I could not find it in the filesystem. I installed the application and recorded the errors it gave me.

jkridner@slotcar:~$ ssh [email protected] -Y
...
er@er:~/Downloads$ wget https://download.elephantrobotics.com/software/RoboFlow/myCobot280/RoboFlow_Linux_aarch64_mycobot280_latest.tar.gz
--2024-02-14 22:28:25--  https://download.elephantrobotics.com/software/RoboFlow/myCobot280/RoboFlow_Linux_aarch64_mycobot280_latest.tar.gz
Resolving download.elephantrobotics.com (download.elephantrobotics.com)... 112.74.1.166
Connecting to download.elephantrobotics.com (download.elephantrobotics.com)|112.74.1.166|:443... connected.
HTTP request sent, awaiting response... 200 OK
Length: 5851836 (5.6M) [application/x-gzip]
Saving to: ‘RoboFlow_Linux_aarch64_mycobot280_latest.tar.gz’

RoboFlow_Linux_aarc 100%[===================>]   5.58M  3.25MB/s    in 1.7s    

2024-02-14 22:28:28 (3.25 MB/s) - ‘RoboFlow_Linux_aarch64_mycobot280_latest.tar.gz’ saved [5851836/5851836]

er@er:~$ tar xf Downloads/RoboFlow_Linux_aarch64_mycobot280_latest.tar.gz
er@er:~$ ./RoboFlow/bin/RoboFlow 
2024/02/14 10:29:47:924  PM {conf} [critical]: 5098:language out of range
2024/02/14 10:29:47:924  PM {core} [info]: log category rule: *.critical=true
2024/02/14 10:29:47:925  PM {core} [info]: log category rule: *.debug=false
2024/02/14 10:29:47:925  PM {core} [info]: log category rule: *.info=true
2024/02/14 10:29:47:925  PM {core} [info]: log category rule: *.warning=true
2024/02/14 10:29:47:925  PM {core} [info]: log category rule: ES.info=false
2024/02/14 10:29:47:925  PM {core} [info]: log category rule: log.info=false
2024/02/14 10:29:47:925  PM {core} [info]: log category rule: robot_controller.debug=true
2024/02/14 10:29:48:280  PM {unspecified} [info]: StopFtpService
2024/02/14 10:29:48:555  PM {unspecified} [warning]: 4517:the vsftpd service is uninstalled, please install the vsftpd first
2024/02/14 10:29:48:555  PM {core} [info]: 
2024/02/14 10:29:48:558  PM {core} [info]: Wed Feb 14 22:29:48 2024
2024/02/14 10:29:48:558  PM {core} [info]: RoboFlow Initialized
2024/02/14 10:29:48:558  PM {core} [info]: Program name: RoboFlow
2024/02/14 10:29:48:559  PM {core} [info]: CWD is/home/er
2024/02/14 10:29:48:559  PM {core} [info]: Qt Version is 5.12.8
2024/02/14 10:29:48:559  PM {core} [info]: 
2024/02/14 10:29:48:645  PM {robot_controller} [debug]: MyCobot
2024/02/14 10:29:49:058  PM {UI} [info]: serial changed,reset combo_box_serial.
2024/02/14 10:30:14:539  PM {robot_controller} [info]: Detected serial port name: ttyAMA0
2024/02/14 10:30:14:539  PM {robot_controller} [info]: new serial port : ttyAMA0
2024/02/14 10:30:14:554  PM {UI} [info]: SetSerialPort success.
2024/02/14 10:30:14:555  PM {robot_controller} [debug]: DetectRobot
2024/02/14 10:30:14:555  PM {UI} [critical]: Cannot find/connect to the Robot. Please, check connection with the Robot.
2024/02/14 10:30:20:562  PM {robot_controller} [info]: Detected serial port name: ttyAMA0
2024/02/14 10:30:20:563  PM {robot_controller} [info]: new serial port : ttyAMA0
2024/02/14 10:30:20:570  PM {UI} [info]: SetSerialPort success.
2024/02/14 10:30:20:570  PM {robot_controller} [debug]: DetectRobot
2024/02/14 10:30:20:570  PM {UI} [critical]: Cannot find/connect to the Robot. Please, check connection with the Robot.

I'm sure I'm doing something stupid, but I would feel better at least knowing how the Pi is supposed to talk to the M5. I'm not super familiar with Pi and the /dev/ttyAMA0 serial port name is new to me. Unfortunately, I haven't been able to find any reference to it under /proc/device-tree. I'd like to just know where it is connected physically to know how the software is configured to talk to it.

From my understanding, the names of tty ports are defined by the drivers via https://www.kernel.org/doc/html/latest/driver-api/tty/tty_struct.html#name unless overridden by udev rules. My /etc/udev doesn't have anything that would apply this name.

FYI, dmesg reports the following serial ports such that I might be able to figure out what is what. When trying to use myblockly with /dev/ttyS0, it just hangs.

[    0.937004] fe201000.serial: ttyAMA0 at MMIO 0xfe201000 (irq = 14, base_baud = 0) is a PL011 rev2
[    0.941931] fe215040.serial: ttyS0 at MMIO 0x0 (irq = 16, base_baud = 62500000) is a 16550
$\endgroup$
2
  • $\begingroup$ Ugh. My baud rate was wrong. Of course I find that out 60 seconds after posting my question. Baud should be '1000000', not '115200'. :-( $\endgroup$
    – Jadon
    Commented Feb 14 at 15:02
  • $\begingroup$ Please post your solution as an answer and not as a comment. Thanks. $\endgroup$ Commented Feb 15 at 0:21

1 Answer 1

1
$\begingroup$

Check the baud rate.

My baud rate was wrong. Of course I found that out 60 seconds after posting my question. Baud should be '1000000', not '115200'.

Out of convenience, the pymycobot library also includes a couple of constants that will help. pymycobot.PI_PORT and pymycobot.PI_BAUD.

Here's what worked nicely for me:

import pymycobot
mc = pymycobot.MyCobot(pymycobot.PI_PORT,pymycobot.PI_BAUD)

def WaitForUp():
  Up = False
  while not Up:
    Up = mc.is_controller_connected()
    mc.clear_error_information()

print('Powering up')
mc.power_on()
WaitForUp()

mc.set_color(0,0,255)

print('Starting first movement')
mc.send_angles([0,0,0,0,0,0],20)
```
$\endgroup$

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.