-
Notifications
You must be signed in to change notification settings - Fork 52
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
[HrpsysSeqStateROSBridge.cpp] avoid segmentation fault when unkown joint name is given to /fullbody_controller/follow_joint_trajectory_action/goal #1121
Conversation
…int name is given to /fullbody_controller/follow_joint_trajectory_action/goal
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.
この変更を適用したところ、jaxon_redのros-bridgeがSegmentation Faultせず、:angle-vectorを送れました。
@@ -188,7 +188,8 @@ void HrpsysSeqStateROSBridge::onJointTrajectory(trajectory_msgs::JointTrajectory | |||
|
|||
trajectory_msgs::JointTrajectoryPoint point = trajectory.points[i]; | |||
for (unsigned int j=0; j < trajectory.joint_names.size(); j++ ) { | |||
body->link(joint_names[j])->q = point.positions[j]; | |||
hrp::Link* l = body->link(joint_names[j]); | |||
if(l) l->q = point.positions[j]; |
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 we should print warning message.
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.
ありがとうございます。7137679 で追加しました
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.
jaxon_red実機で未登録の関節がある場合にもangle-vectorが正しく送れること、警告文が出ることを確認しました。
ありがとうございます。 |
/fullbody_controller/follow_joint_trajectory_action/goal
に、存在しない関節名が与えられるとHrpsysSeqStateROSBridgeがSegmentation Faultで落ちてしまいました。この問題を直すPull Requestです。存在しない関節名が与えられても無視するようにして、Segmentation Faultで落ちないようにしました。
@Utaro-M のハンドの実験で必要です。