diff --git a/CHANGELOG.md b/CHANGELOG.md index ee9f0fe..aeac997 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -26,6 +26,7 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0 ### Fixed - Generated code now includes various lint attributes to suppress warnings. +- TCPROS header parsing now ignores (the undocumented fields) response_type and request_type and doesn't produce warnings on them. ### Changed diff --git a/roslibrust/src/ros1/tcpros.rs b/roslibrust/src/ros1/tcpros.rs index 6307760..e78d897 100644 --- a/roslibrust/src/ros1/tcpros.rs +++ b/roslibrust/src/ros1/tcpros.rs @@ -86,6 +86,10 @@ impl ConnectionHeader { // for the purpose of discovering the service type // If you do `rosservice call /my_service` and hit TAB you'll see this field in the connection header // we can ignore it + } else if field.starts_with("response_type=") || field.starts_with("request_type=") { + // More undocumented fields! + // Discovered in testing that some roscpp service servers will set these on service responses + // We can ignore em } else if field.starts_with("error=") { log::error!("Error reported in TCPROS connection header: {field}, full header: {header_data:#?}"); } else {