sonyccd / roboclaw_ros

ros for roboclaw
BSD 2-Clause "Simplified" License
50 stars 92 forks source link

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

Open ItsJas opened 8 years ago

ItsJas commented 8 years ago

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.

sonyccd commented 8 years ago

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

ItsJas commented 8 years ago

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.

sonyccd commented 8 years ago

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

ItsJas commented 8 years ago

Ok, thank you.

ItsJas commented 8 years ago

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.

harsh-bits commented 7 years ago

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

robotjsorg commented 7 years ago

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?

hawkina commented 7 years ago

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

ItsJas commented 7 years ago

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.

vishu2287 commented 6 years ago

@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

Rahul-Ravichandran commented 5 years ago

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

Marabir commented 4 years ago

@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