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_tutorials] Fix publish status #464

Merged
merged 5 commits into from
Nov 18, 2021

Conversation

shmpwk
Copy link
Contributor

@shmpwk shmpwk commented Jul 31, 2021

During pr2eus_tutorials, robot status is showed on rviz.
Previously, it only shows "click tabletop object in image_view2! though we can click both on rviz and on image_view2.
So I've changed the showing status
from
Screenshot from 2021-07-31 21-30-36
to
Screenshot from 2021-07-31 21-31-13

@@ -210,15 +210,15 @@
(setq *grasp-state* "returning")
(publish-grasp-state)
(pr2-pregrasp-pose)
(publish-info "click tabletop object in Rviz!")
(publish-info "click tabletop object in image_view2!")
(ros::ros-info "click tabletop object in Rviz or in image_view2!")
Copy link
Member

Choose a reason for hiding this comment

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

(defun publish-info (&rest args)
  (let ((s (format nil (car args) (cdr args))))
    (ros::ros-info s)
    (publish-status 'info s)))

publish-info calls both ros::ros-info and 'publish-status, so why you need to call ros::ros-info` twice?

Copy link
Contributor Author

@shmpwk shmpwk Nov 17, 2021

Choose a reason for hiding this comment

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

You're right. (I forgot why I don't use publish-info)

Copy link
Contributor Author

Choose a reason for hiding this comment

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

This is because

(ros::ros-info  (format nil "click tabletop object~%in Rviz or in image_view2!"))

called by

(publish-info (format nil "click tabletop object~%in Rviz or in image_view2!"))

splits the sentence on the command line, which is slightly difficult to read.
Screenshot from 2021-11-17 17-14-10

(publish-info "click tabletop object in Rviz!")
(publish-info "click tabletop object in image_view2!")
(ros::ros-info "click tabletop object in Rviz or in image_view2!")
(publish-status 'info (concatenate string "click tabletop object" '(#\newline) "in Rviz or in image_view2!"))
Copy link
Member

Choose a reason for hiding this comment

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

may be (format nil "click tabletop object~%in Rviz or in image_view2!") seems simpler

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Thank you for your advice, I improve it.

@k-okada k-okada merged commit 9492d39 into jsk-ros-pkg:master Nov 18, 2021
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