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

Exception: EOF Serial port boost::asio::buffer

asked 2017-04-23 22:37:14 -0500

new2ros gravatar image

updated 2017-04-23 23:20:18 -0500

Hi,

I've recently migrated from ROS indigo to ROS kinetic to find that I am getting some issues with running my ROS code on Kinetic, I know the response is due to an EOF read on the serial end but this can't be possible as I have checked the port and it is spitting out data from the minicom command, that and it worked perfectly fine in indigo. Here is the suspect code that is captured in the exception

...
bool receive_next_packet(){
an_packet_t *an_packet;
int bytes_received;

if ((bytes_received = port_.read_some(boost::asio::buffer(an_decoder_pointer(&an_decoder_), an_decoder_size(&an_decoder_)))) > 0) {
    /* increment the decode buffer length by the number of bytes received */
    an_decoder_increment(&an_decoder_, bytes_received);
...

and the exception entry is: [FATAL] [1493003769.565488812]: Exception thrown: read_some: End of file

Also are there any good debuggers people can recommend for diagnosing this in an IDE?, Currently using Eclipse. Any help is much appreciated.

Edit1: Further to this I have found that I am running a more recent release of libboost-dev-all, is this a bug with version 1.58? has anyone else encounter this same issue? I will see if I can install 1.54 as it was on indigo.

Thanks in Advanced

edit retag flag offensive close merge delete

1 Answer

Sort by ยป oldest newest most voted
0

answered 2017-04-24 00:05:26 -0500

new2ros gravatar image

Well looks like the problem is the libboost-dev-all version 1.58 for 16.04 It is suggested that you downgrade to libboost-dev-all version 1.54 or other version as I dont see anything wrong with the code this should be a bug in 1.58. Everything is working after the downgrade.

edit flag offensive delete link more

Comments

Also, avoid the version 1.53 and less which lacks some macros.

AlexisTM gravatar image AlexisTM  ( 2017-04-24 00:51:35 -0500 )edit

Question Tools

Stats

Asked: 2017-04-23 22:37:14 -0500

Seen: 637 times

Last updated: Apr 24 '17