rpi3: '[Errno 22] invalid argument' with rosserial

asked 2017-08-17 11:59:05 -0600

mag.rod gravatar image

updated 2017-08-21 12:04:29 -0600

gvdhoorn gravatar image

I´m using Ubuntu Mate 16.04

rosrun rosserial_python serial_node.py /dev/tty
.... 
IOError: [Errno 22] invalid argument

Edit:

miguel@16G:~$ rosrun rosserial_python serial_node.py /dev/tty
[INFO] [1503295782.506406]: ROS Serial Python Node
[INFO] [1503295782.528603]: Connecting to /dev/tty at 115200 baud
Traceback (most recent call last):
  File "/opt/ros/kinetic/lib/rosserial_python/serial_node.py", line 84, in <module>
    client = SerialClient(port_name, baud)
  File "/opt/ros/kinetic/lib/python2.7/dist-packages/rosserial_python/SerialClient.py", line 344, in __init
    self.port = Serial(port, baud, timeout=self.timeout*0.5)
  File "/opt/ros/kinetic/lib/rosserial_python/serial "/usr/lib/python2.7/dist-packages/serial/serialutil.py", line 180, in 
    __init
  File "/usr/lib/python2.7/dist-packages/serial/serialposix.py", line 605, in _update_dtr_state
    fcntl.ioctl(self.fd, TIOCMBIS, TIOCM_DTR_str) IOError: [Errno 22] Invalid argument
edit retag flag offensive close merge delete

Comments

I don't know the answer to your question, but working with rPi3 in both ubuntu and Jessie, I would say go for the Jessie - in my opinion is smoother with pi :)

angelos.p gravatar imageangelos.p ( 2017-08-19 09:59:36 -0600 )edit

I tried it with Jessi, but I did not get the KINETIC-FULL installation, thank you anyway

mag.rod gravatar imagemag.rod ( 2017-08-20 08:53:25 -0600 )edit

I tried it with Jessi, but I did not get the KINETIC-FULL installation, thank you anyway

mag.rod gravatar imagemag.rod ( 2017-08-20 08:54:51 -0600 )edit

Can you post some more info about the problem you're having? It looks like you've haven't specified the port or baud rate. Normally it should be called like this:

rosrun rosserial_python serial_node.py _port:=/dev/ttyACM1 _baud:=115200
rmck gravatar imagermck ( 2017-08-20 22:21:19 -0600 )edit

@mag.rod: /dev/tty is very likely not an existing serial port device. Make sure to specify the correct one. The example by @rmck shows what that would look like. Also: check how to pass arguments to a rosrun-ed binary.

@rmck: I'm tempted to move your comment to an answer.

gvdhoorn gravatar imagegvdhoorn ( 2017-08-21 01:21:35 -0600 )edit

@mag.rod: if this is a duplicate question, please link us to the question that it is a duplicate of.

Also: with "check how to pass arguments to a rosrun-ed binary", I meant to check how @rmck passed the port and baud arguments (note the underscore (_)).

gvdhoorn gravatar imagegvdhoorn ( 2017-08-21 02:04:53 -0600 )edit

Solutions : sudo chmod 777 /dev/􀄴yACM0 rosrun rosserial_python serial_node.py /dev/ttyACM0

mag.rod gravatar imagemag.rod ( 2017-08-26 11:29:17 -0600 )edit

Please see the answers to #q189457 and #q46790. The former links to How do I allow a non-default user to use serial device ttyUSB0? on SO.

gvdhoorn gravatar imagegvdhoorn ( 2017-08-26 11:33:55 -0600 )edit