You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
In the DriverNodelet::devicePoll() function if the VelodyneDriver::poll() call fails, the devicePoll thread will exit. This happens if there is a network disconnect, the puck's power cycles etc.
This was requiring me to restart the velodyne Driver nodelet whenever I had a timeout.
Is the intent that there is some other mechanism to restart the DriverNodelet when it is detected it exits? What is the recommended way to do this?
For now I've commented out the break; line. My DriverNodelet::devicePoll() function looks like this:
/** @brief Device poll thread main loop. */
void DriverNodelet::devicePoll()
{
while(ros::ok())
{
// poll device until end of file
running_ = dvr_->poll();
if (!running_)
{
ROS_ERROR("W: DriverNodelet:devicePoll poll failed, who cares?");
// break;
}
}
running_ = false;
}
And now it persists through disconnects and works great, but I'm guessing this is the inappropriate way to do this.
The text was updated successfully, but these errors were encountered:
The ROS_ERROR (or, ROS_ERROR_THROTTLE would probably be better in this case) is the correct way to handle this. I would make the message something more... "professional" like "DriverNodelet::devicePoll - Failed to poll device" for the real message. Would you mind submitting a PR with this change?
In the DriverNodelet::devicePoll() function if the VelodyneDriver::poll() call fails, the devicePoll thread will exit. This happens if there is a network disconnect, the puck's power cycles etc.
This was requiring me to restart the velodyne Driver nodelet whenever I had a timeout.
Is the intent that there is some other mechanism to restart the DriverNodelet when it is detected it exits? What is the recommended way to do this?
For now I've commented out the break; line. My DriverNodelet::devicePoll() function looks like this:
And now it persists through disconnects and works great, but I'm guessing this is the inappropriate way to do this.
The text was updated successfully, but these errors were encountered: