-
Notifications
You must be signed in to change notification settings - Fork 5
Add configurable robot protrusions to canvas perimeter rendering #9
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -606,6 +606,10 @@ def _get_config_key_label(self, key: str) -> str: | |
| labels = { | ||
| "robot_length_meters": "Robot Length", | ||
| "robot_width_meters": "Robot Width", | ||
| "robot_protrusion_front_meters": "Robot Protrusion Front", | ||
| "robot_protrusion_back_meters": "Robot Protrusion Back", | ||
| "robot_protrusion_left_meters": "Robot Protrusion Left", | ||
| "robot_protrusion_right_meters": "Robot Protrusion Right", | ||
|
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Protrusion config changes skip live canvas updateMedium Severity The protrusion config keys are added to |
||
| "max_velocity_meters_per_sec": "Default Max Velocity", | ||
| "max_acceleration_meters_per_sec2": "Default Max Accel", | ||
| "intermediate_handoff_radius_meters": "Default Handoff Radius", | ||
|
|
||


There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Sim triangle offset uses protrusion-inclusive width
Low Severity
_build_triangleis now called withself.rect().width()andself.rect().height()which include protrusions. Inside_build_triangle,triangle_offset = robot_length_m * 0.3uses this inflated value to position the direction indicator. With asymmetric protrusions, the triangle shifts away from the robot body center into the protrusion area, since the rect origin (0,0) is the body center but the offset is scaled to the full protrusion-inclusive extent. Previously, the actual body dimensions were passed, keeping the triangle within the robot body.Additional Locations (1)
ui/canvas/items/sim.py#L68-L69