sonyccd / roboclaw_ros

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

TypeError: %d format: a number is required, not NoneType #32

Closed ArghyaChatterjee closed 2 years ago

ArghyaChatterjee commented 2 years ago

Hi, I was trying to run your roboclaw node. During launcing, I got the following error:

[ WARN] [1644700619.659559738]: Analyzer specification should now include the package name. You are using a deprecated API. Please switch from GenericAnalyzer to diagnostic_aggregator/GenericAnalyzer in your Analyzer specification.
[WARN] [1644700622.220984]: Could not get version from roboclaw
Traceback (most recent call last):
  File "/home/ecl/catkin_ws/src/roboclaw_ros/roboclaw_node/nodes/roboclaw_[node.py](https://node.py/)", line 305, in <module>
    [node.run](https://node.run/)()
  File "/home/ecl/catkin_ws/src/roboclaw_ros/roboclaw_node/nodes/roboclaw_[node.py](https://node.py/)", line 232, in run
    rospy.logdebug(" Encoders %d %d" % (enc1, enc2))
TypeError: %d format: a number is required, not NoneType
[roboclaw_node-1] process has died [pid 24989, exit code 1, cmd /home/ecl/catkin_ws/src/roboclaw_ros/roboclaw_node/nodes/roboclaw_node.py __name:=roboclaw_node __log:=/home/ecl/.ros/log/ea28366e-8c37-11ec-9748-401c83808469/roboclaw_node-1.log].
log file: /home/ecl/.ros/log/ea28366e-8c37-11ec-9748-401c83808469/roboclaw_node-1*.log

We are kind of stuck. Any solution would help. Thanks in advance.

ArghyaChatterjee commented 2 years ago

I think the problem is related to 2 things. The hardware itself and the launch file. The 2nd one: If the node provides this error at the very beginning everytime during roslaunch, this means that you have changed the default port /dev/ttyACM0 to /dev/ttyUSB0. Never do that, this consumes additional time for no reason. Use the default one and be happy. The 1st one: If the node provides error during running the bot, probably you are using roboclaw with a developer board which is not able to communicate with encoders at that speed realtime. In my case, it was jetson nano which can't handle this much faster communication with wheels. So, the better option is to use it with arduino/raspberry pi and communicate with rosserial communication to the nvidia jetson.

ArghyaChatterjee commented 2 years ago

Closing the issue.