# Enabling sensor re-connection in "ouster-ros" driver

**URL:** <https://community.ouster.com/t/enabling-sensor-re-connection-in-ouster-ros-driver/186>\
**Category:** Software\
**Tags:** ros\
**Created:** [September 4, 2024, 10:57pm UTC](https://community.ouster.com/t/enabling-sensor-re-connection-in-ouster-ros-driver/186 "2024-09-04T22:57:24Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![Samahu](https://yyz2.discourse-cdn.com/flex004/user_avatar/community.ouster.com/samahu/32/39_2.png) [@Samahu](https://community.ouster.com/u/Samahu)\
**Post date:** [September 4, 2024, 10:57pm UTC](https://community.ouster.com/t/enabling-sensor-re-connection-in-ouster-ros-driver/186/1 "2024-09-04T22:57:24Z")

</div>

Starting with version 0.12.6 for ROS1 and version 0.12.7 for the ROS2 branch the ouster-ros driver supports automatic sensor re-connection, which allows users to:

- start up the driver before booting up the sensor
- recover connection to the sensor after connection was dropped (wire disconnected)
- recover connection to the sensor after sensor power cycle  
ℹ In case this case the driver will reset configuration to persisted config

To enable this feature set the `attempt_reconnect` ros launch parameter to true (disabled by default). To have control some control over the frequency of attempts users can make uses of the two additional params:

- `dormant_period_between_reconnects`: time to wait between reconnect attempts, default is 1.0 second
- `max_failed_reconnect_attempts`: maximum reconnect attempts, default is 2147483647

Here few of demos of how this feature works

- auto reconnect after wire was disconnected

[![](https://canada1.discourse-cdn.com/flex004/uploads/ouster/original/1X/09747c5de23c2e8ec42f1bb2accc6b4b15733a02.jpeg "reconnect disconnect cable 2024 09 04 08 40 08") ](https://www.youtube.com/watch?v=lL_r69SXZFg)

- change config via `/ouster/set_config` service call, then power cycle the sensor

[![](https://canada1.discourse-cdn.com/flex004/uploads/ouster/original/1X/d9d810952f3f8224d57ee959703435982a5cbd55.jpeg "reconnect power cycle 2024 09 04 08 45 35") ](https://www.youtube.com/watch?v=FppH9kfd37o)

- change the sensor configuration via the sensor config page

[![](https://canada1.discourse-cdn.com/flex004/uploads/ouster/original/1X/78bf3cebdbf0a2bb787a9fcbc75d09be7704255b.jpeg "reconnect change config 2024 09 04 08 49 49") ](https://www.youtube.com/watch?v=Rmf7OchUymg)
