Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5

USB COM port Connection issue

#1
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


Attached Files Thumbnail(s)

#2
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:".
#3
(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.

I would try removing that line/if or replacing it by a simple "if True:".

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?


Attached Files Image(s)

#4
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.
Please read theForum Guidelinesbefore posting!
Find useful information about RoboDK by visiting our2022世界杯32强赛程表时间 .
#5
(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.

I would try removing that line/if or replacing it by a simple "if True:".

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.' ??
即使代码在运行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


Attached Files Thumbnail(s)





Users browsing this thread:
1 Guest(s)