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

[pr2eus/robot-interface.l, pr2eus/pr2-interface.l] fix: :wait-interpolation returns :interpolatingp on real robot #191

Merged
merged 2 commits into from
Mar 4, 2016

Conversation

furushchev
Copy link
Member

NOTICE
This PR changes return value of :wait-interpolation

SUMMARY
the return value of :wait-interpolation is defined in docs as below:

return values is a list of interpolatingp for all controllers, so (null (some #'identity (send ri :wait-interpolation))) -> t if all interpolation has stopped

but on real robot it returns (send-all controller-actions :wait-for-result))
So I fixed according with docs.

tested on pr2-simulator and pr1012 real robot.

discussed at #187

@furushchev
Copy link
Member Author

@k-okada @snozawa How do you think of it?

@snozawa
Copy link
Contributor

snozawa commented Dec 4, 2015

I think we also need to discuss the return value of :interpolatingp.

According this discussion,
#187 (comment)
#187 (comment)
do we need to return nil when interpolation is finished and some error occurs.

Questions:

  • Should return values of :wait-interpolation and :interpolatingp be same?
  • :interpolationgp returns t if interpolation finished normally, otherwise returns nil (not finished or finished under some errors). Is this correct?

(return)))
result))

(ros::ros-info "wait-interpolation debug: start")
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

For minor comments, it would be better to add more information for this like
wait-interpolation debug: start of robot-interface's :wait-interpolation

@furushchev
Copy link
Member Author

@snozawa Thank you for revieweing.

  • Should return values of :wait-interpolation and :interpolatingp be same?

No,

  • robot-interface and action-controller instances both have each :interpolatingp method
  • :interpolatingp of robot-interface returns t only when all controllers are not interpolating, otherwise returns nil.
  • :wait-interpolation of robot-interface returns list of results of all controllers' :interpolatingp.

so when robot stops,

:wait-interpolation => (nil nil nil nil)
:interpolating => nil
  • :interpolationgp returns t if interpolation finished normally, otherwise returns nil (not finished or finished under some errors). Is this correct?

I think it returns t only when finished any motion.
When "finished under some errors", it should return nil.

@snozawa
Copy link
Contributor

snozawa commented Dec 4, 2015

Thanks, I see.
LGTM.

k-okada added a commit that referenced this pull request Mar 4, 2016
[pr2eus/robot-interface.l, pr2eus/pr2-interface.l] fix: :wait-interpolation returns :interpolatingp on real robot
@k-okada k-okada merged commit 9612b6c into jsk-ros-pkg:master Mar 4, 2016
@furushchev furushchev deleted the fix-wait-interpolation branch November 6, 2016 10:30
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.

3 participants