Add geographic_msgs (+ uuid_msgs) and regenerate all bindings - #24
Open
leshy wants to merge 5 commits into
Open
Conversation
Vendors ROS geographic_msgs 0.5.6 and its uuid_msgs dependency from
ros-geographic-info, converts them to LCM defs, and regenerates the
Python, C++, C#, Java, Lua, TypeScript and Rust bindings.
17 new types: the 16 geographic_msgs messages (GeoPoint, GeoPose,
GeoPath, GeographicMap, RouteNetwork, WayPoint, ...) plus
uuid_msgs.UniqueID, which they reference for identifiers.
Also registers the two packages in the three hand-maintained package
lists that codegen does not touch:
- generated/python_lcm_msgs/fix_imports.py MSG_PACKAGES (without this
the generated python emits bare `import std_msgs` and fails to load)
- pyproject.toml packages / package-dir
- tools/ts/msgs/{mod.ts,deno.json} exports and decode registry
Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
Both the Rust and TypeScript steps `rm -rf` their whole output directory
before regenerating, but the generators only own part of what lives
there. Every run destroyed generated/rust_lcm_msgs/{.gitignore,tests/}
and generated/ts_lcm_msgs/{mod.ts,deno.json}, so anyone running
generate.sh got four spurious deletions in their diff.
Clear only what each generator actually rewrites: src/ for the Rust
crate (it owns src/ and Cargo.toml), and the per-package directories for
TypeScript (the root files are hand-written in tools/ts/msgs/). The copy
into tools/ts/msgs/generated now takes the package directories
explicitly, which is what it effectively copied before.
Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
flake.lock now points at dimensionalOS/lcm 553171c, which quotes member names that are Lua keywords. Regenerating changes exactly one file: geographic_msgs/RouteSegment.lua, whose "end" field is now emitted as obj["end"] instead of the unparseable obj.end. All 206 generated Lua files pass luac -p (before: 205), and RouteSegment round-trips through encode/decode with the "end" field intact. Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
Both had drifted: dimos_lcm's __init__ said 0.1.0 against pyproject's 0.1.4, and lcm_msgs' said 0.1.1 against its own pyproject's 0.1.2. These are two separate distributions, so each is pinned to its own [project] version rather than to one shared number. Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
lcm_msgs now tracks the same number as dimos_lcm (0.1.2 -> 0.1.4) rather
than carrying its own line, in both its pyproject and its __init__.
generated/ts_lcm_msgs/{deno.json,mod.ts} were left behind when the root
files moved to tools/ts/msgs/ - still on 0.1.5's predecessor and listing
only 14 packages. Bumped to 0.1.5 and given the geographic_msgs and
uuid_msgs entries so they describe what is actually in the directory.
Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
paul-nechifor
approved these changes
Jul 30, 2026
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.
Adds ROS
geographic_msgsas LCM types and regenerates bindings for every language we support.What's here
geographic_msgs0.5.6 anduuid_msgsfrom ros-geographic-info intosources/ros_msgs/(canonical upstream for the kinetic API docs;uuid_msgs/UniqueIDcomes along because 8 of the geographic messages reference it for identifiers).geographic_msgsmessages (GeoPoint,GeoPose,GeoPoseStamped,GeoPoseWithCovariance(Stamped),GeoPath,GeoPointStamped,BoundingBox,KeyValue,WayPoint,MapFeature,GeographicMap,GeographicMapChanges,RouteNetwork,RoutePath,RouteSegment) plusuuid_msgs.UniqueID../generate.sh.Three hand-maintained package lists that codegen does not touch also needed the new packages:
generated/python_lcm_msgs/fix_imports.pyMSG_PACKAGESis hardcoded — without it the generated Python emits bareimport std_msgsandimport geographic_msgs, so the package fails to import at allpyproject.tomlpackages/package-dirfor the PyPI wheeltools/ts/msgs/{mod.ts,deno.json}_registerPackagedecode registryVersion bumps:
dimos_lcm0.1.3 → 0.1.4,@dimos/msgs0.1.4 → 0.1.5 (both publish new packages). Drop them if you'd rather bump at release time.Two fixes that came out of this
RouteSegmentbroke the Lua backend. The ROS message has a field literally namedend, a Lua keyword, and lcm-gen emittedobj.end = nil— a fileluacrefuses to parse. Fixed in our lcm fork (dimensionalOS/lcm#2, merged) by quoting reserved-word names asobj["end"];flake.lockhere bumps to553171cto pick it up. Regenerating changes exactly one file. All 206 generated Lua files now passluac -p, andRouteSegmentround-trips with theendfield intact.generate.shdeleted hand-written files. Both the Rust and TypeScript stepsrm -rf'd their whole output directory before regenerating, destroyinggenerated/rust_lcm_msgs/{.gitignore,tests/}andgenerated/ts_lcm_msgs/{mod.ts,deno.json}on every run — four spurious deletions in anyone's diff. Now each step clears only what its generator actually rewrites. A full run leaves zero unintended deletions.Verification
Cross-language fingerprint + wire check on
GeoPoseStamped— all four runnable targets agree on hash0x7300003f68de379fand an 84-byte encoding:deno checkclean, round-trips, hashes matchcargo check+cargo test(7 passed), round-trips, hashes matchluac -p;RouteSegmentround-trips includingendKnown issues (pre-existing, not fixed here)
C#/Java
std_msgsbreakage.std_msgs.Stringshadows the builtinStringinside thestd_msgsnamespace, so any message with astd_msgs.Headerfails to compile. Verified againstmain: identical failures in untouchedgeometry_msgs(28 C# errors) andstd_msgsitself (9 Java errors, 140 C# errors). Nothing new from this PR; worth its own fix.UniqueID()default doesn't encode. Stock lcm-gen Python defaults the fixedbyte uuid[16]field tob""and encodesself.uuid[:16], so a default-constructedUniqueIDwrites 0 bytes where the decoder expects 16. Populate all 16 bytes before encoding. C++/Rust/TS all handle the fixed array correctly.🤖 Generated with Claude Code