Repository navigation
feat(inverted_pendulum): adopt common demo infrastructure and snippets, updates & cleanup - #124
Open
EnejiOhieku wants to merge 6 commits into
Open
EnejiOhieku wants to merge 6 commits into
EnejiOhieku wants to merge 6 commits into
Conversation
EnejiOhieku
marked this pull request as draft
October 24, 2026 19:42
ShahazadAbdulla
force-pushed
the
feat/demos-inverted-pendulum-common
branch
from
October 24, 2026 20:05
4af9881 to
a895136
Compare
EnejiOhieku
force-pushed
the
feat/demos-inverted-pendulum-common
branch
4 times, most recently
from
October 26, 2026 14:35
b6308e5 to
8c16701
Compare
EnejiOhieku
force-pushed
the
feat/demos-inverted-pendulum-common
branch
from
October 27, 2026 16:00
8c16701 to
5deb814
Compare
- Refactor inverted_pendulum tier1 and tier2 to use demos/common library - Migrate transport configuration to cdc-ecm and wifi snippets - Decouple stepper/encoder board overlays from network transport - Update user documentation
EnejiOhieku
force-pushed
the
feat/demos-inverted-pendulum-common
branch
from
October 27, 2026 16:07
5deb814 to
c636fc2
Compare
…firmware - Include zenbedded_common/network.hpp; the committed zenbedded_demo_net.hpp header no longer exists and broke every inverted_pendulum build - Adopt ZENBEDDED_ZENOH_LOCATOR / ZENBEDDED_COMMON_USB_CDC Kconfig symbols, replacing stale NTP_SERVER / ZENBEDDED_ZENOH_IP_PORT / ZENBEDDED_DEMO_COMM_* options that tripped "Aborting due to Kconfig warnings" in twister (demos) - Keep board overlays strictly actuator/sensor: transport DTS stays in the cdc-ecm and wifi snippets - Firmware upgrades: SNTP time sync, dedicated 400 Hz encoder sampling thread, move_to projection stepping with hard travel limits, WS2812 status LED - sample.yaml: switch to SNIPPET extra_args and add a dual-transport (cdc-ecm;wifi) test target
…sh ROS stack - New inverted_pendulum_tier1_hardware SystemInterface plugin: subscribes sensor_msgs/msg/JointState from tier1 firmware and publishes control_msgs/msg/JointCommand acceleration commands back to the MCU - Launch: tier selection (1/2), use_mock_hardware and use_rviz arguments - RViz config and URDF refresh for the two-joint pendulum visual - Hook up ament pytest launch integration test for the tier1 relay loop; keep the mock hardware test in conformance
- New README with feature matrix, wiring summary and quickstart for both transport snippets - userdoc.rst: document snippet-based firmware builds (cdc-ecm, wifi, dual), tier1/tier2 launch instructions and the tier1 topic hardware interface
… interface The (name, interface, double*) pointer constructors of StateInterface and CommandInterface were removed from newer hardware_interface releases and broke the lyrical binary build (gcc 15 docker stack). Construct the tier1 handles from names only — matching zenbedded_hardware_interface and mock_pendulum_hardware — and let the LooseHandle values carry state: - on_init: build 4 state handles + 1 command handle names-only, init to 0.0 - read(): set latest q/qdot directly on the handles (no hw_states_ staging) - write(): get_optional<double>() -> last_accel_cmd_ holds the last good acceleration so a NaN command keeps the previous value in the message
EnejiOhieku
marked this pull request as ready for review
October 30, 2026 19:48
EnejiOhieku
requested review from
ShahazadAbdulla,
bmagyar,
kamal2730 and
kpochwala
October 30, 2026 19:48
…ntax and LED behavior - Stepper wiring table now documents the active TMC2209 overlay config (EN=GPIO4, M0=GPIO5, M1=GPIO6, STEP=GPIO7, DIR=GPIO8, 32 microsteps); the A4988 mapping survives as a commented-out overlay node footnote - Unify dual-transport snippets (-S cdc-ecm -S wifi) and drop the invalid "-- "-prefixed west build example; flag order matches validated builds - LED status tables match firmware: solid blue init, flashing green every 250 ms; no red fault color row - README gains the second chrony subnet and a troubleshooting section
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Migrates the
inverted_pendulumdemo (Tier 1 and Tier 2) to the centralizedzenbedded_commoninfrastructure and transport snippets, completing the stacked demo-common work. Also introduces the host-side Tier 1 topic hardware interface.Firmware (Tier 1 & Tier 2)
zenbedded_common/network.hpp(the previously referencedzenbedded_demo_net.hppno longer exists) and adopts theZENBEDDED_ZENOH_LOCATOR/ZENBEDDED_COMMON_USB_CDCKconfig scheme, replacing the staleNTP_SERVER/ZENBEDDED_ZENOH_IP_PORT/ZENBEDDED_DEMO_COMM_*symbols that aborted Kconfig with warnings.zenbedded_commonlibrary into both tiers, sources common Kconfig andprj_common.conf.-S cdc-ecmand-S wifiviazenbedded_common/snippets/; board overlays now contain strictly actuator/sensor definitions (TMC2209 stepper, AS5600 encoder, LED strip).move_toprojection stepping with hard travel limits, WS2812 status LED.SNIPPET=extra_args and a new dual-transport (cdc-ecm;wifi) target.Host side (ROS 2)
inverted_pendulum_tier1_hardwareSystemInterface plugin: subscribessensor_msgs/msg/JointStatefrom Tier 1 firmware and publishescontrol_msgs/msg/JointCommandacceleration commands back to the MCU.tier(1/2),use_mock_hardwareanduse_rvizlaunch arguments; RViz config refresh; URDF refresh.Documentation
userdoc.rstcovering snippet-based builds (cdc-ecm,wifi, dual) and Tier 1 usage.