Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

ROS-119: ouster-ros driver automatic reconnection #361

Merged
merged 12 commits into from
Aug 28, 2024

Conversation

Samahu
Copy link
Contributor

@Samahu Samahu commented Aug 23, 2024

Related Issues & PRs

Summary of Changes

  • Implement sensor reconnection behavior
  • Handle sensor reconfiguration from a cold start
  • Add a flag to enable sensor reconnect (default disabled)
  • properly handle config change outside of the ros driver
  • only persist config startup config if persist_config was set
  • only auto_udp if startup config didn't set an address
  • added a parameter to set the dromant period between re-connection attempts
  • added a parameter to set the maximum number of subsequent failed re-connection attempts

TODO(s)

  • handle sensor reconfiguration from a cold start
  • properly handle config change outside of the ros driver

Known Issues

  • RVIZ can't handle image resize
  • Can't handle points cloud resize properly (erroneous or corrupt PointCloud)
  • Doesn't handle invalid configurations gracefully

Validation

  • Use the driver with default configuration to connect to a sensor & verify normal activity
  • Enable the attempt_reconnect parameter and verify that it works as expected for the following scenarios
    • Starting from an under powered or unconnected sensor
      • Connect or power up the sensor
      • Verify the driver connects successfully within 10-15 seconds
    • Using a powered up and connected sensor
      • Disconnect the sensor and reconnect it
      • Verify the driver connects successfully within 10-15 seconds
    • Using a powered up and connected sensor
      • power down the sensor and power it up
      • Verify the driver connects successfully within 10-15 seconds (and adjusts to sensor persisted config if different)
    • Using a powered up and connected sensor
      • Use set_config to change sensor configuration
      • Verify the driver reconnects successfully within 10-15 seconds
    • Using a powered up and connected sensor
      • Change some setting on through the sensor configuration page
      • Verify the driver reconnects successfully within 10-15 seconds

@Samahu Samahu added the enhancement New feature or request label Aug 23, 2024
@Samahu Samahu self-assigned this Aug 23, 2024
@Samahu Samahu changed the title Implement sensor reconnection behavior ROS-119: driver-reconnection-behavior Aug 23, 2024
@Samahu Samahu changed the title ROS-119: driver-reconnection-behavior ROS-119: ouster-ros driver automatic reconnection Aug 23, 2024
@Samahu Samahu marked this pull request as ready for review August 27, 2024 16:28
}

void create_laser_scan_pubs() {
// NOTE: always create the 2nd topic
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We used to create the 2nd topics only if the current profile supported DUAL returns, however, since the user can potentially switch between different profile on reconnection it wouldn't bound well that we create and destroy topics when switching between dual vs non-dual for downstream consumers.

src/os_sensor_nodelet.cpp Outdated Show resolved Hide resolved
@celentes
Copy link
Collaborator

Would be good to have max_reattempts parameter for some cases - it makes sense to have when sensor connection has been dropped, may not make sense to have when first spinning up the sensor though.

@Samahu Samahu merged commit e59e9a4 into master Aug 28, 2024
1 check passed
@Samahu Samahu deleted the ROS-119-driver-reconnection-behavior branch August 28, 2024 22:27
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Reconnection to sensor Ouster (sensor.launch) Retry connecting to sensor instead of crashing
4 participants