Closed harryman1 closed 8 years ago
Does ros have permission to use that port? This looks like the problem is when the roboclaw driver starts up it creates a port object, that is not happening and when a command tries to run such as roboclaw.ForwardM1(self.address, 0)
it has nothing to talk to.
Thank you, I didn't notice that bit, user is now part of dialout group and also change the permissions to 666 , now it connects
sudo usermod -a -G dialout USERx sudo chmod 666 /dev/ttyACM0
EDIT---
to make this a persistent change, I did add on /etc/udev/rules.d/ a file called 70-roboclaw.rules
SUBSYSTEM=="usb", ATTRS{idVendor}=="03eb", ATTRS{idProduct}=="2404", MODE:="0666", SYMLINK+="roboclaw"
and use this on CLI sudo udevadm control --reload-rules && sudo service udev restart && sudo udevadm trigger
cheers
Thanks I will add this to the ReadMe
Hi
I have tested the ROS driver you had developed and so far is the only one it works :), so Many thanks
however I can't get /odom data and I'm no sure hw to get other data out (i.e. battery readings), I hope this can be part of the C++ version
please advise
Thank you
Date: Fri, 18 Mar 2016 15:44:53 -0700 From: notifications@github.com To: roboclaw_ros@noreply.github.com CC: henryacev@hotmail.com Subject: Re: [roboclaw_ros] ROS problems connecting (#2)
Thanks I will add this to the ReadMe
— You are receiving this because you modified the open/close state. Reply to this email directly or view it on GitHub
Hi
my Roboclaw is connected via USB and it shows as (crw-rw---- 1 root dialout 166, 0 Mar 18 16:34 ttyACM0)
I had checked on the ionmc windows SW and I had set-up speed to be 115200,address 128, had setup and check both encoders and are working as should be.
but when I run the roboclaw_node I got this
core service [/rosout] found process[roboclaw_node-1]: started with pid [6463] process[diagnostic_aggregator-2]: started with pid [6464] [FATAL] [WallTime: 1458318918.777312] Could not connect to Roboclaw Traceback (most recent call last): File "/opt/ros/indigo/lib/python2.7/dist-packages/rospy/core.py", line 402, in signal_shutdown h() File "/home/user/ros/agitr/src/roboclaw_ros/roboclaw_node/nodes/roboclaw_node.py", line 290, in shutdown roboclaw.ForwardM1(self.address, 0) File "/home/user/ros/agitr/src/roboclaw_ros/roboclaw_node/src/roboclaw_driver/roboclaw_driver.py", line 700, in ForwardM1 return _write1(address, Cmd.M1FORWARD, val) File "/home/user/ros/agitr/src/roboclaw_ros/roboclaw_node/src/roboclaw_driver/roboclaw_driver.py", line 335, in _write1 _sendcommand(address, cmd) File "/home/user/ros/agitr/src/roboclaw_ros/roboclaw_node/src/roboclaw_driver/roboclaw_driver.py", line 126, in _sendcommand port.write(chr(address)) NameError: global name 'port' is not defined [WARN] [WallTime: 1458318918.949848] Problem getting roboclaw version Traceback (most recent call last): File "/home/user/ros/agitr/src/roboclaw_ros/roboclaw_node/nodes/roboclaw_node.py", line 304, in
node = Node()
File "/home/user/ros/agitr/src/roboclaw_ros/roboclaw_node/nodes/roboclaw_node.py", line 171, in init
if not version[0]:
UnboundLocalError: local variable 'version' referenced before assignment
[roboclaw_node-1] process has died [pid 6463, exit code 1, cmd /home/user/ros/agitr/src/roboclaw_ros/roboclaw_node/nodes/roboclaw_node.py __name:=roboclaw_node __log:=/home/user/.ros/log/0fdfe700-ed27-11e5-8ac9-a0f3c11ea6b9/roboclaw_node-1.log].
log file: /home/user/.ros/log/0fdfe700-ed27-11e5-8ac9-a0f3c11ea6b9/roboclaw_node-1*.log
^C[diagnostic_aggregator-2] killing on exit