Skip to content

Ros rate is overwritten by action client and is not restored #760

@nakane11

Description

@nakane11

When running a loop in roseus_smach, I noticed that the loop rate becomes faster than the initially specified 10Hz after executing (send *ri* :angle-vector) in one of the nodes.

(setq sm (instance state-machine :init))
...
(ros::rate 10)
(do-until-key
  (ros::spin-once)
  (ros::sleep)
  (send sm :execute userdata :step -1))

I found that this is because the wait-for-result method of the controller-action-client overwrites the rate to 100Hz as seen here:

(ros::rate wait-rate)

I was able to resolve the issue by manually resetting the rate after the angle-vector call.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions