Canvas API
skelarm.canvas
Provides a PyQt6 widget for visualizing the robot arm.
SkelarmCanvas
Bases: QWidget
A widget to draw the robot arm skeleton.
Source code in src/skelarm/canvas.py
__init__(skeleton, parent=None)
Initialize the canvas.
Source code in src/skelarm/canvas.py
paintEvent(a0)
Paint the robot arm.
Source code in src/skelarm/canvas.py
update_skeleton()
world_to_screen(wx, wy, cx, cy)
Convert world coordinates (meters) to screen coordinates (pixels).
Source code in src/skelarm/canvas.py
SkelarmViewer
Bases: QMainWindow
Main window for the Skelarm visualizer.
Source code in src/skelarm/canvas.py
94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 | |
__init__(skeleton)
Initialize the viewer.
Source code in src/skelarm/canvas.py
on_slider_change()
Handle slider value changes.