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

ROS custom baud rate on serial port?

asked 2018-06-27 04:31:24 -0600

Hypomania gravatar image

updated 2018-06-27 06:00:48 -0600

gvdhoorn gravatar image


What's the easiest way to set a custom baud rate on Ubuntu 16.04? I am using serial which is based on termios, however it doesn't allow me to use custom baud rates (I just get operation is not supported error). I would like to contain my serial interface within ROS if possible.

I have a sensor that's outputting 128000 baud rate, there is no way to adjust the firmware for that. I have tried using pyserial with 128k baud rate set and it works just fine, is there any way to achieve correct results in ROS?


edit retag flag offensive close merge delete

1 Answer

Sort by ยป oldest newest most voted

answered 2018-06-27 07:37:20 -0600

Hypomania gravatar image

If anyone is interested, I managed to fix it (or work around):

Using the same library, the application that's using it has to be run in "sudo" mode to bypass the exception. Alternatively, you can comment out the exception in @ line 331.

So it says "operation not supported" but it works if ran in sudo mode. As to why it says not supported, I don't know, maybe something to do with me using a VM rather than a physical device.

edit flag offensive delete link more

Question Tools

1 follower


Asked: 2018-06-27 04:31:24 -0600

Seen: 32,394 times

Last updated: Jun 27 '18