Repository navigation
Conversation
Host package + UNO R4 firmware for the current MCP2515 @ 500 kbps / MKS SERVO42D stack (J1/J3/J4/J5), with keyboard teleop and a closed-loop RViz twin over UDP into Docker. This is an interim path alongside the carrier SLCAN stack, which Docker Desktop on Windows cannot use for COM. Known open items called out in the package README: - WASD pitch/roll and J1 CW/CCW sense still need hardware confirmation - Coast-DISABLE with live magnetic encoder (35h) is implemented but not fully tested on hardware yet after the latest flash
|
Important
This repository does not receive automatic reviews because it has fewer than 10 stars.
|
Restore digit printI64 and coastCurrentMa=250 on the OG J1/J3/J4/J5 8 MHz / 500 kbps path, and align host/docs labels away from Ma=0.
Use 31h cumulative reads with checksum, force 8Ch respond + SR_vFOC, accept-all MCP filters, and pause ENC TX while the bus is in TXBO so Q-mode hand-follow can lock once CAN ACKs return.
Pitch +/-75 now gates DIFF_A/D (the cmds the host actually sends for pitch) so IRL motors stop with the soft ROM. Xbox sticks/buttons, M sim-only twin jog, and F5 HOME/SETHOME return to the captured startup encoder pose.
ovilikaris-dotcom
left a comment
There was a problem hiding this comment.
Reviewed commit 9f250c2.
The Windows ASCII serial bridge has several blocking issues that need to be addressed before approval:
- Host-loss safety: The watchdog parameter is ignored, and the firmware lacks a demonstrated command-expiry mechanism.
- Emergency stop: A held movement key may issue another command after ESTOP because motion control is not latched disabled.
- Wrist mapping: Pitch/roll encoder feedback does not match the keyboard and firmware command conventions.
- ROS feedback: Incoming serial data is not polled, preventing the expected
/embedded/firmware_lineupdates.
I've added inline comments identifying each issue and the required corrections.
Testing: The previous local review reported 1,305 passing tests, but those tests do not cover the new standalone bridge. Current GitHub x86 and ARM64 CI jobs are failing. The firmware checks pass for their configured sketches, but the new ASCII sketch is not included in that compilation matrix.
Please address the blocking defects, add regression tests, and complete the Windows hardware validation checklist covering movement directions, stopping, disconnection, coast mode and encoder feedback.
Finally, PR #55 states that its approach supersedes this implementation. Please confirm whether PR #54 is still intended to merge or should be closed in favour of #55.
| self._ser: serial.Serial | None = None | ||
| self._last_tx = 0.0 | ||
| self._rx_buf = bytearray() | ||
| _ = watchdog_s |
There was a problem hiding this comment.
The watchdog parameter is currently discarded rather than enforced.
The previous review also found no command-expiry check in the firmware loop. This leaves continuous motion commands without a demonstrated automatic stop when host communication is lost.
Please implement firmware-enforced command expiry so motion stops after the documented timeout, and add regression tests covering host disconnection and command silence.
| print("> ZERO (encoder origin captured, viz bias cleared)") | ||
| elif name == "escape": | ||
| _safe_send(client, protocol.ESTOP) | ||
| held.clear() |
There was a problem hiding this comment.
The emergency-stop handler clears the tracked keys but does not latch motion control into a disabled state.
As identified in the previous review, a physically held movement key can be detected again and issue another motion command after ESTOP.
Please require all motion controls to be released and the operator to explicitly re-enable control before accepting new movement commands. Add a regression test covering a key held continuously through ESTOP.
| out_right = _shaft_rad(c5, WRIST_GEAR) | ||
|
|
||
| # Pitch = average of left/right; roll = differential. | ||
| j4 = 0.5 * (out_left + out_right) |
There was a problem hiding this comment.
The wrist encoder mapping appears inconsistent with the keyboard and firmware command conventions.
The previous review reproduced this issue: opposite wrist motor counts resulted in zero pitch and approximately -1.047 rad roll, although that movement is commanded as pitch.
Please reconcile the motor directions, gear ratios, and pitch/roll mapping with the actual hardware conventions. Add tests verifying that commanded wrist pitch and roll produce matching encoder feedback and RViz joint states.
| self._line_pub.publish(msg) | ||
| self.get_logger().info(f"FW: {line}") | ||
|
|
||
| self._client = UnoSerialClient( |
There was a problem hiding this comment.
The serial client receives an on_line callback, but the previous review found no call to poll_lines() in this ROS node.
Without polling incoming serial data, the callback cannot process received firmware messages, leaving /embedded/firmware_line without the expected updates.
Please add a ROS timer or equivalent receive mechanism to process incoming serial lines, and add a test verifying that firmware messages are published to /embedded/firmware_line.
|
Closing this in favour of #55, which is merged. #55 brings the real arm up through the ground station's own drive, teleop, diagnostics and RViz nodes on the same UNO R4 + MCP2515 hardware, over the carrier's SLCAN link, so the simulation and the real arm share one code path instead of the real arm having its own bridge and teleop. This PR was the reference for the hardware setup: the MCP2515 at 500 kbit/s and which drives are fitted. Thank you for getting the hardware talking. The branch |
Summary
waybionic_embedded_bridge: Windows host ASCII serial teleop + UDP closed-loop RViz twin for the current UNO R4 / MCP2515 @ 500 kbps / MKS SERVO42D stack (J1, J3, J4/J5; J2 unused).firmware/waybionic_ascii_teleop/(encoder stream, gear-aware speed/accel, coast-DISABLE).docs/embedded_ascii_bridge.md. This sits beside the carrierslcanstack — Docker Desktop on Windows cannot open COM ports, so serial stays on the host.Known issues (please read)
W/S= pitch andA/D= roll, with J1 up/down CW/CCW flipped once for local wiring, but physical mounting may still disagree with the URDF twin. Expect follow-up sign fixes.F3=0froze encoder updates on these 42Ds, soDISABLEnow coasts (F3on, runtime Ma=0) and we poll35hraw. Hand-moving a joint afterQand confirming RViz follows has not been verified end-to-end on hardware after the latest flash.POWEROFFremains the hard coil-off path.Test plan
firmware/waybionic_ascii_teleop/waybionic_ascii_teleop.inostart_rviz.ps1thenstart_teleop.ps1on Windows + Docker DesktopQcoast, hand-move a joint, confirm RViz still updates (explicitly untested so far)