Skip to content

Commit

Permalink
When a joint angle is not given in the initial state, default to 0
Browse files Browse the repository at this point in the history
  • Loading branch information
cmower committed May 31, 2024
1 parent 6c36909 commit c9ec0ac
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion kinpy/visualizer.py
Original file line number Diff line number Diff line change
Expand Up @@ -228,7 +228,7 @@ def _set_joint_slider(self, chain: Chain) -> List[vtk.vtkSliderWidget]:
slider_rep = vtk.vtkSliderRepresentation2D()
slider_rep.SetMinimumValue(-180)
slider_rep.SetMaximumValue(180)
slider_rep.SetValue(np.rad2deg(self._joint_angles[frame.joint.name]))
slider_rep.SetValue(np.rad2deg(self._joint_angles.get(frame.joint.name, 0.0)))
slider_rep.SetSliderLength(0.05)
slider_rep.SetSliderWidth(0.02)
slider_rep.SetEndCapLength(0.01)
Expand Down

0 comments on commit c9ec0ac

Please sign in to comment.