Skip to content

Commit 9084b0d

Browse files
committed
use bdsim state object
1 parent e4e07e1 commit 9084b0d

File tree

1 file changed

+8
-9
lines changed

1 file changed

+8
-9
lines changed

roboticstoolbox/blocks/arm.py

Lines changed: 8 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -672,26 +672,25 @@ def __init__(self, robot=None, *inputs, q0=None, backend=None, **kwargs):
672672
self.q0 = q0
673673
self.env = None
674674

675-
def start(self, **kwargs):
675+
def start(self, state, **kwargs):
676676
# create the plot
677677
super().reset()
678-
if self.bd.options.graphics:
679-
self.fig = self.create_figure()
678+
if state.options.graphics:
679+
self.fig = self.create_figure(state)
680680
self.env = self.robot.plot(
681681
self.q0, backend=self.backend, fig=self.fig, block=False
682682
)
683683
super().start()
684684

685-
def step(self):
685+
def step(self, state):
686686
# inputs are set
687-
if self.bd.options.graphics:
688687

689-
self.robot.q = self.inputs[0]
688+
self.robot.q = self.inputs[0]
690689

691-
if self.bd.options.animation:
692-
self.env.step()
690+
if state.options.animation:
691+
self.env.step()
693692

694-
super().step()
693+
super().step(state)
695694

696695
def done(self, block=False, **kwargs):
697696
if self.bd.options.graphics:

0 commit comments

Comments
 (0)