Skip to content

joint_values.pyで初期姿勢のjointを取得して動作に反映するように修正 - #207

Merged
KuraZuzu merged 4 commits into
ros2from
fix/joint_values_py
May 21, 2026
Merged

KuraZuzu merged 4 commits into
ros2from
fix/joint_values_py

Conversation

@KuraZuzu

@KuraZuzu KuraZuzu commented Jul 15, 2025 •

Copy link
Copy Markdown
Contributor

What does this implement/fix?

joint_values.pyサンプルの動作を修正します。
初期状態のjoint値を取得し、その値をもとに目標姿勢を設定するように変更しています。

これにより、たとえば arm.set_goal_state(configuration_name='vertical') のverticalをhomeに変更したときに、一瞬だけhomeの姿勢を取った後すぐに全jointが0になる不具合が解消されます。

Does this close any currently open issues?

しません。

How has this been tested?

環境

  • Ubuntu 24.04 Desktop
    • 6.11.0-29-generic
  • ROS 2 Jazzy
  • Gazebo Harmonic v 8.9.0

手順

Gazeboと実機の両方でテストしました。

Gazebo

ros2 launch crane_x7_gazebo crane_x7_with_table.launch.py 
ros2 launch crane_x7_examples_py example.launch.py example:='joint_values' use_sim_time:='true'

実機

ros2 launch crane_x7_examples demo.launch.py port_name:=/dev/ttyUSB0
ros2 launch crane_x7_examples_py example.launch.py example:='joint_values

Any other comments?

本修正により、C++版のjoint_valuesサンプルと同じ動作になります。

Checklists

@KuraZuzu KuraZuzu added the Type: Bug Bug or Bug fixes label Jul 15, 2025
@KuraZuzu KuraZuzu self-assigned this Jul 15, 2025
@KuraZuzu
KuraZuzu requested a review from Kuwamai July 15, 2025 08:46

@Kuwamai Kuwamai left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

1点コメントしました 🙇

Comment thread crane_x7_examples_py/crane_x7_examples_py/joint_values.py Outdated
Co-authored-by: Kuwamai <kuwagata@rt-net.jp>

@Kuwamai Kuwamai left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

LGTMです

@KuraZuzu
KuraZuzu merged commit 11ca4ab into ros2 May 21, 2026
2 checks passed
@KuraZuzu
KuraZuzu deleted the fix/joint_values_py branch May 21, 2026 09:10
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Type: Bug Bug or Bug fixes

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants