Skip to content

Add mcm version querying / identification#32

Draft
skyegalaxy wants to merge 9 commits into
mainfrom
skyegalaxy/mcm-version-introspection
Draft

Add mcm version querying / identification#32
skyegalaxy wants to merge 9 commits into
mainfrom
skyegalaxy/mcm-version-introspection

Conversation

@skyegalaxy

Copy link
Copy Markdown
Member

Adds support for querying MCM identity and firmware versions over the Identify protocol (Identify.dbc), across the library and ROS 2 layers.

On the ROS side, this PR introduces McmIdentity.msg and QueryIdentities.srv. The ~/query_identities service broadcasts an identify msg, waits for responses to come in and returns identifications for each device.

  • Each discovered mcm device identification is also exposed on a per-endpoint latched (transient_local) ~/mcm_identity_bus<b>_sub<s>, topic, published once on on_activate and republished only on change.

Separately, this PR also introduces a fix for MCM entries being reset, but the vector that contains them not being emptied on_cleanup, which left the possibility for duplicate publishers to exist if the node went through multiple state transition cycles

Closes #31


inline bool operator==(const McmIdentity & a, const McmIdentity & b)
{
return a.module_serial_number == b.module_serial_number && a.product_id == b.product_id &&

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

i'd prefer this be broken into a few lines to be a little more readable if possible :P

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

we are of the same mind, which is why I had attempted to do so before checking this in but the linter clobbered my readability changes! fixed in a2d296e

@davidt315 davidt315 left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

accident comment ignore

Skyler Medeiros added 9 commits July 13, 2026 16:01
…them

Signed-off-by: Skyler Medeiros <skye@polymathrobotics.com>
Signed-off-by: Skyler Medeiros <skye@polymathrobotics.com>
Signed-off-by: Skyler Medeiros <skye@polymathrobotics.com>
Signed-off-by: Skyler Medeiros <skye@polymathrobotics.com>
Signed-off-by: Skyler Medeiros <skye@polymathrobotics.com>
Signed-off-by: Skyler Medeiros <skye@polymathrobotics.com>
Signed-off-by: Skyler Medeiros <skye@polymathrobotics.com>
Signed-off-by: Skyler Medeiros <skye@polymathrobotics.com>
Signed-off-by: Skyler Medeiros <skye@polymathrobotics.com>
@skyegalaxy
skyegalaxy force-pushed the skyegalaxy/mcm-version-introspection branch from a2d296e to 6e8e13b Compare July 13, 2026 23:01

/// @brief Get the recorded identity for the named MCM endpoint.
/// @return std::nullopt if no MCM with this bus/subsystem is registered, or none has responded yet.
std::optional<McmIdentity> get_mcm_identity(uint8_t bus_address, uint8_t subsystem_id) const;

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

So this isn't just for MCM. If you look at the different identify dbc files for the different devices you'll notice they're all identical:

https://github.com/polymathrobotics/sygnal/blob/main/sygnal_dbc/database/mcm/Identify.dbc
https://github.com/polymathrobotics/sygnal/blob/main/sygnal_dbc/database/hpo/Identify.dbc
https://github.com/polymathrobotics/sygnal/blob/main/sygnal_dbc/database/cb/Identify.dbc

So when you send an identify command you will get a response from ALL sygnal devices. What we can do initially is to probably catalog all devices that are connected with their default responses. Later we can probably put MCM into MCM structs, HPO into HPO structs when we get the mapping of product ids to devices

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

For now we could also correlate bus_id and subsystem_id with the response content so auto-fill based on what bus_id and subsystem_id they respond with

@zeerekahmad zeerekahmad Jul 15, 2026

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks like you're already passing it into the MCM, so that second point is covered!

But we may want to just record anything that isn't filling an expected object to be recorded somewhere so we have a record of all responses. Then we can forward that information to the right object too?

Basically have 2 parse steps:

  • One records raw indentify response vector of ALL objects detected and one that actually puts it into objects we're expecting like MCMs?

Can be pushed to a separate issue

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Sygnal Library to include getting MCM Version

3 participants