gramaziokohler / roslibpy

Python ROS Bridge library
MIT License
273 stars 56 forks source link

Add websocket header support to the ROS-client #124

Open TheSpeedM opened 2 months ago

TheSpeedM commented 2 months ago

Description

Some device that I am using has a websocket available that is protected with a token. This token needs to be passed via the websocket connection header. This PR adds websocket header support to the ROS-client.

The headers can be added to the ROS-client like this, also see test_ws_headers.py:


headers = {
    'cookie': 'token=rosbridge',
    'authorization': 'Some auth'
}

client = Ros('127.0.0.1', 9000, headers=headers)

What type of change is this?

I don't see a reason why this couldn't be backwards compatible, but I could be wrong.

Checklist

Questions

gonzalocasas commented 2 months ago

Cool! Thanks!

TheSpeedM commented 1 month ago

Hi @gonzalocasas, any update on getting this merged?

Elian0213 commented 3 weeks ago

Cool! Thanks!

I actually ended up using his repository since I ran into the same issue, would be awesome if this gets merged!