roboclaw_ros icon indicating copy to clipboard operation
roboclaw_ros copied to clipboard

Getting "SpeedM1M2 OSError 11" and "ReadEncM1/2 OSError 11" and movement commands don't work

Open ItsJas opened this issue 8 years ago • 12 comments

I was trying to get my teleop code running with roboclaw as motor controller but I got these warnings when launching the roboclaw.launch. [WARN] [WallTime: 1472045242.277871] SpeedM1M2 OSError: 11 [WARN] [WallTime: 1472045242.376828] ReadEncM1 OSError: 11 [WARN] [WallTime: 1472045242.798931] ReadEncM2 OSError: 11 And of course I was unable to control my robot's wheels with no feedback. Is it the same problem causing the warnings? what could it be? And can such error occur when there is something wrong with the roboclaw's settings? Any help would be appreciated.

ItsJas avatar Aug 24 '16 13:08 ItsJas

That sounds like the driver is outdated now. Will need to get the new python code and replace it

sonyccd avatar Aug 24 '16 14:08 sonyccd

Thank you for your quick answer, where can I find the latest version of the driver? , the one published on github wasn't updated since last year.

ItsJas avatar Aug 24 '16 14:08 ItsJas

O strange, then that might not be the problem. I will need to look into this a bit more.

sonyccd avatar Aug 24 '16 17:08 sonyccd

Ok, thank you.

ItsJas avatar Aug 24 '16 20:08 ItsJas

After changing the roboclaw settings, I was able to move my wheels but the roboclaw takes too long to respond, the speed is too low and I do still have the warnings. In your code you said that OSError 11 may be caused by a synchronization problem with serial. I would be grateful if you explain to me what is probably causing this problem and how to fix it.

ItsJas avatar Aug 29 '16 08:08 ItsJas

Did it finally work? can you upload the altered code here?

harsh-bits avatar Jun 28 '17 15:06 harsh-bits

I am able to use roboclaw_readversion very quickly, but I have noticed that when I replace it with motor commands, the driver gets into a broken state.

Is there any way of implementing callback functionality with the driver (specifically the motor and encoder commands)?

How long does a motor command take to execute? What is the maximum rate (Hz) of motor commands that can be sent to the motors?

jmcmahon443 avatar Jul 26 '17 14:07 jmcmahon443

Are there any updates on this? I get the same error and it kills the odometry of the robot :/

hawkina avatar Sep 01 '17 13:09 hawkina

I has been a while, as soon as I can remember, I was unable to set the parameters values from the launch file. Make sure to give the node the correct arguments, especially the ticks_per_meter and retry again. To be sure that the correct settings are used you can set them in the code directly. In my case the wheels where moving very slowly because the ticks_per_meter was incorrect and too small. If you are able to move the motors, the warning is not a big deal.

ItsJas avatar Sep 05 '17 09:09 ItsJas

@sonyccd @ItsJas . you mentioned that you have changed settings of roboclaw. may i know what changes you have made? i have changed tick per meter according to my encoder. in windows setup i could see encoder data and even motors running but when i try to use ros node i couldn't notice any movement of motors. i am always get this error.

File "/home/vishu/roboclaw_ws/src/roboclaw/nodes/roboclaw_node.py", line 306, in node.run() File "/home/vishu/roboclaw_ws/src/roboclaw/nodes/roboclaw_node.py", line 233, in run rospy.logdebug(" Encoders %d %d" % (enc1, enc2)) TypeError: %d format: a number is required, not NoneType

please help me to solve this

thank you

vishu2287 avatar Jan 26 '18 13:01 vishu2287

Hey, I am having the same issue as mentioned by vishu2287. If someone finds a solution for this, please post it. Thank you

Rahul-Ravichandran avatar Nov 01 '19 12:11 Rahul-Ravichandran

@Rahul-Ravichandran , @vishu2287 I get rid of this error by defying enc1 and enc2 as integers just before this part with enc1 = None, and delete enc1 = None part. But somethimes, roboclaw is lagging and I don't know what can I do with it

Marabir avatar Sep 01 '20 20:09 Marabir