Skip to content

Commit

Permalink
🐛 Bugfix in meshcat_provider
Browse files Browse the repository at this point in the history
- Now the model will be correctly loaded when a custom mesh is set
  • Loading branch information
GiulioRomualdi committed Dec 15, 2022
1 parent 158f7b8 commit e46ae33
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion robot_log_visualizer/robot_visualizer/meshcat_provider.py
Original file line number Diff line number Diff line change
Expand Up @@ -54,13 +54,18 @@ def load_model(self, considered_joints, model_name):
if not model_name in icub_models.get_robot_names():
model_name = "iCubGenova09"

self.custom_model_path = str(icub_models.get_model_file(model_name))
model_loader.loadReducedModelFromFile(
str(icub_models.get_model_file(model_name)), considered_joints
self.custom_model_path, considered_joints
)

if not model_loader.isValid():
return False

self.meshcat_visualizer.load_model(
model_loader.model(), model_name="robot", color=0.8
)
return True

def run(self):
base_rotation = np.eye(3)
Expand Down

0 comments on commit e46ae33

Please sign in to comment.