gym_donkeycar.core package¶
Submodules¶
gym_donkeycar.core.fps module¶
gym_donkeycar.core.tcp_server module¶
author: Tawn Kramer date: 16 October 2018 file: tcp_server.py notes: a tcp socket server to talk to the unity donkey simulator
-
class
gym_donkeycar.core.tcp_server.
SimHandler
(sock, chunk_size=16384, msg_handler=None)[source]¶ Bases:
asyncore.dispatcher
Handles messages from a single TCP client.
-
handle_read
()[source]¶ Read an incoming message from the client and put it into our outgoing queue. handle_read should only be called when the given socket has data ready to be processed.
-
-
class
gym_donkeycar.core.tcp_server.
SimServer
(address, msg_handler)[source]¶ Bases:
asyncore.dispatcher
Receives network connections and establishes handlers for each client. Each client connection is handled by a new instance of the SteeringHandler class.
-
gym_donkeycar.core.tcp_server.
replace_float_notation
(string)[source]¶ Replace unity float notation for languages like French or German that use comma instead of dot. This convert the json sent by Unity to a valid one. Ex: “test”: 1,2, “key”: 2 -> “test”: 1.2, “key”: 2
Parameters: string – (str) The incorrect json string Returns: (str) Valid JSON string