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

add test to check https://github.com/jsk-enshu/robot-programming/issues/376 #647

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

k-okada
Copy link
Member

@k-okada k-okada commented Nov 8, 2020

  • if user call :wait-for-result, within ros::rate loop, it changed ros::rate at
    (ros::rate wait-rate)
    (while (ros::ok)
    (ros::ros-debug "[~A] :wait-for-result ~A ~A" name-space (simple-goal-states-to-string simple-state) (send comm-state :state))
    (send self :spin-once) ;; spin just before processing status
    (if (= simple-state ros::*simple-goal-state-done*)
    (return))
    (if (> timeout 0)
    (let* ((tm (ros::time- (ros::time-now) start)))
    (if (> (send tm :to-sec) timeout) (return-from :wait-for-result nil))))
    (when return-if-server-down
    (when (= (ros::get-num-publishers result-topic) 0)
    (ros::ros-error "[~A] Unexpected returns from :wait-for-result : no publishers found for ~A" name-space result-topic)
    (return-from :wait-for-result nil))
    (when (and status-stamp maximum-status-interval (> (send (ros::time- (ros::time-now) status-stamp) :to-sec) maximum-status-interval))
    (ros::ros-error "[~A] Unexpected returns from :wait-for-result : status did not received for 5 seconds" name-space)
    (return-from :wait-for-result nil)))
    (ros::sleep))
  • add test-rate.l test-rate.test

@pazeshun
Copy link

pazeshun commented Nov 9, 2020

@k-okada
jsk-ros-pkg/jsk_pr2eus#444 で、:wait-for-result:wait-rateをうまく変えて任意の周期でループが回るようにしているので、この機能自体はなくしたくないところです。あんまりわかってないんですが、https://github.com/jsk-ros-pkg/jsk_roseus/blob/1.7.4/roseus/roseus.cpp#L145s_rateの値を返す関数を作って、それを:wait-for-resultの最初で呼び出して値を保存し、:wait-for-resultの最後で保存しておいた値を復元したらよいんでしょうか?

@Kanazawanaoaki
(ros::rate ~)の設定後にjsk-ros-pkg/jsk_pr2eus#444:wait-interpolation-until-funcを呼び出すと、設定が上書きされてしまうので注意してください。

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants