-
Notifications
You must be signed in to change notification settings - Fork 88
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
Allow to change to torque control mode #1326
base: master
Are you sure you want to change the base?
Changes from 25 commits
91ec2f2
108fb6b
3eb9a0f
0a39c13
8846a8b
228ce6f
ef3910b
e3adcb7
e827887
4ede167
9c750dc
81d2f79
cee9a70
6584025
b8d1516
cbed8f4
134ec67
84941fc
ea83f7a
64ddc71
53e70f4
34c8f9f
d068033
42f6519
d8d245f
b439493
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -665,9 +665,11 @@ bool robot::checkJointCommands(const double *i_commands) | |
bool robot::checkEmergency(emg_reason &o_reason, int &o_id) | ||
{ | ||
int state; | ||
joint_control_mode mode; | ||
for (unsigned int i=0; i<numJoints(); i++){ | ||
read_servo_state(i, &state); | ||
if (state == ON && m_servoErrorLimit[i] != 0){ | ||
read_control_mode(i, &mode); | ||
if (state == ON && m_servoErrorLimit[i] != 0 && mode != JCM_TORQUE){ | ||
Comment on lines
665
to
+672
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. In current JSK JAXON control board's imprementation,
While the robot is hanged by the crane, we use JCM_TORQUE with high position pdgain. After the robot is put on the ground, we reduce position pdgain (or set position pdgain to zero). If JCM_TORQUE with high position pdgain, servoErrorLimitCheck is necessary. We currently modify
After this PR is merged, JCM_TORQUE mode always disables servoErrorLimitCheck. So we have to change our software. @kindsenior |
||
double angle, command; | ||
read_actual_angle(i, &angle); | ||
read_command_angle(i, &command); | ||
|
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.
Are these necessary? They are not called in this PR.
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.
@fkanehiro In this PR they are not used, but in the
PosTorqueCtrl-rebase
branch ofhrp5p-iob
, that I will try to merge soon, I have a standalone program calledmodify_joint_limits
(https://github.com/isri-aist/hrp5p-iob/blob/PosTorqueCtrl-rebase/iob/modify_joint_limits.cpp) that uses those functionsThere 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.
If they are not relevant to this PR, I think they should be removed from this PR.
In addition, as adding APIs will break compatibility, you need to use
ROBOT_IOB_VERSION
to add APIs.Moreover, I prefer not to add these APIs. Because they will enable normal users to implement dangerous programs.
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.
Got it... I have removed these APIs in d8d245f