Closed chadrockey closed 9 years ago
@chadrockey , thanks for your PR! I don't have a device handy for testing, but I suppose you've tested this. Looks good to me.
Apart from the sleep(1)
it looks good to me as well.
@mintar I tested on a TIM that had both micro USB and ethernet. I don't have all of the models so there could be cases in some of the parsers if they keep undesirable states and we violate that assumption, but I didn't see any.
@mintar @jspricke I fixed some issues and addressed comments.
I haven't tried it out -- but based on my quick look it LGTM. This would be a very nice improvement (the respawn thrashing can be pretty problematic). Thanks @chadrockey!
Thanks @chadrockey , looks perfect! Could you please squash all 3 commits into one and force-push the branch? I'll merge it then.
Guys, let's just merge this pull request as it is and move the sleep(1) into the outer loop in a seperate one. Ok?
Fine with me.
I found a method that's most consistent for me. Basically, I check in the outer loop if ! ethernet then ros::Duration(1).sleep(). I'll push a squashed updated pull to this later today PST.
Great! I'll merge as soon as you've pushed the update (please also add a comment then, since I don't think I get an email notification on a force-push).
@jspricke @mintar
Forgot about this yesterday.
Updated and squashed version is pushed now.
Thanks a lot again for your work, merged! :-)
@mintar @mikeferguson @jspricke
This pull request enables a more robust driver by resetting the state and attempting to reconnect automatically until the laser enables or ROS shutsdown.
The driver should survive USB disconnects, ethernet disconnects, and laser power disconnects and eventually come back up.