elephantrobotics / pymycobot

This is a python API for ElephantRobotics product.
MIT License
123 stars 55 forks source link

get_system_version() -1 ... #94

Open klotzdafotz opened 1 month ago

klotzdafotz commented 1 month ago

Sometimes the MyCobot280pi stopps working. With this testscript it shows me, that there are Errors. Why. The only solution is to power it off and on with the switch.

from pymycobot import MyCobot280

mc = MyCobot280('/dev/ttyAMA0',1000000)
print(mc.get_system_version())
print(mc.get_basic_version())
print(mc.is_controller_connected())
mc.sync_send_angles([0,0,0,0,0,0],100)

And the Output is

-1
-1
-1

pip show pymycobot (also tried 3.6.3 and earlier)

Name: pymycobot
Version: 3.6.4
Summary: Python API for serial communication of MyCobot.
Home-page: https://github.com/elephantrobotics/pymycobot
Author: Elephantrobotics
Author-email: weiquan.xu@elephantrobotics.com
License:
Location: /home/er/.local/lib/python3.8/site-packages
Requires: crc, pyserial, python-can
Required-by:

python --version Python 3.8.10

Atom Version v7.0

After restart the output shows

7.0
-1
1

sometimes it works, sometimes it needs another 1 to 3 power off and on's. What is the Problem?

anla-xu commented 4 weeks ago

The 280 Pi machine cannot use the get_basic_version interface, which is used by the 280 M5

klotzdafotz commented 4 weeks ago

i know, but that's not the Problem. The Problem is get_system_version and is_controller_connected and that the 280pi won't work sometimes, and need lots of restarts.

klotzdafotz commented 3 weeks ago

Same Problem with pymycobot 3.6.5

anla-xu commented 3 weeks ago

What are the specific symptoms of 280Pi not working? Cannot read data? There are a few questions that need to be confirmed. After power is turned on, what color is the light at the end? Are all the joints locked?

klotzdafotz commented 3 weeks ago

When I power on the 280Pi the LEDs turn green and they stay green. The joints are locked. I don’t get any error messages. The GPIO works and I can control the attached suction pump, but it won’t move until I turn it off, move the arm around and turn it on (sometimes 2 or 3 times Power off/on). I also redid everything with the myCobot 280 PI ubuntu 20.04 image ( Downloads - Elephant Robotics ) and Atom (7.0) and pymycobot (3.6.5) use the latest versions

anla-xu commented 2 weeks ago

How do you control the movement of the robot arm? Do you control the angle or the coordinates?

klotzdafotz commented 2 weeks ago

I use both. I tried a lot with coords, but sometimes it makes crazy moves, so i switched some from coords to angles

anla-xu commented 2 weeks ago

It is normal that some coordinate points cannot be reached. So when you say the machine cannot work, do you mean that the machine does not execute when controlling the coordinate movement?

klotzdafotz commented 2 weeks ago

No, it stops moving at some position, which is always different and sometimes after 5 minutes, sometimes after 20 minutes. And then I can't make him move again. Look at my first post. I tried the same with coords instead of angles, no differenz, because it says that the controller is not connected any more.

anla-xu commented 2 weeks ago

Is it impossible to control it even when using the angle? If it cannot be controlled, please confirm the following:

  1. Use the is_power_on interface to find the value returned
  2. Record and provide the current angle and coordinate information of the robot Also, please explain the sentence "because it says that the controller is not connected any more." How did you come to this conclusion? I don't understand
klotzdafotz commented 2 weeks ago

print(mc.is_controller_connected()) returns -1

anla-xu commented 2 weeks ago

What about other reading interfaces? For example, get_angles, get_coords, is_power_on