# Resetting cliff event status fails

**URL:** <https://forum.hello-robot.com/t/resetting-cliff-event-status-fails/628>\
**Category:** Ask\
**Created:** [March 7, 2023, 3:43pm UTC](https://forum.hello-robot.com/t/resetting-cliff-event-status-fails/628 "2023-03-07T15:43:22Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![mstaniaszek](https://avatars.discourse-cdn.com/v4/letter/m/7c8e57/32.png) [@mstaniaszek](https://forum.hello-robot.com/u/mstaniaszek)\
**Post date:** [March 7, 2023, 3:43pm UTC](https://forum.hello-robot.com/t/resetting-cliff-event-status-fails/628/1 "2023-03-07T15:43:22Z")

</div>

I’m testing the cliff detector, and seem to have a problem when attempting to reset the cliff event flag after a cliff event.

I have a slightly raised (~1.5cm) platform on which I place the robot, then drive it towards the edge. The runstop correctly activates when the sensors go over the edge.

The instructions at [Robot Sensors - Stretch Documentation](https://docs.hello-robot.com/0.2/stretch-tutorials/stretch_body/tutorial_robot_sensors/#cliff-sensors) indicate that the only way to reset this runstop is with

```auto
import stretch_body.robot
r=stretch_body.robot.Robot()
r.startup()
r.pimu.cliff_event_reset()

```

However, doing this appears to have no effect. I have tried this both with the driving being controlled by the xbox controller (/usr/bin/hello\_robot\_xbox\_teleop.sh), and with the roslaunched driver running and using the keyboard teleop to drive the robot. I suspect that makes no difference to the resets.

When I try resetting I shut down the xbox teleop or ros driver.

I can see that the cliff event is no longer active, as checking the pimu’s `at_cliff` variable shows

```auto
r.pimu.status["at_cliff"]
[False, False, False, False]

```

I also tried using the runstop\_event\_reset function, but that also does nothing.

Is there something else I need to do to release the runstop after a cliff event?

---

<div class="post-metadata">

**Author:** ![aedsinger](https://yyz2.discourse-cdn.com/flex030/user_avatar/forum.hello-robot.com/aedsinger/32/6_2.png) [@aedsinger](https://forum.hello-robot.com/u/aedsinger)\
**Post date:** [March 7, 2023, 5:23pm UTC](https://forum.hello-robot.com/t/resetting-cliff-event-status-fails/628/2 "2023-03-07T17:23:49Z")

</div>

I believe the issue is that you are missing a `push_command` call. This will cause your `cliff_event_reset()` call to get pushed down to the Pimu controller.

Does this work?

```auto
import stretch_body.robot
r=stretch_body.robot.Robot()
r.startup()
r.pimu.cliff_event_reset()
r.pimu.push_command()

```

---

<div class="post-metadata">

**Author:** ![mstaniaszek](https://avatars.discourse-cdn.com/v4/letter/m/7c8e57/32.png) [@mstaniaszek](https://forum.hello-robot.com/u/mstaniaszek)\
**Post date:** [March 9, 2023, 1:02pm UTC](https://forum.hello-robot.com/t/resetting-cliff-event-status-fails/628/3 "2023-03-09T13:02:47Z")

</div>

Thanks - this was indeed the problem. To fully reset the cliff event it’s necessary to push both a `cliff_event_reset` and a `runstop_event_reset`.
