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

Install roseus_resume interruption handler for pr2 #485

Closed
wants to merge 5 commits into from

Conversation

knorth55
Copy link
Member

this PR install roseus_resume interruption handler for pr2-interface.
this PR doesn't load roseus_resume when roseus_resume is not found.

cc. @Affonso-Gui

@@ -5,6 +5,17 @@
(require :pr2-utils "package://pr2eus/pr2-utils.l")
(require :robot-interface "package://pr2eus/robot-interface.l")
(require :speak "package://pr2eus/speak.l")
(defvar *enable-roseus-resume* (ros::rospack-find "roseus_resume"))
Copy link
Member

Choose a reason for hiding this comment

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

should we put this code in robot-interface?

(if *enable-roseus-resume*
(progn
(warning-message 3 "Installing interruption handler...~%")
(roseus_resume::install-interruption-handler self
Copy link
Member

Choose a reason for hiding this comment

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

I am not familer with roseus_resume API, but define

(:install-roseus-resume-interruption-handler (args)
 (if *enable-roseus-resume* (progn ...) (progn ....)

in robot-interface or robot-move-base-interface and add

(send self :install-roseus-resume-interaption-handler (list r-gripper-action l-gripper-action))

in pr2-interface.l

  • I am qurious why we do not have to specity joint-trajectory-action?
  • if we need to install all actionclient, may be we try to find them from program code

Copy link
Member

Choose a reason for hiding this comment

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

I think that adding a :install-roseus-resume-interruption-handler method in the robot interface with internal checking is a valid approach for portability.

I am curious why we do not have to specify joint-trajectory-action?

We already have access to joint trajectory actions via the controller-actions slot in the robot interface. So we only need to pass the "additional" actions in initialization.
https://github.com/Affonso-Gui/roseus_resume/blob/eus10/euslisp/interruption-handler.l#L51-L58

if we need to install all actionclient, may be we try to find them from program code

It is theoretically possible to loop through all slots/bindings/symbols and register all instances of ros::simple-action-client.

Copy link
Member Author

Choose a reason for hiding this comment

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

can we add additional controllers into controller-actions?
if not, we can make a new slot for additional controllers such as additional-controller-actions.
If we can do this, we no more need to change codes in fetcheus or baxtereus, we only need to change pr2eus/robot-interface.l.

Copy link
Member Author

Choose a reason for hiding this comment

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

also, we need to change the order.
(send-super* :init args) is normally called at the first of :init, and we need to move :add-controller before send-super.

@Affonso-Gui
Copy link
Member

@k-okada @knorth55 #488

@k-okada
Copy link
Member

k-okada commented Oct 28, 2022

closed via #488

@k-okada k-okada closed this Oct 28, 2022
@knorth55 knorth55 deleted the roseus-resume branch October 28, 2022 01:33
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants