Skip to content

Commit

Permalink
NavSatFix map fix due to OSM tile server being stricter about HTTP he…
Browse files Browse the repository at this point in the history
…aders; fix ros-install-this for noetic
  • Loading branch information
dheera committed Jul 9, 2021
1 parent 91ff697 commit 7ef5fc3
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 3 deletions.
7 changes: 6 additions & 1 deletion rosshow/ros-install-this
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,12 @@ source $ROS_REAL_ROOT/setup.bash
cd $TEMP_DIR/src/
catkin_init_workspace
cd $TEMP_DIR/
catkin_make

if [ $ROS_DISTRO == "noetic" ]; then
catkin_make -DPYTHON_EXECUTABLE=/usr/bin/python3
else
catkin_make
fi

echo
echo "You may be now be asked for your sudo password to complete installation."
Expand Down
8 changes: 6 additions & 2 deletions rosshow/src/librosshow/viewers/sensor_msgs/NavSatFixViewer.py
Original file line number Diff line number Diff line change
Expand Up @@ -45,9 +45,13 @@ def __missing__(self, key):
@memoize
def get_tile(xtile, ytile, zoom):
try:
url = 'http://a.tile.openstreetmap.org/%s/%s/%s.png' % (zoom, xtile, ytile)
url = 'https://a.tile.openstreetmap.org/%s/%s/%s.png' % (zoom, xtile, ytile)
response = requests.get(url, headers = {
"User-agent": "Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/80.0.3987.116 Safari/537.36",
"User-Agent": "Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/90.0.4430.212 Safari/537.36",
"Accept-Language": "en-US,en;q=0.9",
"Http-Upgrade-Insecure-Requests": "1",
"Accept": "text/html,application/xhtml+xml,application/xml;q=0.9,image/avif,image/webp,image/apng,*/*;q=0.8,application/signed-exchange;v=b3;q=0.9",
"Dnt": "1",
})
img = Image.open(BytesIO(response.content))
except IOError:
Expand Down

0 comments on commit 7ef5fc3

Please sign in to comment.