elephantrobotics / mycobot_ros

A ros package for myCobot.
BSD 3-Clause "New" or "Revised" License
154 stars 81 forks source link

Mycobot serial port shows up as /dev/ttyACM* instead of /dev/ttyUSB* in Ubunt 18.04 #53

Closed dirksavage88 closed 2 years ago

dirksavage88 commented 2 years ago

Hello,

I am having the issue where I can't get the Mycobot to show up as a USB device in linux. This is correctable in the mycobot pi API (where I can just change it on the fly).

Is there a way to fix this in the ROS API also? Or is there a way to get it to show up as a USB device.

blcuwc commented 2 years ago

According to some blogs trying to explain the differences between these two shown ports: https://rfc1149.net/blog/2013/03/05/what-is-the-difference-between-devttyusbx-and-devttyacmx/ https://forums.raspberrypi.com/viewtopic.php?t=281062

It is hard to change the serial port from /dev/ttyACM* to /dev/ttyUSB*. If a serial device identifies as a Abstract Control Model (ACM) device, the kernel has assigned the name before you can do anything with it.

When you are using ROS API, you can specify the port name to be used in the command line, have a try to see if mycobot ROS API works with /dev/ttyACM* devices.

eg. rosrun mycobot_280 slider_control.py _port:=/dev/ttyUSB0 _baud:=115200 can be replaced with rosrun mycobot_280 slider_control.py _port:=/dev/ttyACM0 _baud:=115200 when you try to move the real mycobot through dragging the slider.

Hope this helps.