# Action Feedback is not publishing at 1 Hz

**URL:** <https://get-help.theconstruct.ai/t/action-feedback-is-not-publishing-at-1-hz/230>\
**Category:** ROS Basics In 5 Days (Python)\
**Tags:** rospy\
**Created:** [August 2, 2019, 3:28pm UTC](https://get-help.theconstruct.ai/t/action-feedback-is-not-publishing-at-1-hz/230 "2019-08-02T15:28:30Z")\
**Posts on this page:** 1\
**Showing post:** 2

<div class="post-metadata">

**Author:** ![bayodesegun](https://get-help.theconstruct.ai/user_avatar/get-help.theconstruct.ai/bayodesegun/32/10684_2.png) [@bayodesegun](https://get-help.theconstruct.ai/u/bayodesegun)\
**Post date:** [August 2, 2019, 4:54pm UTC](https://get-help.theconstruct.ai/t/action-feedback-is-not-publishing-at-1-hz/230/2 "2019-08-02T16:54:33Z")

</div>

Hi @nrjbs87, the Rate object is useless outside a loop:

> **[Proper use of rospy.Rate or ros::Rate](https://get-help.theconstruct.ai/t/proper-use-of-rospy-rate-or-ros-rate/59)**
>
> Background I created this topic because I frequently come across the use of rospy.Rate (ROS Python) and ros::Rate (ROS C++) in places where they are not needed. By the way, what is this Rate thingy? According to ROS Wiki, rospy.Rate and ...

For things to work as expected,

- you need to publish the feedback in a loop.
- `self.rate.sleep()` will need to be in the loop as well.

Something like:

```auto
# be careful here: don't use a condition that will never be false
# otherwise your action will never finish!
while some_condition_is_true:  
    self._feedback.feedback = command
    self._as.publish_feedback(self._feedback)
    self.rate.sleep()

```

That said, I don’t think publishing the feedback every second will work out of the box though, because the whole action will be completed in probably less than a second. Of course, you can intentionally make the action last longer just to have some fun!

---

_[View the full topic](https://get-help.theconstruct.ai/t/action-feedback-is-not-publishing-at-1-hz/230)._
