Supported languages
Apart from python, we have examples of LCM integrations for: In our /examples/language-interop/ dir Types generated (but no examples yet) for: C# and JavaNative Modules
Given LCM is so portable, we can easily run dimos Modules written in third party languagesdimos-lcm Package
Thedimos-lcm package provides base message types that mirror ROS message definitions:
session=lcm_demo ansi=false
Dimos Message Overlays
Dimos subclasses the base LCM types to add Python-friendly features while preserving binary compatibility. For example,dimos.msgs.geometry_msgs.Vector3 extends the LCM base with:
- Multiple constructor overloads (from tuples, numpy arrays, etc.)
- Math operations (
+,-,*,/, dot product, cross product) - Conversions to numpy, quaternions, etc.
session=lcm_demo ansi=false
PointCloud2 with Open3D
A more complex example isPointCloud2, which wraps Open3D point clouds while maintaining LCM binary compatibility:
session=lcm_demo ansi=false
Transport Independence
Since LCM messages encode to bytes, you can use them over any transport:session=lcm_demo ansi=false
Available Message Types
Dimos provides overlays for common message types:| Package | Messages |
|---|---|
geometry_msgs | Vector3, Quaternion, Pose, Twist, Transform |
sensor_msgs | Image, PointCloud2, CameraInfo, LaserScan |
nav_msgs | Odometry, Path, OccupancyGrid |
vision_msgs | Detection2D, Detection3D, BoundingBox2D |
dimos_lcm.*.
Creating Custom Message Types
To create a new message type:- Define the LCM message in
.lcmformat (or use existingdimos_lcmbase) - Create a Python overlay that subclasses the LCM type
- Add
lcm_encode()andlcm_decode()methods if custom serialization is needed
PointCloud2.py and Vector3.py for examples.