ROS Resources: Documentation | Support | Discussion Forum | Index | Service Status | Q&A answers.ros.org
Ask Your Question
0

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

Hi,

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?

Thanks!

edit retag flag offensive close merge delete

1 Answer

Sort by ยป oldest newest most voted
1

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 Unix.cc @ 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

Your Answer

Please start posting anonymously - your entry will be published after you log in or create a new account.

Add Answer

Question Tools

1 follower

Stats

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

Seen: 6,464 times

Last updated: Jun 27 '18