foxglove / ros-foxglove-bridge

Foxglove WebSocket bridge for ROS 1 and ROS 2
MIT License
168 stars 75 forks source link

Invalid service definition #301

Closed tonynajjar closed 5 months ago

tonynajjar commented 5 months ago

Description

Steps To Reproduce

[foxglove_bridge-22] [WARN] [1718109515.363661001] [foxglove_bridge]: Failed to add service /perception/front_left/device_info;(realsense2_camera_msgs/srv/DeviceInfo): Invalid service definition in DeviceInfo.srv: Expected 2 definitions, got 1

The srv seems reasonable https://github.com/IntelRealSense/realsense-ros/blob/ros2-development/realsense2_camera_msgs/srv/DeviceInfo.srv

linear[bot] commented 5 months ago

FG-7859 Invalid service definition

tonynajjar commented 5 months ago

Probably has to do with https://github.com/foxglove/ros-foxglove-bridge/pull/293/files#diff-036a66bbf1adc6f51bb38a16510ec4c99d2aa63ef7b929841902f0c4d337210e? @achim-k

tonynajjar commented 5 months ago

It's weird that I'm not getting the warning for other services that use Trigger.srv that also does not have any field in the request

achim-k commented 5 months ago

Yeah, that's strange. I will take a look, thanks for reporting

Edit: Which ROS distro are you on?

tonynajjar commented 5 months ago

I'm on Humble. I'm reverting your commit and checking if it reproduces

tonynajjar commented 5 months ago

confirmed, checked out the commit before the PR I linked (hash 3e35af32fde80dc42e6c7bea40a2cc32c30170f4) and the issue does not reproduce. Still a mystery why it does not reproduce for Trigger.srv

achim-k commented 5 months ago

The reason is an additional CR 0x0D before the actual line feed 0x0A at the end of the line :sob: Trigger.srv doesn't have it. Will push a fix in a couple of hours.

image

tonynajjar commented 5 months ago

It's impressive how fast you figured out such a hidden issue :laughing: Let me know when you have the fix, I might be still in time to give it a quick test