RobotWebTools / rosbridge_suite

Server Implementations of the rosbridge v2 Protocol
https://robotwebtools.github.io
BSD 3-Clause "New" or "Revised" License
919 stars 519 forks source link

"list index out of range" with long topic name in subscriptions #862

Open thomasl-paintup opened 1 year ago

thomasl-paintup commented 1 year ago

Description When using roslibjs, if the topic name is /station/utils/tf/simplified i have the error below, when using /station/utils/simplifiedtf it is working. Didn't find the source of the error.

Steps To Reproduce

let listenerSimplifiedTF = new ROSLIB.Topic({
    ros: getState().ROSBridge.rosBridge,
    name: "/station/utils/tf/simplified",
    messageType: "paintup_msgs/UtilTFSimplified",
});

listenerSimplifiedTF.subscribe((message) => {
    console.log(message);
});

In my launch file :

Node(
    package='rosbridge_server',
    executable='rosbridge_websocket',
    namespace='rosbridge_foxglove',
    parameters=[
        {"port": 9090},
        {"address": ""},
        {"retry_startup_delay": 5.0},
        {"fragment_timeout": 600},
        {"delay_between_messages": 0},
        {"max_message_size": 10000000},
        {"unregister_timeout": 10.0},
        {"use_compression": False},
        {"topics_glob": ""},
        {"services_glob": ""},
        {"params_glob": ""},
        {"bson_only_mode": False}
    ],
),

Error [rosbridge_websocket-1] [ERROR] [1685611515.714429235] [rosbridge_foxglove.rosbridge_websocket]: Exception calling subscribe callback: list index out of range

brean commented 10 months ago

You have an "index out of bounds" error somewhere in your code, I assume you write python because the error message sounds familiar from there. I assume this is not a bug with the ROSBridge-Suite and it can be closed.