ROS Resources: Documentation | Support | Discussion Forum | Index | Service Status | ros @ Robotics Stack Exchange
Ask Your Question

Revision history [back]

Well, as much as I dislike answering my own questions on such a site, since having other people's input gives a fresh perspective, I was able to eventually figure things out.

The main issue was that the user "turtlebot" did not have appropriate permissions to open /dev/ttyACM0. One part of the solution involved creating a file for my USB connection, as outlined in a previous post here: How can I get a unique device path for my Arduino/FTDI device

file name:
/etc/udev/rules.d/81-ftdi.rules

file contents:
SUBSYSTEMS=="usb", KERNEL=="ttyACM[0-9]*", ATTRS{idVendor}=="2341", ATTRS{idProduct}=="0001", ATTRS{serial}=="649383233313511011A0", SYMLINK+="uno_rev2", MODE="666", GROUP="turtlebot"

The critical parts that made it work for me are at the end, especially the part MODE="666", GROUP="turtlebot". This mounts the device as being owned by the turtlebot group, so the startup script has no problem connecting to it. Explanation of the remaining parts can be found in the link, except the "ARRTS{serial}" part that I picked up here.

Regards to how I figured out that it was a permission issue, when everything other resource said I should be fine, required diving into the rosserial_python code. I have some code enhancements and will file a bug report / feature request on the update. I has assumed that when ROS outputs this...

[rosout][INFO] 2012-07-13 19:53:19,133: Connected on /dev/ttyACM0 at 57600 baud 

...that it was actually connected. It turns out this statement is printed even before an attempt to open the port is made.

click to hide/show revision 2
added note about launch file update

Well, as much as I dislike answering my own questions on such a site, since having other people's input gives a fresh perspective, I was able to eventually figure things out.

The main issue was that the user "turtlebot" did not have appropriate permissions to open /dev/ttyACM0. One part of the solution involved creating a file for my USB connection, as outlined in a previous post here: How can I get a unique device path for my Arduino/FTDI device

file name:
/etc/udev/rules.d/81-ftdi.rules

file contents:
SUBSYSTEMS=="usb", KERNEL=="ttyACM[0-9]*", ATTRS{idVendor}=="2341", ATTRS{idProduct}=="0001", ATTRS{serial}=="649383233313511011A0", SYMLINK+="uno_rev2", MODE="666", GROUP="turtlebot"

The critical parts that made it work for me are at the end, especially the part MODE="666", GROUP="turtlebot". This mounts the device as being owned by the turtlebot group, so the startup script has no problem connecting to it. Explanation of the remaining parts can be found in the link, except the "ARRTS{serial}" part that I picked up here.

Regards to how I figured out that it was a permission issue, when everything other resource said I should be fine, required diving into the rosserial_python code. I have some code enhancements and will file a bug report / feature request on the update. I has assumed that when ROS outputs this...

[rosout][INFO] 2012-07-13 19:53:19,133: Connected on /dev/ttyACM0 at 57600 baud 

...that it was actually connected. It turns out this statement is printed even before an attempt to open the port is made.

Another thing I had to do was make a small change to the launch file. Since the Arduino is apparently not ready when the launch comes up, I added respawn="true" to the rosserial_python node so it will keep trying until it is ready. I must find a way to set respawn frequency though since it currently is about 1Hz.