Skip to content

Commit

Permalink
Move user_link_names before generate_collision_pair()
Browse files Browse the repository at this point in the history
  • Loading branch information
KolinGuo committed Feb 22, 2024
1 parent adbbba4 commit 20e30a4
Showing 1 changed file with 2 additions and 4 deletions.
6 changes: 2 additions & 4 deletions mplib/planner.py
Original file line number Diff line number Diff line change
Expand Up @@ -72,6 +72,8 @@ def __init__(
verbose=False,
)
self.pinocchio_model = self.robot.get_pinocchio_model()
self.user_link_names = self.pinocchio_model.get_link_names()
self.user_joint_names = self.pinocchio_model.get_joint_names()

self.planning_world = PlanningWorld(
[self.robot],
Expand All @@ -84,10 +86,6 @@ def __init__(
self.generate_collision_pair()
self.robot.update_SRDF(self.srdf)

self.pinocchio_model = self.robot.get_pinocchio_model()
self.user_link_names = self.pinocchio_model.get_link_names()
self.user_joint_names = self.pinocchio_model.get_joint_names()

self.joint_name_2_idx = {}
for i, joint in enumerate(self.user_joint_names):
self.joint_name_2_idx[joint] = i
Expand Down

0 comments on commit 20e30a4

Please sign in to comment.