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

[HrpsysSeqStateROSBridge.cpp] avoid segmentation fault when unkown joint name is given to /fullbody_controller/follow_joint_trajectory_action/goal #1121

Merged
merged 3 commits into from
Jun 9, 2022

Conversation

Naoki-Hiraoka
Copy link
Contributor

/fullbody_controller/follow_joint_trajectory_action/goal に、存在しない関節名が与えられるとHrpsysSeqStateROSBridgeがSegmentation Faultで落ちてしまいました。この問題を直すPull Requestです。

存在しない関節名が与えられても無視するようにして、Segmentation Faultで落ちないようにしました。

@Utaro-M のハンドの実験で必要です。

…int name is given to /fullbody_controller/follow_joint_trajectory_action/goal
Copy link

@Takuma-Hiraoka Takuma-Hiraoka left a 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];
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 we should print warning message.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

ありがとうございます。7137679 で追加しました

Copy link
Member

@Utaro-M Utaro-M left a 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が正しく送れること、警告文が出ることを確認しました。

@k-okada k-okada merged commit 07f7e19 into start-jsk:master Jun 9, 2022
@Naoki-Hiraoka
Copy link
Contributor Author

ありがとうございます。

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants