-
Notifications
You must be signed in to change notification settings - Fork 41
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
Conversation
@@ -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")) |
There was a problem hiding this comment.
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 |
There was a problem hiding this comment.
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
There was a problem hiding this comment.
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
.
There was a problem hiding this comment.
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
.
There was a problem hiding this comment.
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
.
closed via #488 |
this PR install
roseus_resume
interruption handler forpr2-interface
.this PR doesn't load
roseus_resume
whenroseus_resume
is not found.cc. @Affonso-Gui