Skip to content

Commit

Permalink
Merge pull request #20 from cmower/cmower-mod-vis
Browse files Browse the repository at this point in the history
Update to visualizer: when a joint angle is not given in the initial state, default to 0
  • Loading branch information
neka-nat authored Jun 3, 2024
2 parents 6c36909 + c9ec0ac commit 36f9add
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 36f9add

Please sign in to comment.