Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat: remove request library (#118) #119

Merged
merged 1 commit into from
Sep 10, 2024
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 1 addition & 2 deletions src/signage/src/signage/route_handler.py
Original file line number Diff line number Diff line change
Expand Up @@ -3,15 +3,14 @@
# This Python file uses the following encoding: utf-8

import os
import requests
import json
from datetime import datetime
import aiohttp

Check warning on line 8 in src/signage/src/signage/route_handler.py

View workflow job for this annotation

GitHub Actions / spellcheck

Unknown word (aiohttp)
import asyncio

Check warning on line 9 in src/signage/src/signage/route_handler.py

View workflow job for this annotation

GitHub Actions / spellcheck

Unknown word (asyncio)

import signage.signage_utils as utils
from tier4_external_api_msgs.msg import DoorStatus
from autoware_adapi_v1_msgs.msg import (

Check warning on line 13 in src/signage/src/signage/route_handler.py

View workflow job for this annotation

GitHub Actions / spellcheck

Unknown word (adapi)
RouteState,
MrmState,
OperationModeState,
Expand Down Expand Up @@ -68,7 +67,7 @@
self._announced_arrive = False
self._trigger_external_signage = False

asyncio.run(self.process_station_list_from_fms())

Check warning on line 70 in src/signage/src/signage/route_handler.py

View workflow job for this annotation

GitHub Actions / spellcheck

Unknown word (asyncio)

self._node.create_timer(0.2, self.route_checker_callback)
self._node.create_timer(0.2, self.emergency_checker_callback)
Expand Down Expand Up @@ -178,7 +177,7 @@

async def process_station_list_from_fms(self, force_update=False):
try:
async with aiohttp.ClientSession() as session:

Check warning on line 180 in src/signage/src/signage/route_handler.py

View workflow job for this annotation

GitHub Actions / spellcheck

Unknown word (aiohttp)
async with session.post(
f"http://{self.AUTOWARE_IP}:4711/v1/services/order",
json=self._fms_payload,
Expand Down Expand Up @@ -286,7 +285,7 @@
self._is_driving = True
self._is_stopping = False
self._announced_depart = False

if (
not self._trigger_external_signage
and self._autoware.information.autoware_control
Expand Down Expand Up @@ -319,10 +318,10 @@

if self._prev_route_state != RouteState.SET:
if self._autoware.information.route_state == RouteState.SET:
asyncio.run(self.process_station_list_from_fms(force_update=True))

Check warning on line 321 in src/signage/src/signage/route_handler.py

View workflow job for this annotation

GitHub Actions / spellcheck

Unknown word (asyncio)

if not self._fms_check_time:
asyncio.run(self.process_station_list_from_fms())

Check warning on line 324 in src/signage/src/signage/route_handler.py

View workflow job for this annotation

GitHub Actions / spellcheck

Unknown word (asyncio)
elif utils.check_timeout(
self._node.get_clock().now(), self._fms_check_time, self._parameter.check_fms_time
):
Expand Down
Loading