Reestablish rosserial-connection

asked 2018-11-27 09:42:44 -0500

krl101 gravatar image

Hi Community,

following setup: PC with roscore and rosserial_embedded serial_node tcp with a tiny rosserial node on an embedded linux board. So far so good, everytinh is working.

Problem: If i have to restart roscore/rosseriay on my PC, i also have to restart my rosseria-node at my tiny linux board - by hand.

Question: Can i anyhow configure my rosserial to reestablish this communication? I have tried to check the return value from nh.spinOnce and rerun nh.initNode(); but with out any progress.

// within main loop
int check = nh.spinOnce();
if ( check == 0)
    printf("ros is okay");
else
{
    printf("ros is NOT okay");
    nh.initNode();
}

Is there the possibility to keep one rosserial node on a dedicated device alive while roscore/rosserial_python is down and later reconnect to it? Maybe the missing timestamps are a problem?

Every helping hand is welcome!

edit retag flag offensive close merge delete