Skip to content

Conversation

@Kuwamai
Copy link
Owner

@Kuwamai Kuwamai commented Jun 13, 2019

#4

@Kuwamai Kuwamai changed the title アーム手先位置のリセット 手先位置をリセットするメソッドの追加 Jun 13, 2019
@Kuwamai Kuwamai requested a review from Tiryoh June 13, 2019 12:09
@Kuwamai
Copy link
Owner Author

Kuwamai commented Jun 13, 2019

@Tiryoh reset_poseメソッドで変数zero_poseに保存し、ikメソッドで現在のposeとzero_poseの差分を計算しているのですが、こんな感じで良さそうでしょうか。もっといい方法がありそうな気がするので、アドバイスいただきたいです。

@Kuwamai
Copy link
Owner Author

Kuwamai commented Jun 14, 2019

Resetフラグを書いてみました。

@Kuwamai Kuwamai marked this pull request as ready for review June 14, 2019 05:42
@Kuwamai Kuwamai merged commit 18301ba into master Jun 14, 2019
@Kuwamai Kuwamai deleted the #04_reset_arm_pos branch June 14, 2019 05:43
Copy link
Collaborator

@Tiryoh Tiryoh left a comment

Choose a reason for hiding this comment

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

見ました!研究室で口頭で伝えたけどこのやり方でいいと思います!

self.pose = message.pose
rospy.loginfo(message.pose)

if self.reset_f:
Copy link
Collaborator

Choose a reason for hiding this comment

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

最初だけ呼び出すためならis_firstとかの方がいいんじゃないかなと思いました

Copy link
Owner Author

Choose a reason for hiding this comment

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

ありがとうございます。
この部分なんですが、callbackで逆運動学を何度も呼び出してしまうのがよくなかったので、callbackに分岐を入れずにクラスのinit時にrospy.wait_for_messageで受け取るように変更しました。

6fba39a#diff-60bf28d8bbac7fe82b5b54e2ff2fe498R11

@Kuwamai Kuwamai self-assigned this Jun 16, 2019
@Kuwamai Kuwamai added enhancement New feature or request and removed 新機能実装 labels Aug 7, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

enhancement New feature or request

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants