Skip to content

fix(blocks): ARMPLOT moves the robot plot, which #873 left pinned to the initial pose - #939

Merged
petercorke merged 1 commit into
mainfrom
fix/armplot-pinned-pose
Nov 15, 2026
Merged

petercorke merged 1 commit into
mainfrom
fix/armplot-pinned-pose

Conversation

@petercorke

@petercorke petercorke commented Nov 15, 2026 •

Copy link
Copy Markdown
Owner

Thanks for contributing to RTB!

Summary

ARMPLOT no longer moves the arm. ArmPlot.start() plots the robot with its initial pose, robot.plot(self.q0, ...), which since #873 pins the robot plot to that pose, so setting robot.q in step() no longer moves it. Every diagram that animates an arm shows the robot frozen at its starting pose.

Found running bdsim's computed-torque model in the ICRA 2026 tutorial notebook, where the scope updated and the robot did not. Confirmed by rendering every frame: the arm geometry was identical in all 304 frames before this change, and distinct in all 304 after.

  • ArmPlot.step() now calls a new ArmPlot._set_pose(q), which sets robot.q and the pose of each robot plot in the scene.
  • _set_pose is the one place that knows how the plots hold a pose, so code that drives the block differently, such as bdsim's notebook support, can call it and not repeat the logic. bdsim's PR for that is fix: notebook ARMPLOT asks the block to move the robot plot bdsim#254.

Public behaviour: the arm in ARMPLOT moves again. No change to numerical results.

Test: test_armplot_follows_its_input runs JTRAJ into ARMPLOT and checks the plotted arm ends at qf. It fails without the change.

This change was written with AI assistance (Claude Code); I have read the diff myself.

Related issue

Regression from #873.

Checklist

  • I checked that no other open PR already addresses this Issue
  • PR title follows Conventional Commits (type: description)
  • Tests pass locally (pytest)
  • Added/updated tests for this change
  • New/changed code is type-hinted with modern syntax
  • Docstrings updated
  • PR is as small/focused as practical
  • I understand that the Codacy check is advisory
  • If this change alters numerical results or public behaviour, I have said so in the summary above
  • If an AI assistant wrote or helped with this change, I have said so in the summary above, and I have read the diff myself
  • No test files, data files, or notebooks specific to your own project

🤖 Generated with Claude Code

…the initial pose

start() plots the robot with its initial pose, which since #873 pins the plot to
that pose, so setting robot.q in step() no longer moved the arm. Set the pose of
each plot as well, in _set_pose(), so that code that drives the block differently
can call it.

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
@codacy-production

Copy link
Copy Markdown

Up to standards ✅

🟢 Issues 0 issues

Results:
0 new issues

View in Codacy

🟢 Metrics 0 complexity · 0 duplication

Metric Results
Complexity 0
Duplication 0

View in Codacy

NEW Get contextual insights on your PRs based on Codacy's metrics, along with PR and Jira context, without leaving GitHub. Enable AI reviewer
TIP This summary will be updated as you push new changes.

@petercorke
petercorke merged commit ebe7e2a into main Nov 15, 2026
25 checks passed
@petercorke
petercorke deleted the fix/armplot-pinned-pose branch November 15, 2026 03:11
@github-actions github-actions Bot mentioned this pull request Nov 15, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant