AccelerationConsortium / ac-training-lab

Codebase for controlling and managing the Acceleration Consortium (AC) Training Lab.
https://ac-training-lab.readthedocs.io/
MIT License
8 stars 2 forks source link

Sorting out issues with MyCobot reliability #56

Open sgbaird opened 3 weeks ago

sgbaird commented 3 weeks ago

Just reached out to Elephant Robotics about a few issues @gursi26 mentioned to me. See the following message:

We are using a MyCobot 280 Pi, but we have two problems that are stopping us from using it in our teaching course on autonomous science.

Problem #1: The robot stops working every time we turn it off and then turn it back on.

Problem #2: Many times, the robot does not respond to the commands we send to it.

Related:

  1. https://github.com/elephantrobotics/myCobot/issues/48

Unfortunately, the GitHub repository doesn't appear to be monitored very regularly. I'm also realizing that the firmware is proprietary and isn't open source (it simply downloads proprietary binaries). The Python API is still open source, but it creates a dependency on ER to address bugs like these ones.

Aside: I came across https://github.com/zlj-zz/minimycobotflasher

Hopefully they respond soon.

sgbaird commented 3 weeks ago

@gursi26 I imagine you've already looked through the following:

  1. https://docs.elephantrobotics.com/docs/mecharm-pi-en/14-IssueFAQ/14.3-hardware.html
gursi26 commented 2 weeks ago

didnt see this before, will try out the fixes mentioned

sgbaird commented 2 weeks ago

@SissiFeng mind providing a quick status update about what the company said?

gursi26 commented 2 weeks ago

All wifi issues have been resolved and tested after rebooting the cobot. The issue was just to do with WPA2/WPA3 enterprise vs personal not working, which is why it worked on home wifi but not the office wifi.

Side note: It was also very difficult to remove the cobot from it's base to access the SD card slot. The lego technic connectors are impossible to pull off.

sgbaird commented 2 weeks ago

@gursi26 thanks! For the WiFi, was it having trouble with the Nokia? I think the Nokia is a WPA2-personal network (though of course UoT and eduroam are WPA2-enterprise, and come with their own set of requirements).

Bracing ourselves as we pulled the cobot apart was quite a sight I'm sure đŸ˜… too many Lego connectors at once == really hard to remove (how it came by default).

SissiFeng commented 2 weeks ago

@SissiFeng mind providing a quick status update about what the company said?

Chinese are enjoying their national holiday for the whole week. They will be back to office next Monday.

SissiFeng commented 2 weeks ago

The issue with the cobot, I thing, worth to try by downgrading the firmware to a lower version (6.5) and connecting it to the windows laptop via a wired connection (to maintain signal stability). Last time, I used my phone's hotspot to connect, which allowed the cobot to start, but it was unstable (this could be related to the Type-C connection on the Mac). So be care of the joint losing signal suddenlly.

gursi26 commented 2 weeks ago

@sgbaird Yep, the wifi had options for both and the default selection of the cobot did not work. I just had to change the network configuration to use WPA2 instead of WPA3.

sgbaird commented 2 weeks ago

@gursi26 nice! That makes sense. Could you include instructions or a link for how to change the network configuration to WPA2?

gursi26 commented 1 week ago

Sure, Start by ensuring that NetworkManager is running with

systemctl is-active NetworkManager

Which should output "active". If not, enable it with

sudo systemctl start NetworkManager
sudo systemctl enable NetworkManager

Once that is done, open the connection editor with

nm-connection-editor

In the connection editor, do the following

  1. Click on the network you want to connect to. Then click the gear icon at the bottom of the editor window.
  2. Navigate to the tab titled "Wi-Fi Security" in the connection editor
  3. Here, for the Security field, select "WPA & WPA2 Personal". Enter the password for the network in the text field below.
  4. Click "Save" at the bottom of the window.

These steps should permanently set the correct network configuration and persist on reboot.

gursi26 commented 1 week ago

Also, @SissiFeng found some documentation on the send_coords function for the cobot.

The six parameters of the send_coords function typically represent the position and attitude of the robot’s end-effector (e.g., the end of a robotic arm or the robot’s tool point) in three-dimensional space.
The six parameters are typically listed in the following order:
X: X-axis coordinates (forward and backward)
Y: Y-axis coordinates (left-right direction)
Z: Z-axis coordinates (up and down direction)

  1. Roll: angle of rotation around the X-axis
    Pitch: Angle of rotation around the Y-axis
  2. Yaw: Angle of rotation around the Z-axis
    This representation is called 6DOF (6 Degrees of Freedom) representation. There are several points to consider when specifically setting these parameters:
    Coordinate System: Make sure you are using a coordinate system that is consistent with the robot control system. Usually a right-handed coordinate system is used.
    Units:
    For positions (X, Y, Z), usually use meters (m) or millimeters (mm) as units.
    For angles (Roll, Pitch, Yaw), radians or degrees are usually used.
    Range:
    The range of the position parameter depends on the robot’s workspace.
    Angle parameters typically range from -180 to 180 degrees (or -π to π radians).
    Accuracy: Set the appropriate accuracy based on the task requirements and robot capabilities.
    Safety considerations: Ensure that the coordinates set are within the safe operating range of the robot.
    (Example settings:
    def send_coords(x, y, z, roll, pitch, yaw):
    pass
    send_coords(0.5, 0.3, 0.2, 0, 1.57, 0)
    In this example:
    The robot end-effector is instructed to move to points in space (0.5m, 0.3m, 0.2m)
    Keep horizontal (roll = 0)
    Tilt down 90 degrees (pitch = 1.57 radians ≈ 90 degrees)
    No yaw rotation (yaw = 0)
    In practice, these values need to be carefully calculated and adjusted according to the specific task requirements, robot model and working environment