You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Description
When subscribing to a topic with cbor compression on a message with a fixed-length array, like the position_covariance (float64[9]) of the sensor_msgs/NavSatFix message, the rosbridge fails to encode the message and shows this error:
[-] [MultiSubscriber.callback]: Exception calling subscribe callback: 'float' object has no attribute '__slots__'
Description
When subscribing to a topic with
cbor
compression on a message with a fixed-length array, like theposition_covariance
(float64[9]
) of thesensor_msgs/NavSatFix
message, the rosbridge fails to encode the message and shows this error:Steps To Reproduce
roslaunch rosbridge_server rosbridge_websocket.launchrosbridge_server rosbridge_websocket.launch
rostopic pub -r 2 /nav sensor_msgs/NavSatFix "header: seq: 0 stamp: {secs: 0, nsecs: 0} frame_id: '' status: {status: 0, service: 0} latitude: 0.0 longitude: 0.0 altitude: 0.0 position_covariance: [0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0] position_covariance_type: 0"
Expected Behavior
The rosbridge server transmits the cbor encoded to the payload to the client.
Actual Behavior
The rosbridge server fails wit the error:
Note that the issue is the same on
ros2
branch.Origin
In the
cbor_conversion.py
file, theslot_type
is matched against the keys of theTAGGED_ARRAY_FORMATS
dict:rosbridge_suite/rosbridge_library/src/rosbridge_library/internal/cbor_conversion.py
Line 86 in b0d0d71
And in that dict, the syntax supported is only for variable length arrays:
rosbridge_suite/rosbridge_library/src/rosbridge_library/internal/cbor_conversion.py
Line 33 in b0d0d71
While in this case, the variable
slot_type
has the value:float64[9]
So it would be nice to match on strings starting with
float64[
for example.The text was updated successfully, but these errors were encountered: