Skip to content

Commit

Permalink
crane_x7とすべき変数名がcrane_plusとなっていたのを修正
Browse files Browse the repository at this point in the history
  • Loading branch information
mizonon committed Oct 25, 2024
1 parent 47ac5ea commit 59a9f5d
Showing 1 changed file with 17 additions and 17 deletions.
34 changes: 17 additions & 17 deletions crane_x7_examples_py/crane_x7_examples_py/pose_groupstate.py
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@
MoveItPy,
PlanRequestParameters,
)
from crane_plus_examples_py.utils import plan_and_execute
from crane_x7_examples_py.utils import plan_and_execute


def main(args=None):
Expand All @@ -33,13 +33,13 @@ def main(args=None):
logger = get_logger("pose_groupstate")

# MoveItPy初期化
crane_plus = MoveItPy(node_name="moveit_py")
crane_plus_arm = crane_plus.get_planning_component("arm")
crane_x7 = MoveItPy(node_name="moveit_py")
crane_x7_arm = crane_x7.get_planning_component("arm")
logger.info("MoveItPy instance created")

# planningのパラメータ設定
plan_request_params = PlanRequestParameters(
crane_plus,
crane_x7,
"ompl_rrtc",
)

Expand All @@ -48,37 +48,37 @@ def main(args=None):
plan_request_params.max_velocity_scaling_factor = 1.0 # Set 0.0 ~ 1.0

# 現在の位置から"home"ポジションに動かす
crane_plus_arm.set_start_state_to_current_state()
crane_plus_arm.set_goal_state(configuration_name="home")
crane_x7_arm.set_start_state_to_current_state()
crane_x7_arm.set_goal_state(configuration_name="home")
plan_and_execute(
crane_plus,
crane_plus_arm,
crane_x7,
crane_x7_arm,
logger,
single_plan_parameters=plan_request_params,
)

# 現在の位置から"vertical"ポジションに動かす
crane_plus_arm.set_start_state_to_current_state()
crane_plus_arm.set_goal_state(configuration_name="vertical")
crane_x7_arm.set_start_state_to_current_state()
crane_x7_arm.set_goal_state(configuration_name="vertical")
plan_and_execute(
crane_plus,
crane_plus_arm,
crane_x7,
crane_x7_arm,
logger,
single_plan_parameters=plan_request_params,
)

# 現在の位置から"home"ポジションに動かす
crane_plus_arm.set_start_state_to_current_state()
crane_plus_arm.set_goal_state(configuration_name="home")
crane_x7_arm.set_start_state_to_current_state()
crane_x7_arm.set_goal_state(configuration_name="home")
plan_and_execute(
crane_plus,
crane_plus_arm,
crane_x7,
crane_x7_arm,
logger,
single_plan_parameters=plan_request_params,
)

# MoveItPyの終了
crane_plus.shutdown()
crane_x7.shutdown()

# rclpyの終了
rclpy.shutdown()
Expand Down

0 comments on commit 59a9f5d

Please sign in to comment.