USB COM port Connection issue- Printable Version +- RoboDK Forum (//www.sinclairbody.com/forum) +-- Forum: RoboDK (EN) (//www.sinclairbody.com/forum/Forum-RoboDK-EN) + -论坛:一般关于抢劫的问题oDK (//www.sinclairbody.com/forum/Forum-General-questions-about-RoboDK) +--- Thread: USB COM port Connection issue (/Thread-USB-COM-port-Connection-issue) |
USB COM port Connection issue-GMCG44-06-20-2022 I am trying to use robodk to control a DIY robot which consists of 6 servos (MG90S X2, MG996RX4). These servos are controlled using an Arduino Uno or a Teensy 3.2 which both connect to my laptop through USB COM port. When trying to connect through entering my COM port it fails to connect and the log shows the errors happening. Im using a driver and post processor off someone doing the same project on GitHub and this works fine for them. Their code can be seen on the link below: glumb/robotDK-MRC-driver: A simple driver to control a MRC based robot with roboDK (github.com) Has anyone tried connecting and controlling a robot in this way before with COM port that would be able to provide some help or ideas on the issue? Thank you RE: USB COM port Connection issue-Albert-06-20-2022 This is a nice project. The driver seems to be failing on line 99 when using select to read console input (stdin). It looks like the developer used Linux and you are testing Windows. I would try removing that line/if or replacing it by a simple "if True:". RE: USB COM port Connection issue-GMCG44-06-20-2022 (06-20-2022, 12:10 PM)Albert Wrote:This is a nice project. The driver seems to be failing on line 99 when using select to read console input (stdin). It looks like the developer used Linux and you are testing Windows. Thank you for your reply! Using 'if connected is false:' allows the robot to connect and comes up with the connection status as 'working' but then the program still doesn't actually run on the robot. Any ideas? Each time I click connect it just says 'sending command...' in the log but fails to action it on the robot. Also, when I ping the COM that comes up as failed? but is that just because its a com port and you cant ping a com port? RE: USB COM port Connection issue-Sam-06-20-2022 Have you been able to control your robot remotely with something else than RoboDK? This code is 4 years old and might need some work. You can run the code and debug it through your IDE, sending commands through the command line. It will give you a better idea of what's going on. RE: USB COM port Connection issue-GMCG44-06-22-2022 (06-20-2022, 12:10 PM)Albert Wrote:This is a nice project. The driver seems to be failing on line 99 when using select to read console input (stdin). It looks like the developer used Linux and you are testing Windows. On my windows device the robot connected but upon running the robodk program nothing happened on my actual robot, the log just showed 'sending command...' without the command being executed. This was presumed, as you said, that the driver code was written for a different device. I then used a Mac device, ran the driver code in python which ran fine without any errors but once the driver was connected to robodk it wouldn't connect and the log stated 'no module named serial.' ?? Even though the code runs in python fine and I have proven the serial to be working through using other programs. Therefore can not work out why it is causing an error on Robodk? An image of the log can be seen attached |