-
Notifications
You must be signed in to change notification settings - Fork 97
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
[Fetch] add servo-off method to fetch-interface.l #1405
[Fetch] add servo-off method to fetch-interface.l #1405
Conversation
fix unintended space
once we send :servo-off command to robot, how do we servo-on the
arm/grippers ?
--
◉ Kei Okada
2021年11月3日(水) 12:16 Shingo Kitagawa ***@***.***>:
… ***@***.**** approved this pull request.
—
You are receiving this because you are subscribed to this thread.
Reply to this email directly, view it on GitHub
<#1405 (review)>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/AADYNXGQRPGKROCN3MURAJTUKCSM7ANCNFSM5HGMRO3A>
.
|
I tried For arm: |
I think
You can move part of fetch by the following command.
jsk_robot/jsk_fetch_robot/fetcheus/fetch-interface.l Lines 16 to 19 in e4262cb
https://github.com/jsk-ros-pkg/jsk_pr2eus/blob/df0fc28a965168744c7d2bd1dd57e6fca8fb9d29/pr2eus/robot-interface.l#L377 You can get the gripper position by the following command.
You can move the gripper by position.
|
If |
@708yamaguchi |
By the way, what is the error message when you cannot servo on? Could you tell me where is the cause of the error? |
When I publish like following, rostopic pub
this message is shown in
I think this part causes messages above. https://github.com/fetchrobotics/robot_controllers/blob/010855f0e6a8e058a1cbd2ad69c324cd97f0d815/robot_controllers_interface/src/controller_manager.cpp#L320-L330 |
Thank you for your report. If we cannot solve this problem by ourselves, let's report it to https://github.com/fetchrobotics/robot_controllers/issues |
I found good test scripts in fetchrobotics/robot_controllers. I tried to stop and start controller with using these scripts, and the same error I previously mentioned occured.
This log is outputted by https://github.com/fetchrobotics/robot_controllers/blob/010855f0e6a8e058a1cbd2ad69c324cd97f0d815/robot_controllers/src/follow_joint_trajectory.cpp#L145-L150 I wonder why the action server seems to be non-active... |
Thanks for your advice.
I'll try checking these lines. |
In my understanding, |
ZebraDevs/robot_controllers#72 (comment) Anyway to execute (send self :angle-vector (send self :state :potentio-vector) 3000 :arm-controller) ;; for arm
...etc is correct. |
;; https://github.com/fetchrobotics/robot_controllers/issues/72 | ||
(when arm | ||
(ros::ros-info "arm servo on") | ||
(send self :angle-vector (send self :state :potentio-vector) 3000 :arm-controller) |
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.
@tkmtnt7000 If 3000 is the minimum number to re-start controller, then it is ok. Otherwise, I we'd better to set this in keyword option.
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.
Thank you for reviewing.
I confirmed minimum time to restart contollers. It is about 60 [msec] as follows.
So I'll set :time
as keyword option. I'll set default time as 500 [msec] for now.
checking minimum time to restart controller
16.irteusgl$ send *ri* :servo-on :time 0
[ INFO] [1637381001.316778487] [/fetch_eus_interface_1637380539071598730]: [arm servo on]
[ INFO] [1637381001.525625578] [/fetch_eus_interface_1637380539071598730]: [;; Planned Trajectory Total Time 0.053 [sec]]
[ INFO] [1637381001.525788490] [/fetch_eus_interface_1637380539071598730]: [;; Scaled Trajectory Total Time 0.053(0.053) [sec]]
[ INFO] [1637381001.525845322] [/fetch_eus_interface_1637380539071598730]: [;; generated 2 points for 0.052928 sec using [arm_with_torso] group]
[ INFO] [1637381001.525893210] [/fetch_eus_interface_1637380539071598730]: [;; will send to (torso_lift_joint shoulder_pan_joint shoulder_lift_joint upperarm_roll_joint elbow_flex_joint forearm_roll_joint wrist_flex_joint wrist_roll_joint)]
[ INFO] [1637381001.525966171] [/fetch_eus_interface_1637380539071598730]: [;; send self :send-trajectory :arm-controller]
[ INFO] [1637381001.909813113] [/fetch_eus_interface_1637380539071598730]: [;; Planned Trajectory Total Time 0.064 [sec]]
[ INFO] [1637381001.909940000] [/fetch_eus_interface_1637380539071598730]: [;; Scaled Trajectory Total Time 0.064(0.064) [sec]]
[ INFO] [1637381001.909974174] [/fetch_eus_interface_1637380539071598730]: [;; generated 2 points for 0.063665 sec using [arm_with_torso] group]
[ INFO] [1637381001.910000743] [/fetch_eus_interface_1637380539071598730]: [;; will send to (torso_lift_joint shoulder_pan_joint shoulder_lift_joint upperarm_roll_joint elbow_flex_joint forearm_roll_joint wrist_flex_joint wrist_roll_joint)]
[ INFO] [1637381001.910035502] [/fetch_eus_interface_1637380539071598730]: [;; send self :send-trajectory :torso-controller]
[ INFO] [1637381001.913013224] [/fetch_eus_interface_1637380539071598730]: [head servo on]
[ INFO] [1637381002.203155503] [/fetch_eus_interface_1637380539071598730]: [;; Planned Trajectory Total Time 0.066 [sec]]
[ INFO] [1637381002.203274844] [/fetch_eus_interface_1637380539071598730]: [;; Scaled Trajectory Total Time 0.066(0.066) [sec]]
[ INFO] [1637381002.203311426] [/fetch_eus_interface_1637380539071598730]: [;; generated 2 points for 0.065561 sec using [arm_with_torso] group]
[ INFO] [1637381002.203357681] [/fetch_eus_interface_1637380539071598730]: [;; will send to (torso_lift_joint shoulder_pan_joint shoulder_lift_joint upperarm_roll_joint elbow_flex_joint forearm_roll_joint wrist_flex_joint wrist_roll_joint)]
[ INFO] [1637381002.203419477] [/fetch_eus_interface_1637380539071598730]: [;; send self :angle-vector :head-controller (#<controller-action-client #X563271925ec0 /head_controller/follow_joint_trajectory>) (without planning)]
[ INFO] [1637381002.210564802] [/fetch_eus_interface_1637380539071598730]: [;; send self :send-trajectory :head-controller]
[ INFO] [1637381002.210622252] [/fetch_eus_interface_1637380539071598730]: [gripper servo on]
#<control_msgs::grippercommandresult #X56327fd17318>
(send (send goal-gripper-servo-off :command) :max_effort -1.0) | ||
(send gripper-action :send-goal goal-gripper-servo-off)))) | ||
(:servo-on (&key (arm t) (gripper t) (head t) (time 500)) | ||
;; the reason why :servo-off and :servo-on has different implementation is in the following issue |
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.
@tkmtnt7000 thank you, the last comment, please add method documentation like https://github.com/jsk-ros-pkg/jsk_pr2eus/blob/ca2d919fe87f61605c10c966af32dcdf8c4f5147/pr2eus/robot-interface.l#L378-L391
(:servo-off (&key (arm t) (gripper t) (head t))
"
Turn servo off for arm/gripper/head motors
- arm : If you do not want to servo off the arm, set nil (default: t)
- gripper : If you do not want to servo off the grippper, set nil (default: t)
- head : If you do not want to servo off the head, set nil (default: t)
"
(:servo-on (&key (arm t) (gripper t) (head t) (time 500))
"Turm upperbody servo on
- arm : If ...
- gripper : ...
- head : ...
- time : [msec] duration to turn servo on, experimentally the minimal duration is about 60[msec]
;; the reason why :servo-off and :servo-on has different implementation is in the following issue
You can find better English explanation of each keyward...
If there is no reason for 500[msec], please set 200 or 300 as default. As you get used to robot experiments, you'll tend to set a lot of sleep
and more duration time.
c.f. https://youtu.be/8o0eU_O3_OY?t=982, https://www.mis.mpg.de/fileadmin/pdf/slides_al_2616.pdf (p.81), https://hlr2016.sciencesconf.org/data/hlr_2016_ta.pdf (p.39), https://www.codyco.eu/images/pdf/2013_Humanoids/Asfour.pdf (p.17)
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.
Thank you very much for advice.
I understand speed is important.
I add the explanation of each keyword and the usage examples of these methods.
Duplicate of knorth55#152
I added
:servo-off
method to fetch-interface.As we do from a joystick, this enables us to turn off arm, gripper and head servos respectively and shift to gravity compensation mode from euslisp.
I use this PR in Fetch-door-open-close demo jsk-ros-pkg/jsk_demos#1348.